1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package composer provides access to the Cloud Composer API.
8//
9// For product documentation, see: https://cloud.google.com/composer/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/composer/v1beta1"
16//   ...
17//   ctx := context.Background()
18//   composerService, err := composer.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   composerService, err := composer.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   composerService, err := composer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package composer // import "google.golang.org/api/composer/v1beta1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "composer:v1beta1"
75const apiName = "composer"
76const apiVersion = "v1beta1"
77const basePath = "https://composer.googleapis.com/"
78
79// OAuth2 scopes used by this API.
80const (
81	// View and manage your data across Google Cloud Platform services
82	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
83)
84
85// NewService creates a new Service.
86func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
87	scopesOption := option.WithScopes(
88		"https://www.googleapis.com/auth/cloud-platform",
89	)
90	// NOTE: prepend, so we don't override user-specified scopes.
91	opts = append([]option.ClientOption{scopesOption}, opts...)
92	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
93	client, endpoint, err := htransport.NewClient(ctx, opts...)
94	if err != nil {
95		return nil, err
96	}
97	s, err := New(client)
98	if err != nil {
99		return nil, err
100	}
101	if endpoint != "" {
102		s.BasePath = endpoint
103	}
104	return s, nil
105}
106
107// New creates a new Service. It uses the provided http.Client for requests.
108//
109// Deprecated: please use NewService instead.
110// To provide a custom HTTP client, use option.WithHTTPClient.
111// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
112func New(client *http.Client) (*Service, error) {
113	if client == nil {
114		return nil, errors.New("client is nil")
115	}
116	s := &Service{client: client, BasePath: basePath}
117	s.Projects = NewProjectsService(s)
118	return s, nil
119}
120
121type Service struct {
122	client    *http.Client
123	BasePath  string // API endpoint base URL
124	UserAgent string // optional additional User-Agent fragment
125
126	Projects *ProjectsService
127}
128
129func (s *Service) userAgent() string {
130	if s.UserAgent == "" {
131		return googleapi.UserAgent
132	}
133	return googleapi.UserAgent + " " + s.UserAgent
134}
135
136func NewProjectsService(s *Service) *ProjectsService {
137	rs := &ProjectsService{s: s}
138	rs.Locations = NewProjectsLocationsService(s)
139	return rs
140}
141
142type ProjectsService struct {
143	s *Service
144
145	Locations *ProjectsLocationsService
146}
147
148func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
149	rs := &ProjectsLocationsService{s: s}
150	rs.Environments = NewProjectsLocationsEnvironmentsService(s)
151	rs.ImageVersions = NewProjectsLocationsImageVersionsService(s)
152	rs.Operations = NewProjectsLocationsOperationsService(s)
153	return rs
154}
155
156type ProjectsLocationsService struct {
157	s *Service
158
159	Environments *ProjectsLocationsEnvironmentsService
160
161	ImageVersions *ProjectsLocationsImageVersionsService
162
163	Operations *ProjectsLocationsOperationsService
164}
165
166func NewProjectsLocationsEnvironmentsService(s *Service) *ProjectsLocationsEnvironmentsService {
167	rs := &ProjectsLocationsEnvironmentsService{s: s}
168	return rs
169}
170
171type ProjectsLocationsEnvironmentsService struct {
172	s *Service
173}
174
175func NewProjectsLocationsImageVersionsService(s *Service) *ProjectsLocationsImageVersionsService {
176	rs := &ProjectsLocationsImageVersionsService{s: s}
177	return rs
178}
179
180type ProjectsLocationsImageVersionsService struct {
181	s *Service
182}
183
184func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
185	rs := &ProjectsLocationsOperationsService{s: s}
186	return rs
187}
188
189type ProjectsLocationsOperationsService struct {
190	s *Service
191}
192
193// AllowedIpRange: Allowed IP range with user-provided description.
194type AllowedIpRange struct {
195	// Description: Optional. User-provided description. It must contain at
196	// most 300 characters.
197	Description string `json:"description,omitempty"`
198
199	// Value: IP address or range, defined using CIDR notation, of requests
200	// that this
201	// rule applies to. You can use the wildcard character "*" to match all
202	// IPs
203	// equivalent to "0/0" and "::/0" together.
204	// Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
205	//           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
206	//
207	//
208	// <p>IP range prefixes should be properly truncated. For
209	// example,
210	// `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for
211	// IPv6,
212	// `2001:db8::1/32` should be truncated to `2001:db8::/32`.
213	Value string `json:"value,omitempty"`
214
215	// ForceSendFields is a list of field names (e.g. "Description") to
216	// unconditionally include in API requests. By default, fields with
217	// empty values are omitted from API requests. However, any non-pointer,
218	// non-interface field appearing in ForceSendFields will be sent to the
219	// server regardless of whether the field is empty or not. This may be
220	// used to include empty fields in Patch requests.
221	ForceSendFields []string `json:"-"`
222
223	// NullFields is a list of field names (e.g. "Description") to include
224	// in API requests with the JSON null value. By default, fields with
225	// empty values are omitted from API requests. However, any field with
226	// an empty value appearing in NullFields will be sent to the server as
227	// null. It is an error if a field in this list has a non-empty value.
228	// This may be used to include null fields in Patch requests.
229	NullFields []string `json:"-"`
230}
231
232func (s *AllowedIpRange) MarshalJSON() ([]byte, error) {
233	type NoMethod AllowedIpRange
234	raw := NoMethod(*s)
235	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
236}
237
238// Empty: A generic empty message that you can re-use to avoid defining
239// duplicated
240// empty messages in your APIs. A typical example is to use it as the
241// request
242// or the response type of an API method. For instance:
243//
244//     service Foo {
245//       rpc Bar(google.protobuf.Empty) returns
246// (google.protobuf.Empty);
247//     }
248//
249// The JSON representation for `Empty` is empty JSON object `{}`.
250type Empty struct {
251	// ServerResponse contains the HTTP response code and headers from the
252	// server.
253	googleapi.ServerResponse `json:"-"`
254}
255
256// Environment: An environment for running orchestration tasks.
257type Environment struct {
258	// Config: Configuration parameters for this environment.
259	Config *EnvironmentConfig `json:"config,omitempty"`
260
261	// CreateTime: Output only. The time at which this environment was
262	// created.
263	CreateTime string `json:"createTime,omitempty"`
264
265	// Labels: Optional. User-defined labels for this environment.
266	// The labels map can contain no more than 64 entries. Entries of the
267	// labels
268	// map are UTF8 strings that comply with the following restrictions:
269	//
270	// * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62}
271	// * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
272	// * Both keys and values are additionally constrained to be <= 128
273	// bytes in
274	// size.
275	Labels map[string]string `json:"labels,omitempty"`
276
277	// Name: The resource name of the environment, in the
278	// form:
279	// "projects/{projectId}/locations/{locationId}/environments/{envir
280	// onmentId}"
281	//
282	// EnvironmentId must start with a lowercase letter followed by up to
283	// 63
284	// lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
285	Name string `json:"name,omitempty"`
286
287	// State: The current state of the environment.
288	//
289	// Possible values:
290	//   "STATE_UNSPECIFIED" - The state of the environment is unknown.
291	//   "CREATING" - The environment is in the process of being created.
292	//   "RUNNING" - The environment is currently running and healthy. It is
293	// ready for use.
294	//   "UPDATING" - The environment is being updated. It remains usable
295	// but cannot receive
296	// additional update requests or be deleted at this time.
297	//   "DELETING" - The environment is undergoing deletion. It cannot be
298	// used.
299	//   "ERROR" - The environment has encountered an error and cannot be
300	// used.
301	State string `json:"state,omitempty"`
302
303	// UpdateTime: Output only. The time at which this environment was last
304	// modified.
305	UpdateTime string `json:"updateTime,omitempty"`
306
307	// Uuid: Output only. The UUID (Universally Unique IDentifier)
308	// associated with this environment.
309	// This value is generated when the environment is created.
310	Uuid string `json:"uuid,omitempty"`
311
312	// ServerResponse contains the HTTP response code and headers from the
313	// server.
314	googleapi.ServerResponse `json:"-"`
315
316	// ForceSendFields is a list of field names (e.g. "Config") to
317	// unconditionally include in API requests. By default, fields with
318	// empty values are omitted from API requests. However, any non-pointer,
319	// non-interface field appearing in ForceSendFields will be sent to the
320	// server regardless of whether the field is empty or not. This may be
321	// used to include empty fields in Patch requests.
322	ForceSendFields []string `json:"-"`
323
324	// NullFields is a list of field names (e.g. "Config") to include in API
325	// requests with the JSON null value. By default, fields with empty
326	// values are omitted from API requests. However, any field with an
327	// empty value appearing in NullFields will be sent to the server as
328	// null. It is an error if a field in this list has a non-empty value.
329	// This may be used to include null fields in Patch requests.
330	NullFields []string `json:"-"`
331}
332
333func (s *Environment) MarshalJSON() ([]byte, error) {
334	type NoMethod Environment
335	raw := NoMethod(*s)
336	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
337}
338
339// EnvironmentConfig: Configuration information for an environment.
340type EnvironmentConfig struct {
341	// AirflowUri: Output only. The URI of the Apache Airflow Web UI hosted
342	// within this environment (see
343	// [Airflow
344	// web
345	// interface](/composer/docs/how-to/accessing/airflow-web-interface))
346	// .
347	AirflowUri string `json:"airflowUri,omitempty"`
348
349	// DagGcsPrefix: Output only. The Cloud Storage prefix of the DAGs for
350	// this environment. Although Cloud
351	// Storage objects reside in a flat namespace, a hierarchical file
352	// tree
353	// can be simulated using "/"-delimited object name prefixes. DAG
354	// objects for
355	// this environment reside in a simulated directory with the given
356	// prefix.
357	DagGcsPrefix string `json:"dagGcsPrefix,omitempty"`
358
359	// GkeCluster: Output only. The Kubernetes Engine cluster used to run
360	// this environment.
361	GkeCluster string `json:"gkeCluster,omitempty"`
362
363	// NodeConfig: The configuration used for the Kubernetes Engine cluster.
364	NodeConfig *NodeConfig `json:"nodeConfig,omitempty"`
365
366	// NodeCount: The number of nodes in the Kubernetes Engine cluster that
367	// will be
368	// used to run this environment.
369	NodeCount int64 `json:"nodeCount,omitempty"`
370
371	// PrivateEnvironmentConfig: The configuration used for the Private IP
372	// Cloud Composer environment.
373	PrivateEnvironmentConfig *PrivateEnvironmentConfig `json:"privateEnvironmentConfig,omitempty"`
374
375	// SoftwareConfig: The configuration settings for software inside the
376	// environment.
377	SoftwareConfig *SoftwareConfig `json:"softwareConfig,omitempty"`
378
379	// WebServerNetworkAccessControl: Optional. The network-level access
380	// control policy for the Airflow web server. If
381	// unspecified, no network-level access restrictions will be applied.
382	WebServerNetworkAccessControl *WebServerNetworkAccessControl `json:"webServerNetworkAccessControl,omitempty"`
383
384	// ForceSendFields is a list of field names (e.g. "AirflowUri") to
385	// unconditionally include in API requests. By default, fields with
386	// empty values are omitted from API requests. However, any non-pointer,
387	// non-interface field appearing in ForceSendFields will be sent to the
388	// server regardless of whether the field is empty or not. This may be
389	// used to include empty fields in Patch requests.
390	ForceSendFields []string `json:"-"`
391
392	// NullFields is a list of field names (e.g. "AirflowUri") to include in
393	// API requests with the JSON null value. By default, fields with empty
394	// values are omitted from API requests. However, any field with an
395	// empty value appearing in NullFields will be sent to the server as
396	// null. It is an error if a field in this list has a non-empty value.
397	// This may be used to include null fields in Patch requests.
398	NullFields []string `json:"-"`
399}
400
401func (s *EnvironmentConfig) MarshalJSON() ([]byte, error) {
402	type NoMethod EnvironmentConfig
403	raw := NoMethod(*s)
404	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
405}
406
407// IPAllocationPolicy: Configuration for controlling how IPs are
408// allocated in the
409// GKE cluster.
410type IPAllocationPolicy struct {
411	// ClusterIpv4CidrBlock: Optional. The IP address range used to allocate
412	// IP addresses to pods in
413	// the cluster.
414	//
415	// This field is applicable only when `use_ip_aliases` is true.
416	//
417	// Set to blank to have GKE choose a range with the default size.
418	//
419	// Set to /netmask (e.g. `/14`) to have GKE choose a range with a
420	// specific
421	// netmask.
422	//
423	// Set to
424	// a
425	// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
426	//
427	// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks
428	// (e.g.
429	// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific
430	// range
431	// to use.
432	// Specify `cluster_secondary_range_name` or
433	// `cluster_ipv4_cidr_block`
434	// but not both.
435	ClusterIpv4CidrBlock string `json:"clusterIpv4CidrBlock,omitempty"`
436
437	// ClusterSecondaryRangeName: Optional. The name of the cluster's
438	// secondary range used to allocate
439	// IP addresses to pods. Specify either
440	// `cluster_secondary_range_name`
441	// or `cluster_ipv4_cidr_block` but not both.
442	//
443	// This field is applicable only when `use_ip_aliases` is true.
444	ClusterSecondaryRangeName string `json:"clusterSecondaryRangeName,omitempty"`
445
446	// ServicesIpv4CidrBlock: Optional. The IP address range of the services
447	// IP addresses in this
448	// cluster.
449	//
450	// This field is applicable only when `use_ip_aliases` is true.
451	//
452	// Set to blank to have GKE choose a range with the default size.
453	//
454	// Set to /netmask (e.g. `/14`) to have GKE choose a range with a
455	// specific
456	// netmask.
457	//
458	// Set to
459	// a
460	// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
461	//
462	// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks
463	// (e.g.
464	// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific
465	// range
466	// to use.
467	// Specify `services_secondary_range_name` or
468	// `services_ipv4_cidr_block`
469	// but not both.
470	ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"`
471
472	// ServicesSecondaryRangeName: Optional. The name of the services'
473	// secondary range used to allocate
474	// IP addresses to the cluster. Specify either
475	// `services_secondary_range_name`
476	// or `services_ipv4_cidr_block` but not both.
477	//
478	// This field is applicable only when `use_ip_aliases` is true.
479	ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName,omitempty"`
480
481	// UseIpAliases: Optional. Whether or not to enable Alias IPs in the GKE
482	// cluster.
483	// If `true`, a VPC-native cluster is created.
484	UseIpAliases bool `json:"useIpAliases,omitempty"`
485
486	// ForceSendFields is a list of field names (e.g.
487	// "ClusterIpv4CidrBlock") to unconditionally include in API requests.
488	// By default, fields with empty values are omitted from API requests.
489	// However, any non-pointer, non-interface field appearing in
490	// ForceSendFields will be sent to the server regardless of whether the
491	// field is empty or not. This may be used to include empty fields in
492	// Patch requests.
493	ForceSendFields []string `json:"-"`
494
495	// NullFields is a list of field names (e.g. "ClusterIpv4CidrBlock") to
496	// include in API requests with the JSON null value. By default, fields
497	// with empty values are omitted from API requests. However, any field
498	// with an empty value appearing in NullFields will be sent to the
499	// server as null. It is an error if a field in this list has a
500	// non-empty value. This may be used to include null fields in Patch
501	// requests.
502	NullFields []string `json:"-"`
503}
504
505func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) {
506	type NoMethod IPAllocationPolicy
507	raw := NoMethod(*s)
508	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
509}
510
511// ImageVersion: Image Version information
512type ImageVersion struct {
513	// ImageVersionId: The string identifier of the ImageVersion, in the
514	// form:
515	// "composer-x.y.z-airflow-a.b(.c)"
516	ImageVersionId string `json:"imageVersionId,omitempty"`
517
518	// IsDefault: Whether this is the default ImageVersion used by Composer
519	// during
520	// environment creation if no input ImageVersion is specified.
521	IsDefault bool `json:"isDefault,omitempty"`
522
523	// SupportedPythonVersions: supported python versions
524	SupportedPythonVersions []string `json:"supportedPythonVersions,omitempty"`
525
526	// ForceSendFields is a list of field names (e.g. "ImageVersionId") to
527	// unconditionally include in API requests. By default, fields with
528	// empty values are omitted from API requests. However, any non-pointer,
529	// non-interface field appearing in ForceSendFields will be sent to the
530	// server regardless of whether the field is empty or not. This may be
531	// used to include empty fields in Patch requests.
532	ForceSendFields []string `json:"-"`
533
534	// NullFields is a list of field names (e.g. "ImageVersionId") to
535	// include in API requests with the JSON null value. By default, fields
536	// with empty values are omitted from API requests. However, any field
537	// with an empty value appearing in NullFields will be sent to the
538	// server as null. It is an error if a field in this list has a
539	// non-empty value. This may be used to include null fields in Patch
540	// requests.
541	NullFields []string `json:"-"`
542}
543
544func (s *ImageVersion) MarshalJSON() ([]byte, error) {
545	type NoMethod ImageVersion
546	raw := NoMethod(*s)
547	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
548}
549
550// ListEnvironmentsResponse: The environments in a project and location.
551type ListEnvironmentsResponse struct {
552	// Environments: The list of environments returned by a
553	// ListEnvironmentsRequest.
554	Environments []*Environment `json:"environments,omitempty"`
555
556	// NextPageToken: The page token used to query for the next page if one
557	// exists.
558	NextPageToken string `json:"nextPageToken,omitempty"`
559
560	// ServerResponse contains the HTTP response code and headers from the
561	// server.
562	googleapi.ServerResponse `json:"-"`
563
564	// ForceSendFields is a list of field names (e.g. "Environments") to
565	// unconditionally include in API requests. By default, fields with
566	// empty values are omitted from API requests. However, any non-pointer,
567	// non-interface field appearing in ForceSendFields will be sent to the
568	// server regardless of whether the field is empty or not. This may be
569	// used to include empty fields in Patch requests.
570	ForceSendFields []string `json:"-"`
571
572	// NullFields is a list of field names (e.g. "Environments") to include
573	// in API requests with the JSON null value. By default, fields with
574	// empty values are omitted from API requests. However, any field with
575	// an empty value appearing in NullFields will be sent to the server as
576	// null. It is an error if a field in this list has a non-empty value.
577	// This may be used to include null fields in Patch requests.
578	NullFields []string `json:"-"`
579}
580
581func (s *ListEnvironmentsResponse) MarshalJSON() ([]byte, error) {
582	type NoMethod ListEnvironmentsResponse
583	raw := NoMethod(*s)
584	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
585}
586
587// ListImageVersionsResponse: The ImageVersions in a project and
588// location.
589type ListImageVersionsResponse struct {
590	// ImageVersions: The list of supported ImageVersions in a location.
591	ImageVersions []*ImageVersion `json:"imageVersions,omitempty"`
592
593	// NextPageToken: The page token used to query for the next page if one
594	// exists.
595	NextPageToken string `json:"nextPageToken,omitempty"`
596
597	// ServerResponse contains the HTTP response code and headers from the
598	// server.
599	googleapi.ServerResponse `json:"-"`
600
601	// ForceSendFields is a list of field names (e.g. "ImageVersions") to
602	// unconditionally include in API requests. By default, fields with
603	// empty values are omitted from API requests. However, any non-pointer,
604	// non-interface field appearing in ForceSendFields will be sent to the
605	// server regardless of whether the field is empty or not. This may be
606	// used to include empty fields in Patch requests.
607	ForceSendFields []string `json:"-"`
608
609	// NullFields is a list of field names (e.g. "ImageVersions") to include
610	// in API requests with the JSON null value. By default, fields with
611	// empty values are omitted from API requests. However, any field with
612	// an 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
618func (s *ListImageVersionsResponse) MarshalJSON() ([]byte, error) {
619	type NoMethod ListImageVersionsResponse
620	raw := NoMethod(*s)
621	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
622}
623
624// ListOperationsResponse: The response message for
625// Operations.ListOperations.
626type ListOperationsResponse struct {
627	// NextPageToken: The standard List next-page token.
628	NextPageToken string `json:"nextPageToken,omitempty"`
629
630	// Operations: A list of operations that matches the specified filter in
631	// the request.
632	Operations []*Operation `json:"operations,omitempty"`
633
634	// ServerResponse contains the HTTP response code and headers from the
635	// server.
636	googleapi.ServerResponse `json:"-"`
637
638	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
639	// unconditionally include in API requests. By default, fields with
640	// empty values are omitted from API requests. However, any non-pointer,
641	// non-interface field appearing in ForceSendFields will be sent to the
642	// server regardless of whether the field is empty or not. This may be
643	// used to include empty fields in Patch requests.
644	ForceSendFields []string `json:"-"`
645
646	// NullFields is a list of field names (e.g. "NextPageToken") to include
647	// in API requests with the JSON null value. By default, fields with
648	// empty values are omitted from API requests. However, any field with
649	// an empty value appearing in NullFields will be sent to the server as
650	// null. It is an error if a field in this list has a non-empty value.
651	// This may be used to include null fields in Patch requests.
652	NullFields []string `json:"-"`
653}
654
655func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
656	type NoMethod ListOperationsResponse
657	raw := NoMethod(*s)
658	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
659}
660
661// NodeConfig: The configuration information for the Kubernetes Engine
662// nodes running
663// the Apache Airflow software.
664type NodeConfig struct {
665	// DiskSizeGb: Optional. The disk size in GB used for node VMs. Minimum
666	// size is 20GB.
667	// If unspecified, defaults to 100GB. Cannot be updated.
668	DiskSizeGb int64 `json:"diskSizeGb,omitempty"`
669
670	// IpAllocationPolicy: Optional. The IPAllocationPolicy fields for the
671	// GKE cluster.
672	IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"`
673
674	// Location: Optional. The Compute Engine
675	// [zone](/compute/docs/regions-zones) in which
676	// to deploy the VMs used to run the Apache Airflow software, specified
677	// as a
678	// [relative
679	// resource
680	// name](/apis/design/resource_names#relative_resource_name). For
681	// example:
682	// "projects/{projectId}/zones/{zoneId}".
683	//
684	// This `location` must belong to the enclosing environment's project
685	// and
686	// location. If both this field and `nodeConfig.machineType` are
687	// specified,
688	// `nodeConfig.machineType` must belong to this `location`; if both
689	// are
690	// unspecified, the service will pick a zone in the Compute Engine
691	// region
692	// corresponding to the Cloud Composer location, and propagate that
693	// choice to
694	// both fields. If only one field (`location` or
695	// `nodeConfig.machineType`) is
696	// specified, the location information from the specified field will
697	// be
698	// propagated to the unspecified field.
699	Location string `json:"location,omitempty"`
700
701	// MachineType: Optional. The Compute Engine
702	// [machine type](/compute/docs/machine-types) used for cluster
703	// instances,
704	// specified as a
705	// [relative
706	// resource
707	// name](/apis/design/resource_names#relative_resource_name). For
708	// example:
709	// "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTyp
710	// eId}".
711	//
712	// The `machineType` must belong to the enclosing environment's project
713	// and
714	// location. If both this field and `nodeConfig.location` are
715	// specified,
716	// this `machineType` must belong to the `nodeConfig.location`; if both
717	// are
718	// unspecified, the service will pick a zone in the Compute Engine
719	// region
720	// corresponding to the Cloud Composer location, and propagate that
721	// choice to
722	// both fields. If exactly one of this field and `nodeConfig.location`
723	// is
724	// specified, the location information from the specified field will
725	// be
726	// propagated to the unspecified field.
727	//
728	// The `machineTypeId` must not be a [shared-core
729	// machine
730	// type](/compute/docs/machine-types#sharedcore).
731	//
732	// If this field is unspecified, the `machineTypeId` defaults
733	// to "n1-standard-1".
734	MachineType string `json:"machineType,omitempty"`
735
736	// Network: Optional. The Compute Engine network to be used for
737	// machine
738	// communications, specified as a
739	// [relative
740	// resource
741	// name](/apis/design/resource_names#relative_resource_name). For
742	// example:
743	// "projects/{projectId}/global/networks/{networkId}".
744	//
745	// If unspecified, the default network in the environment's project is
746	// used.
747	// If a [Custom Subnet
748	// Network](/vpc/docs/vpc#vpc_networks_and_subnets)
749	// is provided, `nodeConfig.subnetwork` must also be provided.
750	// For
751	// [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements,
752	// see
753	// `nodeConfig.subnetwork`.
754	Network string `json:"network,omitempty"`
755
756	// OauthScopes: Optional. The set of Google API scopes to be made
757	// available on all
758	// node VMs. If `oauth_scopes` is empty, defaults
759	// to
760	// ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be
761	// updated.
762	OauthScopes []string `json:"oauthScopes,omitempty"`
763
764	// ServiceAccount: Optional. The Google Cloud Platform Service Account
765	// to be used by the node
766	// VMs. If a service account is not specified, the "default" Compute
767	// Engine
768	// service account is used. Cannot be updated.
769	ServiceAccount string `json:"serviceAccount,omitempty"`
770
771	// Subnetwork: Optional. The Compute Engine subnetwork to be used for
772	// machine
773	// communications, specified as a
774	// [relative
775	// resource
776	// name](/apis/design/resource_names#relative_resource_name). For
777	// example:
778	// "projects/{projectId}/regions/{regionId}/subnetworks/{subnetw
779	// orkId}"
780	//
781	// If a subnetwork is provided, `nodeConfig.network` must also be
782	// provided,
783	// and the subnetwork must belong to the enclosing environment's project
784	// and
785	// location.
786	Subnetwork string `json:"subnetwork,omitempty"`
787
788	// Tags: Optional. The list of instance tags applied to all node VMs.
789	// Tags are used
790	// to identify valid sources or targets for network firewalls. Each tag
791	// within
792	// the list must comply with
793	// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
794	// Cannot be updated.
795	Tags []string `json:"tags,omitempty"`
796
797	// ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
798	// unconditionally include in API requests. By default, fields with
799	// empty values are omitted from API requests. However, any non-pointer,
800	// non-interface field appearing in ForceSendFields will be sent to the
801	// server regardless of whether the field is empty or not. This may be
802	// used to include empty fields in Patch requests.
803	ForceSendFields []string `json:"-"`
804
805	// NullFields is a list of field names (e.g. "DiskSizeGb") to include in
806	// API requests with the JSON null value. By default, fields with empty
807	// values are omitted from API requests. However, any field with an
808	// empty value appearing in NullFields will be sent to the server as
809	// null. It is an error if a field in this list has a non-empty value.
810	// This may be used to include null fields in Patch requests.
811	NullFields []string `json:"-"`
812}
813
814func (s *NodeConfig) MarshalJSON() ([]byte, error) {
815	type NoMethod NodeConfig
816	raw := NoMethod(*s)
817	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
818}
819
820// Operation: This resource represents a long-running operation that is
821// the result of a
822// network API call.
823type Operation struct {
824	// Done: If the value is `false`, it means the operation is still in
825	// progress.
826	// If `true`, the operation is completed, and either `error` or
827	// `response` is
828	// available.
829	Done bool `json:"done,omitempty"`
830
831	// Error: The error result of the operation in case of failure or
832	// cancellation.
833	Error *Status `json:"error,omitempty"`
834
835	// Metadata: Service-specific metadata associated with the operation.
836	// It typically
837	// contains progress information and common metadata such as create
838	// time.
839	// Some services might not provide such metadata.  Any method that
840	// returns a
841	// long-running operation should document the metadata type, if any.
842	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
843
844	// Name: The server-assigned name, which is only unique within the same
845	// service that
846	// originally returns it. If you use the default HTTP mapping,
847	// the
848	// `name` should be a resource name ending with
849	// `operations/{unique_id}`.
850	Name string `json:"name,omitempty"`
851
852	// Response: The normal response of the operation in case of success.
853	// If the original
854	// method returns no data on success, such as `Delete`, the response
855	// is
856	// `google.protobuf.Empty`.  If the original method is
857	// standard
858	// `Get`/`Create`/`Update`, the response should be the resource.  For
859	// other
860	// methods, the response should have the type `XxxResponse`, where
861	// `Xxx`
862	// is the original method name.  For example, if the original method
863	// name
864	// is `TakeSnapshot()`, the inferred response type
865	// is
866	// `TakeSnapshotResponse`.
867	Response googleapi.RawMessage `json:"response,omitempty"`
868
869	// ServerResponse contains the HTTP response code and headers from the
870	// server.
871	googleapi.ServerResponse `json:"-"`
872
873	// ForceSendFields is a list of field names (e.g. "Done") to
874	// unconditionally include in API requests. By default, fields with
875	// empty values are omitted from API requests. However, any non-pointer,
876	// non-interface field appearing in ForceSendFields will be sent to the
877	// server regardless of whether the field is empty or not. This may be
878	// used to include empty fields in Patch requests.
879	ForceSendFields []string `json:"-"`
880
881	// NullFields is a list of field names (e.g. "Done") to include in API
882	// requests with the JSON null value. By default, fields with empty
883	// values are omitted from API requests. However, any field with an
884	// empty value appearing in NullFields will be sent to the server as
885	// null. It is an error if a field in this list has a non-empty value.
886	// This may be used to include null fields in Patch requests.
887	NullFields []string `json:"-"`
888}
889
890func (s *Operation) MarshalJSON() ([]byte, error) {
891	type NoMethod Operation
892	raw := NoMethod(*s)
893	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
894}
895
896// OperationMetadata: Metadata describing an operation.
897type OperationMetadata struct {
898	// CreateTime: Output only. The time the operation was submitted to the
899	// server.
900	CreateTime string `json:"createTime,omitempty"`
901
902	// EndTime: Output only. The time when the operation terminated,
903	// regardless of its success.
904	// This field is unset if the operation is still ongoing.
905	EndTime string `json:"endTime,omitempty"`
906
907	// OperationType: Output only. The type of operation being performed.
908	//
909	// Possible values:
910	//   "TYPE_UNSPECIFIED" - Unused.
911	//   "CREATE" - A resource creation operation.
912	//   "DELETE" - A resource deletion operation.
913	//   "UPDATE" - A resource update operation.
914	OperationType string `json:"operationType,omitempty"`
915
916	// Resource: Output only. The resource being operated on, as a [relative
917	// resource name](
918	// /apis/design/resource_names#relative_resource_name).
919	Resource string `json:"resource,omitempty"`
920
921	// ResourceUuid: Output only. The UUID of the resource being operated
922	// on.
923	ResourceUuid string `json:"resourceUuid,omitempty"`
924
925	// State: Output only. The current operation state.
926	//
927	// Possible values:
928	//   "STATE_UNSPECIFIED" - Unused.
929	//   "PENDING" - The operation has been created but is not yet started.
930	//   "RUNNING" - The operation is underway.
931	//   "SUCCESSFUL" - The operation completed successfully.
932	//   "FAILED" - The operation is no longer running but did not succeed.
933	State string `json:"state,omitempty"`
934
935	// ForceSendFields is a list of field names (e.g. "CreateTime") to
936	// unconditionally include in API requests. By default, fields with
937	// empty values are omitted from API requests. However, any non-pointer,
938	// non-interface field appearing in ForceSendFields will be sent to the
939	// server regardless of whether the field is empty or not. This may be
940	// used to include empty fields in Patch requests.
941	ForceSendFields []string `json:"-"`
942
943	// NullFields is a list of field names (e.g. "CreateTime") to include in
944	// API requests with the JSON null value. By default, fields with empty
945	// values are omitted from API requests. However, any field with an
946	// empty value appearing in NullFields will be sent to the server as
947	// null. It is an error if a field in this list has a non-empty value.
948	// This may be used to include null fields in Patch requests.
949	NullFields []string `json:"-"`
950}
951
952func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
953	type NoMethod OperationMetadata
954	raw := NoMethod(*s)
955	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
956}
957
958// PrivateClusterConfig: Configuration options for the private GKE
959// cluster in a Cloud Composer
960// environment.
961type PrivateClusterConfig struct {
962	// EnablePrivateEndpoint: Optional. If `true`, access to the public
963	// endpoint of the GKE cluster is
964	// denied.
965	EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"`
966
967	// MasterIpv4CidrBlock: The IP range in CIDR notation to use for the
968	// hosted master network. This
969	// range is used for assigning internal IP addresses to the
970	// cluster
971	// master or set of masters and to the internal load balancer virtual
972	// IP.
973	// This range must not overlap with any other ranges in use
974	// within the cluster's network. If left blank, the default value
975	// of
976	// '172.16.0.0/28' is used.
977	MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"`
978
979	// ForceSendFields is a list of field names (e.g.
980	// "EnablePrivateEndpoint") to unconditionally include in API requests.
981	// By default, fields with empty values are omitted from API requests.
982	// However, any non-pointer, non-interface field appearing in
983	// ForceSendFields will be sent to the server regardless of whether the
984	// field is empty or not. This may be used to include empty fields in
985	// Patch requests.
986	ForceSendFields []string `json:"-"`
987
988	// NullFields is a list of field names (e.g. "EnablePrivateEndpoint") to
989	// include in API requests with the JSON null value. By default, fields
990	// with empty values are omitted from API requests. However, any field
991	// with an empty value appearing in NullFields will be sent to the
992	// server as null. It is an error if a field in this list has a
993	// non-empty value. This may be used to include null fields in Patch
994	// requests.
995	NullFields []string `json:"-"`
996}
997
998func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) {
999	type NoMethod PrivateClusterConfig
1000	raw := NoMethod(*s)
1001	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1002}
1003
1004// PrivateEnvironmentConfig: The configuration information for
1005// configuring a Private IP Cloud Composer
1006// environment.
1007type PrivateEnvironmentConfig struct {
1008	// EnablePrivateEnvironment: Optional. If `true`, a Private IP Cloud
1009	// Composer environment is created.
1010	// If this field is true, `use_ip_aliases` must be true.
1011	EnablePrivateEnvironment bool `json:"enablePrivateEnvironment,omitempty"`
1012
1013	// PrivateClusterConfig: Optional. Configuration for the private GKE
1014	// cluster for a Private IP
1015	// Cloud Composer environment.
1016	PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"`
1017
1018	// ForceSendFields is a list of field names (e.g.
1019	// "EnablePrivateEnvironment") to unconditionally include in API
1020	// requests. By default, fields with empty values are omitted from API
1021	// requests. However, any non-pointer, non-interface field appearing in
1022	// ForceSendFields will be sent to the server regardless of whether the
1023	// field is empty or not. This may be used to include empty fields in
1024	// Patch requests.
1025	ForceSendFields []string `json:"-"`
1026
1027	// NullFields is a list of field names (e.g. "EnablePrivateEnvironment")
1028	// to include in API requests with the JSON null value. By default,
1029	// fields with empty values are omitted from API requests. However, any
1030	// field with an empty value appearing in NullFields will be sent to the
1031	// server as null. It is an error if a field in this list has a
1032	// non-empty value. This may be used to include null fields in Patch
1033	// requests.
1034	NullFields []string `json:"-"`
1035}
1036
1037func (s *PrivateEnvironmentConfig) MarshalJSON() ([]byte, error) {
1038	type NoMethod PrivateEnvironmentConfig
1039	raw := NoMethod(*s)
1040	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1041}
1042
1043// SoftwareConfig: Specifies the selection and configuration of software
1044// inside the environment.
1045type SoftwareConfig struct {
1046	// AirflowConfigOverrides: Optional. Apache Airflow configuration
1047	// properties to override.
1048	//
1049	// Property keys contain the section and property names, separated by
1050	// a
1051	// hyphen, for example "core-dags_are_paused_at_creation". Section names
1052	// must
1053	// not contain hyphens ("-"), opening square brackets ("["),  or
1054	// closing
1055	// square brackets ("]"). The property name must not be empty and must
1056	// not
1057	// contain an equals sign ("=") or semicolon (";"). Section and property
1058	// names
1059	// must not contain a period ("."). Apache Airflow configuration
1060	// property
1061	// names must be written
1062	// in
1063	// [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property
1064	// values can
1065	// contain any character, and can be written in any lower/upper case
1066	// format.
1067	//
1068	// Certain Apache Airflow configuration property values
1069	// are
1070	// [blacklisted](/composer/docs/how-to/managing/setting-airflow-confi
1071	// gurations#airflow_configuration_blacklists),
1072	// and cannot be overridden.
1073	AirflowConfigOverrides map[string]string `json:"airflowConfigOverrides,omitempty"`
1074
1075	// EnvVariables: Optional. Additional environment variables to provide
1076	// to the Apache Airflow
1077	// scheduler, worker, and webserver processes.
1078	//
1079	// Environment variable names must match the regular
1080	// expression
1081	// `a-zA-Z_*`. They cannot specify Apache Airflow
1082	// software configuration overrides (they cannot match the regular
1083	// expression
1084	// `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of
1085	// the
1086	// following reserved names:
1087	//
1088	// * `AIRFLOW_HOME`
1089	// * `C_FORCE_ROOT`
1090	// * `CONTAINER_NAME`
1091	// * `DAGS_FOLDER`
1092	// * `GCP_PROJECT`
1093	// * `GCS_BUCKET`
1094	// * `GKE_CLUSTER_NAME`
1095	// * `SQL_DATABASE`
1096	// * `SQL_INSTANCE`
1097	// * `SQL_PASSWORD`
1098	// * `SQL_PROJECT`
1099	// * `SQL_REGION`
1100	// * `SQL_USER`
1101	EnvVariables map[string]string `json:"envVariables,omitempty"`
1102
1103	// ImageVersion: The version of the software running in the
1104	// environment.
1105	// This encapsulates both the version of Cloud Composer functionality
1106	// and the
1107	// version of Apache Airflow. It must match the regular
1108	// expression
1109	// `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[
1110	// 0-9]+(\.[0-9]+.*)?`.
1111	// When used as input, the server also checks if the provided version
1112	// is
1113	// supported and denies the request for an unsupported version.
1114	//
1115	// The Cloud Composer portion of the version is a
1116	// [semantic version](https://semver.org) or `latest`. When the patch
1117	// version
1118	// is omitted, the current Cloud Composer patch version is
1119	// selected.
1120	// When `latest` is provided instead of an explicit version number,
1121	// the server replaces `latest` with the current Cloud Composer
1122	// version
1123	// and stores that version number in the same field.
1124	//
1125	// The portion of the image version that follows <em>airflow-</em> is
1126	// an
1127	// official Apache Airflow repository
1128	// [release
1129	// name](https://github.com/apache/incubator-airflow/releases).
1130	//
1131	// See also
1132	// [Version
1133	// List](/composer/docs/concepts/versioning/composer-versions).
1134	ImageVersion string `json:"imageVersion,omitempty"`
1135
1136	// PypiPackages: Optional. Custom Python Package Index (PyPI) packages
1137	// to be installed in
1138	// the environment.
1139	//
1140	// Keys refer to the lowercase package name such as "numpy"
1141	// and values are the lowercase extras and version specifier such
1142	// as
1143	// "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To
1144	// specify a
1145	// package without pinning it to a version specifier, use the empty
1146	// string as
1147	// the value.
1148	PypiPackages map[string]string `json:"pypiPackages,omitempty"`
1149
1150	// PythonVersion: Optional. The major version of Python used to run the
1151	// Apache Airflow
1152	// scheduler, worker, and webserver processes.
1153	//
1154	// Can be set to '2' or '3'. If not specified, the default is '2'.
1155	// Cannot be
1156	// updated.
1157	PythonVersion string `json:"pythonVersion,omitempty"`
1158
1159	// ForceSendFields is a list of field names (e.g.
1160	// "AirflowConfigOverrides") to unconditionally include in API requests.
1161	// By default, fields with empty values are omitted from API requests.
1162	// However, any non-pointer, non-interface field appearing in
1163	// ForceSendFields will be sent to the server regardless of whether the
1164	// field is empty or not. This may be used to include empty fields in
1165	// Patch requests.
1166	ForceSendFields []string `json:"-"`
1167
1168	// NullFields is a list of field names (e.g. "AirflowConfigOverrides")
1169	// to include in API requests with the JSON null value. By default,
1170	// fields with empty values are omitted from API requests. However, any
1171	// field with an empty value appearing in NullFields will be sent to the
1172	// server as null. It is an error if a field in this list has a
1173	// non-empty value. This may be used to include null fields in Patch
1174	// requests.
1175	NullFields []string `json:"-"`
1176}
1177
1178func (s *SoftwareConfig) MarshalJSON() ([]byte, error) {
1179	type NoMethod SoftwareConfig
1180	raw := NoMethod(*s)
1181	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1182}
1183
1184// Status: The `Status` type defines a logical error model that is
1185// suitable for
1186// different programming environments, including REST APIs and RPC APIs.
1187// It is
1188// used by [gRPC](https://github.com/grpc). Each `Status` message
1189// contains
1190// three pieces of data: error code, error message, and error
1191// details.
1192//
1193// You can find out more about this error model and how to work with it
1194// in the
1195// [API Design Guide](https://cloud.google.com/apis/design/errors).
1196type Status struct {
1197	// Code: The status code, which should be an enum value of
1198	// google.rpc.Code.
1199	Code int64 `json:"code,omitempty"`
1200
1201	// Details: A list of messages that carry the error details.  There is a
1202	// common set of
1203	// message types for APIs to use.
1204	Details []googleapi.RawMessage `json:"details,omitempty"`
1205
1206	// Message: A developer-facing error message, which should be in
1207	// English. Any
1208	// user-facing error message should be localized and sent in
1209	// the
1210	// google.rpc.Status.details field, or localized by the client.
1211	Message string `json:"message,omitempty"`
1212
1213	// ForceSendFields is a list of field names (e.g. "Code") to
1214	// unconditionally include in API requests. By default, fields with
1215	// empty values are omitted from API requests. However, any non-pointer,
1216	// non-interface field appearing in ForceSendFields will be sent to the
1217	// server regardless of whether the field is empty or not. This may be
1218	// used to include empty fields in Patch requests.
1219	ForceSendFields []string `json:"-"`
1220
1221	// NullFields is a list of field names (e.g. "Code") to include in API
1222	// requests with the JSON null value. By default, fields with empty
1223	// values are omitted from API requests. However, any field with an
1224	// empty value appearing in NullFields will be sent to the server as
1225	// null. It is an error if a field in this list has a non-empty value.
1226	// This may be used to include null fields in Patch requests.
1227	NullFields []string `json:"-"`
1228}
1229
1230func (s *Status) MarshalJSON() ([]byte, error) {
1231	type NoMethod Status
1232	raw := NoMethod(*s)
1233	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1234}
1235
1236// WebServerNetworkAccessControl: Network-level access control policy
1237// for the Airflow web server.
1238type WebServerNetworkAccessControl struct {
1239	// AllowedIpRanges: A collection of allowed IP ranges with descriptions.
1240	AllowedIpRanges []*AllowedIpRange `json:"allowedIpRanges,omitempty"`
1241
1242	// ForceSendFields is a list of field names (e.g. "AllowedIpRanges") to
1243	// unconditionally include in API requests. By default, fields with
1244	// empty values are omitted from API requests. However, any non-pointer,
1245	// non-interface field appearing in ForceSendFields will be sent to the
1246	// server regardless of whether the field is empty or not. This may be
1247	// used to include empty fields in Patch requests.
1248	ForceSendFields []string `json:"-"`
1249
1250	// NullFields is a list of field names (e.g. "AllowedIpRanges") to
1251	// include in API requests with the JSON null value. By default, fields
1252	// with empty values are omitted from API requests. However, any field
1253	// with an empty value appearing in NullFields will be sent to the
1254	// server as null. It is an error if a field in this list has a
1255	// non-empty value. This may be used to include null fields in Patch
1256	// requests.
1257	NullFields []string `json:"-"`
1258}
1259
1260func (s *WebServerNetworkAccessControl) MarshalJSON() ([]byte, error) {
1261	type NoMethod WebServerNetworkAccessControl
1262	raw := NoMethod(*s)
1263	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1264}
1265
1266// method id "composer.projects.locations.environments.create":
1267
1268type ProjectsLocationsEnvironmentsCreateCall struct {
1269	s           *Service
1270	parent      string
1271	environment *Environment
1272	urlParams_  gensupport.URLParams
1273	ctx_        context.Context
1274	header_     http.Header
1275}
1276
1277// Create: Create a new environment.
1278func (r *ProjectsLocationsEnvironmentsService) Create(parent string, environment *Environment) *ProjectsLocationsEnvironmentsCreateCall {
1279	c := &ProjectsLocationsEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1280	c.parent = parent
1281	c.environment = environment
1282	return c
1283}
1284
1285// Fields allows partial responses to be retrieved. See
1286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1287// for more information.
1288func (c *ProjectsLocationsEnvironmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsCreateCall {
1289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1290	return c
1291}
1292
1293// Context sets the context to be used in this call's Do method. Any
1294// pending HTTP request will be aborted if the provided context is
1295// canceled.
1296func (c *ProjectsLocationsEnvironmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsCreateCall {
1297	c.ctx_ = ctx
1298	return c
1299}
1300
1301// Header returns an http.Header that can be modified by the caller to
1302// add HTTP headers to the request.
1303func (c *ProjectsLocationsEnvironmentsCreateCall) Header() http.Header {
1304	if c.header_ == nil {
1305		c.header_ = make(http.Header)
1306	}
1307	return c.header_
1308}
1309
1310func (c *ProjectsLocationsEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) {
1311	reqHeaders := make(http.Header)
1312	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
1313	for k, v := range c.header_ {
1314		reqHeaders[k] = v
1315	}
1316	reqHeaders.Set("User-Agent", c.s.userAgent())
1317	var body io.Reader = nil
1318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.environment)
1319	if err != nil {
1320		return nil, err
1321	}
1322	reqHeaders.Set("Content-Type", "application/json")
1323	c.urlParams_.Set("alt", alt)
1324	c.urlParams_.Set("prettyPrint", "false")
1325	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/environments")
1326	urls += "?" + c.urlParams_.Encode()
1327	req, err := http.NewRequest("POST", urls, body)
1328	if err != nil {
1329		return nil, err
1330	}
1331	req.Header = reqHeaders
1332	googleapi.Expand(req.URL, map[string]string{
1333		"parent": c.parent,
1334	})
1335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1336}
1337
1338// Do executes the "composer.projects.locations.environments.create" call.
1339// Exactly one of *Operation or error will be non-nil. Any non-2xx
1340// status code is an error. Response headers are in either
1341// *Operation.ServerResponse.Header or (if a response was returned at
1342// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1343// to check whether the returned error was because
1344// http.StatusNotModified was returned.
1345func (c *ProjectsLocationsEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
1346	gensupport.SetOptions(c.urlParams_, opts...)
1347	res, err := c.doRequest("json")
1348	if res != nil && res.StatusCode == http.StatusNotModified {
1349		if res.Body != nil {
1350			res.Body.Close()
1351		}
1352		return nil, &googleapi.Error{
1353			Code:   res.StatusCode,
1354			Header: res.Header,
1355		}
1356	}
1357	if err != nil {
1358		return nil, err
1359	}
1360	defer googleapi.CloseBody(res)
1361	if err := googleapi.CheckResponse(res); err != nil {
1362		return nil, err
1363	}
1364	ret := &Operation{
1365		ServerResponse: googleapi.ServerResponse{
1366			Header:         res.Header,
1367			HTTPStatusCode: res.StatusCode,
1368		},
1369	}
1370	target := &ret
1371	if err := gensupport.DecodeResponse(target, res); err != nil {
1372		return nil, err
1373	}
1374	return ret, nil
1375	// {
1376	//   "description": "Create a new environment.",
1377	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments",
1378	//   "httpMethod": "POST",
1379	//   "id": "composer.projects.locations.environments.create",
1380	//   "parameterOrder": [
1381	//     "parent"
1382	//   ],
1383	//   "parameters": {
1384	//     "parent": {
1385	//       "description": "The parent must be of the form\n\"projects/{projectId}/locations/{locationId}\".",
1386	//       "location": "path",
1387	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
1388	//       "required": true,
1389	//       "type": "string"
1390	//     }
1391	//   },
1392	//   "path": "v1beta1/{+parent}/environments",
1393	//   "request": {
1394	//     "$ref": "Environment"
1395	//   },
1396	//   "response": {
1397	//     "$ref": "Operation"
1398	//   },
1399	//   "scopes": [
1400	//     "https://www.googleapis.com/auth/cloud-platform"
1401	//   ]
1402	// }
1403
1404}
1405
1406// method id "composer.projects.locations.environments.delete":
1407
1408type ProjectsLocationsEnvironmentsDeleteCall struct {
1409	s          *Service
1410	name       string
1411	urlParams_ gensupport.URLParams
1412	ctx_       context.Context
1413	header_    http.Header
1414}
1415
1416// Delete: Delete an environment.
1417func (r *ProjectsLocationsEnvironmentsService) Delete(name string) *ProjectsLocationsEnvironmentsDeleteCall {
1418	c := &ProjectsLocationsEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1419	c.name = name
1420	return c
1421}
1422
1423// Fields allows partial responses to be retrieved. See
1424// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1425// for more information.
1426func (c *ProjectsLocationsEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsDeleteCall {
1427	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1428	return c
1429}
1430
1431// Context sets the context to be used in this call's Do method. Any
1432// pending HTTP request will be aborted if the provided context is
1433// canceled.
1434func (c *ProjectsLocationsEnvironmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsDeleteCall {
1435	c.ctx_ = ctx
1436	return c
1437}
1438
1439// Header returns an http.Header that can be modified by the caller to
1440// add HTTP headers to the request.
1441func (c *ProjectsLocationsEnvironmentsDeleteCall) Header() http.Header {
1442	if c.header_ == nil {
1443		c.header_ = make(http.Header)
1444	}
1445	return c.header_
1446}
1447
1448func (c *ProjectsLocationsEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
1449	reqHeaders := make(http.Header)
1450	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
1451	for k, v := range c.header_ {
1452		reqHeaders[k] = v
1453	}
1454	reqHeaders.Set("User-Agent", c.s.userAgent())
1455	var body io.Reader = nil
1456	c.urlParams_.Set("alt", alt)
1457	c.urlParams_.Set("prettyPrint", "false")
1458	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
1459	urls += "?" + c.urlParams_.Encode()
1460	req, err := http.NewRequest("DELETE", urls, body)
1461	if err != nil {
1462		return nil, err
1463	}
1464	req.Header = reqHeaders
1465	googleapi.Expand(req.URL, map[string]string{
1466		"name": c.name,
1467	})
1468	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1469}
1470
1471// Do executes the "composer.projects.locations.environments.delete" call.
1472// Exactly one of *Operation or error will be non-nil. Any non-2xx
1473// status code is an error. Response headers are in either
1474// *Operation.ServerResponse.Header or (if a response was returned at
1475// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1476// to check whether the returned error was because
1477// http.StatusNotModified was returned.
1478func (c *ProjectsLocationsEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
1479	gensupport.SetOptions(c.urlParams_, opts...)
1480	res, err := c.doRequest("json")
1481	if res != nil && res.StatusCode == http.StatusNotModified {
1482		if res.Body != nil {
1483			res.Body.Close()
1484		}
1485		return nil, &googleapi.Error{
1486			Code:   res.StatusCode,
1487			Header: res.Header,
1488		}
1489	}
1490	if err != nil {
1491		return nil, err
1492	}
1493	defer googleapi.CloseBody(res)
1494	if err := googleapi.CheckResponse(res); err != nil {
1495		return nil, err
1496	}
1497	ret := &Operation{
1498		ServerResponse: googleapi.ServerResponse{
1499			Header:         res.Header,
1500			HTTPStatusCode: res.StatusCode,
1501		},
1502	}
1503	target := &ret
1504	if err := gensupport.DecodeResponse(target, res); err != nil {
1505		return nil, err
1506	}
1507	return ret, nil
1508	// {
1509	//   "description": "Delete an environment.",
1510	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}",
1511	//   "httpMethod": "DELETE",
1512	//   "id": "composer.projects.locations.environments.delete",
1513	//   "parameterOrder": [
1514	//     "name"
1515	//   ],
1516	//   "parameters": {
1517	//     "name": {
1518	//       "description": "The environment to delete, in the form:\n\"projects/{projectId}/locations/{locationId}/environments/{environmentId}\"",
1519	//       "location": "path",
1520	//       "pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$",
1521	//       "required": true,
1522	//       "type": "string"
1523	//     }
1524	//   },
1525	//   "path": "v1beta1/{+name}",
1526	//   "response": {
1527	//     "$ref": "Operation"
1528	//   },
1529	//   "scopes": [
1530	//     "https://www.googleapis.com/auth/cloud-platform"
1531	//   ]
1532	// }
1533
1534}
1535
1536// method id "composer.projects.locations.environments.get":
1537
1538type ProjectsLocationsEnvironmentsGetCall struct {
1539	s            *Service
1540	name         string
1541	urlParams_   gensupport.URLParams
1542	ifNoneMatch_ string
1543	ctx_         context.Context
1544	header_      http.Header
1545}
1546
1547// Get: Get an existing environment.
1548func (r *ProjectsLocationsEnvironmentsService) Get(name string) *ProjectsLocationsEnvironmentsGetCall {
1549	c := &ProjectsLocationsEnvironmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1550	c.name = name
1551	return c
1552}
1553
1554// Fields allows partial responses to be retrieved. See
1555// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1556// for more information.
1557func (c *ProjectsLocationsEnvironmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsGetCall {
1558	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1559	return c
1560}
1561
1562// IfNoneMatch sets the optional parameter which makes the operation
1563// fail if the object's ETag matches the given value. This is useful for
1564// getting updates only after the object has changed since the last
1565// request. Use googleapi.IsNotModified to check whether the response
1566// error from Do is the result of In-None-Match.
1567func (c *ProjectsLocationsEnvironmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEnvironmentsGetCall {
1568	c.ifNoneMatch_ = entityTag
1569	return c
1570}
1571
1572// Context sets the context to be used in this call's Do method. Any
1573// pending HTTP request will be aborted if the provided context is
1574// canceled.
1575func (c *ProjectsLocationsEnvironmentsGetCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsGetCall {
1576	c.ctx_ = ctx
1577	return c
1578}
1579
1580// Header returns an http.Header that can be modified by the caller to
1581// add HTTP headers to the request.
1582func (c *ProjectsLocationsEnvironmentsGetCall) Header() http.Header {
1583	if c.header_ == nil {
1584		c.header_ = make(http.Header)
1585	}
1586	return c.header_
1587}
1588
1589func (c *ProjectsLocationsEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) {
1590	reqHeaders := make(http.Header)
1591	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
1592	for k, v := range c.header_ {
1593		reqHeaders[k] = v
1594	}
1595	reqHeaders.Set("User-Agent", c.s.userAgent())
1596	if c.ifNoneMatch_ != "" {
1597		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1598	}
1599	var body io.Reader = nil
1600	c.urlParams_.Set("alt", alt)
1601	c.urlParams_.Set("prettyPrint", "false")
1602	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
1603	urls += "?" + c.urlParams_.Encode()
1604	req, err := http.NewRequest("GET", urls, body)
1605	if err != nil {
1606		return nil, err
1607	}
1608	req.Header = reqHeaders
1609	googleapi.Expand(req.URL, map[string]string{
1610		"name": c.name,
1611	})
1612	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1613}
1614
1615// Do executes the "composer.projects.locations.environments.get" call.
1616// Exactly one of *Environment or error will be non-nil. Any non-2xx
1617// status code is an error. Response headers are in either
1618// *Environment.ServerResponse.Header or (if a response was returned at
1619// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1620// to check whether the returned error was because
1621// http.StatusNotModified was returned.
1622func (c *ProjectsLocationsEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*Environment, error) {
1623	gensupport.SetOptions(c.urlParams_, opts...)
1624	res, err := c.doRequest("json")
1625	if res != nil && res.StatusCode == http.StatusNotModified {
1626		if res.Body != nil {
1627			res.Body.Close()
1628		}
1629		return nil, &googleapi.Error{
1630			Code:   res.StatusCode,
1631			Header: res.Header,
1632		}
1633	}
1634	if err != nil {
1635		return nil, err
1636	}
1637	defer googleapi.CloseBody(res)
1638	if err := googleapi.CheckResponse(res); err != nil {
1639		return nil, err
1640	}
1641	ret := &Environment{
1642		ServerResponse: googleapi.ServerResponse{
1643			Header:         res.Header,
1644			HTTPStatusCode: res.StatusCode,
1645		},
1646	}
1647	target := &ret
1648	if err := gensupport.DecodeResponse(target, res); err != nil {
1649		return nil, err
1650	}
1651	return ret, nil
1652	// {
1653	//   "description": "Get an existing environment.",
1654	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}",
1655	//   "httpMethod": "GET",
1656	//   "id": "composer.projects.locations.environments.get",
1657	//   "parameterOrder": [
1658	//     "name"
1659	//   ],
1660	//   "parameters": {
1661	//     "name": {
1662	//       "description": "The resource name of the environment to get, in the form:\n\"projects/{projectId}/locations/{locationId}/environments/{environmentId}\"",
1663	//       "location": "path",
1664	//       "pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$",
1665	//       "required": true,
1666	//       "type": "string"
1667	//     }
1668	//   },
1669	//   "path": "v1beta1/{+name}",
1670	//   "response": {
1671	//     "$ref": "Environment"
1672	//   },
1673	//   "scopes": [
1674	//     "https://www.googleapis.com/auth/cloud-platform"
1675	//   ]
1676	// }
1677
1678}
1679
1680// method id "composer.projects.locations.environments.list":
1681
1682type ProjectsLocationsEnvironmentsListCall struct {
1683	s            *Service
1684	parent       string
1685	urlParams_   gensupport.URLParams
1686	ifNoneMatch_ string
1687	ctx_         context.Context
1688	header_      http.Header
1689}
1690
1691// List: List environments.
1692func (r *ProjectsLocationsEnvironmentsService) List(parent string) *ProjectsLocationsEnvironmentsListCall {
1693	c := &ProjectsLocationsEnvironmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1694	c.parent = parent
1695	return c
1696}
1697
1698// PageSize sets the optional parameter "pageSize": The maximum number
1699// of environments to return.
1700func (c *ProjectsLocationsEnvironmentsListCall) PageSize(pageSize int64) *ProjectsLocationsEnvironmentsListCall {
1701	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1702	return c
1703}
1704
1705// PageToken sets the optional parameter "pageToken": The
1706// next_page_token value returned from a previous List request, if any.
1707func (c *ProjectsLocationsEnvironmentsListCall) PageToken(pageToken string) *ProjectsLocationsEnvironmentsListCall {
1708	c.urlParams_.Set("pageToken", pageToken)
1709	return c
1710}
1711
1712// Fields allows partial responses to be retrieved. See
1713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1714// for more information.
1715func (c *ProjectsLocationsEnvironmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsListCall {
1716	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1717	return c
1718}
1719
1720// IfNoneMatch sets the optional parameter which makes the operation
1721// fail if the object's ETag matches the given value. This is useful for
1722// getting updates only after the object has changed since the last
1723// request. Use googleapi.IsNotModified to check whether the response
1724// error from Do is the result of In-None-Match.
1725func (c *ProjectsLocationsEnvironmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEnvironmentsListCall {
1726	c.ifNoneMatch_ = entityTag
1727	return c
1728}
1729
1730// Context sets the context to be used in this call's Do method. Any
1731// pending HTTP request will be aborted if the provided context is
1732// canceled.
1733func (c *ProjectsLocationsEnvironmentsListCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsListCall {
1734	c.ctx_ = ctx
1735	return c
1736}
1737
1738// Header returns an http.Header that can be modified by the caller to
1739// add HTTP headers to the request.
1740func (c *ProjectsLocationsEnvironmentsListCall) Header() http.Header {
1741	if c.header_ == nil {
1742		c.header_ = make(http.Header)
1743	}
1744	return c.header_
1745}
1746
1747func (c *ProjectsLocationsEnvironmentsListCall) doRequest(alt string) (*http.Response, error) {
1748	reqHeaders := make(http.Header)
1749	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
1750	for k, v := range c.header_ {
1751		reqHeaders[k] = v
1752	}
1753	reqHeaders.Set("User-Agent", c.s.userAgent())
1754	if c.ifNoneMatch_ != "" {
1755		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1756	}
1757	var body io.Reader = nil
1758	c.urlParams_.Set("alt", alt)
1759	c.urlParams_.Set("prettyPrint", "false")
1760	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/environments")
1761	urls += "?" + c.urlParams_.Encode()
1762	req, err := http.NewRequest("GET", urls, body)
1763	if err != nil {
1764		return nil, err
1765	}
1766	req.Header = reqHeaders
1767	googleapi.Expand(req.URL, map[string]string{
1768		"parent": c.parent,
1769	})
1770	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1771}
1772
1773// Do executes the "composer.projects.locations.environments.list" call.
1774// Exactly one of *ListEnvironmentsResponse or error will be non-nil.
1775// Any non-2xx status code is an error. Response headers are in either
1776// *ListEnvironmentsResponse.ServerResponse.Header or (if a response was
1777// returned at all) in error.(*googleapi.Error).Header. Use
1778// googleapi.IsNotModified to check whether the returned error was
1779// because http.StatusNotModified was returned.
1780func (c *ProjectsLocationsEnvironmentsListCall) Do(opts ...googleapi.CallOption) (*ListEnvironmentsResponse, error) {
1781	gensupport.SetOptions(c.urlParams_, opts...)
1782	res, err := c.doRequest("json")
1783	if res != nil && res.StatusCode == http.StatusNotModified {
1784		if res.Body != nil {
1785			res.Body.Close()
1786		}
1787		return nil, &googleapi.Error{
1788			Code:   res.StatusCode,
1789			Header: res.Header,
1790		}
1791	}
1792	if err != nil {
1793		return nil, err
1794	}
1795	defer googleapi.CloseBody(res)
1796	if err := googleapi.CheckResponse(res); err != nil {
1797		return nil, err
1798	}
1799	ret := &ListEnvironmentsResponse{
1800		ServerResponse: googleapi.ServerResponse{
1801			Header:         res.Header,
1802			HTTPStatusCode: res.StatusCode,
1803		},
1804	}
1805	target := &ret
1806	if err := gensupport.DecodeResponse(target, res); err != nil {
1807		return nil, err
1808	}
1809	return ret, nil
1810	// {
1811	//   "description": "List environments.",
1812	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments",
1813	//   "httpMethod": "GET",
1814	//   "id": "composer.projects.locations.environments.list",
1815	//   "parameterOrder": [
1816	//     "parent"
1817	//   ],
1818	//   "parameters": {
1819	//     "pageSize": {
1820	//       "description": "The maximum number of environments to return.",
1821	//       "format": "int32",
1822	//       "location": "query",
1823	//       "type": "integer"
1824	//     },
1825	//     "pageToken": {
1826	//       "description": "The next_page_token value returned from a previous List request, if any.",
1827	//       "location": "query",
1828	//       "type": "string"
1829	//     },
1830	//     "parent": {
1831	//       "description": "List environments in the given project and location, in the form:\n\"projects/{projectId}/locations/{locationId}\"",
1832	//       "location": "path",
1833	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
1834	//       "required": true,
1835	//       "type": "string"
1836	//     }
1837	//   },
1838	//   "path": "v1beta1/{+parent}/environments",
1839	//   "response": {
1840	//     "$ref": "ListEnvironmentsResponse"
1841	//   },
1842	//   "scopes": [
1843	//     "https://www.googleapis.com/auth/cloud-platform"
1844	//   ]
1845	// }
1846
1847}
1848
1849// Pages invokes f for each page of results.
1850// A non-nil error returned from f will halt the iteration.
1851// The provided context supersedes any context provided to the Context method.
1852func (c *ProjectsLocationsEnvironmentsListCall) Pages(ctx context.Context, f func(*ListEnvironmentsResponse) error) error {
1853	c.ctx_ = ctx
1854	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
1855	for {
1856		x, err := c.Do()
1857		if err != nil {
1858			return err
1859		}
1860		if err := f(x); err != nil {
1861			return err
1862		}
1863		if x.NextPageToken == "" {
1864			return nil
1865		}
1866		c.PageToken(x.NextPageToken)
1867	}
1868}
1869
1870// method id "composer.projects.locations.environments.patch":
1871
1872type ProjectsLocationsEnvironmentsPatchCall struct {
1873	s           *Service
1874	name        string
1875	environment *Environment
1876	urlParams_  gensupport.URLParams
1877	ctx_        context.Context
1878	header_     http.Header
1879}
1880
1881// Patch: Update an environment.
1882func (r *ProjectsLocationsEnvironmentsService) Patch(name string, environment *Environment) *ProjectsLocationsEnvironmentsPatchCall {
1883	c := &ProjectsLocationsEnvironmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1884	c.name = name
1885	c.environment = environment
1886	return c
1887}
1888
1889// UpdateMask sets the optional parameter "updateMask": Required. A
1890// comma-separated list of paths, relative to `Environment`, of
1891// fields to update.
1892// For example, to set the version of scikit-learn to install in
1893// the
1894// environment to 0.19.0 and to remove an existing installation
1895// of
1896// argparse, the `updateMask` parameter would include the following
1897// two
1898// `paths` values: "config.softwareConfig.pypiPackages.scikit-learn"
1899// and
1900// "config.softwareConfig.pypiPackages.argparse". The included
1901// patch
1902// environment would specify the scikit-learn version as follows:
1903//
1904//     {
1905//       "config":{
1906//         "softwareConfig":{
1907//           "pypiPackages":{
1908//             "scikit-learn":"==0.19.0"
1909//           }
1910//         }
1911//       }
1912//     }
1913//
1914// Note that in the above example, any existing PyPI packages
1915// other than scikit-learn and argparse will be unaffected.
1916//
1917// Only one update type may be included in a single request's
1918// `updateMask`.
1919// For example, one cannot update both the PyPI packages and
1920// labels in the same request. However, it is possible to update
1921// multiple
1922// members of a map field simultaneously in the same request. For
1923// example,
1924// to set the labels "label1" and "label2" while clearing "label3"
1925// (assuming
1926// it already exists), one can
1927// provide the paths "labels.label1", "labels.label2", and
1928// "labels.label3"
1929// and populate the patch environment as follows:
1930//
1931//     {
1932//       "labels":{
1933//         "label1":"new-label1-value"
1934//         "label2":"new-label2-value"
1935//       }
1936//     }
1937//
1938// Note that in the above example, any existing labels that are
1939// not
1940// included in the `updateMask` will be unaffected.
1941//
1942// It is also possible to replace an entire map field by providing
1943// the
1944// map field's path in the `updateMask`. The new value of the field
1945// will
1946// be that which is provided in the patch environment. For example,
1947// to
1948// delete all pre-existing user-specified PyPI packages and
1949// install botocore at version 1.7.14, the `updateMask` would
1950// contain
1951// the path "config.softwareConfig.pypiPackages", and
1952// the patch environment would be the following:
1953//
1954//     {
1955//       "config":{
1956//         "softwareConfig":{
1957//           "pypiPackages":{
1958//             "botocore":"==1.7.14"
1959//           }
1960//         }
1961//       }
1962//     }
1963//
1964// <strong>Note:</strong> Only the following fields can be updated:
1965//
1966//  <table>
1967//  <tbody>
1968//  <tr>
1969//  <td><strong>Mask</strong></td>
1970//  <td><strong>Purpose</strong></td>
1971//  </tr>
1972//  <tr>
1973//  <td>config.softwareConfig.pypiPackages
1974//  </td>
1975//  <td>Replace all custom custom PyPI packages. If a replacement
1976//  package map is not included in `environment`, all custom
1977//  PyPI packages are cleared. It is an error to provide both this mask
1978// and a
1979//  mask specifying an individual package.</td>
1980//  </tr>
1981//  <tr>
1982//  <td>config.softwareConfig.pypiPackages.<var>packagename</var></td>
1983//  <td>Update the custom PyPI package <var>packagename</var>,
1984//  preserving other packages. To delete the package, include it in
1985//  `updateMask`, and omit the mapping for it in
1986//  `environment.config.softwareConfig.pypiPackages`. It is an error
1987//  to provide both a mask of this form and the
1988//  "config.softwareConfig.pypiPackages" mask.</td>
1989//  </tr>
1990//  <tr>
1991//  <td>labels</td>
1992//  <td>Replace all environment labels. If a replacement labels map is
1993// not
1994//  included in `environment`, all labels are cleared. It is an error
1995// to
1996//  provide both this mask and a mask specifying one or more individual
1997//  labels.</td>
1998//  </tr>
1999//  <tr>
2000//  <td>labels.<var>labelName</var></td>
2001//  <td>Set the label named <var>labelName</var>, while preserving
2002// other
2003//  labels. To delete the label, include it in `updateMask` and omit
2004// its
2005//  mapping in `environment.labels`. It is an error to provide both a
2006//  mask of this form and the "labels" mask.</td>
2007//  </tr>
2008//  <tr>
2009//  <td>config.nodeCount</td>
2010//  <td>Horizontally scale the number of nodes in the environment. An
2011// integer
2012//  greater than or equal to 3 must be provided in the
2013// `config.nodeCount`
2014//  field.
2015//  </td>
2016//  </tr>
2017//  <tr>
2018//  <td>config.softwareConfig.airflowConfigOverrides</td>
2019//  <td>Replace all Apache Airflow config overrides. If a replacement
2020// config
2021//  overrides map is not included in `environment`, all config
2022// overrides
2023//  are cleared.
2024//  It is an error to provide both this mask and a mask specifying one
2025// or
2026//  more individual config overrides.</td>
2027//  </tr>
2028//  <tr>
2029//
2030// <td>config.softwareConfig.airflowConfigOverrides.<var>section</var>-<v
2031// ar>name
2032//  </var></td>
2033//  <td>Override the Apache Airflow config property <var>name</var> in
2034// the
2035//  section named <var>section</var>, preserving other properties. To
2036// delete
2037//  the property override, include it in `updateMask` and omit its
2038// mapping
2039//  in `environment.config.softwareConfig.airflowConfigOverrides`.
2040//  It is an error to provide both a mask of this form and the
2041//  "config.softwareConfig.airflowConfigOverrides" mask.</td>
2042//  </tr>
2043//  <tr>
2044//  <td>config.softwareConfig.envVariables</td>
2045//  <td>Replace all environment variables. If a replacement environment
2046//  variable map is not included in `environment`, all custom
2047// environment
2048//  variables  are cleared.
2049//  It is an error to provide both this mask and a mask specifying one
2050// or
2051//  more individual environment variables.</td>
2052//  </tr>
2053//  <tr>
2054//  <td>config.softwareConfig.imageVersion</td>
2055//  <td>Upgrade the version of the environment in-place. Refer to
2056//  `SoftwareConfig.image_version` for information on how to format the
2057// new
2058//  image version. Additionally, the new image version cannot effect a
2059// version
2060//  downgrade and must match the current image version's Composer major
2061//  version and Airflow major and minor versions. Consult the
2062//  <a
2063// href="/composer/docs/concepts/versioning/composer-versions">Cloud
2064//  Composer Version List</a> for valid values.</td>
2065//  </tr>
2066//  </tbody>
2067//  </table>
2068func (c *ProjectsLocationsEnvironmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEnvironmentsPatchCall {
2069	c.urlParams_.Set("updateMask", updateMask)
2070	return c
2071}
2072
2073// Fields allows partial responses to be retrieved. See
2074// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2075// for more information.
2076func (c *ProjectsLocationsEnvironmentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsPatchCall {
2077	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2078	return c
2079}
2080
2081// Context sets the context to be used in this call's Do method. Any
2082// pending HTTP request will be aborted if the provided context is
2083// canceled.
2084func (c *ProjectsLocationsEnvironmentsPatchCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsPatchCall {
2085	c.ctx_ = ctx
2086	return c
2087}
2088
2089// Header returns an http.Header that can be modified by the caller to
2090// add HTTP headers to the request.
2091func (c *ProjectsLocationsEnvironmentsPatchCall) Header() http.Header {
2092	if c.header_ == nil {
2093		c.header_ = make(http.Header)
2094	}
2095	return c.header_
2096}
2097
2098func (c *ProjectsLocationsEnvironmentsPatchCall) doRequest(alt string) (*http.Response, error) {
2099	reqHeaders := make(http.Header)
2100	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
2101	for k, v := range c.header_ {
2102		reqHeaders[k] = v
2103	}
2104	reqHeaders.Set("User-Agent", c.s.userAgent())
2105	var body io.Reader = nil
2106	body, err := googleapi.WithoutDataWrapper.JSONReader(c.environment)
2107	if err != nil {
2108		return nil, err
2109	}
2110	reqHeaders.Set("Content-Type", "application/json")
2111	c.urlParams_.Set("alt", alt)
2112	c.urlParams_.Set("prettyPrint", "false")
2113	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2114	urls += "?" + c.urlParams_.Encode()
2115	req, err := http.NewRequest("PATCH", urls, body)
2116	if err != nil {
2117		return nil, err
2118	}
2119	req.Header = reqHeaders
2120	googleapi.Expand(req.URL, map[string]string{
2121		"name": c.name,
2122	})
2123	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2124}
2125
2126// Do executes the "composer.projects.locations.environments.patch" call.
2127// Exactly one of *Operation or error will be non-nil. Any non-2xx
2128// status code is an error. Response headers are in either
2129// *Operation.ServerResponse.Header or (if a response was returned at
2130// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2131// to check whether the returned error was because
2132// http.StatusNotModified was returned.
2133func (c *ProjectsLocationsEnvironmentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2134	gensupport.SetOptions(c.urlParams_, opts...)
2135	res, err := c.doRequest("json")
2136	if res != nil && res.StatusCode == http.StatusNotModified {
2137		if res.Body != nil {
2138			res.Body.Close()
2139		}
2140		return nil, &googleapi.Error{
2141			Code:   res.StatusCode,
2142			Header: res.Header,
2143		}
2144	}
2145	if err != nil {
2146		return nil, err
2147	}
2148	defer googleapi.CloseBody(res)
2149	if err := googleapi.CheckResponse(res); err != nil {
2150		return nil, err
2151	}
2152	ret := &Operation{
2153		ServerResponse: googleapi.ServerResponse{
2154			Header:         res.Header,
2155			HTTPStatusCode: res.StatusCode,
2156		},
2157	}
2158	target := &ret
2159	if err := gensupport.DecodeResponse(target, res); err != nil {
2160		return nil, err
2161	}
2162	return ret, nil
2163	// {
2164	//   "description": "Update an environment.",
2165	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}",
2166	//   "httpMethod": "PATCH",
2167	//   "id": "composer.projects.locations.environments.patch",
2168	//   "parameterOrder": [
2169	//     "name"
2170	//   ],
2171	//   "parameters": {
2172	//     "name": {
2173	//       "description": "The relative resource name of the environment to update, in the form:\n\"projects/{projectId}/locations/{locationId}/environments/{environmentId}\"",
2174	//       "location": "path",
2175	//       "pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$",
2176	//       "required": true,
2177	//       "type": "string"
2178	//     },
2179	//     "updateMask": {
2180	//       "description": "Required. A comma-separated list of paths, relative to `Environment`, of\nfields to update.\nFor example, to set the version of scikit-learn to install in the\nenvironment to 0.19.0 and to remove an existing installation of\nargparse, the `updateMask` parameter would include the following two\n`paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and\n\"config.softwareConfig.pypiPackages.argparse\". The included patch\nenvironment would specify the scikit-learn version as follows:\n\n    {\n      \"config\":{\n        \"softwareConfig\":{\n          \"pypiPackages\":{\n            \"scikit-learn\":\"==0.19.0\"\n          }\n        }\n      }\n    }\n\nNote that in the above example, any existing PyPI packages\nother than scikit-learn and argparse will be unaffected.\n\nOnly one update type may be included in a single request's `updateMask`.\nFor example, one cannot update both the PyPI packages and\nlabels in the same request. However, it is possible to update multiple\nmembers of a map field simultaneously in the same request. For example,\nto set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming\nit already exists), one can\nprovide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\"\nand populate the patch environment as follows:\n\n    {\n      \"labels\":{\n        \"label1\":\"new-label1-value\"\n        \"label2\":\"new-label2-value\"\n      }\n    }\n\nNote that in the above example, any existing labels that are not\nincluded in the `updateMask` will be unaffected.\n\nIt is also possible to replace an entire map field by providing the\nmap field's path in the `updateMask`. The new value of the field will\nbe that which is provided in the patch environment. For example, to\ndelete all pre-existing user-specified PyPI packages and\ninstall botocore at version 1.7.14, the `updateMask` would contain\nthe path \"config.softwareConfig.pypiPackages\", and\nthe patch environment would be the following:\n\n    {\n      \"config\":{\n        \"softwareConfig\":{\n          \"pypiPackages\":{\n            \"botocore\":\"==1.7.14\"\n          }\n        }\n      }\n    }\n\n\u003cstrong\u003eNote:\u003c/strong\u003e Only the following fields can be updated:\n\n \u003ctable\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cstrong\u003eMask\u003c/strong\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.pypiPackages\n \u003c/td\u003e\n \u003ctd\u003eReplace all custom custom PyPI packages. If a replacement\n package map is not included in `environment`, all custom\n PyPI packages are cleared. It is an error to provide both this mask and a\n mask specifying an individual package.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.pypiPackages.\u003cvar\u003epackagename\u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eUpdate the custom PyPI package \u003cvar\u003epackagename\u003c/var\u003e,\n preserving other packages. To delete the package, include it in\n `updateMask`, and omit the mapping for it in\n `environment.config.softwareConfig.pypiPackages`. It is an error\n to provide both a mask of this form and the\n \"config.softwareConfig.pypiPackages\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003elabels\u003c/td\u003e\n \u003ctd\u003eReplace all environment labels. If a replacement labels map is not\n included in `environment`, all labels are cleared. It is an error to\n provide both this mask and a mask specifying one or more individual\n labels.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003elabels.\u003cvar\u003elabelName\u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eSet the label named \u003cvar\u003elabelName\u003c/var\u003e, while preserving other\n labels. To delete the label, include it in `updateMask` and omit its\n mapping in `environment.labels`. It is an error to provide both a\n mask of this form and the \"labels\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.nodeCount\u003c/td\u003e\n \u003ctd\u003eHorizontally scale the number of nodes in the environment. An integer\n greater than or equal to 3 must be provided in the `config.nodeCount`\n field.\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.airflowConfigOverrides\u003c/td\u003e\n \u003ctd\u003eReplace all Apache Airflow config overrides. If a replacement config\n overrides map is not included in `environment`, all config overrides\n are cleared.\n It is an error to provide both this mask and a mask specifying one or\n more individual config overrides.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.airflowConfigOverrides.\u003cvar\u003esection\u003c/var\u003e-\u003cvar\u003ename\n \u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eOverride the Apache Airflow config property \u003cvar\u003ename\u003c/var\u003e in the\n section named \u003cvar\u003esection\u003c/var\u003e, preserving other properties. To delete\n the property override, include it in `updateMask` and omit its mapping\n in `environment.config.softwareConfig.airflowConfigOverrides`.\n It is an error to provide both a mask of this form and the\n \"config.softwareConfig.airflowConfigOverrides\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.envVariables\u003c/td\u003e\n \u003ctd\u003eReplace all environment variables. If a replacement environment\n variable map is not included in `environment`, all custom environment\n variables  are cleared.\n It is an error to provide both this mask and a mask specifying one or\n more individual environment variables.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.imageVersion\u003c/td\u003e\n \u003ctd\u003eUpgrade the version of the environment in-place. Refer to\n `SoftwareConfig.image_version` for information on how to format the new\n image version. Additionally, the new image version cannot effect a version\n downgrade and must match the current image version's Composer major\n version and Airflow major and minor versions. Consult the\n \u003ca href=\"/composer/docs/concepts/versioning/composer-versions\"\u003eCloud\n Composer Version List\u003c/a\u003e for valid values.\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e",
2181	//       "format": "google-fieldmask",
2182	//       "location": "query",
2183	//       "type": "string"
2184	//     }
2185	//   },
2186	//   "path": "v1beta1/{+name}",
2187	//   "request": {
2188	//     "$ref": "Environment"
2189	//   },
2190	//   "response": {
2191	//     "$ref": "Operation"
2192	//   },
2193	//   "scopes": [
2194	//     "https://www.googleapis.com/auth/cloud-platform"
2195	//   ]
2196	// }
2197
2198}
2199
2200// method id "composer.projects.locations.imageVersions.list":
2201
2202type ProjectsLocationsImageVersionsListCall struct {
2203	s            *Service
2204	parent       string
2205	urlParams_   gensupport.URLParams
2206	ifNoneMatch_ string
2207	ctx_         context.Context
2208	header_      http.Header
2209}
2210
2211// List: List ImageVersions for provided location.
2212func (r *ProjectsLocationsImageVersionsService) List(parent string) *ProjectsLocationsImageVersionsListCall {
2213	c := &ProjectsLocationsImageVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2214	c.parent = parent
2215	return c
2216}
2217
2218// PageSize sets the optional parameter "pageSize": The maximum number
2219// of image_versions to return.
2220func (c *ProjectsLocationsImageVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsImageVersionsListCall {
2221	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2222	return c
2223}
2224
2225// PageToken sets the optional parameter "pageToken": The
2226// next_page_token value returned from a previous List request, if any.
2227func (c *ProjectsLocationsImageVersionsListCall) PageToken(pageToken string) *ProjectsLocationsImageVersionsListCall {
2228	c.urlParams_.Set("pageToken", pageToken)
2229	return c
2230}
2231
2232// Fields allows partial responses to be retrieved. See
2233// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2234// for more information.
2235func (c *ProjectsLocationsImageVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageVersionsListCall {
2236	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2237	return c
2238}
2239
2240// IfNoneMatch sets the optional parameter which makes the operation
2241// fail if the object's ETag matches the given value. This is useful for
2242// getting updates only after the object has changed since the last
2243// request. Use googleapi.IsNotModified to check whether the response
2244// error from Do is the result of In-None-Match.
2245func (c *ProjectsLocationsImageVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageVersionsListCall {
2246	c.ifNoneMatch_ = entityTag
2247	return c
2248}
2249
2250// Context sets the context to be used in this call's Do method. Any
2251// pending HTTP request will be aborted if the provided context is
2252// canceled.
2253func (c *ProjectsLocationsImageVersionsListCall) Context(ctx context.Context) *ProjectsLocationsImageVersionsListCall {
2254	c.ctx_ = ctx
2255	return c
2256}
2257
2258// Header returns an http.Header that can be modified by the caller to
2259// add HTTP headers to the request.
2260func (c *ProjectsLocationsImageVersionsListCall) Header() http.Header {
2261	if c.header_ == nil {
2262		c.header_ = make(http.Header)
2263	}
2264	return c.header_
2265}
2266
2267func (c *ProjectsLocationsImageVersionsListCall) doRequest(alt string) (*http.Response, error) {
2268	reqHeaders := make(http.Header)
2269	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
2270	for k, v := range c.header_ {
2271		reqHeaders[k] = v
2272	}
2273	reqHeaders.Set("User-Agent", c.s.userAgent())
2274	if c.ifNoneMatch_ != "" {
2275		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2276	}
2277	var body io.Reader = nil
2278	c.urlParams_.Set("alt", alt)
2279	c.urlParams_.Set("prettyPrint", "false")
2280	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/imageVersions")
2281	urls += "?" + c.urlParams_.Encode()
2282	req, err := http.NewRequest("GET", urls, body)
2283	if err != nil {
2284		return nil, err
2285	}
2286	req.Header = reqHeaders
2287	googleapi.Expand(req.URL, map[string]string{
2288		"parent": c.parent,
2289	})
2290	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2291}
2292
2293// Do executes the "composer.projects.locations.imageVersions.list" call.
2294// Exactly one of *ListImageVersionsResponse or error will be non-nil.
2295// Any non-2xx status code is an error. Response headers are in either
2296// *ListImageVersionsResponse.ServerResponse.Header or (if a response
2297// was returned at all) in error.(*googleapi.Error).Header. Use
2298// googleapi.IsNotModified to check whether the returned error was
2299// because http.StatusNotModified was returned.
2300func (c *ProjectsLocationsImageVersionsListCall) Do(opts ...googleapi.CallOption) (*ListImageVersionsResponse, error) {
2301	gensupport.SetOptions(c.urlParams_, opts...)
2302	res, err := c.doRequest("json")
2303	if res != nil && res.StatusCode == http.StatusNotModified {
2304		if res.Body != nil {
2305			res.Body.Close()
2306		}
2307		return nil, &googleapi.Error{
2308			Code:   res.StatusCode,
2309			Header: res.Header,
2310		}
2311	}
2312	if err != nil {
2313		return nil, err
2314	}
2315	defer googleapi.CloseBody(res)
2316	if err := googleapi.CheckResponse(res); err != nil {
2317		return nil, err
2318	}
2319	ret := &ListImageVersionsResponse{
2320		ServerResponse: googleapi.ServerResponse{
2321			Header:         res.Header,
2322			HTTPStatusCode: res.StatusCode,
2323		},
2324	}
2325	target := &ret
2326	if err := gensupport.DecodeResponse(target, res); err != nil {
2327		return nil, err
2328	}
2329	return ret, nil
2330	// {
2331	//   "description": "List ImageVersions for provided location.",
2332	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/imageVersions",
2333	//   "httpMethod": "GET",
2334	//   "id": "composer.projects.locations.imageVersions.list",
2335	//   "parameterOrder": [
2336	//     "parent"
2337	//   ],
2338	//   "parameters": {
2339	//     "pageSize": {
2340	//       "description": "The maximum number of image_versions to return.",
2341	//       "format": "int32",
2342	//       "location": "query",
2343	//       "type": "integer"
2344	//     },
2345	//     "pageToken": {
2346	//       "description": "The next_page_token value returned from a previous List request, if any.",
2347	//       "location": "query",
2348	//       "type": "string"
2349	//     },
2350	//     "parent": {
2351	//       "description": "List ImageVersions in the given project and location, in the form:\n\"projects/{projectId}/locations/{locationId}\"",
2352	//       "location": "path",
2353	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2354	//       "required": true,
2355	//       "type": "string"
2356	//     }
2357	//   },
2358	//   "path": "v1beta1/{+parent}/imageVersions",
2359	//   "response": {
2360	//     "$ref": "ListImageVersionsResponse"
2361	//   },
2362	//   "scopes": [
2363	//     "https://www.googleapis.com/auth/cloud-platform"
2364	//   ]
2365	// }
2366
2367}
2368
2369// Pages invokes f for each page of results.
2370// A non-nil error returned from f will halt the iteration.
2371// The provided context supersedes any context provided to the Context method.
2372func (c *ProjectsLocationsImageVersionsListCall) Pages(ctx context.Context, f func(*ListImageVersionsResponse) error) error {
2373	c.ctx_ = ctx
2374	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2375	for {
2376		x, err := c.Do()
2377		if err != nil {
2378			return err
2379		}
2380		if err := f(x); err != nil {
2381			return err
2382		}
2383		if x.NextPageToken == "" {
2384			return nil
2385		}
2386		c.PageToken(x.NextPageToken)
2387	}
2388}
2389
2390// method id "composer.projects.locations.operations.delete":
2391
2392type ProjectsLocationsOperationsDeleteCall struct {
2393	s          *Service
2394	name       string
2395	urlParams_ gensupport.URLParams
2396	ctx_       context.Context
2397	header_    http.Header
2398}
2399
2400// Delete: Deletes a long-running operation. This method indicates that
2401// the client is
2402// no longer interested in the operation result. It does not cancel
2403// the
2404// operation. If the server doesn't support this method, it
2405// returns
2406// `google.rpc.Code.UNIMPLEMENTED`.
2407func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
2408	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2409	c.name = name
2410	return c
2411}
2412
2413// Fields allows partial responses to be retrieved. See
2414// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2415// for more information.
2416func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
2417	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2418	return c
2419}
2420
2421// Context sets the context to be used in this call's Do method. Any
2422// pending HTTP request will be aborted if the provided context is
2423// canceled.
2424func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
2425	c.ctx_ = ctx
2426	return c
2427}
2428
2429// Header returns an http.Header that can be modified by the caller to
2430// add HTTP headers to the request.
2431func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
2432	if c.header_ == nil {
2433		c.header_ = make(http.Header)
2434	}
2435	return c.header_
2436}
2437
2438func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
2439	reqHeaders := make(http.Header)
2440	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
2441	for k, v := range c.header_ {
2442		reqHeaders[k] = v
2443	}
2444	reqHeaders.Set("User-Agent", c.s.userAgent())
2445	var body io.Reader = nil
2446	c.urlParams_.Set("alt", alt)
2447	c.urlParams_.Set("prettyPrint", "false")
2448	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2449	urls += "?" + c.urlParams_.Encode()
2450	req, err := http.NewRequest("DELETE", urls, body)
2451	if err != nil {
2452		return nil, err
2453	}
2454	req.Header = reqHeaders
2455	googleapi.Expand(req.URL, map[string]string{
2456		"name": c.name,
2457	})
2458	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2459}
2460
2461// Do executes the "composer.projects.locations.operations.delete" call.
2462// Exactly one of *Empty or error will be non-nil. Any non-2xx status
2463// code is an error. Response headers are in either
2464// *Empty.ServerResponse.Header or (if a response was returned at all)
2465// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2466// check whether the returned error was because http.StatusNotModified
2467// was returned.
2468func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2469	gensupport.SetOptions(c.urlParams_, opts...)
2470	res, err := c.doRequest("json")
2471	if res != nil && res.StatusCode == http.StatusNotModified {
2472		if res.Body != nil {
2473			res.Body.Close()
2474		}
2475		return nil, &googleapi.Error{
2476			Code:   res.StatusCode,
2477			Header: res.Header,
2478		}
2479	}
2480	if err != nil {
2481		return nil, err
2482	}
2483	defer googleapi.CloseBody(res)
2484	if err := googleapi.CheckResponse(res); err != nil {
2485		return nil, err
2486	}
2487	ret := &Empty{
2488		ServerResponse: googleapi.ServerResponse{
2489			Header:         res.Header,
2490			HTTPStatusCode: res.StatusCode,
2491		},
2492	}
2493	target := &ret
2494	if err := gensupport.DecodeResponse(target, res); err != nil {
2495		return nil, err
2496	}
2497	return ret, nil
2498	// {
2499	//   "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.",
2500	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
2501	//   "httpMethod": "DELETE",
2502	//   "id": "composer.projects.locations.operations.delete",
2503	//   "parameterOrder": [
2504	//     "name"
2505	//   ],
2506	//   "parameters": {
2507	//     "name": {
2508	//       "description": "The name of the operation resource to be deleted.",
2509	//       "location": "path",
2510	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
2511	//       "required": true,
2512	//       "type": "string"
2513	//     }
2514	//   },
2515	//   "path": "v1beta1/{+name}",
2516	//   "response": {
2517	//     "$ref": "Empty"
2518	//   },
2519	//   "scopes": [
2520	//     "https://www.googleapis.com/auth/cloud-platform"
2521	//   ]
2522	// }
2523
2524}
2525
2526// method id "composer.projects.locations.operations.get":
2527
2528type ProjectsLocationsOperationsGetCall struct {
2529	s            *Service
2530	name         string
2531	urlParams_   gensupport.URLParams
2532	ifNoneMatch_ string
2533	ctx_         context.Context
2534	header_      http.Header
2535}
2536
2537// Get: Gets the latest state of a long-running operation.  Clients can
2538// use this
2539// method to poll the operation result at intervals as recommended by
2540// the API
2541// service.
2542func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
2543	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2544	c.name = name
2545	return c
2546}
2547
2548// Fields allows partial responses to be retrieved. See
2549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2550// for more information.
2551func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
2552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2553	return c
2554}
2555
2556// IfNoneMatch sets the optional parameter which makes the operation
2557// fail if the object's ETag matches the given value. This is useful for
2558// getting updates only after the object has changed since the last
2559// request. Use googleapi.IsNotModified to check whether the response
2560// error from Do is the result of In-None-Match.
2561func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
2562	c.ifNoneMatch_ = entityTag
2563	return c
2564}
2565
2566// Context sets the context to be used in this call's Do method. Any
2567// pending HTTP request will be aborted if the provided context is
2568// canceled.
2569func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
2570	c.ctx_ = ctx
2571	return c
2572}
2573
2574// Header returns an http.Header that can be modified by the caller to
2575// add HTTP headers to the request.
2576func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
2577	if c.header_ == nil {
2578		c.header_ = make(http.Header)
2579	}
2580	return c.header_
2581}
2582
2583func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
2584	reqHeaders := make(http.Header)
2585	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
2586	for k, v := range c.header_ {
2587		reqHeaders[k] = v
2588	}
2589	reqHeaders.Set("User-Agent", c.s.userAgent())
2590	if c.ifNoneMatch_ != "" {
2591		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2592	}
2593	var body io.Reader = nil
2594	c.urlParams_.Set("alt", alt)
2595	c.urlParams_.Set("prettyPrint", "false")
2596	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2597	urls += "?" + c.urlParams_.Encode()
2598	req, err := http.NewRequest("GET", urls, body)
2599	if err != nil {
2600		return nil, err
2601	}
2602	req.Header = reqHeaders
2603	googleapi.Expand(req.URL, map[string]string{
2604		"name": c.name,
2605	})
2606	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2607}
2608
2609// Do executes the "composer.projects.locations.operations.get" call.
2610// Exactly one of *Operation or error will be non-nil. Any non-2xx
2611// status code is an error. Response headers are in either
2612// *Operation.ServerResponse.Header or (if a response was returned at
2613// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2614// to check whether the returned error was because
2615// http.StatusNotModified was returned.
2616func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2617	gensupport.SetOptions(c.urlParams_, opts...)
2618	res, err := c.doRequest("json")
2619	if res != nil && res.StatusCode == http.StatusNotModified {
2620		if res.Body != nil {
2621			res.Body.Close()
2622		}
2623		return nil, &googleapi.Error{
2624			Code:   res.StatusCode,
2625			Header: res.Header,
2626		}
2627	}
2628	if err != nil {
2629		return nil, err
2630	}
2631	defer googleapi.CloseBody(res)
2632	if err := googleapi.CheckResponse(res); err != nil {
2633		return nil, err
2634	}
2635	ret := &Operation{
2636		ServerResponse: googleapi.ServerResponse{
2637			Header:         res.Header,
2638			HTTPStatusCode: res.StatusCode,
2639		},
2640	}
2641	target := &ret
2642	if err := gensupport.DecodeResponse(target, res); err != nil {
2643		return nil, err
2644	}
2645	return ret, nil
2646	// {
2647	//   "description": "Gets the latest state of a long-running operation.  Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
2648	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
2649	//   "httpMethod": "GET",
2650	//   "id": "composer.projects.locations.operations.get",
2651	//   "parameterOrder": [
2652	//     "name"
2653	//   ],
2654	//   "parameters": {
2655	//     "name": {
2656	//       "description": "The name of the operation resource.",
2657	//       "location": "path",
2658	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
2659	//       "required": true,
2660	//       "type": "string"
2661	//     }
2662	//   },
2663	//   "path": "v1beta1/{+name}",
2664	//   "response": {
2665	//     "$ref": "Operation"
2666	//   },
2667	//   "scopes": [
2668	//     "https://www.googleapis.com/auth/cloud-platform"
2669	//   ]
2670	// }
2671
2672}
2673
2674// method id "composer.projects.locations.operations.list":
2675
2676type ProjectsLocationsOperationsListCall struct {
2677	s            *Service
2678	name         string
2679	urlParams_   gensupport.URLParams
2680	ifNoneMatch_ string
2681	ctx_         context.Context
2682	header_      http.Header
2683}
2684
2685// List: Lists operations that match the specified filter in the
2686// request. If the
2687// server doesn't support this method, it returns
2688// `UNIMPLEMENTED`.
2689//
2690// NOTE: the `name` binding allows API services to override the
2691// binding
2692// to use different resource name schemes, such as `users/*/operations`.
2693// To
2694// override the binding, API services can add a binding such
2695// as
2696// "/v1/{name=users/*}/operations" to their service configuration.
2697// For backwards compatibility, the default name includes the
2698// operations
2699// collection id, however overriding users must ensure the name
2700// binding
2701// is the parent resource, without the operations collection id.
2702func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
2703	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2704	c.name = name
2705	return c
2706}
2707
2708// Filter sets the optional parameter "filter": The standard list
2709// filter.
2710func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
2711	c.urlParams_.Set("filter", filter)
2712	return c
2713}
2714
2715// PageSize sets the optional parameter "pageSize": The standard list
2716// page size.
2717func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
2718	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2719	return c
2720}
2721
2722// PageToken sets the optional parameter "pageToken": The standard list
2723// page token.
2724func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
2725	c.urlParams_.Set("pageToken", pageToken)
2726	return c
2727}
2728
2729// Fields allows partial responses to be retrieved. See
2730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2731// for more information.
2732func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
2733	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2734	return c
2735}
2736
2737// IfNoneMatch sets the optional parameter which makes the operation
2738// fail if the object's ETag matches the given value. This is useful for
2739// getting updates only after the object has changed since the last
2740// request. Use googleapi.IsNotModified to check whether the response
2741// error from Do is the result of In-None-Match.
2742func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
2743	c.ifNoneMatch_ = entityTag
2744	return c
2745}
2746
2747// Context sets the context to be used in this call's Do method. Any
2748// pending HTTP request will be aborted if the provided context is
2749// canceled.
2750func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
2751	c.ctx_ = ctx
2752	return c
2753}
2754
2755// Header returns an http.Header that can be modified by the caller to
2756// add HTTP headers to the request.
2757func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
2758	if c.header_ == nil {
2759		c.header_ = make(http.Header)
2760	}
2761	return c.header_
2762}
2763
2764func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
2765	reqHeaders := make(http.Header)
2766	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302")
2767	for k, v := range c.header_ {
2768		reqHeaders[k] = v
2769	}
2770	reqHeaders.Set("User-Agent", c.s.userAgent())
2771	if c.ifNoneMatch_ != "" {
2772		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2773	}
2774	var body io.Reader = nil
2775	c.urlParams_.Set("alt", alt)
2776	c.urlParams_.Set("prettyPrint", "false")
2777	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
2778	urls += "?" + c.urlParams_.Encode()
2779	req, err := http.NewRequest("GET", urls, body)
2780	if err != nil {
2781		return nil, err
2782	}
2783	req.Header = reqHeaders
2784	googleapi.Expand(req.URL, map[string]string{
2785		"name": c.name,
2786	})
2787	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2788}
2789
2790// Do executes the "composer.projects.locations.operations.list" call.
2791// Exactly one of *ListOperationsResponse or error will be non-nil. Any
2792// non-2xx status code is an error. Response headers are in either
2793// *ListOperationsResponse.ServerResponse.Header or (if a response was
2794// returned at all) in error.(*googleapi.Error).Header. Use
2795// googleapi.IsNotModified to check whether the returned error was
2796// because http.StatusNotModified was returned.
2797func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
2798	gensupport.SetOptions(c.urlParams_, opts...)
2799	res, err := c.doRequest("json")
2800	if res != nil && res.StatusCode == http.StatusNotModified {
2801		if res.Body != nil {
2802			res.Body.Close()
2803		}
2804		return nil, &googleapi.Error{
2805			Code:   res.StatusCode,
2806			Header: res.Header,
2807		}
2808	}
2809	if err != nil {
2810		return nil, err
2811	}
2812	defer googleapi.CloseBody(res)
2813	if err := googleapi.CheckResponse(res); err != nil {
2814		return nil, err
2815	}
2816	ret := &ListOperationsResponse{
2817		ServerResponse: googleapi.ServerResponse{
2818			Header:         res.Header,
2819			HTTPStatusCode: res.StatusCode,
2820		},
2821	}
2822	target := &ret
2823	if err := gensupport.DecodeResponse(target, res); err != nil {
2824		return nil, err
2825	}
2826	return ret, nil
2827	// {
2828	//   "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
2829	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations",
2830	//   "httpMethod": "GET",
2831	//   "id": "composer.projects.locations.operations.list",
2832	//   "parameterOrder": [
2833	//     "name"
2834	//   ],
2835	//   "parameters": {
2836	//     "filter": {
2837	//       "description": "The standard list filter.",
2838	//       "location": "query",
2839	//       "type": "string"
2840	//     },
2841	//     "name": {
2842	//       "description": "The name of the operation's parent resource.",
2843	//       "location": "path",
2844	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2845	//       "required": true,
2846	//       "type": "string"
2847	//     },
2848	//     "pageSize": {
2849	//       "description": "The standard list page size.",
2850	//       "format": "int32",
2851	//       "location": "query",
2852	//       "type": "integer"
2853	//     },
2854	//     "pageToken": {
2855	//       "description": "The standard list page token.",
2856	//       "location": "query",
2857	//       "type": "string"
2858	//     }
2859	//   },
2860	//   "path": "v1beta1/{+name}/operations",
2861	//   "response": {
2862	//     "$ref": "ListOperationsResponse"
2863	//   },
2864	//   "scopes": [
2865	//     "https://www.googleapis.com/auth/cloud-platform"
2866	//   ]
2867	// }
2868
2869}
2870
2871// Pages invokes f for each page of results.
2872// A non-nil error returned from f will halt the iteration.
2873// The provided context supersedes any context provided to the Context method.
2874func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
2875	c.ctx_ = ctx
2876	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2877	for {
2878		x, err := c.Do()
2879		if err != nil {
2880			return err
2881		}
2882		if err := f(x); err != nil {
2883			return err
2884		}
2885		if x.NextPageToken == "" {
2886			return nil
2887		}
2888		c.PageToken(x.NextPageToken)
2889	}
2890}
2891