1// Package composer provides access to the Cloud Composer API.
2//
3// See https://cloud.google.com/composer/
4//
5// Usage example:
6//
7//   import "google.golang.org/api/composer/v1beta1"
8//   ...
9//   composerService, err := composer.New(oauthHttpClient)
10package composer // import "google.golang.org/api/composer/v1beta1"
11
12import (
13	"bytes"
14	"encoding/json"
15	"errors"
16	"fmt"
17	context "golang.org/x/net/context"
18	ctxhttp "golang.org/x/net/context/ctxhttp"
19	gensupport "google.golang.org/api/gensupport"
20	googleapi "google.golang.org/api/googleapi"
21	"io"
22	"net/http"
23	"net/url"
24	"strconv"
25	"strings"
26)
27
28// Always reference these packages, just in case the auto-generated code
29// below doesn't.
30var _ = bytes.NewBuffer
31var _ = strconv.Itoa
32var _ = fmt.Sprintf
33var _ = json.NewDecoder
34var _ = io.Copy
35var _ = url.Parse
36var _ = gensupport.MarshalJSON
37var _ = googleapi.Version
38var _ = errors.New
39var _ = strings.Replace
40var _ = context.Canceled
41var _ = ctxhttp.Do
42
43const apiId = "composer:v1beta1"
44const apiName = "composer"
45const apiVersion = "v1beta1"
46const basePath = "https://composer.googleapis.com/"
47
48// OAuth2 scopes used by this API.
49const (
50	// View and manage your data across Google Cloud Platform services
51	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
52)
53
54func New(client *http.Client) (*Service, error) {
55	if client == nil {
56		return nil, errors.New("client is nil")
57	}
58	s := &Service{client: client, BasePath: basePath}
59	s.Projects = NewProjectsService(s)
60	return s, nil
61}
62
63type Service struct {
64	client    *http.Client
65	BasePath  string // API endpoint base URL
66	UserAgent string // optional additional User-Agent fragment
67
68	Projects *ProjectsService
69}
70
71func (s *Service) userAgent() string {
72	if s.UserAgent == "" {
73		return googleapi.UserAgent
74	}
75	return googleapi.UserAgent + " " + s.UserAgent
76}
77
78func NewProjectsService(s *Service) *ProjectsService {
79	rs := &ProjectsService{s: s}
80	rs.Locations = NewProjectsLocationsService(s)
81	return rs
82}
83
84type ProjectsService struct {
85	s *Service
86
87	Locations *ProjectsLocationsService
88}
89
90func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
91	rs := &ProjectsLocationsService{s: s}
92	rs.Environments = NewProjectsLocationsEnvironmentsService(s)
93	rs.Operations = NewProjectsLocationsOperationsService(s)
94	return rs
95}
96
97type ProjectsLocationsService struct {
98	s *Service
99
100	Environments *ProjectsLocationsEnvironmentsService
101
102	Operations *ProjectsLocationsOperationsService
103}
104
105func NewProjectsLocationsEnvironmentsService(s *Service) *ProjectsLocationsEnvironmentsService {
106	rs := &ProjectsLocationsEnvironmentsService{s: s}
107	return rs
108}
109
110type ProjectsLocationsEnvironmentsService struct {
111	s *Service
112}
113
114func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
115	rs := &ProjectsLocationsOperationsService{s: s}
116	return rs
117}
118
119type ProjectsLocationsOperationsService struct {
120	s *Service
121}
122
123// Empty: A generic empty message that you can re-use to avoid defining
124// duplicated
125// empty messages in your APIs. A typical example is to use it as the
126// request
127// or the response type of an API method. For instance:
128//
129//     service Foo {
130//       rpc Bar(google.protobuf.Empty) returns
131// (google.protobuf.Empty);
132//     }
133//
134// The JSON representation for `Empty` is empty JSON object `{}`.
135type Empty struct {
136	// ServerResponse contains the HTTP response code and headers from the
137	// server.
138	googleapi.ServerResponse `json:"-"`
139}
140
141// Environment: An environment for running orchestration tasks.
142type Environment struct {
143	// Config: Configuration parameters for this environment.
144	Config *EnvironmentConfig `json:"config,omitempty"`
145
146	// CreateTime: Output only.
147	// The time at which this environment was created.
148	CreateTime string `json:"createTime,omitempty"`
149
150	// Labels: Optional. User-defined labels for this environment.
151	// The labels map can contain no more than 64 entries. Entries of the
152	// labels
153	// map are UTF8 strings that comply with the following restrictions:
154	//
155	// * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62}
156	// * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
157	// * Both keys and values are additionally constrained to be <= 128
158	// bytes in
159	// size.
160	Labels map[string]string `json:"labels,omitempty"`
161
162	// Name: The resource name of the environment, in the
163	// form:
164	// `projects/{projectId}/locations/{locationId}/environments/{envir
165	// onmentId}`
166	Name string `json:"name,omitempty"`
167
168	// State: The current state of the environment.
169	//
170	// Possible values:
171	//   "STATE_UNSPECIFIED" - The state of the environment is unknown.
172	//   "CREATING" - The environment is in the process of being created.
173	//   "RUNNING" - The environment is currently running and healthy. It is
174	// ready for use.
175	//   "UPDATING" - The environment is being updated. It remains usable
176	// but cannot receive
177	// additional update requests or be deleted at this time.
178	//   "DELETING" - The environment is undergoing deletion. It cannot be
179	// used.
180	//   "ERROR" - The environment has encountered an error and cannot be
181	// used.
182	State string `json:"state,omitempty"`
183
184	// UpdateTime: Output only.
185	// The time at which this environment was last modified.
186	UpdateTime string `json:"updateTime,omitempty"`
187
188	// Uuid: Output only.
189	// The UUID (Universally Unique IDentifier) associated with this
190	// environment.
191	// This value is generated when the environment is created.
192	Uuid string `json:"uuid,omitempty"`
193
194	// ServerResponse contains the HTTP response code and headers from the
195	// server.
196	googleapi.ServerResponse `json:"-"`
197
198	// ForceSendFields is a list of field names (e.g. "Config") to
199	// unconditionally include in API requests. By default, fields with
200	// empty values are omitted from API requests. However, any non-pointer,
201	// non-interface field appearing in ForceSendFields will be sent to the
202	// server regardless of whether the field is empty or not. This may be
203	// used to include empty fields in Patch requests.
204	ForceSendFields []string `json:"-"`
205
206	// NullFields is a list of field names (e.g. "Config") to include in API
207	// requests with the JSON null value. By default, fields with empty
208	// values are omitted from API requests. However, any field with an
209	// empty value appearing in NullFields will be sent to the server as
210	// null. It is an error if a field in this list has a non-empty value.
211	// This may be used to include null fields in Patch requests.
212	NullFields []string `json:"-"`
213}
214
215func (s *Environment) MarshalJSON() ([]byte, error) {
216	type NoMethod Environment
217	raw := NoMethod(*s)
218	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
219}
220
221// EnvironmentConfig: Configuration information for an environment.
222type EnvironmentConfig struct {
223	// AirflowUri: The URI of the Apache Airflow Web UI hosted within this
224	// environment (see
225	// [Airflow web
226	// interface](/composer/docs/how-to/accessing/airflow-web-interface)).
227	AirflowUri string `json:"airflowUri,omitempty"`
228
229	// DagGcsPrefix: Output only.
230	// The Cloud Storage prefix of the DAGs for this environment. Although
231	// Cloud
232	// Storage objects reside in a flat namespace, a hierarchical file
233	// tree
234	// can be simulated using "/"-delimited object name prefixes. DAG
235	// objects for
236	// this environment reside in a simulated directory with the given
237	// prefix.
238	DagGcsPrefix string `json:"dagGcsPrefix,omitempty"`
239
240	// GkeCluster: Output only.
241	// The Kubernetes Engine cluster used to run this environment.
242	GkeCluster string `json:"gkeCluster,omitempty"`
243
244	// NodeConfig: The configuration used for the Container Engine cluster.
245	NodeConfig *NodeConfig `json:"nodeConfig,omitempty"`
246
247	// NodeCount: The number of nodes in the Container Engine cluster that
248	// will be
249	// used to run this environment.
250	NodeCount int64 `json:"nodeCount,omitempty"`
251
252	// SoftwareConfig: The config settings for software inside the
253	// environment.
254	SoftwareConfig *SoftwareConfig `json:"softwareConfig,omitempty"`
255
256	// ForceSendFields is a list of field names (e.g. "AirflowUri") to
257	// unconditionally include in API requests. By default, fields with
258	// empty values are omitted from API requests. However, any non-pointer,
259	// non-interface field appearing in ForceSendFields will be sent to the
260	// server regardless of whether the field is empty or not. This may be
261	// used to include empty fields in Patch requests.
262	ForceSendFields []string `json:"-"`
263
264	// NullFields is a list of field names (e.g. "AirflowUri") to include in
265	// API requests with the JSON null value. By default, fields with empty
266	// values are omitted from API requests. However, any field with an
267	// empty value appearing in NullFields will be sent to the server as
268	// null. It is an error if a field in this list has a non-empty value.
269	// This may be used to include null fields in Patch requests.
270	NullFields []string `json:"-"`
271}
272
273func (s *EnvironmentConfig) MarshalJSON() ([]byte, error) {
274	type NoMethod EnvironmentConfig
275	raw := NoMethod(*s)
276	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
277}
278
279// ListEnvironmentsResponse: The environments in a project and location.
280type ListEnvironmentsResponse struct {
281	// Environments: The list of environments returned by a
282	// ListEnvironmentsRequest.
283	Environments []*Environment `json:"environments,omitempty"`
284
285	// NextPageToken: The page token used to query for the next page if one
286	// exists
287	NextPageToken string `json:"nextPageToken,omitempty"`
288
289	// ServerResponse contains the HTTP response code and headers from the
290	// server.
291	googleapi.ServerResponse `json:"-"`
292
293	// ForceSendFields is a list of field names (e.g. "Environments") to
294	// unconditionally include in API requests. By default, fields with
295	// empty values are omitted from API requests. However, any non-pointer,
296	// non-interface field appearing in ForceSendFields will be sent to the
297	// server regardless of whether the field is empty or not. This may be
298	// used to include empty fields in Patch requests.
299	ForceSendFields []string `json:"-"`
300
301	// NullFields is a list of field names (e.g. "Environments") to include
302	// in API requests with the JSON null value. By default, fields with
303	// empty values are omitted from API requests. However, any field with
304	// an empty value appearing in NullFields will be sent to the server as
305	// null. It is an error if a field in this list has a non-empty value.
306	// This may be used to include null fields in Patch requests.
307	NullFields []string `json:"-"`
308}
309
310func (s *ListEnvironmentsResponse) MarshalJSON() ([]byte, error) {
311	type NoMethod ListEnvironmentsResponse
312	raw := NoMethod(*s)
313	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
314}
315
316// ListOperationsResponse: The response message for
317// Operations.ListOperations.
318type ListOperationsResponse struct {
319	// NextPageToken: The standard List next-page token.
320	NextPageToken string `json:"nextPageToken,omitempty"`
321
322	// Operations: A list of operations that matches the specified filter in
323	// the request.
324	Operations []*Operation `json:"operations,omitempty"`
325
326	// ServerResponse contains the HTTP response code and headers from the
327	// server.
328	googleapi.ServerResponse `json:"-"`
329
330	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
331	// unconditionally include in API requests. By default, fields with
332	// empty values are omitted from API requests. However, any non-pointer,
333	// non-interface field appearing in ForceSendFields will be sent to the
334	// server regardless of whether the field is empty or not. This may be
335	// used to include empty fields in Patch requests.
336	ForceSendFields []string `json:"-"`
337
338	// NullFields is a list of field names (e.g. "NextPageToken") to include
339	// in API requests with the JSON null value. By default, fields with
340	// empty values are omitted from API requests. However, any field with
341	// an empty value appearing in NullFields will be sent to the server as
342	// null. It is an error if a field in this list has a non-empty value.
343	// This may be used to include null fields in Patch requests.
344	NullFields []string `json:"-"`
345}
346
347func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
348	type NoMethod ListOperationsResponse
349	raw := NoMethod(*s)
350	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
351}
352
353// NodeConfig: The configuration information for the Container Engine
354// nodes running
355// the Apache Airflow software.
356type NodeConfig struct {
357	// DiskSizeGb: Optional. The disk size in GB used for node VMs. Minimum
358	// is 10GB.
359	// If unspecified, defaults to 100GB. Cannot be updated.
360	DiskSizeGb int64 `json:"diskSizeGb,omitempty"`
361
362	// Location: Optional. The Compute Engine
363	// [zone](/compute/docs/regions-zones) in which
364	// to deploy the VMs used to run the Apache Airflow software, specified
365	// as a
366	// relative resource
367	// name](https://cloud.google.com/apis/design/resource_names#relative_res
368	// ource_name).
369	// For example: `projects/{projectId}/zones/{zoneId}`.
370	//
371	// This `location` must belong to the enclosing environment's project
372	// and
373	// location. If both this field and `nodeConfig.machineType` are
374	// specified,
375	// `nodeConfig.machineType` must belong to this `location`; if both
376	// are
377	// unspecified, the service will pick a zone in the Compute Engine
378	// region
379	// corresponding to the Cloud Composer location and propagate that
380	// choice to
381	// both fields. If exactly one of this field and
382	// `nodeConfig.machineType` is
383	// specified, the location information from the specified field will
384	// be
385	// propagated to the unspecified field.
386	Location string `json:"location,omitempty"`
387
388	// MachineType: Optional. The Google Compute Engine [machine
389	// type](
390	// /compute/docs/machine-types) used for cluster instances, specified as
391	// a
392	// [relative resource
393	// name](
394	// https://cloud.google.com/apis/design/resource_names#relative_re
395	// source_name).
396	// For
397	// example:
398	// `projects/{projectId}/zones/{zoneId}/machineTypes/{machineTyp
399	// eId}`.
400	//
401	// The `machineType` must belong to the enclosing environment's project
402	// and
403	// location. If both this field and `nodeConfig.location` are
404	// specified,
405	// this `machineType` must belong to the `nodeConfig.location`; if both
406	// are
407	// unspecified, the service will pick a zone in the Compute Engine
408	// region
409	// corresponding to the Cloud Composer location and propagate that
410	// choice to
411	// both fields. If exactly one of this field and `nodeConfig.location`
412	// is
413	// specified, the location information from the specified field will
414	// be
415	// propagated to the unspecified field.
416	//
417	// Furthermore, if this field is unspecified, the `machineTypeId`
418	// defaults
419	// to `n1-standard-1`.
420	MachineType string `json:"machineType,omitempty"`
421
422	// Network: Optional. The Compute Engine network to be used for
423	// machine
424	// communications, specified as a [relative resource
425	// name](
426	// https://cloud.google.com/apis/design/resource_names#relative_re
427	// source_name).
428	// For example:
429	// `projects/{projectId}/global/networks/{networkId}`.
430	//
431	// [Shared VPC](/vpc/docs/shared-vpc) is not currently supported.
432	// The
433	// network must belong to the environment's project. If unspecified,
434	// the
435	// "default" network ID in the environment's project is used.  If a
436	// "Custom
437	// Subnet Network" (see [Using Subnetworks](/compute/docs/subnetworks)
438	// for
439	// more information) is provided, `nodeConfig.subnetwork` must also be
440	// provided.
441	Network string `json:"network,omitempty"`
442
443	// OauthScopes: Optional. The set of Google API scopes to be made
444	// available on all of the
445	// node VMs. If `oauth_scopes` is empty, defaults
446	// to
447	// ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be
448	// updated.
449	OauthScopes []string `json:"oauthScopes,omitempty"`
450
451	// ServiceAccount: Optional. The Google Cloud Platform Service Account
452	// to be used by the node
453	// VMs. If a service account is not specified, the "default" Compute
454	// Engine
455	// service account is used. Cannot be updated.
456	ServiceAccount string `json:"serviceAccount,omitempty"`
457
458	// Subnetwork: Optional. The Compute Engine subnetwork to be used for
459	// machine
460	// communications, specified as a [relative resource
461	// name](
462	// https://cloud.google.com/apis/design/resource_names#relative_re
463	// source_name).
464	// For
465	// example:
466	// `projects/{projectId}/regions/{regionId}/subnetworks/{subnetw
467	// orkId}`
468	//
469	// If a subnetwork is provided, `nodeConfig.network` must also be
470	// provided,
471	// and the subnetwork must belong to the enclosing environment's project
472	// and
473	// location.
474	Subnetwork string `json:"subnetwork,omitempty"`
475
476	// Tags: Optional. The list of instance tags applied to all node VMs.
477	// Tags are used
478	// to identify valid sources or targets for network firewalls. Each tag
479	// within
480	// the list must comply with
481	// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
482	// Cannot be updated.
483	Tags []string `json:"tags,omitempty"`
484
485	// ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
486	// unconditionally include in API requests. By default, fields with
487	// empty values are omitted from API requests. However, any non-pointer,
488	// non-interface field appearing in ForceSendFields will be sent to the
489	// server regardless of whether the field is empty or not. This may be
490	// used to include empty fields in Patch requests.
491	ForceSendFields []string `json:"-"`
492
493	// NullFields is a list of field names (e.g. "DiskSizeGb") to include in
494	// API requests with the JSON null value. By default, fields with empty
495	// values are omitted from API requests. However, any field with an
496	// empty value appearing in NullFields will be sent to the server as
497	// null. It is an error if a field in this list has a non-empty value.
498	// This may be used to include null fields in Patch requests.
499	NullFields []string `json:"-"`
500}
501
502func (s *NodeConfig) MarshalJSON() ([]byte, error) {
503	type NoMethod NodeConfig
504	raw := NoMethod(*s)
505	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
506}
507
508// Operation: This resource represents a long-running operation that is
509// the result of a
510// network API call.
511type Operation struct {
512	// Done: If the value is `false`, it means the operation is still in
513	// progress.
514	// If `true`, the operation is completed, and either `error` or
515	// `response` is
516	// available.
517	Done bool `json:"done,omitempty"`
518
519	// Error: The error result of the operation in case of failure or
520	// cancellation.
521	Error *Status `json:"error,omitempty"`
522
523	// Metadata: Service-specific metadata associated with the operation.
524	// It typically
525	// contains progress information and common metadata such as create
526	// time.
527	// Some services might not provide such metadata.  Any method that
528	// returns a
529	// long-running operation should document the metadata type, if any.
530	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
531
532	// Name: The server-assigned name, which is only unique within the same
533	// service that
534	// originally returns it. If you use the default HTTP mapping,
535	// the
536	// `name` should have the format of `operations/some/unique/name`.
537	Name string `json:"name,omitempty"`
538
539	// Response: The normal response of the operation in case of success.
540	// If the original
541	// method returns no data on success, such as `Delete`, the response
542	// is
543	// `google.protobuf.Empty`.  If the original method is
544	// standard
545	// `Get`/`Create`/`Update`, the response should be the resource.  For
546	// other
547	// methods, the response should have the type `XxxResponse`, where
548	// `Xxx`
549	// is the original method name.  For example, if the original method
550	// name
551	// is `TakeSnapshot()`, the inferred response type
552	// is
553	// `TakeSnapshotResponse`.
554	Response googleapi.RawMessage `json:"response,omitempty"`
555
556	// ServerResponse contains the HTTP response code and headers from the
557	// server.
558	googleapi.ServerResponse `json:"-"`
559
560	// ForceSendFields is a list of field names (e.g. "Done") to
561	// unconditionally include in API requests. By default, fields with
562	// empty values are omitted from API requests. However, any non-pointer,
563	// non-interface field appearing in ForceSendFields will be sent to the
564	// server regardless of whether the field is empty or not. This may be
565	// used to include empty fields in Patch requests.
566	ForceSendFields []string `json:"-"`
567
568	// NullFields is a list of field names (e.g. "Done") to include in API
569	// requests with the JSON null value. By default, fields with empty
570	// values are omitted from API requests. However, any field with an
571	// empty value appearing in NullFields will be sent to the server as
572	// null. It is an error if a field in this list has a non-empty value.
573	// This may be used to include null fields in Patch requests.
574	NullFields []string `json:"-"`
575}
576
577func (s *Operation) MarshalJSON() ([]byte, error) {
578	type NoMethod Operation
579	raw := NoMethod(*s)
580	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
581}
582
583// OperationMetadata: Metadata describing an operation.
584type OperationMetadata struct {
585	// CreateTime: Output only.
586	// The time the operation was submitted to the server.
587	CreateTime string `json:"createTime,omitempty"`
588
589	// EndTime: Output only.
590	// The time when the operation terminated, regardless of its
591	// success.
592	// This field is unset if the operation is still ongoing.
593	EndTime string `json:"endTime,omitempty"`
594
595	// OperationType: Output only.
596	// The type of operation being performed.
597	//
598	// Possible values:
599	//   "TYPE_UNSPECIFIED" - Unused.
600	//   "CREATE" - A resource creation operation.
601	//   "DELETE" - A resource deletion operation.
602	//   "UPDATE" - A resource update operation.
603	OperationType string `json:"operationType,omitempty"`
604
605	// Resource: Output only.
606	// The resource being operated on, as a [relative resource
607	// name](
608	// /apis/design/resource_names#relative_resource_name).
609	Resource string `json:"resource,omitempty"`
610
611	// ResourceUuid: Output only.
612	// The UUID of the resource being operated on.
613	ResourceUuid string `json:"resourceUuid,omitempty"`
614
615	// State: Output only.
616	// The current operation state.
617	//
618	// Possible values:
619	//   "STATE_UNSPECIFIED" - Unused.
620	//   "PENDING" - The operation has been created but is not yet started.
621	//   "RUNNING" - The operation is underway.
622	//   "SUCCESSFUL" - The operation completed successfully.
623	//   "FAILED" - The operation is no longer running but did not succeed.
624	State string `json:"state,omitempty"`
625
626	// ForceSendFields is a list of field names (e.g. "CreateTime") to
627	// unconditionally include in API requests. By default, fields with
628	// empty values are omitted from API requests. However, any non-pointer,
629	// non-interface field appearing in ForceSendFields will be sent to the
630	// server regardless of whether the field is empty or not. This may be
631	// used to include empty fields in Patch requests.
632	ForceSendFields []string `json:"-"`
633
634	// NullFields is a list of field names (e.g. "CreateTime") to include in
635	// API requests with the JSON null value. By default, fields with empty
636	// values are omitted from API requests. However, any field with an
637	// empty value appearing in NullFields will be sent to the server as
638	// null. It is an error if a field in this list has a non-empty value.
639	// This may be used to include null fields in Patch requests.
640	NullFields []string `json:"-"`
641}
642
643func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
644	type NoMethod OperationMetadata
645	raw := NoMethod(*s)
646	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
647}
648
649// SoftwareConfig: Specifies the selection and config of software inside
650// the environment.
651type SoftwareConfig struct {
652	// AirflowConfigOverrides: Optional. Apache Airflow configuration
653	// properties to override.
654	//
655	// Property keys contain the section and property name, separated by a
656	// hyphen,
657	// for example `core-dags_are_paused_at_creation`. Sections must
658	// not
659	// contain hyphens ("-"), opening square brackets ("["),  or closing
660	// square
661	// brackets ("]"). The name must be non-empty and must not contain an
662	// equals
663	// sign ("=") or semicolon (";"). The section as well as the name must
664	// not
665	// contain a period ("."). Apache Airflow configuration property names
666	// must be
667	// written
668	// in
669	// [snake_case](https://www.google.com/url?sa=D&q=https%3A%2F%2Fen.wik
670	// ipedia.org%2Fwiki%2FSnake_case).
671	// Property values can contain any character and be written in any
672	// lower/upper
673	// case format.
674	//
675	// Certain Apache Airflow configuration property values
676	// are
677	// [blacklisted](/composer/docs/how-to/managing/setting-airflow-confi
678	// gurations#airflow_configuration_blacklists) and
679	// cannot be overridden.
680	AirflowConfigOverrides map[string]string `json:"airflowConfigOverrides,omitempty"`
681
682	// EnvVariables: Optional. Additional environment variables to provide
683	// to the Apache Airflow
684	// scheduler, worker, and webserver processes.
685	//
686	// Environment variable names must match the regular
687	// expression
688	// `a-zA-Z_*`. Furthermore, they cannot specify Apache Airflow
689	// software configuration overrides (i.e., match the regular
690	// expression
691	// `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`); nor can they take any of the
692	// following
693	// reserved values:
694	//
695	// * `AIRFLOW_HOME`
696	// * `C_FORCE_ROOT`
697	// * `CONTAINER_NAME`
698	// * `DAGS_FOLDER`
699	// * `GCP_PROJECT`
700	// * `GCS_BUCKET`
701	// * `GKE_CLUSTER_NAME`
702	// * `SQL_DATABASE`
703	// * `SQL_INSTANCE`
704	// * `SQL_PASSWORD`
705	// * `SQL_PROJECT`
706	// * `SQL_REGION`
707	// * `SQL_USER`
708	EnvVariables map[string]string `json:"envVariables,omitempty"`
709
710	// ImageVersion: Output only.
711	// The version of the software running in the environment.
712	// This encapsulates both the version of Cloud Composer functionality
713	// and the
714	// version of Apache Airflow. It must match the regular
715	// expression
716	// `composer-[0-9]+\.[0-9]+(\.[0-9]+)?-airflow-[0-9]+\.[0-9]+(
717	// \.[0-9]+.*)?`.
718	//
719	// The Cloud Composer portion of the version is a
720	// [semantic
721	// version](https://semver.org). The portion of the image version
722	// following
723	// <em>airflow-</em> is an official Apache Airflow repository
724	// [release
725	// name](https://github.com/apache/incubator-airflow/releases).
726	//
727	//
728	// See also [Release Notes](/composer/docs/release-notes).
729	ImageVersion string `json:"imageVersion,omitempty"`
730
731	// PypiPackages: Optional. Custom Python Package Index (PyPI) packages
732	// to be installed in
733	// the environment.
734	//
735	// Keys refer to the lowercase package name such as `numpy`
736	// and values are the lowercase extras and version specifier such
737	// as
738	// `==1.12.0`, `[devel,gcp_api]`, or `[devel]>=1.8.2, <1.9.2`. To
739	// specify a
740	// package without pinning it to a version specifier, use the empty
741	// string as
742	// the value.
743	PypiPackages map[string]string `json:"pypiPackages,omitempty"`
744
745	// ForceSendFields is a list of field names (e.g.
746	// "AirflowConfigOverrides") to unconditionally include in API requests.
747	// By default, fields with empty values are omitted from API requests.
748	// However, any non-pointer, non-interface field appearing in
749	// ForceSendFields will be sent to the server regardless of whether the
750	// field is empty or not. This may be used to include empty fields in
751	// Patch requests.
752	ForceSendFields []string `json:"-"`
753
754	// NullFields is a list of field names (e.g. "AirflowConfigOverrides")
755	// to include in API requests with the JSON null value. By default,
756	// fields with empty values are omitted from API requests. However, any
757	// field with an empty value appearing in NullFields will be sent to the
758	// server as null. It is an error if a field in this list has a
759	// non-empty value. This may be used to include null fields in Patch
760	// requests.
761	NullFields []string `json:"-"`
762}
763
764func (s *SoftwareConfig) MarshalJSON() ([]byte, error) {
765	type NoMethod SoftwareConfig
766	raw := NoMethod(*s)
767	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
768}
769
770// Status: The `Status` type defines a logical error model that is
771// suitable for different
772// programming environments, including REST APIs and RPC APIs. It is
773// used by
774// [gRPC](https://github.com/grpc). The error model is designed to
775// be:
776//
777// - Simple to use and understand for most users
778// - Flexible enough to meet unexpected needs
779//
780// # Overview
781//
782// The `Status` message contains three pieces of data: error code, error
783// message,
784// and error details. The error code should be an enum value
785// of
786// google.rpc.Code, but it may accept additional error codes if needed.
787// The
788// error message should be a developer-facing English message that
789// helps
790// developers *understand* and *resolve* the error. If a localized
791// user-facing
792// error message is needed, put the localized message in the error
793// details or
794// localize it in the client. The optional error details may contain
795// arbitrary
796// information about the error. There is a predefined set of error
797// detail types
798// in the package `google.rpc` that can be used for common error
799// conditions.
800//
801// # Language mapping
802//
803// The `Status` message is the logical representation of the error
804// model, but it
805// is not necessarily the actual wire format. When the `Status` message
806// is
807// exposed in different client libraries and different wire protocols,
808// it can be
809// mapped differently. For example, it will likely be mapped to some
810// exceptions
811// in Java, but more likely mapped to some error codes in C.
812//
813// # Other uses
814//
815// The error model and the `Status` message can be used in a variety
816// of
817// environments, either with or without APIs, to provide a
818// consistent developer experience across different
819// environments.
820//
821// Example uses of this error model include:
822//
823// - Partial errors. If a service needs to return partial errors to the
824// client,
825//     it may embed the `Status` in the normal response to indicate the
826// partial
827//     errors.
828//
829// - Workflow errors. A typical workflow has multiple steps. Each step
830// may
831//     have a `Status` message for error reporting.
832//
833// - Batch operations. If a client uses batch request and batch
834// response, the
835//     `Status` message should be used directly inside batch response,
836// one for
837//     each error sub-response.
838//
839// - Asynchronous operations. If an API call embeds asynchronous
840// operation
841//     results in its response, the status of those operations should
842// be
843//     represented directly using the `Status` message.
844//
845// - Logging. If some API errors are stored in logs, the message
846// `Status` could
847//     be used directly after any stripping needed for security/privacy
848// reasons.
849type Status struct {
850	// Code: The status code, which should be an enum value of
851	// google.rpc.Code.
852	Code int64 `json:"code,omitempty"`
853
854	// Details: A list of messages that carry the error details.  There is a
855	// common set of
856	// message types for APIs to use.
857	Details []googleapi.RawMessage `json:"details,omitempty"`
858
859	// Message: A developer-facing error message, which should be in
860	// English. Any
861	// user-facing error message should be localized and sent in
862	// the
863	// google.rpc.Status.details field, or localized by the client.
864	Message string `json:"message,omitempty"`
865
866	// ForceSendFields is a list of field names (e.g. "Code") to
867	// unconditionally include in API requests. By default, fields with
868	// empty values are omitted from API requests. However, any non-pointer,
869	// non-interface field appearing in ForceSendFields will be sent to the
870	// server regardless of whether the field is empty or not. This may be
871	// used to include empty fields in Patch requests.
872	ForceSendFields []string `json:"-"`
873
874	// NullFields is a list of field names (e.g. "Code") to include in API
875	// requests with the JSON null value. By default, fields with empty
876	// values are omitted from API requests. However, any field with an
877	// empty value appearing in NullFields will be sent to the server as
878	// null. It is an error if a field in this list has a non-empty value.
879	// This may be used to include null fields in Patch requests.
880	NullFields []string `json:"-"`
881}
882
883func (s *Status) MarshalJSON() ([]byte, error) {
884	type NoMethod Status
885	raw := NoMethod(*s)
886	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
887}
888
889// method id "composer.projects.locations.environments.create":
890
891type ProjectsLocationsEnvironmentsCreateCall struct {
892	s           *Service
893	parent      string
894	environment *Environment
895	urlParams_  gensupport.URLParams
896	ctx_        context.Context
897	header_     http.Header
898}
899
900// Create: Create a new environment.
901func (r *ProjectsLocationsEnvironmentsService) Create(parent string, environment *Environment) *ProjectsLocationsEnvironmentsCreateCall {
902	c := &ProjectsLocationsEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
903	c.parent = parent
904	c.environment = environment
905	return c
906}
907
908// Fields allows partial responses to be retrieved. See
909// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
910// for more information.
911func (c *ProjectsLocationsEnvironmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsCreateCall {
912	c.urlParams_.Set("fields", googleapi.CombineFields(s))
913	return c
914}
915
916// Context sets the context to be used in this call's Do method. Any
917// pending HTTP request will be aborted if the provided context is
918// canceled.
919func (c *ProjectsLocationsEnvironmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsCreateCall {
920	c.ctx_ = ctx
921	return c
922}
923
924// Header returns an http.Header that can be modified by the caller to
925// add HTTP headers to the request.
926func (c *ProjectsLocationsEnvironmentsCreateCall) Header() http.Header {
927	if c.header_ == nil {
928		c.header_ = make(http.Header)
929	}
930	return c.header_
931}
932
933func (c *ProjectsLocationsEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) {
934	reqHeaders := make(http.Header)
935	for k, v := range c.header_ {
936		reqHeaders[k] = v
937	}
938	reqHeaders.Set("User-Agent", c.s.userAgent())
939	var body io.Reader = nil
940	body, err := googleapi.WithoutDataWrapper.JSONReader(c.environment)
941	if err != nil {
942		return nil, err
943	}
944	reqHeaders.Set("Content-Type", "application/json")
945	c.urlParams_.Set("alt", alt)
946	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/environments")
947	urls += "?" + c.urlParams_.Encode()
948	req, _ := http.NewRequest("POST", urls, body)
949	req.Header = reqHeaders
950	googleapi.Expand(req.URL, map[string]string{
951		"parent": c.parent,
952	})
953	return gensupport.SendRequest(c.ctx_, c.s.client, req)
954}
955
956// Do executes the "composer.projects.locations.environments.create" call.
957// Exactly one of *Operation or error will be non-nil. Any non-2xx
958// status code is an error. Response headers are in either
959// *Operation.ServerResponse.Header or (if a response was returned at
960// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
961// to check whether the returned error was because
962// http.StatusNotModified was returned.
963func (c *ProjectsLocationsEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
964	gensupport.SetOptions(c.urlParams_, opts...)
965	res, err := c.doRequest("json")
966	if res != nil && res.StatusCode == http.StatusNotModified {
967		if res.Body != nil {
968			res.Body.Close()
969		}
970		return nil, &googleapi.Error{
971			Code:   res.StatusCode,
972			Header: res.Header,
973		}
974	}
975	if err != nil {
976		return nil, err
977	}
978	defer googleapi.CloseBody(res)
979	if err := googleapi.CheckResponse(res); err != nil {
980		return nil, err
981	}
982	ret := &Operation{
983		ServerResponse: googleapi.ServerResponse{
984			Header:         res.Header,
985			HTTPStatusCode: res.StatusCode,
986		},
987	}
988	target := &ret
989	if err := gensupport.DecodeResponse(target, res); err != nil {
990		return nil, err
991	}
992	return ret, nil
993	// {
994	//   "description": "Create a new environment.",
995	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments",
996	//   "httpMethod": "POST",
997	//   "id": "composer.projects.locations.environments.create",
998	//   "parameterOrder": [
999	//     "parent"
1000	//   ],
1001	//   "parameters": {
1002	//     "parent": {
1003	//       "description": "The parent must be of the form `projects/{projectId}/locations/{locationId}`.",
1004	//       "location": "path",
1005	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
1006	//       "required": true,
1007	//       "type": "string"
1008	//     }
1009	//   },
1010	//   "path": "v1beta1/{+parent}/environments",
1011	//   "request": {
1012	//     "$ref": "Environment"
1013	//   },
1014	//   "response": {
1015	//     "$ref": "Operation"
1016	//   },
1017	//   "scopes": [
1018	//     "https://www.googleapis.com/auth/cloud-platform"
1019	//   ]
1020	// }
1021
1022}
1023
1024// method id "composer.projects.locations.environments.delete":
1025
1026type ProjectsLocationsEnvironmentsDeleteCall struct {
1027	s          *Service
1028	name       string
1029	urlParams_ gensupport.URLParams
1030	ctx_       context.Context
1031	header_    http.Header
1032}
1033
1034// Delete: Delete an environment.
1035func (r *ProjectsLocationsEnvironmentsService) Delete(name string) *ProjectsLocationsEnvironmentsDeleteCall {
1036	c := &ProjectsLocationsEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1037	c.name = name
1038	return c
1039}
1040
1041// Fields allows partial responses to be retrieved. See
1042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1043// for more information.
1044func (c *ProjectsLocationsEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsDeleteCall {
1045	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1046	return c
1047}
1048
1049// Context sets the context to be used in this call's Do method. Any
1050// pending HTTP request will be aborted if the provided context is
1051// canceled.
1052func (c *ProjectsLocationsEnvironmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsDeleteCall {
1053	c.ctx_ = ctx
1054	return c
1055}
1056
1057// Header returns an http.Header that can be modified by the caller to
1058// add HTTP headers to the request.
1059func (c *ProjectsLocationsEnvironmentsDeleteCall) Header() http.Header {
1060	if c.header_ == nil {
1061		c.header_ = make(http.Header)
1062	}
1063	return c.header_
1064}
1065
1066func (c *ProjectsLocationsEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
1067	reqHeaders := make(http.Header)
1068	for k, v := range c.header_ {
1069		reqHeaders[k] = v
1070	}
1071	reqHeaders.Set("User-Agent", c.s.userAgent())
1072	var body io.Reader = nil
1073	c.urlParams_.Set("alt", alt)
1074	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
1075	urls += "?" + c.urlParams_.Encode()
1076	req, _ := http.NewRequest("DELETE", urls, body)
1077	req.Header = reqHeaders
1078	googleapi.Expand(req.URL, map[string]string{
1079		"name": c.name,
1080	})
1081	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1082}
1083
1084// Do executes the "composer.projects.locations.environments.delete" call.
1085// Exactly one of *Operation or error will be non-nil. Any non-2xx
1086// status code is an error. Response headers are in either
1087// *Operation.ServerResponse.Header or (if a response was returned at
1088// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1089// to check whether the returned error was because
1090// http.StatusNotModified was returned.
1091func (c *ProjectsLocationsEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
1092	gensupport.SetOptions(c.urlParams_, opts...)
1093	res, err := c.doRequest("json")
1094	if res != nil && res.StatusCode == http.StatusNotModified {
1095		if res.Body != nil {
1096			res.Body.Close()
1097		}
1098		return nil, &googleapi.Error{
1099			Code:   res.StatusCode,
1100			Header: res.Header,
1101		}
1102	}
1103	if err != nil {
1104		return nil, err
1105	}
1106	defer googleapi.CloseBody(res)
1107	if err := googleapi.CheckResponse(res); err != nil {
1108		return nil, err
1109	}
1110	ret := &Operation{
1111		ServerResponse: googleapi.ServerResponse{
1112			Header:         res.Header,
1113			HTTPStatusCode: res.StatusCode,
1114		},
1115	}
1116	target := &ret
1117	if err := gensupport.DecodeResponse(target, res); err != nil {
1118		return nil, err
1119	}
1120	return ret, nil
1121	// {
1122	//   "description": "Delete an environment.",
1123	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}",
1124	//   "httpMethod": "DELETE",
1125	//   "id": "composer.projects.locations.environments.delete",
1126	//   "parameterOrder": [
1127	//     "name"
1128	//   ],
1129	//   "parameters": {
1130	//     "name": {
1131	//       "description": "The environment to delete, in the form:\n`projects/{projectId}/locations/{locationId}/environments/{environmentId}`",
1132	//       "location": "path",
1133	//       "pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$",
1134	//       "required": true,
1135	//       "type": "string"
1136	//     }
1137	//   },
1138	//   "path": "v1beta1/{+name}",
1139	//   "response": {
1140	//     "$ref": "Operation"
1141	//   },
1142	//   "scopes": [
1143	//     "https://www.googleapis.com/auth/cloud-platform"
1144	//   ]
1145	// }
1146
1147}
1148
1149// method id "composer.projects.locations.environments.get":
1150
1151type ProjectsLocationsEnvironmentsGetCall struct {
1152	s            *Service
1153	name         string
1154	urlParams_   gensupport.URLParams
1155	ifNoneMatch_ string
1156	ctx_         context.Context
1157	header_      http.Header
1158}
1159
1160// Get: Get an existing environment.
1161func (r *ProjectsLocationsEnvironmentsService) Get(name string) *ProjectsLocationsEnvironmentsGetCall {
1162	c := &ProjectsLocationsEnvironmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1163	c.name = name
1164	return c
1165}
1166
1167// Fields allows partial responses to be retrieved. See
1168// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1169// for more information.
1170func (c *ProjectsLocationsEnvironmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsGetCall {
1171	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1172	return c
1173}
1174
1175// IfNoneMatch sets the optional parameter which makes the operation
1176// fail if the object's ETag matches the given value. This is useful for
1177// getting updates only after the object has changed since the last
1178// request. Use googleapi.IsNotModified to check whether the response
1179// error from Do is the result of In-None-Match.
1180func (c *ProjectsLocationsEnvironmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEnvironmentsGetCall {
1181	c.ifNoneMatch_ = entityTag
1182	return c
1183}
1184
1185// Context sets the context to be used in this call's Do method. Any
1186// pending HTTP request will be aborted if the provided context is
1187// canceled.
1188func (c *ProjectsLocationsEnvironmentsGetCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsGetCall {
1189	c.ctx_ = ctx
1190	return c
1191}
1192
1193// Header returns an http.Header that can be modified by the caller to
1194// add HTTP headers to the request.
1195func (c *ProjectsLocationsEnvironmentsGetCall) Header() http.Header {
1196	if c.header_ == nil {
1197		c.header_ = make(http.Header)
1198	}
1199	return c.header_
1200}
1201
1202func (c *ProjectsLocationsEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) {
1203	reqHeaders := make(http.Header)
1204	for k, v := range c.header_ {
1205		reqHeaders[k] = v
1206	}
1207	reqHeaders.Set("User-Agent", c.s.userAgent())
1208	if c.ifNoneMatch_ != "" {
1209		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1210	}
1211	var body io.Reader = nil
1212	c.urlParams_.Set("alt", alt)
1213	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
1214	urls += "?" + c.urlParams_.Encode()
1215	req, _ := http.NewRequest("GET", urls, body)
1216	req.Header = reqHeaders
1217	googleapi.Expand(req.URL, map[string]string{
1218		"name": c.name,
1219	})
1220	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1221}
1222
1223// Do executes the "composer.projects.locations.environments.get" call.
1224// Exactly one of *Environment or error will be non-nil. Any non-2xx
1225// status code is an error. Response headers are in either
1226// *Environment.ServerResponse.Header or (if a response was returned at
1227// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1228// to check whether the returned error was because
1229// http.StatusNotModified was returned.
1230func (c *ProjectsLocationsEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*Environment, error) {
1231	gensupport.SetOptions(c.urlParams_, opts...)
1232	res, err := c.doRequest("json")
1233	if res != nil && res.StatusCode == http.StatusNotModified {
1234		if res.Body != nil {
1235			res.Body.Close()
1236		}
1237		return nil, &googleapi.Error{
1238			Code:   res.StatusCode,
1239			Header: res.Header,
1240		}
1241	}
1242	if err != nil {
1243		return nil, err
1244	}
1245	defer googleapi.CloseBody(res)
1246	if err := googleapi.CheckResponse(res); err != nil {
1247		return nil, err
1248	}
1249	ret := &Environment{
1250		ServerResponse: googleapi.ServerResponse{
1251			Header:         res.Header,
1252			HTTPStatusCode: res.StatusCode,
1253		},
1254	}
1255	target := &ret
1256	if err := gensupport.DecodeResponse(target, res); err != nil {
1257		return nil, err
1258	}
1259	return ret, nil
1260	// {
1261	//   "description": "Get an existing environment.",
1262	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}",
1263	//   "httpMethod": "GET",
1264	//   "id": "composer.projects.locations.environments.get",
1265	//   "parameterOrder": [
1266	//     "name"
1267	//   ],
1268	//   "parameters": {
1269	//     "name": {
1270	//       "description": "The resource name of the environment to get, in the form:\n`projects/{projectId}/locations/{locationId}/environments/{environmentId}`",
1271	//       "location": "path",
1272	//       "pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$",
1273	//       "required": true,
1274	//       "type": "string"
1275	//     }
1276	//   },
1277	//   "path": "v1beta1/{+name}",
1278	//   "response": {
1279	//     "$ref": "Environment"
1280	//   },
1281	//   "scopes": [
1282	//     "https://www.googleapis.com/auth/cloud-platform"
1283	//   ]
1284	// }
1285
1286}
1287
1288// method id "composer.projects.locations.environments.list":
1289
1290type ProjectsLocationsEnvironmentsListCall struct {
1291	s            *Service
1292	parent       string
1293	urlParams_   gensupport.URLParams
1294	ifNoneMatch_ string
1295	ctx_         context.Context
1296	header_      http.Header
1297}
1298
1299// List: List environments.
1300func (r *ProjectsLocationsEnvironmentsService) List(parent string) *ProjectsLocationsEnvironmentsListCall {
1301	c := &ProjectsLocationsEnvironmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1302	c.parent = parent
1303	return c
1304}
1305
1306// PageSize sets the optional parameter "pageSize": The maximum number
1307// of environments to return.
1308func (c *ProjectsLocationsEnvironmentsListCall) PageSize(pageSize int64) *ProjectsLocationsEnvironmentsListCall {
1309	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1310	return c
1311}
1312
1313// PageToken sets the optional parameter "pageToken": The
1314// next_page_token value returned from a previous List request, if any.
1315func (c *ProjectsLocationsEnvironmentsListCall) PageToken(pageToken string) *ProjectsLocationsEnvironmentsListCall {
1316	c.urlParams_.Set("pageToken", pageToken)
1317	return c
1318}
1319
1320// Fields allows partial responses to be retrieved. See
1321// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1322// for more information.
1323func (c *ProjectsLocationsEnvironmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsListCall {
1324	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1325	return c
1326}
1327
1328// IfNoneMatch sets the optional parameter which makes the operation
1329// fail if the object's ETag matches the given value. This is useful for
1330// getting updates only after the object has changed since the last
1331// request. Use googleapi.IsNotModified to check whether the response
1332// error from Do is the result of In-None-Match.
1333func (c *ProjectsLocationsEnvironmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEnvironmentsListCall {
1334	c.ifNoneMatch_ = entityTag
1335	return c
1336}
1337
1338// Context sets the context to be used in this call's Do method. Any
1339// pending HTTP request will be aborted if the provided context is
1340// canceled.
1341func (c *ProjectsLocationsEnvironmentsListCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsListCall {
1342	c.ctx_ = ctx
1343	return c
1344}
1345
1346// Header returns an http.Header that can be modified by the caller to
1347// add HTTP headers to the request.
1348func (c *ProjectsLocationsEnvironmentsListCall) Header() http.Header {
1349	if c.header_ == nil {
1350		c.header_ = make(http.Header)
1351	}
1352	return c.header_
1353}
1354
1355func (c *ProjectsLocationsEnvironmentsListCall) doRequest(alt string) (*http.Response, error) {
1356	reqHeaders := make(http.Header)
1357	for k, v := range c.header_ {
1358		reqHeaders[k] = v
1359	}
1360	reqHeaders.Set("User-Agent", c.s.userAgent())
1361	if c.ifNoneMatch_ != "" {
1362		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1363	}
1364	var body io.Reader = nil
1365	c.urlParams_.Set("alt", alt)
1366	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/environments")
1367	urls += "?" + c.urlParams_.Encode()
1368	req, _ := http.NewRequest("GET", urls, body)
1369	req.Header = reqHeaders
1370	googleapi.Expand(req.URL, map[string]string{
1371		"parent": c.parent,
1372	})
1373	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1374}
1375
1376// Do executes the "composer.projects.locations.environments.list" call.
1377// Exactly one of *ListEnvironmentsResponse or error will be non-nil.
1378// Any non-2xx status code is an error. Response headers are in either
1379// *ListEnvironmentsResponse.ServerResponse.Header or (if a response was
1380// returned at all) in error.(*googleapi.Error).Header. Use
1381// googleapi.IsNotModified to check whether the returned error was
1382// because http.StatusNotModified was returned.
1383func (c *ProjectsLocationsEnvironmentsListCall) Do(opts ...googleapi.CallOption) (*ListEnvironmentsResponse, error) {
1384	gensupport.SetOptions(c.urlParams_, opts...)
1385	res, err := c.doRequest("json")
1386	if res != nil && res.StatusCode == http.StatusNotModified {
1387		if res.Body != nil {
1388			res.Body.Close()
1389		}
1390		return nil, &googleapi.Error{
1391			Code:   res.StatusCode,
1392			Header: res.Header,
1393		}
1394	}
1395	if err != nil {
1396		return nil, err
1397	}
1398	defer googleapi.CloseBody(res)
1399	if err := googleapi.CheckResponse(res); err != nil {
1400		return nil, err
1401	}
1402	ret := &ListEnvironmentsResponse{
1403		ServerResponse: googleapi.ServerResponse{
1404			Header:         res.Header,
1405			HTTPStatusCode: res.StatusCode,
1406		},
1407	}
1408	target := &ret
1409	if err := gensupport.DecodeResponse(target, res); err != nil {
1410		return nil, err
1411	}
1412	return ret, nil
1413	// {
1414	//   "description": "List environments.",
1415	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments",
1416	//   "httpMethod": "GET",
1417	//   "id": "composer.projects.locations.environments.list",
1418	//   "parameterOrder": [
1419	//     "parent"
1420	//   ],
1421	//   "parameters": {
1422	//     "pageSize": {
1423	//       "description": "The maximum number of environments to return.",
1424	//       "format": "int32",
1425	//       "location": "query",
1426	//       "type": "integer"
1427	//     },
1428	//     "pageToken": {
1429	//       "description": "The next_page_token value returned from a previous List request, if any.",
1430	//       "location": "query",
1431	//       "type": "string"
1432	//     },
1433	//     "parent": {
1434	//       "description": "List environments in the given project and location, in the form:\n`projects/{projectId}/locations/{locationId}`",
1435	//       "location": "path",
1436	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
1437	//       "required": true,
1438	//       "type": "string"
1439	//     }
1440	//   },
1441	//   "path": "v1beta1/{+parent}/environments",
1442	//   "response": {
1443	//     "$ref": "ListEnvironmentsResponse"
1444	//   },
1445	//   "scopes": [
1446	//     "https://www.googleapis.com/auth/cloud-platform"
1447	//   ]
1448	// }
1449
1450}
1451
1452// Pages invokes f for each page of results.
1453// A non-nil error returned from f will halt the iteration.
1454// The provided context supersedes any context provided to the Context method.
1455func (c *ProjectsLocationsEnvironmentsListCall) Pages(ctx context.Context, f func(*ListEnvironmentsResponse) error) error {
1456	c.ctx_ = ctx
1457	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
1458	for {
1459		x, err := c.Do()
1460		if err != nil {
1461			return err
1462		}
1463		if err := f(x); err != nil {
1464			return err
1465		}
1466		if x.NextPageToken == "" {
1467			return nil
1468		}
1469		c.PageToken(x.NextPageToken)
1470	}
1471}
1472
1473// method id "composer.projects.locations.environments.patch":
1474
1475type ProjectsLocationsEnvironmentsPatchCall struct {
1476	s           *Service
1477	name        string
1478	environment *Environment
1479	urlParams_  gensupport.URLParams
1480	ctx_        context.Context
1481	header_     http.Header
1482}
1483
1484// Patch: Update an environment.
1485func (r *ProjectsLocationsEnvironmentsService) Patch(name string, environment *Environment) *ProjectsLocationsEnvironmentsPatchCall {
1486	c := &ProjectsLocationsEnvironmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1487	c.name = name
1488	c.environment = environment
1489	return c
1490}
1491
1492// UpdateMask sets the optional parameter "updateMask": Required. A
1493// comma-separated list of paths, relative to `Environment`, of
1494// fields to update.
1495// For example, to set the version of scikit-learn to install in
1496// the
1497// environment to 0.19.0 and to remove an existing installation
1498// of
1499// argparse, the `updateMask` parameter would include the following
1500// two
1501// `paths` values: "config.softwareConfig.pypiPackages.scikit-learn"
1502// and
1503// "config.softwareConfig.pypiPackages.argparse". The included
1504// patch
1505// environment would specify the scikit-learn version as follows:
1506//
1507//     {
1508//       "config":{
1509//         "softwareConfig":{
1510//           "pypiPackages":{
1511//             "scikit-learn":"==0.19.0"
1512//           }
1513//         }
1514//       }
1515//     }
1516//
1517// Note that in the above example, any existing PyPI packages
1518// other than scikit-learn and argparse will be unaffected.
1519//
1520// Only one update type may be included in a single request's
1521// `updateMask`.
1522// For example, one cannot update both the PyPI packages and
1523// labels in the same request. However, it is possible to update
1524// multiple
1525// members of a map field simultaneously in the same request. For
1526// example,
1527// to set the labels "label1" and "label2" while clearing "label3"
1528// (assuming
1529// it already exists), one can
1530// provide the paths "labels.label1", "labels.label2", and
1531// "labels.label3"
1532// and populate the patch environment as follows:
1533//
1534//     {
1535//       "labels":{
1536//         "label1":"new-label1-value"
1537//         "label2":"new-label2-value"
1538//       }
1539//     }
1540//
1541// Note that in the above example, any existing labels that are
1542// not
1543// included in the `updateMask` will be unaffected.
1544//
1545// It is also possible to replace an entire map field by providing
1546// the
1547// map field's path in the `updateMask`. The new value of the field
1548// will
1549// be that which is provided in the patch environment. For example,
1550// to
1551// delete all pre-existing user-specified PyPI packages and
1552// install botocore at version 1.7.14, the `updateMask` would
1553// contain
1554// the path "config.softwareConfig.pypiPackages", and
1555// the patch environment would be the following:
1556//
1557//     {
1558//       "config":{
1559//         "softwareConfig":{
1560//           "pypiPackages":{
1561//             "botocore":"==1.7.14"
1562//           }
1563//         }
1564//       }
1565//     }
1566//
1567// <strong>Note:</strong> Only the following fields can be updated:
1568//
1569//  <table>
1570//  <tbody>
1571//  <tr>
1572//  <td><strong>Mask</strong></td>
1573//  <td><strong>Purpose</strong></td>
1574//  </tr>
1575//  <tr>
1576//  <td>config.softwareConfig.pypiPackages
1577//  </td>
1578//  <td>Replace all custom custom PyPI packages. If a replacement
1579//  package map is not included in `environment`, all custom
1580//  PyPI packages are cleared. It is an error to provide both this mask
1581// and a
1582//  mask specifying an individual package.</td>
1583//  </tr>
1584//  <tr>
1585//  <td>config.softwareConfig.pypiPackages.<var>packagename</var></td>
1586//  <td>Update the custom PyPI package <var>packagename</var>,
1587//  preserving other packages. To delete the package, include it in
1588//  `updateMask`, and omit the mapping for it in
1589//  `environment.config.softwareConfig.pypiPackages`. It is an error
1590//  to provide both a mask of this form and the
1591//  "config.softwareConfig.pypiPackages" mask.</td>
1592//  </tr>
1593//  <tr>
1594//  <td>labels</td>
1595//  <td>Replace all environment labels. If a replacement labels map is
1596// not
1597//  included in `environment`, all labels are cleared. It is an error
1598// to
1599//  provide both this mask and a mask specifying one or more individual
1600//  labels.</td>
1601//  </tr>
1602//  <tr>
1603//  <td>labels.<var>labelName</var></td>
1604//  <td>Set the label named <var>labelName</var>, while preserving
1605// other
1606//  labels. To delete the label, include it in `updateMask` and omit
1607// its
1608//  mapping in `environment.labels`. It is an error to provide both a
1609//  mask of this form and the "labels" mask.</td>
1610//  </tr>
1611//  <tr>
1612//  <td>config.nodeCount</td>
1613//  <td>Horizontally scale the number of nodes in the environment. An
1614// integer
1615//  greater than or equal to 3 must be provided in the
1616// `config.nodeCount` field.
1617//  </td>
1618//  </tr>
1619//  <tr>
1620//  <td>config.softwareConfig.airflowConfigOverrides</td>
1621//  <td>Replace all Apache Airflow config overrides. If a replacement
1622// config
1623//  overrides map is not included in `environment`, all config
1624// overrides
1625//  are cleared.
1626//  It is an error to provide both this mask and a mask specifying one
1627// or
1628//  more individual config overrides.</td>
1629//  </tr>
1630//  <tr>
1631//  <td>config.softwareConfig.properties.<var>section</var>-<var>name
1632//  </var></td>
1633//  <td>Override the Apache Airflow property <var>name</var> in the
1634// section
1635//  named <var>section</var>, preserving other properties. To delete
1636// the
1637//  property override, include it in `updateMask` and omit its mapping
1638//  in `environment.config.softwareConfig.properties`.
1639//  It is an error to provide both a mask of this form and the
1640//  "config.softwareConfig.properties" mask.</td>
1641//  </tr>
1642//  <tr>
1643//  <td>config.softwareConfig.envVariables</td>
1644//  <td>Replace all environment variables. If a replacement environment
1645//  variable map is not included in `environment`, all custom
1646// environment
1647//  variables  are cleared.
1648//  It is an error to provide both this mask and a mask specifying one
1649// or
1650//  more individual environment variables.</td>
1651//  </tr>
1652//  </tbody>
1653//  </table>
1654func (c *ProjectsLocationsEnvironmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEnvironmentsPatchCall {
1655	c.urlParams_.Set("updateMask", updateMask)
1656	return c
1657}
1658
1659// Fields allows partial responses to be retrieved. See
1660// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1661// for more information.
1662func (c *ProjectsLocationsEnvironmentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsPatchCall {
1663	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1664	return c
1665}
1666
1667// Context sets the context to be used in this call's Do method. Any
1668// pending HTTP request will be aborted if the provided context is
1669// canceled.
1670func (c *ProjectsLocationsEnvironmentsPatchCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsPatchCall {
1671	c.ctx_ = ctx
1672	return c
1673}
1674
1675// Header returns an http.Header that can be modified by the caller to
1676// add HTTP headers to the request.
1677func (c *ProjectsLocationsEnvironmentsPatchCall) Header() http.Header {
1678	if c.header_ == nil {
1679		c.header_ = make(http.Header)
1680	}
1681	return c.header_
1682}
1683
1684func (c *ProjectsLocationsEnvironmentsPatchCall) doRequest(alt string) (*http.Response, error) {
1685	reqHeaders := make(http.Header)
1686	for k, v := range c.header_ {
1687		reqHeaders[k] = v
1688	}
1689	reqHeaders.Set("User-Agent", c.s.userAgent())
1690	var body io.Reader = nil
1691	body, err := googleapi.WithoutDataWrapper.JSONReader(c.environment)
1692	if err != nil {
1693		return nil, err
1694	}
1695	reqHeaders.Set("Content-Type", "application/json")
1696	c.urlParams_.Set("alt", alt)
1697	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
1698	urls += "?" + c.urlParams_.Encode()
1699	req, _ := http.NewRequest("PATCH", urls, body)
1700	req.Header = reqHeaders
1701	googleapi.Expand(req.URL, map[string]string{
1702		"name": c.name,
1703	})
1704	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1705}
1706
1707// Do executes the "composer.projects.locations.environments.patch" call.
1708// Exactly one of *Operation or error will be non-nil. Any non-2xx
1709// status code is an error. Response headers are in either
1710// *Operation.ServerResponse.Header or (if a response was returned at
1711// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1712// to check whether the returned error was because
1713// http.StatusNotModified was returned.
1714func (c *ProjectsLocationsEnvironmentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
1715	gensupport.SetOptions(c.urlParams_, opts...)
1716	res, err := c.doRequest("json")
1717	if res != nil && res.StatusCode == http.StatusNotModified {
1718		if res.Body != nil {
1719			res.Body.Close()
1720		}
1721		return nil, &googleapi.Error{
1722			Code:   res.StatusCode,
1723			Header: res.Header,
1724		}
1725	}
1726	if err != nil {
1727		return nil, err
1728	}
1729	defer googleapi.CloseBody(res)
1730	if err := googleapi.CheckResponse(res); err != nil {
1731		return nil, err
1732	}
1733	ret := &Operation{
1734		ServerResponse: googleapi.ServerResponse{
1735			Header:         res.Header,
1736			HTTPStatusCode: res.StatusCode,
1737		},
1738	}
1739	target := &ret
1740	if err := gensupport.DecodeResponse(target, res); err != nil {
1741		return nil, err
1742	}
1743	return ret, nil
1744	// {
1745	//   "description": "Update an environment.",
1746	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}",
1747	//   "httpMethod": "PATCH",
1748	//   "id": "composer.projects.locations.environments.patch",
1749	//   "parameterOrder": [
1750	//     "name"
1751	//   ],
1752	//   "parameters": {
1753	//     "name": {
1754	//       "description": "The relative resource name of the environment to update, in the form:\n`projects/{projectId}/locations/{locationId}/environments/{environmentId}`",
1755	//       "location": "path",
1756	//       "pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$",
1757	//       "required": true,
1758	//       "type": "string"
1759	//     },
1760	//     "updateMask": {
1761	//       "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` 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.properties.\u003cvar\u003esection\u003c/var\u003e-\u003cvar\u003ename\n \u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eOverride the Apache Airflow property \u003cvar\u003ename\u003c/var\u003e in the section\n named \u003cvar\u003esection\u003c/var\u003e, preserving other properties. To delete the\n property override, include it in `updateMask` and omit its mapping\n in `environment.config.softwareConfig.properties`.\n It is an error to provide both a mask of this form and the\n \"config.softwareConfig.properties\" 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 \u003c/tbody\u003e\n \u003c/table\u003e",
1762	//       "format": "google-fieldmask",
1763	//       "location": "query",
1764	//       "type": "string"
1765	//     }
1766	//   },
1767	//   "path": "v1beta1/{+name}",
1768	//   "request": {
1769	//     "$ref": "Environment"
1770	//   },
1771	//   "response": {
1772	//     "$ref": "Operation"
1773	//   },
1774	//   "scopes": [
1775	//     "https://www.googleapis.com/auth/cloud-platform"
1776	//   ]
1777	// }
1778
1779}
1780
1781// method id "composer.projects.locations.operations.delete":
1782
1783type ProjectsLocationsOperationsDeleteCall struct {
1784	s          *Service
1785	name       string
1786	urlParams_ gensupport.URLParams
1787	ctx_       context.Context
1788	header_    http.Header
1789}
1790
1791// Delete: Deletes a long-running operation. This method indicates that
1792// the client is
1793// no longer interested in the operation result. It does not cancel
1794// the
1795// operation. If the server doesn't support this method, it
1796// returns
1797// `google.rpc.Code.UNIMPLEMENTED`.
1798func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
1799	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1800	c.name = name
1801	return c
1802}
1803
1804// Fields allows partial responses to be retrieved. See
1805// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1806// for more information.
1807func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
1808	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1809	return c
1810}
1811
1812// Context sets the context to be used in this call's Do method. Any
1813// pending HTTP request will be aborted if the provided context is
1814// canceled.
1815func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
1816	c.ctx_ = ctx
1817	return c
1818}
1819
1820// Header returns an http.Header that can be modified by the caller to
1821// add HTTP headers to the request.
1822func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
1823	if c.header_ == nil {
1824		c.header_ = make(http.Header)
1825	}
1826	return c.header_
1827}
1828
1829func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
1830	reqHeaders := make(http.Header)
1831	for k, v := range c.header_ {
1832		reqHeaders[k] = v
1833	}
1834	reqHeaders.Set("User-Agent", c.s.userAgent())
1835	var body io.Reader = nil
1836	c.urlParams_.Set("alt", alt)
1837	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
1838	urls += "?" + c.urlParams_.Encode()
1839	req, _ := http.NewRequest("DELETE", urls, body)
1840	req.Header = reqHeaders
1841	googleapi.Expand(req.URL, map[string]string{
1842		"name": c.name,
1843	})
1844	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1845}
1846
1847// Do executes the "composer.projects.locations.operations.delete" call.
1848// Exactly one of *Empty or error will be non-nil. Any non-2xx status
1849// code is an error. Response headers are in either
1850// *Empty.ServerResponse.Header or (if a response was returned at all)
1851// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1852// check whether the returned error was because http.StatusNotModified
1853// was returned.
1854func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
1855	gensupport.SetOptions(c.urlParams_, opts...)
1856	res, err := c.doRequest("json")
1857	if res != nil && res.StatusCode == http.StatusNotModified {
1858		if res.Body != nil {
1859			res.Body.Close()
1860		}
1861		return nil, &googleapi.Error{
1862			Code:   res.StatusCode,
1863			Header: res.Header,
1864		}
1865	}
1866	if err != nil {
1867		return nil, err
1868	}
1869	defer googleapi.CloseBody(res)
1870	if err := googleapi.CheckResponse(res); err != nil {
1871		return nil, err
1872	}
1873	ret := &Empty{
1874		ServerResponse: googleapi.ServerResponse{
1875			Header:         res.Header,
1876			HTTPStatusCode: res.StatusCode,
1877		},
1878	}
1879	target := &ret
1880	if err := gensupport.DecodeResponse(target, res); err != nil {
1881		return nil, err
1882	}
1883	return ret, nil
1884	// {
1885	//   "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`.",
1886	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
1887	//   "httpMethod": "DELETE",
1888	//   "id": "composer.projects.locations.operations.delete",
1889	//   "parameterOrder": [
1890	//     "name"
1891	//   ],
1892	//   "parameters": {
1893	//     "name": {
1894	//       "description": "The name of the operation resource to be deleted.",
1895	//       "location": "path",
1896	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
1897	//       "required": true,
1898	//       "type": "string"
1899	//     }
1900	//   },
1901	//   "path": "v1beta1/{+name}",
1902	//   "response": {
1903	//     "$ref": "Empty"
1904	//   },
1905	//   "scopes": [
1906	//     "https://www.googleapis.com/auth/cloud-platform"
1907	//   ]
1908	// }
1909
1910}
1911
1912// method id "composer.projects.locations.operations.get":
1913
1914type ProjectsLocationsOperationsGetCall struct {
1915	s            *Service
1916	name         string
1917	urlParams_   gensupport.URLParams
1918	ifNoneMatch_ string
1919	ctx_         context.Context
1920	header_      http.Header
1921}
1922
1923// Get: Gets the latest state of a long-running operation.  Clients can
1924// use this
1925// method to poll the operation result at intervals as recommended by
1926// the API
1927// service.
1928func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
1929	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1930	c.name = name
1931	return c
1932}
1933
1934// Fields allows partial responses to be retrieved. See
1935// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1936// for more information.
1937func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
1938	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1939	return c
1940}
1941
1942// IfNoneMatch sets the optional parameter which makes the operation
1943// fail if the object's ETag matches the given value. This is useful for
1944// getting updates only after the object has changed since the last
1945// request. Use googleapi.IsNotModified to check whether the response
1946// error from Do is the result of In-None-Match.
1947func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
1948	c.ifNoneMatch_ = entityTag
1949	return c
1950}
1951
1952// Context sets the context to be used in this call's Do method. Any
1953// pending HTTP request will be aborted if the provided context is
1954// canceled.
1955func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
1956	c.ctx_ = ctx
1957	return c
1958}
1959
1960// Header returns an http.Header that can be modified by the caller to
1961// add HTTP headers to the request.
1962func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
1963	if c.header_ == nil {
1964		c.header_ = make(http.Header)
1965	}
1966	return c.header_
1967}
1968
1969func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
1970	reqHeaders := make(http.Header)
1971	for k, v := range c.header_ {
1972		reqHeaders[k] = v
1973	}
1974	reqHeaders.Set("User-Agent", c.s.userAgent())
1975	if c.ifNoneMatch_ != "" {
1976		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1977	}
1978	var body io.Reader = nil
1979	c.urlParams_.Set("alt", alt)
1980	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
1981	urls += "?" + c.urlParams_.Encode()
1982	req, _ := http.NewRequest("GET", urls, body)
1983	req.Header = reqHeaders
1984	googleapi.Expand(req.URL, map[string]string{
1985		"name": c.name,
1986	})
1987	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1988}
1989
1990// Do executes the "composer.projects.locations.operations.get" call.
1991// Exactly one of *Operation or error will be non-nil. Any non-2xx
1992// status code is an error. Response headers are in either
1993// *Operation.ServerResponse.Header or (if a response was returned at
1994// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1995// to check whether the returned error was because
1996// http.StatusNotModified was returned.
1997func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
1998	gensupport.SetOptions(c.urlParams_, opts...)
1999	res, err := c.doRequest("json")
2000	if res != nil && res.StatusCode == http.StatusNotModified {
2001		if res.Body != nil {
2002			res.Body.Close()
2003		}
2004		return nil, &googleapi.Error{
2005			Code:   res.StatusCode,
2006			Header: res.Header,
2007		}
2008	}
2009	if err != nil {
2010		return nil, err
2011	}
2012	defer googleapi.CloseBody(res)
2013	if err := googleapi.CheckResponse(res); err != nil {
2014		return nil, err
2015	}
2016	ret := &Operation{
2017		ServerResponse: googleapi.ServerResponse{
2018			Header:         res.Header,
2019			HTTPStatusCode: res.StatusCode,
2020		},
2021	}
2022	target := &ret
2023	if err := gensupport.DecodeResponse(target, res); err != nil {
2024		return nil, err
2025	}
2026	return ret, nil
2027	// {
2028	//   "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.",
2029	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
2030	//   "httpMethod": "GET",
2031	//   "id": "composer.projects.locations.operations.get",
2032	//   "parameterOrder": [
2033	//     "name"
2034	//   ],
2035	//   "parameters": {
2036	//     "name": {
2037	//       "description": "The name of the operation resource.",
2038	//       "location": "path",
2039	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
2040	//       "required": true,
2041	//       "type": "string"
2042	//     }
2043	//   },
2044	//   "path": "v1beta1/{+name}",
2045	//   "response": {
2046	//     "$ref": "Operation"
2047	//   },
2048	//   "scopes": [
2049	//     "https://www.googleapis.com/auth/cloud-platform"
2050	//   ]
2051	// }
2052
2053}
2054
2055// method id "composer.projects.locations.operations.list":
2056
2057type ProjectsLocationsOperationsListCall struct {
2058	s            *Service
2059	name         string
2060	urlParams_   gensupport.URLParams
2061	ifNoneMatch_ string
2062	ctx_         context.Context
2063	header_      http.Header
2064}
2065
2066// List: Lists operations that match the specified filter in the
2067// request. If the
2068// server doesn't support this method, it returns
2069// `UNIMPLEMENTED`.
2070//
2071// NOTE: the `name` binding allows API services to override the
2072// binding
2073// to use different resource name schemes, such as `users/*/operations`.
2074// To
2075// override the binding, API services can add a binding such
2076// as
2077// "/v1/{name=users/*}/operations" to their service configuration.
2078// For backwards compatibility, the default name includes the
2079// operations
2080// collection id, however overriding users must ensure the name
2081// binding
2082// is the parent resource, without the operations collection id.
2083func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
2084	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2085	c.name = name
2086	return c
2087}
2088
2089// Filter sets the optional parameter "filter": The standard list
2090// filter.
2091func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
2092	c.urlParams_.Set("filter", filter)
2093	return c
2094}
2095
2096// PageSize sets the optional parameter "pageSize": The standard list
2097// page size.
2098func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
2099	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2100	return c
2101}
2102
2103// PageToken sets the optional parameter "pageToken": The standard list
2104// page token.
2105func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
2106	c.urlParams_.Set("pageToken", pageToken)
2107	return c
2108}
2109
2110// Fields allows partial responses to be retrieved. See
2111// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2112// for more information.
2113func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
2114	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2115	return c
2116}
2117
2118// IfNoneMatch sets the optional parameter which makes the operation
2119// fail if the object's ETag matches the given value. This is useful for
2120// getting updates only after the object has changed since the last
2121// request. Use googleapi.IsNotModified to check whether the response
2122// error from Do is the result of In-None-Match.
2123func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
2124	c.ifNoneMatch_ = entityTag
2125	return c
2126}
2127
2128// Context sets the context to be used in this call's Do method. Any
2129// pending HTTP request will be aborted if the provided context is
2130// canceled.
2131func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
2132	c.ctx_ = ctx
2133	return c
2134}
2135
2136// Header returns an http.Header that can be modified by the caller to
2137// add HTTP headers to the request.
2138func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
2139	if c.header_ == nil {
2140		c.header_ = make(http.Header)
2141	}
2142	return c.header_
2143}
2144
2145func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
2146	reqHeaders := make(http.Header)
2147	for k, v := range c.header_ {
2148		reqHeaders[k] = v
2149	}
2150	reqHeaders.Set("User-Agent", c.s.userAgent())
2151	if c.ifNoneMatch_ != "" {
2152		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2153	}
2154	var body io.Reader = nil
2155	c.urlParams_.Set("alt", alt)
2156	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
2157	urls += "?" + c.urlParams_.Encode()
2158	req, _ := http.NewRequest("GET", urls, body)
2159	req.Header = reqHeaders
2160	googleapi.Expand(req.URL, map[string]string{
2161		"name": c.name,
2162	})
2163	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2164}
2165
2166// Do executes the "composer.projects.locations.operations.list" call.
2167// Exactly one of *ListOperationsResponse or error will be non-nil. Any
2168// non-2xx status code is an error. Response headers are in either
2169// *ListOperationsResponse.ServerResponse.Header or (if a response was
2170// returned at all) in error.(*googleapi.Error).Header. Use
2171// googleapi.IsNotModified to check whether the returned error was
2172// because http.StatusNotModified was returned.
2173func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
2174	gensupport.SetOptions(c.urlParams_, opts...)
2175	res, err := c.doRequest("json")
2176	if res != nil && res.StatusCode == http.StatusNotModified {
2177		if res.Body != nil {
2178			res.Body.Close()
2179		}
2180		return nil, &googleapi.Error{
2181			Code:   res.StatusCode,
2182			Header: res.Header,
2183		}
2184	}
2185	if err != nil {
2186		return nil, err
2187	}
2188	defer googleapi.CloseBody(res)
2189	if err := googleapi.CheckResponse(res); err != nil {
2190		return nil, err
2191	}
2192	ret := &ListOperationsResponse{
2193		ServerResponse: googleapi.ServerResponse{
2194			Header:         res.Header,
2195			HTTPStatusCode: res.StatusCode,
2196		},
2197	}
2198	target := &ret
2199	if err := gensupport.DecodeResponse(target, res); err != nil {
2200		return nil, err
2201	}
2202	return ret, nil
2203	// {
2204	//   "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.",
2205	//   "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations",
2206	//   "httpMethod": "GET",
2207	//   "id": "composer.projects.locations.operations.list",
2208	//   "parameterOrder": [
2209	//     "name"
2210	//   ],
2211	//   "parameters": {
2212	//     "filter": {
2213	//       "description": "The standard list filter.",
2214	//       "location": "query",
2215	//       "type": "string"
2216	//     },
2217	//     "name": {
2218	//       "description": "The name of the operation's parent resource.",
2219	//       "location": "path",
2220	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2221	//       "required": true,
2222	//       "type": "string"
2223	//     },
2224	//     "pageSize": {
2225	//       "description": "The standard list page size.",
2226	//       "format": "int32",
2227	//       "location": "query",
2228	//       "type": "integer"
2229	//     },
2230	//     "pageToken": {
2231	//       "description": "The standard list page token.",
2232	//       "location": "query",
2233	//       "type": "string"
2234	//     }
2235	//   },
2236	//   "path": "v1beta1/{+name}/operations",
2237	//   "response": {
2238	//     "$ref": "ListOperationsResponse"
2239	//   },
2240	//   "scopes": [
2241	//     "https://www.googleapis.com/auth/cloud-platform"
2242	//   ]
2243	// }
2244
2245}
2246
2247// Pages invokes f for each page of results.
2248// A non-nil error returned from f will halt the iteration.
2249// The provided context supersedes any context provided to the Context method.
2250func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
2251	c.ctx_ = ctx
2252	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2253	for {
2254		x, err := c.Do()
2255		if err != nil {
2256			return err
2257		}
2258		if err := f(x); err != nil {
2259			return err
2260		}
2261		if x.NextPageToken == "" {
2262			return nil
2263		}
2264		c.PageToken(x.NextPageToken)
2265	}
2266}
2267