1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package datastream provides access to the Datastream API.
8//
9// For product documentation, see: https://cloud.google.com/datastream/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/datastream/v1alpha1"
16//   ...
17//   ctx := context.Background()
18//   datastreamService, err := datastream.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   datastreamService, err := datastream.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   datastreamService, err := datastream.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package datastream // import "google.golang.org/api/datastream/v1alpha1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "datastream:v1alpha1"
75const apiName = "datastream"
76const apiVersion = "v1alpha1"
77const basePath = "https://datastream.googleapis.com/"
78const mtlsBasePath = "https://datastream.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// See, edit, configure, and delete your Google Cloud data and see the
83	// email address for your Google Account.
84	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
85)
86
87// NewService creates a new Service.
88func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
89	scopesOption := option.WithScopes(
90		"https://www.googleapis.com/auth/cloud-platform",
91	)
92	// NOTE: prepend, so we don't override user-specified scopes.
93	opts = append([]option.ClientOption{scopesOption}, opts...)
94	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
95	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
96	client, endpoint, err := htransport.NewClient(ctx, opts...)
97	if err != nil {
98		return nil, err
99	}
100	s, err := New(client)
101	if err != nil {
102		return nil, err
103	}
104	if endpoint != "" {
105		s.BasePath = endpoint
106	}
107	return s, nil
108}
109
110// New creates a new Service. It uses the provided http.Client for requests.
111//
112// Deprecated: please use NewService instead.
113// To provide a custom HTTP client, use option.WithHTTPClient.
114// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
115func New(client *http.Client) (*Service, error) {
116	if client == nil {
117		return nil, errors.New("client is nil")
118	}
119	s := &Service{client: client, BasePath: basePath}
120	s.Projects = NewProjectsService(s)
121	return s, nil
122}
123
124type Service struct {
125	client    *http.Client
126	BasePath  string // API endpoint base URL
127	UserAgent string // optional additional User-Agent fragment
128
129	Projects *ProjectsService
130}
131
132func (s *Service) userAgent() string {
133	if s.UserAgent == "" {
134		return googleapi.UserAgent
135	}
136	return googleapi.UserAgent + " " + s.UserAgent
137}
138
139func NewProjectsService(s *Service) *ProjectsService {
140	rs := &ProjectsService{s: s}
141	rs.Locations = NewProjectsLocationsService(s)
142	return rs
143}
144
145type ProjectsService struct {
146	s *Service
147
148	Locations *ProjectsLocationsService
149}
150
151func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
152	rs := &ProjectsLocationsService{s: s}
153	rs.ConnectionProfiles = NewProjectsLocationsConnectionProfilesService(s)
154	rs.Operations = NewProjectsLocationsOperationsService(s)
155	rs.PrivateConnections = NewProjectsLocationsPrivateConnectionsService(s)
156	rs.Streams = NewProjectsLocationsStreamsService(s)
157	return rs
158}
159
160type ProjectsLocationsService struct {
161	s *Service
162
163	ConnectionProfiles *ProjectsLocationsConnectionProfilesService
164
165	Operations *ProjectsLocationsOperationsService
166
167	PrivateConnections *ProjectsLocationsPrivateConnectionsService
168
169	Streams *ProjectsLocationsStreamsService
170}
171
172func NewProjectsLocationsConnectionProfilesService(s *Service) *ProjectsLocationsConnectionProfilesService {
173	rs := &ProjectsLocationsConnectionProfilesService{s: s}
174	return rs
175}
176
177type ProjectsLocationsConnectionProfilesService struct {
178	s *Service
179}
180
181func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
182	rs := &ProjectsLocationsOperationsService{s: s}
183	return rs
184}
185
186type ProjectsLocationsOperationsService struct {
187	s *Service
188}
189
190func NewProjectsLocationsPrivateConnectionsService(s *Service) *ProjectsLocationsPrivateConnectionsService {
191	rs := &ProjectsLocationsPrivateConnectionsService{s: s}
192	rs.Routes = NewProjectsLocationsPrivateConnectionsRoutesService(s)
193	return rs
194}
195
196type ProjectsLocationsPrivateConnectionsService struct {
197	s *Service
198
199	Routes *ProjectsLocationsPrivateConnectionsRoutesService
200}
201
202func NewProjectsLocationsPrivateConnectionsRoutesService(s *Service) *ProjectsLocationsPrivateConnectionsRoutesService {
203	rs := &ProjectsLocationsPrivateConnectionsRoutesService{s: s}
204	return rs
205}
206
207type ProjectsLocationsPrivateConnectionsRoutesService struct {
208	s *Service
209}
210
211func NewProjectsLocationsStreamsService(s *Service) *ProjectsLocationsStreamsService {
212	rs := &ProjectsLocationsStreamsService{s: s}
213	return rs
214}
215
216type ProjectsLocationsStreamsService struct {
217	s *Service
218}
219
220// AvroFileFormat: AVRO file format configuration.
221type AvroFileFormat struct {
222}
223
224// BackfillAllStrategy: Backfill strategy to automatically backfill the
225// Stream's objects. Specific objects can be excluded.
226type BackfillAllStrategy struct {
227	// MysqlExcludedObjects: MySQL data source objects to avoid backfilling.
228	MysqlExcludedObjects *MysqlRdbms `json:"mysqlExcludedObjects,omitempty"`
229
230	// OracleExcludedObjects: Oracle data source objects to avoid
231	// backfilling.
232	OracleExcludedObjects *OracleRdbms `json:"oracleExcludedObjects,omitempty"`
233
234	// ForceSendFields is a list of field names (e.g.
235	// "MysqlExcludedObjects") to unconditionally include in API requests.
236	// By default, fields with empty or default values are omitted from API
237	// requests. However, any non-pointer, non-interface field appearing in
238	// ForceSendFields will be sent to the server regardless of whether the
239	// field is empty or not. This may be used to include empty fields in
240	// Patch requests.
241	ForceSendFields []string `json:"-"`
242
243	// NullFields is a list of field names (e.g. "MysqlExcludedObjects") to
244	// include in API requests with the JSON null value. By default, fields
245	// with empty values are omitted from API requests. However, any field
246	// with an empty value appearing in NullFields will be sent to the
247	// server as null. It is an error if a field in this list has a
248	// non-empty value. This may be used to include null fields in Patch
249	// requests.
250	NullFields []string `json:"-"`
251}
252
253func (s *BackfillAllStrategy) MarshalJSON() ([]byte, error) {
254	type NoMethod BackfillAllStrategy
255	raw := NoMethod(*s)
256	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
257}
258
259// BackfillNoneStrategy: Backfill strategy to disable automatic backfill
260// for the Stream's objects.
261type BackfillNoneStrategy struct {
262}
263
264// CancelOperationRequest: The request message for
265// Operations.CancelOperation.
266type CancelOperationRequest struct {
267}
268
269type ConnectionProfile struct {
270	// CreateTime: Output only. The create time of the resource.
271	CreateTime string `json:"createTime,omitempty"`
272
273	// DisplayName: Required. Display name.
274	DisplayName string `json:"displayName,omitempty"`
275
276	// ForwardSshConnectivity: Forward SSH tunnel connectivity.
277	ForwardSshConnectivity *ForwardSshTunnelConnectivity `json:"forwardSshConnectivity,omitempty"`
278
279	// GcsProfile: Cloud Storage ConnectionProfile configuration.
280	GcsProfile *GcsProfile `json:"gcsProfile,omitempty"`
281
282	// Labels: Labels.
283	Labels map[string]string `json:"labels,omitempty"`
284
285	// MysqlProfile: MySQL ConnectionProfile configuration.
286	MysqlProfile *MysqlProfile `json:"mysqlProfile,omitempty"`
287
288	// Name: Output only. The resource's name.
289	Name string `json:"name,omitempty"`
290
291	// NoConnectivity: No connectivity option chosen.
292	NoConnectivity *NoConnectivitySettings `json:"noConnectivity,omitempty"`
293
294	// OracleProfile: Oracle ConnectionProfile configuration.
295	OracleProfile *OracleProfile `json:"oracleProfile,omitempty"`
296
297	// PrivateConnectivity: Private connectivity.
298	PrivateConnectivity *PrivateConnectivity `json:"privateConnectivity,omitempty"`
299
300	// StaticServiceIpConnectivity: Static Service IP connectivity.
301	StaticServiceIpConnectivity *StaticServiceIpConnectivity `json:"staticServiceIpConnectivity,omitempty"`
302
303	// UpdateTime: Output only. The update time of the resource.
304	UpdateTime string `json:"updateTime,omitempty"`
305
306	// ServerResponse contains the HTTP response code and headers from the
307	// server.
308	googleapi.ServerResponse `json:"-"`
309
310	// ForceSendFields is a list of field names (e.g. "CreateTime") to
311	// unconditionally include in API requests. By default, fields with
312	// empty or default values are omitted from API requests. However, any
313	// non-pointer, non-interface field appearing in ForceSendFields will be
314	// sent to the server regardless of whether the field is empty or not.
315	// This may be used to include empty fields in Patch requests.
316	ForceSendFields []string `json:"-"`
317
318	// NullFields is a list of field names (e.g. "CreateTime") to include in
319	// API requests with the JSON null value. By default, fields with empty
320	// values are omitted from API requests. However, any field with an
321	// empty value appearing in NullFields will be sent to the server as
322	// null. It is an error if a field in this list has a non-empty value.
323	// This may be used to include null fields in Patch requests.
324	NullFields []string `json:"-"`
325}
326
327func (s *ConnectionProfile) MarshalJSON() ([]byte, error) {
328	type NoMethod ConnectionProfile
329	raw := NoMethod(*s)
330	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
331}
332
333// DestinationConfig: The configuration of the stream destination.
334type DestinationConfig struct {
335	// DestinationConnectionProfileName: Required. Destination connection
336	// profile identifier.
337	DestinationConnectionProfileName string `json:"destinationConnectionProfileName,omitempty"`
338
339	GcsDestinationConfig *GcsDestinationConfig `json:"gcsDestinationConfig,omitempty"`
340
341	// ForceSendFields is a list of field names (e.g.
342	// "DestinationConnectionProfileName") to unconditionally include in API
343	// requests. By default, fields with empty or default values are omitted
344	// from API requests. However, any non-pointer, non-interface field
345	// appearing in ForceSendFields will be sent to the server regardless of
346	// whether the field is empty or not. This may be used to include empty
347	// fields in Patch requests.
348	ForceSendFields []string `json:"-"`
349
350	// NullFields is a list of field names (e.g.
351	// "DestinationConnectionProfileName") to include in API requests with
352	// the JSON null value. By default, fields with empty values are omitted
353	// from API requests. However, any field with an empty value appearing
354	// in NullFields will be sent to the server as null. It is an error if a
355	// field in this list has a non-empty value. This may be used to include
356	// null fields in Patch requests.
357	NullFields []string `json:"-"`
358}
359
360func (s *DestinationConfig) MarshalJSON() ([]byte, error) {
361	type NoMethod DestinationConfig
362	raw := NoMethod(*s)
363	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
364}
365
366// DiscoverConnectionProfileRequest: Request message for 'discover'
367// ConnectionProfile request.
368type DiscoverConnectionProfileRequest struct {
369	// ConnectionProfile: An ad-hoc ConnectionProfile configuration.
370	ConnectionProfile *ConnectionProfile `json:"connectionProfile,omitempty"`
371
372	// ConnectionProfileName: A reference to an existing ConnectionProfile.
373	ConnectionProfileName string `json:"connectionProfileName,omitempty"`
374
375	// MysqlRdbms: MySQL RDBMS to enrich with child data objects and
376	// metadata.
377	MysqlRdbms *MysqlRdbms `json:"mysqlRdbms,omitempty"`
378
379	// OracleRdbms: Oracle RDBMS to enrich with child data objects and
380	// metadata.
381	OracleRdbms *OracleRdbms `json:"oracleRdbms,omitempty"`
382
383	// RecursionDepth: The number of hierarchy levels below the current
384	// level to be retrieved.
385	RecursionDepth int64 `json:"recursionDepth,omitempty"`
386
387	// Recursive: Whether to retrieve the full hierarchy of data objects
388	// (TRUE) or only the current level (FALSE).
389	Recursive bool `json:"recursive,omitempty"`
390
391	// ForceSendFields is a list of field names (e.g. "ConnectionProfile")
392	// to unconditionally include in API requests. By default, fields with
393	// empty or default values are omitted from API requests. However, any
394	// non-pointer, non-interface field appearing in ForceSendFields will be
395	// sent to the server regardless of whether the field is empty or not.
396	// This may be used to include empty fields in Patch requests.
397	ForceSendFields []string `json:"-"`
398
399	// NullFields is a list of field names (e.g. "ConnectionProfile") to
400	// include in API requests with the JSON null value. By default, fields
401	// with empty values are omitted from API requests. However, any field
402	// with an empty value appearing in NullFields will be sent to the
403	// server as null. It is an error if a field in this list has a
404	// non-empty value. This may be used to include null fields in Patch
405	// requests.
406	NullFields []string `json:"-"`
407}
408
409func (s *DiscoverConnectionProfileRequest) MarshalJSON() ([]byte, error) {
410	type NoMethod DiscoverConnectionProfileRequest
411	raw := NoMethod(*s)
412	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
413}
414
415type DiscoverConnectionProfileResponse struct {
416	// MysqlRdbms: Enriched MySQL RDBMS object.
417	MysqlRdbms *MysqlRdbms `json:"mysqlRdbms,omitempty"`
418
419	// OracleRdbms: Enriched Oracle RDBMS object.
420	OracleRdbms *OracleRdbms `json:"oracleRdbms,omitempty"`
421
422	// ServerResponse contains the HTTP response code and headers from the
423	// server.
424	googleapi.ServerResponse `json:"-"`
425
426	// ForceSendFields is a list of field names (e.g. "MysqlRdbms") to
427	// unconditionally include in API requests. By default, fields with
428	// empty or default values are omitted from API requests. However, any
429	// non-pointer, non-interface field appearing in ForceSendFields will be
430	// sent to the server regardless of whether the field is empty or not.
431	// This may be used to include empty fields in Patch requests.
432	ForceSendFields []string `json:"-"`
433
434	// NullFields is a list of field names (e.g. "MysqlRdbms") to include in
435	// API requests with the JSON null value. By default, fields with empty
436	// values are omitted from API requests. However, any field with an
437	// empty value appearing in NullFields will be sent to the server as
438	// null. It is an error if a field in this list has a non-empty value.
439	// This may be used to include null fields in Patch requests.
440	NullFields []string `json:"-"`
441}
442
443func (s *DiscoverConnectionProfileResponse) MarshalJSON() ([]byte, error) {
444	type NoMethod DiscoverConnectionProfileResponse
445	raw := NoMethod(*s)
446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
447}
448
449// Empty: A generic empty message that you can re-use to avoid defining
450// duplicated empty messages in your APIs. A typical example is to use
451// it as the request or the response type of an API method. For
452// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
453// (google.protobuf.Empty); } The JSON representation for `Empty` is
454// empty JSON object `{}`.
455type Empty struct {
456	// ServerResponse contains the HTTP response code and headers from the
457	// server.
458	googleapi.ServerResponse `json:"-"`
459}
460
461// Error: Represent a user-facing Error.
462type Error struct {
463	// Details: Additional information about the error.
464	Details map[string]string `json:"details,omitempty"`
465
466	// ErrorTime: The time when the error occurred.
467	ErrorTime string `json:"errorTime,omitempty"`
468
469	// ErrorUuid: A unique identifier for this specific error, allowing it
470	// to be traced throughout the system in logs and API responses.
471	ErrorUuid string `json:"errorUuid,omitempty"`
472
473	// Message: A message containing more information about the error that
474	// occurred.
475	Message string `json:"message,omitempty"`
476
477	// Reason: A title that explains the reason for the error.
478	Reason string `json:"reason,omitempty"`
479
480	// ForceSendFields is a list of field names (e.g. "Details") to
481	// unconditionally include in API requests. By default, fields with
482	// empty or default values are omitted from API requests. However, any
483	// non-pointer, non-interface field appearing in ForceSendFields will be
484	// sent to the server regardless of whether the field is empty or not.
485	// This may be used to include empty fields in Patch requests.
486	ForceSendFields []string `json:"-"`
487
488	// NullFields is a list of field names (e.g. "Details") to include in
489	// API requests with the JSON null value. By default, fields with empty
490	// values are omitted from API requests. However, any field with an
491	// empty value appearing in NullFields will be sent to the server as
492	// null. It is an error if a field in this list has a non-empty value.
493	// This may be used to include null fields in Patch requests.
494	NullFields []string `json:"-"`
495}
496
497func (s *Error) MarshalJSON() ([]byte, error) {
498	type NoMethod Error
499	raw := NoMethod(*s)
500	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
501}
502
503// FetchErrorsRequest: Request message for 'FetchErrors' request.
504type FetchErrorsRequest struct {
505}
506
507// FetchErrorsResponse: Response message for a 'FetchErrors' response.
508type FetchErrorsResponse struct {
509	// Errors: The list of errors on the Stream.
510	Errors []*Error `json:"errors,omitempty"`
511
512	// ForceSendFields is a list of field names (e.g. "Errors") to
513	// unconditionally include in API requests. By default, fields with
514	// empty or default values are omitted from API requests. However, any
515	// non-pointer, non-interface field appearing in ForceSendFields will be
516	// sent to the server regardless of whether the field is empty or not.
517	// This may be used to include empty fields in Patch requests.
518	ForceSendFields []string `json:"-"`
519
520	// NullFields is a list of field names (e.g. "Errors") to include in API
521	// requests with the JSON null value. By default, fields with empty
522	// values are omitted from API requests. However, any field with an
523	// empty value appearing in NullFields will be sent to the server as
524	// null. It is an error if a field in this list has a non-empty value.
525	// This may be used to include null fields in Patch requests.
526	NullFields []string `json:"-"`
527}
528
529func (s *FetchErrorsResponse) MarshalJSON() ([]byte, error) {
530	type NoMethod FetchErrorsResponse
531	raw := NoMethod(*s)
532	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
533}
534
535// FetchStaticIpsResponse: Response message for a 'FetchStaticIps'
536// response.
537type FetchStaticIpsResponse struct {
538	// NextPageToken: A token that can be sent as `page_token` to retrieve
539	// the next page. If this field is omitted, there are no subsequent
540	// pages.
541	NextPageToken string `json:"nextPageToken,omitempty"`
542
543	// StaticIps: list of static ips by account
544	StaticIps []string `json:"staticIps,omitempty"`
545
546	// ServerResponse contains the HTTP response code and headers from the
547	// server.
548	googleapi.ServerResponse `json:"-"`
549
550	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
551	// unconditionally include in API requests. By default, fields with
552	// empty or default values are omitted from API requests. However, any
553	// non-pointer, non-interface field appearing in ForceSendFields will be
554	// sent to the server regardless of whether the field is empty or not.
555	// This may be used to include empty fields in Patch requests.
556	ForceSendFields []string `json:"-"`
557
558	// NullFields is a list of field names (e.g. "NextPageToken") to include
559	// in API requests with the JSON null value. By default, fields with
560	// empty values are omitted from API requests. However, any field with
561	// an empty value appearing in NullFields will be sent to the server as
562	// null. It is an error if a field in this list has a non-empty value.
563	// This may be used to include null fields in Patch requests.
564	NullFields []string `json:"-"`
565}
566
567func (s *FetchStaticIpsResponse) MarshalJSON() ([]byte, error) {
568	type NoMethod FetchStaticIpsResponse
569	raw := NoMethod(*s)
570	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
571}
572
573// ForwardSshTunnelConnectivity: Forward SSH Tunnel connectivity.
574type ForwardSshTunnelConnectivity struct {
575	// Hostname: Required. Hostname for the SSH tunnel.
576	Hostname string `json:"hostname,omitempty"`
577
578	// Password: Input only. SSH password.
579	Password string `json:"password,omitempty"`
580
581	// Port: Port for the SSH tunnel, default value is 22.
582	Port int64 `json:"port,omitempty"`
583
584	// PrivateKey: Input only. SSH private key.
585	PrivateKey string `json:"privateKey,omitempty"`
586
587	// Username: Required. Username for the SSH tunnel.
588	Username string `json:"username,omitempty"`
589
590	// ForceSendFields is a list of field names (e.g. "Hostname") to
591	// unconditionally include in API requests. By default, fields with
592	// empty or default values are omitted from API requests. However, any
593	// non-pointer, non-interface field appearing in ForceSendFields will be
594	// sent to the server regardless of whether the field is empty or not.
595	// This may be used to include empty fields in Patch requests.
596	ForceSendFields []string `json:"-"`
597
598	// NullFields is a list of field names (e.g. "Hostname") to include in
599	// API requests with the JSON null value. By default, fields with empty
600	// values are omitted from API requests. However, any field with an
601	// empty value appearing in NullFields will be sent to the server as
602	// null. It is an error if a field in this list has a non-empty value.
603	// This may be used to include null fields in Patch requests.
604	NullFields []string `json:"-"`
605}
606
607func (s *ForwardSshTunnelConnectivity) MarshalJSON() ([]byte, error) {
608	type NoMethod ForwardSshTunnelConnectivity
609	raw := NoMethod(*s)
610	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
611}
612
613// GcsDestinationConfig: Google Cloud Storage destination configuration
614type GcsDestinationConfig struct {
615	// AvroFileFormat: AVRO file format configuration.
616	AvroFileFormat *AvroFileFormat `json:"avroFileFormat,omitempty"`
617
618	// FileRotationInterval: The maximum duration for which new events are
619	// added before a file is closed and a new file is created.
620	FileRotationInterval string `json:"fileRotationInterval,omitempty"`
621
622	// FileRotationMb: The maximum file size to be saved in the bucket.
623	FileRotationMb int64 `json:"fileRotationMb,omitempty"`
624
625	// GcsFileFormat: File format that data should be written in. Deprecated
626	// field (b/169501737) - use file_format instead.
627	//
628	// Possible values:
629	//   "GCS_FILE_FORMAT_UNSPECIFIED" - Unspecified Cloud Storage file
630	// format.
631	//   "AVRO" - Avro file format
632	GcsFileFormat string `json:"gcsFileFormat,omitempty"`
633
634	// JsonFileFormat: JSON file format configuration.
635	JsonFileFormat *JsonFileFormat `json:"jsonFileFormat,omitempty"`
636
637	// Path: Path inside the Cloud Storage bucket to write data to.
638	Path string `json:"path,omitempty"`
639
640	// ForceSendFields is a list of field names (e.g. "AvroFileFormat") to
641	// unconditionally include in API requests. By default, fields with
642	// empty or default values are omitted from API requests. However, any
643	// non-pointer, non-interface field appearing in ForceSendFields will be
644	// sent to the server regardless of whether the field is empty or not.
645	// This may be used to include empty fields in Patch requests.
646	ForceSendFields []string `json:"-"`
647
648	// NullFields is a list of field names (e.g. "AvroFileFormat") to
649	// include in API requests with the JSON null value. By default, fields
650	// with empty values are omitted from API requests. However, any field
651	// with an empty value appearing in NullFields will be sent to the
652	// server as null. It is an error if a field in this list has a
653	// non-empty value. This may be used to include null fields in Patch
654	// requests.
655	NullFields []string `json:"-"`
656}
657
658func (s *GcsDestinationConfig) MarshalJSON() ([]byte, error) {
659	type NoMethod GcsDestinationConfig
660	raw := NoMethod(*s)
661	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
662}
663
664// GcsProfile: Cloud Storage bucket profile.
665type GcsProfile struct {
666	// BucketName: Required. The full project and resource path for Cloud
667	// Storage bucket including the name.
668	BucketName string `json:"bucketName,omitempty"`
669
670	// RootPath: The root path inside the Cloud Storage bucket.
671	RootPath string `json:"rootPath,omitempty"`
672
673	// ForceSendFields is a list of field names (e.g. "BucketName") to
674	// unconditionally include in API requests. By default, fields with
675	// empty or default values are omitted from API requests. However, any
676	// non-pointer, non-interface field appearing in ForceSendFields will be
677	// sent to the server regardless of whether the field is empty or not.
678	// This may be used to include empty fields in Patch requests.
679	ForceSendFields []string `json:"-"`
680
681	// NullFields is a list of field names (e.g. "BucketName") to include in
682	// API requests with the JSON null value. By default, fields with empty
683	// values are omitted from API requests. However, any field with an
684	// empty value appearing in NullFields will be sent to the server as
685	// null. It is an error if a field in this list has a non-empty value.
686	// This may be used to include null fields in Patch requests.
687	NullFields []string `json:"-"`
688}
689
690func (s *GcsProfile) MarshalJSON() ([]byte, error) {
691	type NoMethod GcsProfile
692	raw := NoMethod(*s)
693	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
694}
695
696// JsonFileFormat: JSON file format configuration.
697type JsonFileFormat struct {
698	// Compression: Compression of the loaded JSON file.
699	//
700	// Possible values:
701	//   "JSON_COMPRESSION_UNSPECIFIED" - Unspecified json file compression.
702	//   "NO_COMPRESSION" - Do not compress JSON file.
703	//   "GZIP" - Gzip compression.
704	Compression string `json:"compression,omitempty"`
705
706	// SchemaFileFormat: The schema file format along JSON data files.
707	//
708	// Possible values:
709	//   "SCHEMA_FILE_FORMAT_UNSPECIFIED" - Unspecified schema file format.
710	//   "NO_SCHEMA_FILE" - Do not attach schema file.
711	//   "AVRO_SCHEMA_FILE" - Avro schema format.
712	SchemaFileFormat string `json:"schemaFileFormat,omitempty"`
713
714	// ForceSendFields is a list of field names (e.g. "Compression") to
715	// unconditionally include in API requests. By default, fields with
716	// empty or default values are omitted from API requests. However, any
717	// non-pointer, non-interface field appearing in ForceSendFields will be
718	// sent to the server regardless of whether the field is empty or not.
719	// This may be used to include empty fields in Patch requests.
720	ForceSendFields []string `json:"-"`
721
722	// NullFields is a list of field names (e.g. "Compression") to include
723	// in API requests with the JSON null value. By default, fields with
724	// empty values are omitted from API requests. However, any field with
725	// an empty value appearing in NullFields will be sent to the server as
726	// null. It is an error if a field in this list has a non-empty value.
727	// This may be used to include null fields in Patch requests.
728	NullFields []string `json:"-"`
729}
730
731func (s *JsonFileFormat) MarshalJSON() ([]byte, error) {
732	type NoMethod JsonFileFormat
733	raw := NoMethod(*s)
734	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
735}
736
737type ListConnectionProfilesResponse struct {
738	// ConnectionProfiles: List of connection profiles.
739	ConnectionProfiles []*ConnectionProfile `json:"connectionProfiles,omitempty"`
740
741	// NextPageToken: A token, which can be sent as `page_token` to retrieve
742	// the next page. If this field is omitted, there are no subsequent
743	// pages.
744	NextPageToken string `json:"nextPageToken,omitempty"`
745
746	// Unreachable: Locations that could not be reached.
747	Unreachable []string `json:"unreachable,omitempty"`
748
749	// ServerResponse contains the HTTP response code and headers from the
750	// server.
751	googleapi.ServerResponse `json:"-"`
752
753	// ForceSendFields is a list of field names (e.g. "ConnectionProfiles")
754	// to unconditionally include in API requests. By default, fields with
755	// empty or default values are omitted from API requests. However, any
756	// non-pointer, non-interface field appearing in ForceSendFields will be
757	// sent to the server regardless of whether the field is empty or not.
758	// This may be used to include empty fields in Patch requests.
759	ForceSendFields []string `json:"-"`
760
761	// NullFields is a list of field names (e.g. "ConnectionProfiles") to
762	// include in API requests with the JSON null value. By default, fields
763	// with empty values are omitted from API requests. However, any field
764	// with an empty value appearing in NullFields will be sent to the
765	// server as null. It is an error if a field in this list has a
766	// non-empty value. This may be used to include null fields in Patch
767	// requests.
768	NullFields []string `json:"-"`
769}
770
771func (s *ListConnectionProfilesResponse) MarshalJSON() ([]byte, error) {
772	type NoMethod ListConnectionProfilesResponse
773	raw := NoMethod(*s)
774	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
775}
776
777// ListLocationsResponse: The response message for
778// Locations.ListLocations.
779type ListLocationsResponse struct {
780	// Locations: A list of locations that matches the specified filter in
781	// the request.
782	Locations []*Location `json:"locations,omitempty"`
783
784	// NextPageToken: The standard List next-page token.
785	NextPageToken string `json:"nextPageToken,omitempty"`
786
787	// ServerResponse contains the HTTP response code and headers from the
788	// server.
789	googleapi.ServerResponse `json:"-"`
790
791	// ForceSendFields is a list of field names (e.g. "Locations") to
792	// unconditionally include in API requests. By default, fields with
793	// empty or default values are omitted from API requests. However, any
794	// non-pointer, non-interface field appearing in ForceSendFields will be
795	// sent to the server regardless of whether the field is empty or not.
796	// This may be used to include empty fields in Patch requests.
797	ForceSendFields []string `json:"-"`
798
799	// NullFields is a list of field names (e.g. "Locations") to include in
800	// API requests with the JSON null value. By default, fields with empty
801	// values are omitted from API requests. However, any field with an
802	// empty value appearing in NullFields will be sent to the server as
803	// null. It is an error if a field in this list has a non-empty value.
804	// This may be used to include null fields in Patch requests.
805	NullFields []string `json:"-"`
806}
807
808func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
809	type NoMethod ListLocationsResponse
810	raw := NoMethod(*s)
811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
812}
813
814// ListOperationsResponse: The response message for
815// Operations.ListOperations.
816type ListOperationsResponse struct {
817	// NextPageToken: The standard List next-page token.
818	NextPageToken string `json:"nextPageToken,omitempty"`
819
820	// Operations: A list of operations that matches the specified filter in
821	// the request.
822	Operations []*Operation `json:"operations,omitempty"`
823
824	// ServerResponse contains the HTTP response code and headers from the
825	// server.
826	googleapi.ServerResponse `json:"-"`
827
828	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
829	// unconditionally include in API requests. By default, fields with
830	// empty or default values are omitted from API requests. However, any
831	// non-pointer, non-interface field appearing in ForceSendFields will be
832	// sent to the server regardless of whether the field is empty or not.
833	// This may be used to include empty fields in Patch requests.
834	ForceSendFields []string `json:"-"`
835
836	// NullFields is a list of field names (e.g. "NextPageToken") to include
837	// in API requests with the JSON null value. By default, fields with
838	// empty values are omitted from API requests. However, any field with
839	// an empty value appearing in NullFields will be sent to the server as
840	// null. It is an error if a field in this list has a non-empty value.
841	// This may be used to include null fields in Patch requests.
842	NullFields []string `json:"-"`
843}
844
845func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
846	type NoMethod ListOperationsResponse
847	raw := NoMethod(*s)
848	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
849}
850
851type ListPrivateConnectionsResponse struct {
852	// NextPageToken: A token, which can be sent as `page_token` to retrieve
853	// the next page. If this field is omitted, there are no subsequent
854	// pages.
855	NextPageToken string `json:"nextPageToken,omitempty"`
856
857	// PrivateConnections: List of private connectivity configurations.
858	PrivateConnections []*PrivateConnection `json:"privateConnections,omitempty"`
859
860	// Unreachable: Locations that could not be reached.
861	Unreachable []string `json:"unreachable,omitempty"`
862
863	// ServerResponse contains the HTTP response code and headers from the
864	// server.
865	googleapi.ServerResponse `json:"-"`
866
867	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
868	// unconditionally include in API requests. By default, fields with
869	// empty or default values are omitted from API requests. However, any
870	// non-pointer, non-interface field appearing in ForceSendFields will be
871	// sent to the server regardless of whether the field is empty or not.
872	// This may be used to include empty fields in Patch requests.
873	ForceSendFields []string `json:"-"`
874
875	// NullFields is a list of field names (e.g. "NextPageToken") to include
876	// in API requests with the JSON null value. By default, fields with
877	// empty values are omitted from API requests. However, any field with
878	// an empty value appearing in NullFields will be sent to the server as
879	// null. It is an error if a field in this list has a non-empty value.
880	// This may be used to include null fields in Patch requests.
881	NullFields []string `json:"-"`
882}
883
884func (s *ListPrivateConnectionsResponse) MarshalJSON() ([]byte, error) {
885	type NoMethod ListPrivateConnectionsResponse
886	raw := NoMethod(*s)
887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
888}
889
890// ListRoutesResponse: route list response
891type ListRoutesResponse struct {
892	// NextPageToken: A token, which can be sent as `page_token` to retrieve
893	// the next page. If this field is omitted, there are no subsequent
894	// pages.
895	NextPageToken string `json:"nextPageToken,omitempty"`
896
897	// Routes: List of Routes.
898	Routes []*Route `json:"routes,omitempty"`
899
900	// Unreachable: Locations that could not be reached.
901	Unreachable []string `json:"unreachable,omitempty"`
902
903	// ServerResponse contains the HTTP response code and headers from the
904	// server.
905	googleapi.ServerResponse `json:"-"`
906
907	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
908	// unconditionally include in API requests. By default, fields with
909	// empty or default values are omitted from API requests. However, any
910	// non-pointer, non-interface field appearing in ForceSendFields will be
911	// sent to the server regardless of whether the field is empty or not.
912	// This may be used to include empty fields in Patch requests.
913	ForceSendFields []string `json:"-"`
914
915	// NullFields is a list of field names (e.g. "NextPageToken") to include
916	// in API requests with the JSON null value. By default, fields with
917	// empty values are omitted from API requests. However, any field with
918	// an empty value appearing in NullFields will be sent to the server as
919	// null. It is an error if a field in this list has a non-empty value.
920	// This may be used to include null fields in Patch requests.
921	NullFields []string `json:"-"`
922}
923
924func (s *ListRoutesResponse) MarshalJSON() ([]byte, error) {
925	type NoMethod ListRoutesResponse
926	raw := NoMethod(*s)
927	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
928}
929
930type ListStreamsResponse struct {
931	// NextPageToken: A token, which can be sent as `page_token` to retrieve
932	// the next page. If this field is omitted, there are no subsequent
933	// pages.
934	NextPageToken string `json:"nextPageToken,omitempty"`
935
936	// Streams: List of streams
937	Streams []*Stream `json:"streams,omitempty"`
938
939	// Unreachable: Locations that could not be reached.
940	Unreachable []string `json:"unreachable,omitempty"`
941
942	// ServerResponse contains the HTTP response code and headers from the
943	// server.
944	googleapi.ServerResponse `json:"-"`
945
946	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
947	// unconditionally include in API requests. By default, fields with
948	// empty or default values are omitted from API requests. However, any
949	// non-pointer, non-interface field appearing in ForceSendFields will be
950	// sent to the server regardless of whether the field is empty or not.
951	// This may be used to include empty fields in Patch requests.
952	ForceSendFields []string `json:"-"`
953
954	// NullFields is a list of field names (e.g. "NextPageToken") to include
955	// in API requests with the JSON null value. By default, fields with
956	// empty values are omitted from API requests. However, any field with
957	// an empty value appearing in NullFields will be sent to the server as
958	// null. It is an error if a field in this list has a non-empty value.
959	// This may be used to include null fields in Patch requests.
960	NullFields []string `json:"-"`
961}
962
963func (s *ListStreamsResponse) MarshalJSON() ([]byte, error) {
964	type NoMethod ListStreamsResponse
965	raw := NoMethod(*s)
966	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
967}
968
969// Location: A resource that represents Google Cloud Platform location.
970type Location struct {
971	// DisplayName: The friendly name for this location, typically a nearby
972	// city name. For example, "Tokyo".
973	DisplayName string `json:"displayName,omitempty"`
974
975	// Labels: Cross-service attributes for the location. For example
976	// {"cloud.googleapis.com/region": "us-east1"}
977	Labels map[string]string `json:"labels,omitempty"`
978
979	// LocationId: The canonical id for this location. For example:
980	// "us-east1".
981	LocationId string `json:"locationId,omitempty"`
982
983	// Metadata: Service-specific metadata. For example the available
984	// capacity at the given location.
985	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
986
987	// Name: Resource name for the location, which may vary between
988	// implementations. For example:
989	// "projects/example-project/locations/us-east1"
990	Name string `json:"name,omitempty"`
991
992	// ServerResponse contains the HTTP response code and headers from the
993	// server.
994	googleapi.ServerResponse `json:"-"`
995
996	// ForceSendFields is a list of field names (e.g. "DisplayName") to
997	// unconditionally include in API requests. By default, fields with
998	// empty or default values are omitted from API requests. However, any
999	// non-pointer, non-interface field appearing in ForceSendFields will be
1000	// sent to the server regardless of whether the field is empty or not.
1001	// This may be used to include empty fields in Patch requests.
1002	ForceSendFields []string `json:"-"`
1003
1004	// NullFields is a list of field names (e.g. "DisplayName") to include
1005	// in API requests with the JSON null value. By default, fields with
1006	// empty values are omitted from API requests. However, any field with
1007	// an empty value appearing in NullFields will be sent to the server as
1008	// null. It is an error if a field in this list has a non-empty value.
1009	// This may be used to include null fields in Patch requests.
1010	NullFields []string `json:"-"`
1011}
1012
1013func (s *Location) MarshalJSON() ([]byte, error) {
1014	type NoMethod Location
1015	raw := NoMethod(*s)
1016	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1017}
1018
1019// MysqlColumn: MySQL Column.
1020type MysqlColumn struct {
1021	// Collation: Column collation.
1022	Collation string `json:"collation,omitempty"`
1023
1024	// ColumnName: Column name.
1025	ColumnName string `json:"columnName,omitempty"`
1026
1027	// DataType: The MySQL data type. Full data types list can be found
1028	// here: https://dev.mysql.com/doc/refman/8.0/en/data-types.html
1029	DataType string `json:"dataType,omitempty"`
1030
1031	// Length: Column length.
1032	Length int64 `json:"length,omitempty"`
1033
1034	// Nullable: Whether or not the column can accept a null value.
1035	Nullable bool `json:"nullable,omitempty"`
1036
1037	// OrdinalPosition: The ordinal position of the column in the table.
1038	OrdinalPosition int64 `json:"ordinalPosition,omitempty"`
1039
1040	// PrimaryKey: Whether or not the column represents a primary key.
1041	PrimaryKey bool `json:"primaryKey,omitempty"`
1042
1043	// ForceSendFields is a list of field names (e.g. "Collation") to
1044	// unconditionally include in API requests. By default, fields with
1045	// empty or default values are omitted from API requests. However, any
1046	// non-pointer, non-interface field appearing in ForceSendFields will be
1047	// sent to the server regardless of whether the field is empty or not.
1048	// This may be used to include empty fields in Patch requests.
1049	ForceSendFields []string `json:"-"`
1050
1051	// NullFields is a list of field names (e.g. "Collation") to include in
1052	// API requests with the JSON null value. By default, fields with empty
1053	// values are omitted from API requests. However, any field with an
1054	// empty value appearing in NullFields will be sent to the server as
1055	// null. It is an error if a field in this list has a non-empty value.
1056	// This may be used to include null fields in Patch requests.
1057	NullFields []string `json:"-"`
1058}
1059
1060func (s *MysqlColumn) MarshalJSON() ([]byte, error) {
1061	type NoMethod MysqlColumn
1062	raw := NoMethod(*s)
1063	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1064}
1065
1066// MysqlDatabase: MySQL database.
1067type MysqlDatabase struct {
1068	// DatabaseName: Database name.
1069	DatabaseName string `json:"databaseName,omitempty"`
1070
1071	// MysqlTables: Tables in the database.
1072	MysqlTables []*MysqlTable `json:"mysqlTables,omitempty"`
1073
1074	// ForceSendFields is a list of field names (e.g. "DatabaseName") to
1075	// unconditionally include in API requests. By default, fields with
1076	// empty or default values are omitted from API requests. However, any
1077	// non-pointer, non-interface field appearing in ForceSendFields will be
1078	// sent to the server regardless of whether the field is empty or not.
1079	// This may be used to include empty fields in Patch requests.
1080	ForceSendFields []string `json:"-"`
1081
1082	// NullFields is a list of field names (e.g. "DatabaseName") to include
1083	// in API requests with the JSON null value. By default, fields with
1084	// empty values are omitted from API requests. However, any field with
1085	// an empty value appearing in NullFields will be sent to the server as
1086	// null. It is an error if a field in this list has a non-empty value.
1087	// This may be used to include null fields in Patch requests.
1088	NullFields []string `json:"-"`
1089}
1090
1091func (s *MysqlDatabase) MarshalJSON() ([]byte, error) {
1092	type NoMethod MysqlDatabase
1093	raw := NoMethod(*s)
1094	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1095}
1096
1097// MysqlProfile: MySQL database profile.
1098type MysqlProfile struct {
1099	// Hostname: Required. Hostname for the MySQL connection.
1100	Hostname string `json:"hostname,omitempty"`
1101
1102	// Password: Required. Input only. Password for the MySQL connection.
1103	Password string `json:"password,omitempty"`
1104
1105	// Port: Port for the MySQL connection, default value is 3306.
1106	Port int64 `json:"port,omitempty"`
1107
1108	// SslConfig: SSL configuration for the MySQL connection.
1109	SslConfig *MysqlSslConfig `json:"sslConfig,omitempty"`
1110
1111	// Username: Required. Username for the MySQL connection.
1112	Username string `json:"username,omitempty"`
1113
1114	// ForceSendFields is a list of field names (e.g. "Hostname") to
1115	// unconditionally include in API requests. By default, fields with
1116	// empty or default values are omitted from API requests. However, any
1117	// non-pointer, non-interface field appearing in ForceSendFields will be
1118	// sent to the server regardless of whether the field is empty or not.
1119	// This may be used to include empty fields in Patch requests.
1120	ForceSendFields []string `json:"-"`
1121
1122	// NullFields is a list of field names (e.g. "Hostname") to include in
1123	// API requests with the JSON null value. By default, fields with empty
1124	// values are omitted from API requests. However, any field with an
1125	// empty value appearing in NullFields will be sent to the server as
1126	// null. It is an error if a field in this list has a non-empty value.
1127	// This may be used to include null fields in Patch requests.
1128	NullFields []string `json:"-"`
1129}
1130
1131func (s *MysqlProfile) MarshalJSON() ([]byte, error) {
1132	type NoMethod MysqlProfile
1133	raw := NoMethod(*s)
1134	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1135}
1136
1137// MysqlRdbms: MySQL database structure
1138type MysqlRdbms struct {
1139	// MysqlDatabases: Mysql databases on the server
1140	MysqlDatabases []*MysqlDatabase `json:"mysqlDatabases,omitempty"`
1141
1142	// ForceSendFields is a list of field names (e.g. "MysqlDatabases") to
1143	// unconditionally include in API requests. By default, fields with
1144	// empty or default values are omitted from API requests. However, any
1145	// non-pointer, non-interface field appearing in ForceSendFields will be
1146	// sent to the server regardless of whether the field is empty or not.
1147	// This may be used to include empty fields in Patch requests.
1148	ForceSendFields []string `json:"-"`
1149
1150	// NullFields is a list of field names (e.g. "MysqlDatabases") to
1151	// include in API requests with the JSON null value. By default, fields
1152	// with empty values are omitted from API requests. However, any field
1153	// with an empty value appearing in NullFields will be sent to the
1154	// server as null. It is an error if a field in this list has a
1155	// non-empty value. This may be used to include null fields in Patch
1156	// requests.
1157	NullFields []string `json:"-"`
1158}
1159
1160func (s *MysqlRdbms) MarshalJSON() ([]byte, error) {
1161	type NoMethod MysqlRdbms
1162	raw := NoMethod(*s)
1163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1164}
1165
1166// MysqlSourceConfig: MySQL source configuration
1167type MysqlSourceConfig struct {
1168	// Allowlist: MySQL objects to retrieve from the source.
1169	Allowlist *MysqlRdbms `json:"allowlist,omitempty"`
1170
1171	// Rejectlist: MySQL objects to exclude from the stream.
1172	Rejectlist *MysqlRdbms `json:"rejectlist,omitempty"`
1173
1174	// ForceSendFields is a list of field names (e.g. "Allowlist") to
1175	// unconditionally include in API requests. By default, fields with
1176	// empty or default values are omitted from API requests. However, any
1177	// non-pointer, non-interface field appearing in ForceSendFields will be
1178	// sent to the server regardless of whether the field is empty or not.
1179	// This may be used to include empty fields in Patch requests.
1180	ForceSendFields []string `json:"-"`
1181
1182	// NullFields is a list of field names (e.g. "Allowlist") to include in
1183	// API requests with the JSON null value. By default, fields with empty
1184	// values are omitted from API requests. However, any field with an
1185	// empty value appearing in NullFields will be sent to the server as
1186	// null. It is an error if a field in this list has a non-empty value.
1187	// This may be used to include null fields in Patch requests.
1188	NullFields []string `json:"-"`
1189}
1190
1191func (s *MysqlSourceConfig) MarshalJSON() ([]byte, error) {
1192	type NoMethod MysqlSourceConfig
1193	raw := NoMethod(*s)
1194	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1195}
1196
1197// MysqlSslConfig: MySQL SSL configuration information.
1198type MysqlSslConfig struct {
1199	// CaCertificate: Input only. PEM-encoded certificate of the CA that
1200	// signed the source database server's certificate.
1201	CaCertificate string `json:"caCertificate,omitempty"`
1202
1203	// CaCertificateSet: Output only. Indicates whether the ca_certificate
1204	// field is set.
1205	CaCertificateSet bool `json:"caCertificateSet,omitempty"`
1206
1207	// ClientCertificate: Input only. PEM-encoded certificate that will be
1208	// used by the replica to authenticate against the source database
1209	// server. If this field is used then the 'client_key' and the
1210	// 'ca_certificate' fields are mandatory.
1211	ClientCertificate string `json:"clientCertificate,omitempty"`
1212
1213	// ClientCertificateSet: Output only. Indicates whether the
1214	// client_certificate field is set.
1215	ClientCertificateSet bool `json:"clientCertificateSet,omitempty"`
1216
1217	// ClientKey: Input only. PEM-encoded private key associated with the
1218	// Client Certificate. If this field is used then the
1219	// 'client_certificate' and the 'ca_certificate' fields are mandatory.
1220	ClientKey string `json:"clientKey,omitempty"`
1221
1222	// ClientKeySet: Output only. Indicates whether the client_key field is
1223	// set.
1224	ClientKeySet bool `json:"clientKeySet,omitempty"`
1225
1226	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
1227	// unconditionally include in API requests. By default, fields with
1228	// empty or default values are omitted from API requests. However, any
1229	// non-pointer, non-interface field appearing in ForceSendFields will be
1230	// sent to the server regardless of whether the field is empty or not.
1231	// This may be used to include empty fields in Patch requests.
1232	ForceSendFields []string `json:"-"`
1233
1234	// NullFields is a list of field names (e.g. "CaCertificate") to include
1235	// in API requests with the JSON null value. By default, fields with
1236	// empty values are omitted from API requests. However, any field with
1237	// an empty value appearing in NullFields will be sent to the server as
1238	// null. It is an error if a field in this list has a non-empty value.
1239	// This may be used to include null fields in Patch requests.
1240	NullFields []string `json:"-"`
1241}
1242
1243func (s *MysqlSslConfig) MarshalJSON() ([]byte, error) {
1244	type NoMethod MysqlSslConfig
1245	raw := NoMethod(*s)
1246	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1247}
1248
1249// MysqlTable: MySQL table.
1250type MysqlTable struct {
1251	// MysqlColumns: MySQL columns in the database. When unspecified as part
1252	// of include/exclude lists, includes/excludes everything.
1253	MysqlColumns []*MysqlColumn `json:"mysqlColumns,omitempty"`
1254
1255	// TableName: Table name.
1256	TableName string `json:"tableName,omitempty"`
1257
1258	// ForceSendFields is a list of field names (e.g. "MysqlColumns") to
1259	// unconditionally include in API requests. By default, fields with
1260	// empty or default values are omitted from API requests. However, any
1261	// non-pointer, non-interface field appearing in ForceSendFields will be
1262	// sent to the server regardless of whether the field is empty or not.
1263	// This may be used to include empty fields in Patch requests.
1264	ForceSendFields []string `json:"-"`
1265
1266	// NullFields is a list of field names (e.g. "MysqlColumns") to include
1267	// in API requests with the JSON null value. By default, fields with
1268	// empty values are omitted from API requests. However, any field with
1269	// an empty value appearing in NullFields will be sent to the server as
1270	// null. It is an error if a field in this list has a non-empty value.
1271	// This may be used to include null fields in Patch requests.
1272	NullFields []string `json:"-"`
1273}
1274
1275func (s *MysqlTable) MarshalJSON() ([]byte, error) {
1276	type NoMethod MysqlTable
1277	raw := NoMethod(*s)
1278	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1279}
1280
1281// NoConnectivitySettings: No connectivity settings.
1282type NoConnectivitySettings struct {
1283}
1284
1285// Operation: This resource represents a long-running operation that is
1286// the result of a network API call.
1287type Operation struct {
1288	// Done: If the value is `false`, it means the operation is still in
1289	// progress. If `true`, the operation is completed, and either `error`
1290	// or `response` is available.
1291	Done bool `json:"done,omitempty"`
1292
1293	// Error: The error result of the operation in case of failure or
1294	// cancellation.
1295	Error *Status `json:"error,omitempty"`
1296
1297	// Metadata: Service-specific metadata associated with the operation. It
1298	// typically contains progress information and common metadata such as
1299	// create time. Some services might not provide such metadata. Any
1300	// method that returns a long-running operation should document the
1301	// metadata type, if any.
1302	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1303
1304	// Name: The server-assigned name, which is only unique within the same
1305	// service that originally returns it. If you use the default HTTP
1306	// mapping, the `name` should be a resource name ending with
1307	// `operations/{unique_id}`.
1308	Name string `json:"name,omitempty"`
1309
1310	// Response: The normal response of the operation in case of success. If
1311	// the original method returns no data on success, such as `Delete`, the
1312	// response is `google.protobuf.Empty`. If the original method is
1313	// standard `Get`/`Create`/`Update`, the response should be the
1314	// resource. For other methods, the response should have the type
1315	// `XxxResponse`, where `Xxx` is the original method name. For example,
1316	// if the original method name is `TakeSnapshot()`, the inferred
1317	// response type is `TakeSnapshotResponse`.
1318	Response googleapi.RawMessage `json:"response,omitempty"`
1319
1320	// ServerResponse contains the HTTP response code and headers from the
1321	// server.
1322	googleapi.ServerResponse `json:"-"`
1323
1324	// ForceSendFields is a list of field names (e.g. "Done") to
1325	// unconditionally include in API requests. By default, fields with
1326	// empty or default values are omitted from API requests. However, any
1327	// non-pointer, non-interface field appearing in ForceSendFields will be
1328	// sent to the server regardless of whether the field is empty or not.
1329	// This may be used to include empty fields in Patch requests.
1330	ForceSendFields []string `json:"-"`
1331
1332	// NullFields is a list of field names (e.g. "Done") to include in API
1333	// requests with the JSON null value. By default, fields with empty
1334	// values are omitted from API requests. However, any field with an
1335	// empty value appearing in NullFields will be sent to the server as
1336	// null. It is an error if a field in this list has a non-empty value.
1337	// This may be used to include null fields in Patch requests.
1338	NullFields []string `json:"-"`
1339}
1340
1341func (s *Operation) MarshalJSON() ([]byte, error) {
1342	type NoMethod Operation
1343	raw := NoMethod(*s)
1344	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1345}
1346
1347// OperationMetadata: Represents the metadata of the long-running
1348// operation.
1349type OperationMetadata struct {
1350	// ApiVersion: Output only. API version used to start the operation.
1351	ApiVersion string `json:"apiVersion,omitempty"`
1352
1353	// CreateTime: Output only. The time the operation was created.
1354	CreateTime string `json:"createTime,omitempty"`
1355
1356	// EndTime: Output only. The time the operation finished running.
1357	EndTime string `json:"endTime,omitempty"`
1358
1359	// RequestedCancellation: Output only. Identifies whether the user has
1360	// requested cancellation of the operation. Operations that have
1361	// successfully been cancelled have Operation.error value with a
1362	// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
1363	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
1364
1365	// StatusMessage: Output only. Human-readable status of the operation,
1366	// if any.
1367	StatusMessage string `json:"statusMessage,omitempty"`
1368
1369	// Target: Output only. Server-defined resource path for the target of
1370	// the operation.
1371	Target string `json:"target,omitempty"`
1372
1373	// ValidationResult: Output only. Results of executed validations if
1374	// there are any.
1375	ValidationResult *ValidationResult `json:"validationResult,omitempty"`
1376
1377	// Verb: Output only. Name of the verb executed by the operation.
1378	Verb string `json:"verb,omitempty"`
1379
1380	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
1381	// unconditionally include in API requests. By default, fields with
1382	// empty or default values are omitted from API requests. However, any
1383	// non-pointer, non-interface field appearing in ForceSendFields will be
1384	// sent to the server regardless of whether the field is empty or not.
1385	// This may be used to include empty fields in Patch requests.
1386	ForceSendFields []string `json:"-"`
1387
1388	// NullFields is a list of field names (e.g. "ApiVersion") to include in
1389	// API requests with the JSON null value. By default, fields with empty
1390	// values are omitted from API requests. However, any field with an
1391	// empty value appearing in NullFields will be sent to the server as
1392	// null. It is an error if a field in this list has a non-empty value.
1393	// This may be used to include null fields in Patch requests.
1394	NullFields []string `json:"-"`
1395}
1396
1397func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1398	type NoMethod OperationMetadata
1399	raw := NoMethod(*s)
1400	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1401}
1402
1403// OracleColumn: Oracle Column.
1404type OracleColumn struct {
1405	// ColumnName: Column name.
1406	ColumnName string `json:"columnName,omitempty"`
1407
1408	// DataType: The Oracle data type.
1409	DataType string `json:"dataType,omitempty"`
1410
1411	// Encoding: Column encoding.
1412	Encoding string `json:"encoding,omitempty"`
1413
1414	// Length: Column length.
1415	Length int64 `json:"length,omitempty"`
1416
1417	// Nullable: Whether or not the column can accept a null value.
1418	Nullable bool `json:"nullable,omitempty"`
1419
1420	// OrdinalPosition: The ordinal position of the column in the table.
1421	OrdinalPosition int64 `json:"ordinalPosition,omitempty"`
1422
1423	// Precision: Column precision.
1424	Precision int64 `json:"precision,omitempty"`
1425
1426	// PrimaryKey: Whether or not the column represents a primary key.
1427	PrimaryKey bool `json:"primaryKey,omitempty"`
1428
1429	// Scale: Column scale.
1430	Scale int64 `json:"scale,omitempty"`
1431
1432	// ForceSendFields is a list of field names (e.g. "ColumnName") to
1433	// unconditionally include in API requests. By default, fields with
1434	// empty or default values are omitted from API requests. However, any
1435	// non-pointer, non-interface field appearing in ForceSendFields will be
1436	// sent to the server regardless of whether the field is empty or not.
1437	// This may be used to include empty fields in Patch requests.
1438	ForceSendFields []string `json:"-"`
1439
1440	// NullFields is a list of field names (e.g. "ColumnName") to include in
1441	// API requests with the JSON null value. By default, fields with empty
1442	// values are omitted from API requests. However, any field with an
1443	// empty value appearing in NullFields will be sent to the server as
1444	// null. It is an error if a field in this list has a non-empty value.
1445	// This may be used to include null fields in Patch requests.
1446	NullFields []string `json:"-"`
1447}
1448
1449func (s *OracleColumn) MarshalJSON() ([]byte, error) {
1450	type NoMethod OracleColumn
1451	raw := NoMethod(*s)
1452	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1453}
1454
1455// OracleProfile: Oracle database profile.
1456type OracleProfile struct {
1457	// ConnectionAttributes: Connection string attributes
1458	ConnectionAttributes map[string]string `json:"connectionAttributes,omitempty"`
1459
1460	// DatabaseService: Required. Database for the Oracle connection.
1461	DatabaseService string `json:"databaseService,omitempty"`
1462
1463	// Hostname: Required. Hostname for the Oracle connection.
1464	Hostname string `json:"hostname,omitempty"`
1465
1466	// Password: Required. Password for the Oracle connection.
1467	Password string `json:"password,omitempty"`
1468
1469	// Port: Port for the Oracle connection, default value is 1521.
1470	Port int64 `json:"port,omitempty"`
1471
1472	// Username: Required. Username for the Oracle connection.
1473	Username string `json:"username,omitempty"`
1474
1475	// ForceSendFields is a list of field names (e.g.
1476	// "ConnectionAttributes") to unconditionally include in API requests.
1477	// By default, fields with empty or default values are omitted from API
1478	// requests. However, any non-pointer, non-interface field appearing in
1479	// ForceSendFields will be sent to the server regardless of whether the
1480	// field is empty or not. This may be used to include empty fields in
1481	// Patch requests.
1482	ForceSendFields []string `json:"-"`
1483
1484	// NullFields is a list of field names (e.g. "ConnectionAttributes") to
1485	// include in API requests with the JSON null value. By default, fields
1486	// with empty values are omitted from API requests. However, any field
1487	// with an empty value appearing in NullFields will be sent to the
1488	// server as null. It is an error if a field in this list has a
1489	// non-empty value. This may be used to include null fields in Patch
1490	// requests.
1491	NullFields []string `json:"-"`
1492}
1493
1494func (s *OracleProfile) MarshalJSON() ([]byte, error) {
1495	type NoMethod OracleProfile
1496	raw := NoMethod(*s)
1497	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1498}
1499
1500// OracleRdbms: Oracle database structure.
1501type OracleRdbms struct {
1502	// OracleSchemas: Oracle schemas/databases in the database server.
1503	OracleSchemas []*OracleSchema `json:"oracleSchemas,omitempty"`
1504
1505	// ForceSendFields is a list of field names (e.g. "OracleSchemas") to
1506	// unconditionally include in API requests. By default, fields with
1507	// empty or default values are omitted from API requests. However, any
1508	// non-pointer, non-interface field appearing in ForceSendFields will be
1509	// sent to the server regardless of whether the field is empty or not.
1510	// This may be used to include empty fields in Patch requests.
1511	ForceSendFields []string `json:"-"`
1512
1513	// NullFields is a list of field names (e.g. "OracleSchemas") to include
1514	// in API requests with the JSON null value. By default, fields with
1515	// empty values are omitted from API requests. However, any field with
1516	// an empty value appearing in NullFields will be sent to the server as
1517	// null. It is an error if a field in this list has a non-empty value.
1518	// This may be used to include null fields in Patch requests.
1519	NullFields []string `json:"-"`
1520}
1521
1522func (s *OracleRdbms) MarshalJSON() ([]byte, error) {
1523	type NoMethod OracleRdbms
1524	raw := NoMethod(*s)
1525	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1526}
1527
1528// OracleSchema: Oracle schema.
1529type OracleSchema struct {
1530	// OracleTables: Tables in the schema.
1531	OracleTables []*OracleTable `json:"oracleTables,omitempty"`
1532
1533	// SchemaName: Schema name.
1534	SchemaName string `json:"schemaName,omitempty"`
1535
1536	// ForceSendFields is a list of field names (e.g. "OracleTables") to
1537	// unconditionally include in API requests. By default, fields with
1538	// empty or default values are omitted from API requests. However, any
1539	// non-pointer, non-interface field appearing in ForceSendFields will be
1540	// sent to the server regardless of whether the field is empty or not.
1541	// This may be used to include empty fields in Patch requests.
1542	ForceSendFields []string `json:"-"`
1543
1544	// NullFields is a list of field names (e.g. "OracleTables") to include
1545	// in API requests with the JSON null value. By default, fields with
1546	// empty values are omitted from API requests. However, any field with
1547	// an empty value appearing in NullFields will be sent to the server as
1548	// null. It is an error if a field in this list has a non-empty value.
1549	// This may be used to include null fields in Patch requests.
1550	NullFields []string `json:"-"`
1551}
1552
1553func (s *OracleSchema) MarshalJSON() ([]byte, error) {
1554	type NoMethod OracleSchema
1555	raw := NoMethod(*s)
1556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1557}
1558
1559// OracleSourceConfig: Oracle data source configuration
1560type OracleSourceConfig struct {
1561	// Allowlist: Oracle objects to include in the stream.
1562	Allowlist *OracleRdbms `json:"allowlist,omitempty"`
1563
1564	// Rejectlist: Oracle objects to exclude from the stream.
1565	Rejectlist *OracleRdbms `json:"rejectlist,omitempty"`
1566
1567	// ForceSendFields is a list of field names (e.g. "Allowlist") to
1568	// unconditionally include in API requests. By default, fields with
1569	// empty or default values are omitted from API requests. However, any
1570	// non-pointer, non-interface field appearing in ForceSendFields will be
1571	// sent to the server regardless of whether the field is empty or not.
1572	// This may be used to include empty fields in Patch requests.
1573	ForceSendFields []string `json:"-"`
1574
1575	// NullFields is a list of field names (e.g. "Allowlist") to include in
1576	// API requests with the JSON null value. By default, fields with empty
1577	// values are omitted from API requests. However, any field with an
1578	// empty value appearing in NullFields will be sent to the server as
1579	// null. It is an error if a field in this list has a non-empty value.
1580	// This may be used to include null fields in Patch requests.
1581	NullFields []string `json:"-"`
1582}
1583
1584func (s *OracleSourceConfig) MarshalJSON() ([]byte, error) {
1585	type NoMethod OracleSourceConfig
1586	raw := NoMethod(*s)
1587	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1588}
1589
1590// OracleTable: Oracle table.
1591type OracleTable struct {
1592	// OracleColumns: Oracle columns in the schema. When unspecified as part
1593	// of inclue/exclude lists, includes/excludes everything.
1594	OracleColumns []*OracleColumn `json:"oracleColumns,omitempty"`
1595
1596	// TableName: Table name.
1597	TableName string `json:"tableName,omitempty"`
1598
1599	// ForceSendFields is a list of field names (e.g. "OracleColumns") to
1600	// unconditionally include in API requests. By default, fields with
1601	// empty or default values are omitted from API requests. However, any
1602	// non-pointer, non-interface field appearing in ForceSendFields will be
1603	// sent to the server regardless of whether the field is empty or not.
1604	// This may be used to include empty fields in Patch requests.
1605	ForceSendFields []string `json:"-"`
1606
1607	// NullFields is a list of field names (e.g. "OracleColumns") to include
1608	// in API requests with the JSON null value. By default, fields with
1609	// empty values are omitted from API requests. However, any field with
1610	// an empty value appearing in NullFields will be sent to the server as
1611	// null. It is an error if a field in this list has a non-empty value.
1612	// This may be used to include null fields in Patch requests.
1613	NullFields []string `json:"-"`
1614}
1615
1616func (s *OracleTable) MarshalJSON() ([]byte, error) {
1617	type NoMethod OracleTable
1618	raw := NoMethod(*s)
1619	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1620}
1621
1622// PrivateConnection: The PrivateConnection resource is used to
1623// establish private connectivity between Datastream and a customer's
1624// network.
1625type PrivateConnection struct {
1626	// CreateTime: Output only. The create time of the resource.
1627	CreateTime string `json:"createTime,omitempty"`
1628
1629	// DisplayName: Required. Display name.
1630	DisplayName string `json:"displayName,omitempty"`
1631
1632	// Error: Output only. In case of error, the details of the error in a
1633	// user-friendly format.
1634	Error *Error `json:"error,omitempty"`
1635
1636	// Labels: Labels.
1637	Labels map[string]string `json:"labels,omitempty"`
1638
1639	// Name: Output only. The resource's name.
1640	Name string `json:"name,omitempty"`
1641
1642	// State: Output only. The state of the Private Connection.
1643	//
1644	// Possible values:
1645	//   "STATE_UNSPECIFIED"
1646	//   "CREATING" - The private connection is in creation state - creating
1647	// resources.
1648	//   "CREATED" - The private connection has been created with all of
1649	// it's resources.
1650	//   "FAILED" - The private connection creation has failed.
1651	//   "DELETING" - The private connection is being deleted.
1652	//   "FAILED_TO_DELETE" - Delete request has failed, resource is in
1653	// invalid state.
1654	State string `json:"state,omitempty"`
1655
1656	// UpdateTime: Output only. The update time of the resource.
1657	UpdateTime string `json:"updateTime,omitempty"`
1658
1659	// VpcPeeringConfig: VPC Peering Config
1660	VpcPeeringConfig *VpcPeeringConfig `json:"vpcPeeringConfig,omitempty"`
1661
1662	// ServerResponse contains the HTTP response code and headers from the
1663	// server.
1664	googleapi.ServerResponse `json:"-"`
1665
1666	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1667	// unconditionally include in API requests. By default, fields with
1668	// empty or default values are omitted from API requests. However, any
1669	// non-pointer, non-interface field appearing in ForceSendFields will be
1670	// sent to the server regardless of whether the field is empty or not.
1671	// This may be used to include empty fields in Patch requests.
1672	ForceSendFields []string `json:"-"`
1673
1674	// NullFields is a list of field names (e.g. "CreateTime") to include in
1675	// API requests with the JSON null value. By default, fields with empty
1676	// values are omitted from API requests. However, any field with an
1677	// empty value appearing in NullFields will be sent to the server as
1678	// null. It is an error if a field in this list has a non-empty value.
1679	// This may be used to include null fields in Patch requests.
1680	NullFields []string `json:"-"`
1681}
1682
1683func (s *PrivateConnection) MarshalJSON() ([]byte, error) {
1684	type NoMethod PrivateConnection
1685	raw := NoMethod(*s)
1686	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1687}
1688
1689// PrivateConnectivity: Private Connectivity
1690type PrivateConnectivity struct {
1691	PrivateConnectionName string `json:"privateConnectionName,omitempty"`
1692
1693	// ForceSendFields is a list of field names (e.g.
1694	// "PrivateConnectionName") to unconditionally include in API requests.
1695	// By default, fields with empty or default values are omitted from API
1696	// requests. However, any non-pointer, non-interface field appearing in
1697	// ForceSendFields will be sent to the server regardless of whether the
1698	// field is empty or not. This may be used to include empty fields in
1699	// Patch requests.
1700	ForceSendFields []string `json:"-"`
1701
1702	// NullFields is a list of field names (e.g. "PrivateConnectionName") to
1703	// include in API requests with the JSON null value. By default, fields
1704	// with empty values are omitted from API requests. However, any field
1705	// with an empty value appearing in NullFields will be sent to the
1706	// server as null. It is an error if a field in this list has a
1707	// non-empty value. This may be used to include null fields in Patch
1708	// requests.
1709	NullFields []string `json:"-"`
1710}
1711
1712func (s *PrivateConnectivity) MarshalJSON() ([]byte, error) {
1713	type NoMethod PrivateConnectivity
1714	raw := NoMethod(*s)
1715	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1716}
1717
1718// Route: The Route resource is the child of the PrivateConnection
1719// resource. It used to define a route for a PrivateConnection setup.
1720type Route struct {
1721	// CreateTime: Output only. The create time of the resource.
1722	CreateTime string `json:"createTime,omitempty"`
1723
1724	// DestinationAddress: Required. Destination address for connection
1725	DestinationAddress string `json:"destinationAddress,omitempty"`
1726
1727	// DestinationPort: Destination port for connection
1728	DestinationPort int64 `json:"destinationPort,omitempty"`
1729
1730	// DisplayName: Required. Display name.
1731	DisplayName string `json:"displayName,omitempty"`
1732
1733	// Labels: Labels.
1734	Labels map[string]string `json:"labels,omitempty"`
1735
1736	// Name: Output only. The resource's name.
1737	Name string `json:"name,omitempty"`
1738
1739	// UpdateTime: Output only. The update time of the resource.
1740	UpdateTime string `json:"updateTime,omitempty"`
1741
1742	// ServerResponse contains the HTTP response code and headers from the
1743	// server.
1744	googleapi.ServerResponse `json:"-"`
1745
1746	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1747	// unconditionally include in API requests. By default, fields with
1748	// empty or default values are omitted from API requests. However, any
1749	// non-pointer, non-interface field appearing in ForceSendFields will be
1750	// sent to the server regardless of whether the field is empty or not.
1751	// This may be used to include empty fields in Patch requests.
1752	ForceSendFields []string `json:"-"`
1753
1754	// NullFields is a list of field names (e.g. "CreateTime") to include in
1755	// API requests with the JSON null value. By default, fields with empty
1756	// values are omitted from API requests. However, any field with an
1757	// empty value appearing in NullFields will be sent to the server as
1758	// null. It is an error if a field in this list has a non-empty value.
1759	// This may be used to include null fields in Patch requests.
1760	NullFields []string `json:"-"`
1761}
1762
1763func (s *Route) MarshalJSON() ([]byte, error) {
1764	type NoMethod Route
1765	raw := NoMethod(*s)
1766	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1767}
1768
1769// SourceConfig: The configuration of the stream source.
1770type SourceConfig struct {
1771	// MysqlSourceConfig: MySQL data source configuration
1772	MysqlSourceConfig *MysqlSourceConfig `json:"mysqlSourceConfig,omitempty"`
1773
1774	// OracleSourceConfig: Oracle data source configuration
1775	OracleSourceConfig *OracleSourceConfig `json:"oracleSourceConfig,omitempty"`
1776
1777	// SourceConnectionProfileName: Required. Source connection profile
1778	// identifier.
1779	SourceConnectionProfileName string `json:"sourceConnectionProfileName,omitempty"`
1780
1781	// ForceSendFields is a list of field names (e.g. "MysqlSourceConfig")
1782	// to unconditionally include in API requests. By default, fields with
1783	// empty or default values are omitted from API requests. However, any
1784	// non-pointer, non-interface field appearing in ForceSendFields will be
1785	// sent to the server regardless of whether the field is empty or not.
1786	// This may be used to include empty fields in Patch requests.
1787	ForceSendFields []string `json:"-"`
1788
1789	// NullFields is a list of field names (e.g. "MysqlSourceConfig") to
1790	// include in API requests with the JSON null value. By default, fields
1791	// with empty values are omitted from API requests. However, any field
1792	// with an empty value appearing in NullFields will be sent to the
1793	// server as null. It is an error if a field in this list has a
1794	// non-empty value. This may be used to include null fields in Patch
1795	// requests.
1796	NullFields []string `json:"-"`
1797}
1798
1799func (s *SourceConfig) MarshalJSON() ([]byte, error) {
1800	type NoMethod SourceConfig
1801	raw := NoMethod(*s)
1802	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1803}
1804
1805// StaticServiceIpConnectivity: Static IP address connectivity.
1806type StaticServiceIpConnectivity struct {
1807}
1808
1809// Status: The `Status` type defines a logical error model that is
1810// suitable for different programming environments, including REST APIs
1811// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
1812// `Status` message contains three pieces of data: error code, error
1813// message, and error details. You can find out more about this error
1814// model and how to work with it in the API Design Guide
1815// (https://cloud.google.com/apis/design/errors).
1816type Status struct {
1817	// Code: The status code, which should be an enum value of
1818	// google.rpc.Code.
1819	Code int64 `json:"code,omitempty"`
1820
1821	// Details: A list of messages that carry the error details. There is a
1822	// common set of message types for APIs to use.
1823	Details []googleapi.RawMessage `json:"details,omitempty"`
1824
1825	// Message: A developer-facing error message, which should be in
1826	// English. Any user-facing error message should be localized and sent
1827	// in the google.rpc.Status.details field, or localized by the client.
1828	Message string `json:"message,omitempty"`
1829
1830	// ForceSendFields is a list of field names (e.g. "Code") to
1831	// unconditionally include in API requests. By default, fields with
1832	// empty or default values are omitted from API requests. However, any
1833	// non-pointer, non-interface field appearing in ForceSendFields will be
1834	// sent to the server regardless of whether the field is empty or not.
1835	// This may be used to include empty fields in Patch requests.
1836	ForceSendFields []string `json:"-"`
1837
1838	// NullFields is a list of field names (e.g. "Code") to include in API
1839	// requests with the JSON null value. By default, fields with empty
1840	// values are omitted from API requests. However, any field with an
1841	// empty value appearing in NullFields will be sent to the server as
1842	// null. It is an error if a field in this list has a non-empty value.
1843	// This may be used to include null fields in Patch requests.
1844	NullFields []string `json:"-"`
1845}
1846
1847func (s *Status) MarshalJSON() ([]byte, error) {
1848	type NoMethod Status
1849	raw := NoMethod(*s)
1850	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1851}
1852
1853type Stream struct {
1854	// BackfillAll: Automatically backfill objects included in the stream
1855	// source configuration. Specific objects can be excluded.
1856	BackfillAll *BackfillAllStrategy `json:"backfillAll,omitempty"`
1857
1858	// BackfillNone: Do not automatically backfill any objects.
1859	BackfillNone *BackfillNoneStrategy `json:"backfillNone,omitempty"`
1860
1861	// CreateTime: Output only. The creation time of the stream.
1862	CreateTime string `json:"createTime,omitempty"`
1863
1864	// DestinationConfig: Required. Destination connection profile
1865	// configuration.
1866	DestinationConfig *DestinationConfig `json:"destinationConfig,omitempty"`
1867
1868	// DisplayName: Required. Display name.
1869	DisplayName string `json:"displayName,omitempty"`
1870
1871	// Errors: Output only. Errors on the Stream.
1872	Errors []*Error `json:"errors,omitempty"`
1873
1874	// Labels: Labels.
1875	Labels map[string]string `json:"labels,omitempty"`
1876
1877	// Name: Output only. The stream's name.
1878	Name string `json:"name,omitempty"`
1879
1880	// SourceConfig: Required. Source connection profile configuration.
1881	SourceConfig *SourceConfig `json:"sourceConfig,omitempty"`
1882
1883	// State: The state of the stream.
1884	//
1885	// Possible values:
1886	//   "STATE_UNSPECIFIED" - Unspecified stream state.
1887	//   "CREATED" - The stream has been created.
1888	//   "RUNNING" - The stream is running.
1889	//   "PAUSED" - The stream is paused.
1890	//   "MAINTENANCE" - The stream is in maintenance mode. Updates are
1891	// rejected on the resource in this state.
1892	//   "FAILED" - The stream is experiencing an error that is preventing
1893	// data from being streamed.
1894	//   "FAILED_PERMANENTLY" - The stream has experienced a terminal
1895	// failure.
1896	//   "STARTING" - The stream is starting, but not yet running.
1897	//   "DRAINING" - The Stream is no longer reading new events, but still
1898	// writing events in the buffer.
1899	State string `json:"state,omitempty"`
1900
1901	// UpdateTime: Output only. The last update time of the stream.
1902	UpdateTime string `json:"updateTime,omitempty"`
1903
1904	// ServerResponse contains the HTTP response code and headers from the
1905	// server.
1906	googleapi.ServerResponse `json:"-"`
1907
1908	// ForceSendFields is a list of field names (e.g. "BackfillAll") to
1909	// unconditionally include in API requests. By default, fields with
1910	// empty or default values are omitted from API requests. However, any
1911	// non-pointer, non-interface field appearing in ForceSendFields will be
1912	// sent to the server regardless of whether the field is empty or not.
1913	// This may be used to include empty fields in Patch requests.
1914	ForceSendFields []string `json:"-"`
1915
1916	// NullFields is a list of field names (e.g. "BackfillAll") to include
1917	// in API requests with the JSON null value. By default, fields with
1918	// empty values are omitted from API requests. However, any field with
1919	// an empty value appearing in NullFields will be sent to the server as
1920	// null. It is an error if a field in this list has a non-empty value.
1921	// This may be used to include null fields in Patch requests.
1922	NullFields []string `json:"-"`
1923}
1924
1925func (s *Stream) MarshalJSON() ([]byte, error) {
1926	type NoMethod Stream
1927	raw := NoMethod(*s)
1928	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1929}
1930
1931type Validation struct {
1932	// Code: A custom code identifying this validation.
1933	Code string `json:"code,omitempty"`
1934
1935	// Description: A short description of the validation.
1936	Description string `json:"description,omitempty"`
1937
1938	// Message: Messages reflecting the validation results.
1939	Message []*ValidationMessage `json:"message,omitempty"`
1940
1941	// Status: Validation execution status.
1942	//
1943	// Possible values:
1944	//   "STATUS_UNSPECIFIED" - Unspecified status.
1945	//   "NOT_EXECUTED" - Validation did not execute.
1946	//   "FAILED" - Validation failed.
1947	//   "PASSED" - Validation passed.
1948	Status string `json:"status,omitempty"`
1949
1950	// ForceSendFields is a list of field names (e.g. "Code") to
1951	// unconditionally include in API requests. By default, fields with
1952	// empty or default values are omitted from API requests. However, any
1953	// non-pointer, non-interface field appearing in ForceSendFields will be
1954	// sent to the server regardless of whether the field is empty or not.
1955	// This may be used to include empty fields in Patch requests.
1956	ForceSendFields []string `json:"-"`
1957
1958	// NullFields is a list of field names (e.g. "Code") to include in API
1959	// requests with the JSON null value. By default, fields with empty
1960	// values are omitted from API requests. However, any field with an
1961	// empty value appearing in NullFields will be sent to the server as
1962	// null. It is an error if a field in this list has a non-empty value.
1963	// This may be used to include null fields in Patch requests.
1964	NullFields []string `json:"-"`
1965}
1966
1967func (s *Validation) MarshalJSON() ([]byte, error) {
1968	type NoMethod Validation
1969	raw := NoMethod(*s)
1970	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1971}
1972
1973// ValidationMessage: Represent user-facing validation result message.
1974type ValidationMessage struct {
1975	// Code: A custom code identifying this specific message.
1976	Code string `json:"code,omitempty"`
1977
1978	// Level: Message severity level (warning or error).
1979	//
1980	// Possible values:
1981	//   "LEVEL_UNSPECIFIED" - Unspecified level.
1982	//   "WARNING" - Potentially cause issues with the Stream.
1983	//   "ERROR" - Definitely cause issues with the Stream.
1984	Level string `json:"level,omitempty"`
1985
1986	// Message: The result of the validation.
1987	Message string `json:"message,omitempty"`
1988
1989	// Metadata: Additional metadata related to the result.
1990	Metadata map[string]string `json:"metadata,omitempty"`
1991
1992	// ForceSendFields is a list of field names (e.g. "Code") to
1993	// unconditionally include in API requests. By default, fields with
1994	// empty or default values are omitted from API requests. However, any
1995	// non-pointer, non-interface field appearing in ForceSendFields will be
1996	// sent to the server regardless of whether the field is empty or not.
1997	// This may be used to include empty fields in Patch requests.
1998	ForceSendFields []string `json:"-"`
1999
2000	// NullFields is a list of field names (e.g. "Code") to include in API
2001	// requests with the JSON null value. By default, fields with empty
2002	// values are omitted from API requests. However, any field with an
2003	// empty value appearing in NullFields will be sent to the server as
2004	// null. It is an error if a field in this list has a non-empty value.
2005	// This may be used to include null fields in Patch requests.
2006	NullFields []string `json:"-"`
2007}
2008
2009func (s *ValidationMessage) MarshalJSON() ([]byte, error) {
2010	type NoMethod ValidationMessage
2011	raw := NoMethod(*s)
2012	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2013}
2014
2015// ValidationResult: Contains the current validation results.
2016type ValidationResult struct {
2017	// Validations: A list of validations (includes both executed as well as
2018	// not executed validations).
2019	Validations []*Validation `json:"validations,omitempty"`
2020
2021	// ForceSendFields is a list of field names (e.g. "Validations") to
2022	// unconditionally include in API requests. By default, fields with
2023	// empty or default values are omitted from API requests. However, any
2024	// non-pointer, non-interface field appearing in ForceSendFields will be
2025	// sent to the server regardless of whether the field is empty or not.
2026	// This may be used to include empty fields in Patch requests.
2027	ForceSendFields []string `json:"-"`
2028
2029	// NullFields is a list of field names (e.g. "Validations") to include
2030	// in API requests with the JSON null value. By default, fields with
2031	// empty values are omitted from API requests. However, any field with
2032	// an empty value appearing in NullFields will be sent to the server as
2033	// null. It is an error if a field in this list has a non-empty value.
2034	// This may be used to include null fields in Patch requests.
2035	NullFields []string `json:"-"`
2036}
2037
2038func (s *ValidationResult) MarshalJSON() ([]byte, error) {
2039	type NoMethod ValidationResult
2040	raw := NoMethod(*s)
2041	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2042}
2043
2044// VpcPeeringConfig: The VPC Peering configuration is used to create VPC
2045// peering between Datastream and the consumer's VPC.
2046type VpcPeeringConfig struct {
2047	// Subnet: Required. A free subnet for peering. (CIDR of /29)
2048	// TODO(b/172995841) add validators.
2049	Subnet string `json:"subnet,omitempty"`
2050
2051	// VpcName: Required. fully qualified name of the VPC Datastream will
2052	// peer to.
2053	VpcName string `json:"vpcName,omitempty"`
2054
2055	// ForceSendFields is a list of field names (e.g. "Subnet") to
2056	// unconditionally include in API requests. By default, fields with
2057	// empty or default values are omitted from API requests. However, any
2058	// non-pointer, non-interface field appearing in ForceSendFields will be
2059	// sent to the server regardless of whether the field is empty or not.
2060	// This may be used to include empty fields in Patch requests.
2061	ForceSendFields []string `json:"-"`
2062
2063	// NullFields is a list of field names (e.g. "Subnet") to include in API
2064	// requests with the JSON null value. By default, fields with empty
2065	// values are omitted from API requests. However, any field with an
2066	// empty value appearing in NullFields will be sent to the server as
2067	// null. It is an error if a field in this list has a non-empty value.
2068	// This may be used to include null fields in Patch requests.
2069	NullFields []string `json:"-"`
2070}
2071
2072func (s *VpcPeeringConfig) MarshalJSON() ([]byte, error) {
2073	type NoMethod VpcPeeringConfig
2074	raw := NoMethod(*s)
2075	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2076}
2077
2078// method id "datastream.projects.locations.fetchStaticIps":
2079
2080type ProjectsLocationsFetchStaticIpsCall struct {
2081	s            *Service
2082	name         string
2083	urlParams_   gensupport.URLParams
2084	ifNoneMatch_ string
2085	ctx_         context.Context
2086	header_      http.Header
2087}
2088
2089// FetchStaticIps: The FetchStaticIps API call exposes the static ips
2090// used by Datastream. Typically, a request returns children data
2091// objects under a parent data object that's optionally supplied in the
2092// request.
2093//
2094// - name: The name resource of the Response type. Must be in the format
2095//   `projects/*/locations/*`.
2096func (r *ProjectsLocationsService) FetchStaticIps(name string) *ProjectsLocationsFetchStaticIpsCall {
2097	c := &ProjectsLocationsFetchStaticIpsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2098	c.name = name
2099	return c
2100}
2101
2102// PageSize sets the optional parameter "pageSize": Maximum number of
2103// Ips to return, will likely not be specified.
2104func (c *ProjectsLocationsFetchStaticIpsCall) PageSize(pageSize int64) *ProjectsLocationsFetchStaticIpsCall {
2105	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2106	return c
2107}
2108
2109// PageToken sets the optional parameter "pageToken": A page token,
2110// received from a previous `ListStaticIps` call. will likely not be
2111// specified.
2112func (c *ProjectsLocationsFetchStaticIpsCall) PageToken(pageToken string) *ProjectsLocationsFetchStaticIpsCall {
2113	c.urlParams_.Set("pageToken", pageToken)
2114	return c
2115}
2116
2117// Fields allows partial responses to be retrieved. See
2118// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2119// for more information.
2120func (c *ProjectsLocationsFetchStaticIpsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFetchStaticIpsCall {
2121	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2122	return c
2123}
2124
2125// IfNoneMatch sets the optional parameter which makes the operation
2126// fail if the object's ETag matches the given value. This is useful for
2127// getting updates only after the object has changed since the last
2128// request. Use googleapi.IsNotModified to check whether the response
2129// error from Do is the result of In-None-Match.
2130func (c *ProjectsLocationsFetchStaticIpsCall) IfNoneMatch(entityTag string) *ProjectsLocationsFetchStaticIpsCall {
2131	c.ifNoneMatch_ = entityTag
2132	return c
2133}
2134
2135// Context sets the context to be used in this call's Do method. Any
2136// pending HTTP request will be aborted if the provided context is
2137// canceled.
2138func (c *ProjectsLocationsFetchStaticIpsCall) Context(ctx context.Context) *ProjectsLocationsFetchStaticIpsCall {
2139	c.ctx_ = ctx
2140	return c
2141}
2142
2143// Header returns an http.Header that can be modified by the caller to
2144// add HTTP headers to the request.
2145func (c *ProjectsLocationsFetchStaticIpsCall) Header() http.Header {
2146	if c.header_ == nil {
2147		c.header_ = make(http.Header)
2148	}
2149	return c.header_
2150}
2151
2152func (c *ProjectsLocationsFetchStaticIpsCall) doRequest(alt string) (*http.Response, error) {
2153	reqHeaders := make(http.Header)
2154	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2155	for k, v := range c.header_ {
2156		reqHeaders[k] = v
2157	}
2158	reqHeaders.Set("User-Agent", c.s.userAgent())
2159	if c.ifNoneMatch_ != "" {
2160		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2161	}
2162	var body io.Reader = nil
2163	c.urlParams_.Set("alt", alt)
2164	c.urlParams_.Set("prettyPrint", "false")
2165	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:fetchStaticIps")
2166	urls += "?" + c.urlParams_.Encode()
2167	req, err := http.NewRequest("GET", urls, body)
2168	if err != nil {
2169		return nil, err
2170	}
2171	req.Header = reqHeaders
2172	googleapi.Expand(req.URL, map[string]string{
2173		"name": c.name,
2174	})
2175	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2176}
2177
2178// Do executes the "datastream.projects.locations.fetchStaticIps" call.
2179// Exactly one of *FetchStaticIpsResponse or error will be non-nil. Any
2180// non-2xx status code is an error. Response headers are in either
2181// *FetchStaticIpsResponse.ServerResponse.Header or (if a response was
2182// returned at all) in error.(*googleapi.Error).Header. Use
2183// googleapi.IsNotModified to check whether the returned error was
2184// because http.StatusNotModified was returned.
2185func (c *ProjectsLocationsFetchStaticIpsCall) Do(opts ...googleapi.CallOption) (*FetchStaticIpsResponse, error) {
2186	gensupport.SetOptions(c.urlParams_, opts...)
2187	res, err := c.doRequest("json")
2188	if res != nil && res.StatusCode == http.StatusNotModified {
2189		if res.Body != nil {
2190			res.Body.Close()
2191		}
2192		return nil, &googleapi.Error{
2193			Code:   res.StatusCode,
2194			Header: res.Header,
2195		}
2196	}
2197	if err != nil {
2198		return nil, err
2199	}
2200	defer googleapi.CloseBody(res)
2201	if err := googleapi.CheckResponse(res); err != nil {
2202		return nil, err
2203	}
2204	ret := &FetchStaticIpsResponse{
2205		ServerResponse: googleapi.ServerResponse{
2206			Header:         res.Header,
2207			HTTPStatusCode: res.StatusCode,
2208		},
2209	}
2210	target := &ret
2211	if err := gensupport.DecodeResponse(target, res); err != nil {
2212		return nil, err
2213	}
2214	return ret, nil
2215	// {
2216	//   "description": "The FetchStaticIps API call exposes the static ips used by Datastream. Typically, a request returns children data objects under a parent data object that's optionally supplied in the request.",
2217	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}:fetchStaticIps",
2218	//   "httpMethod": "GET",
2219	//   "id": "datastream.projects.locations.fetchStaticIps",
2220	//   "parameterOrder": [
2221	//     "name"
2222	//   ],
2223	//   "parameters": {
2224	//     "name": {
2225	//       "description": "Required. The name resource of the Response type. Must be in the format `projects/*/locations/*`.",
2226	//       "location": "path",
2227	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2228	//       "required": true,
2229	//       "type": "string"
2230	//     },
2231	//     "pageSize": {
2232	//       "description": "Maximum number of Ips to return, will likely not be specified.",
2233	//       "format": "int32",
2234	//       "location": "query",
2235	//       "type": "integer"
2236	//     },
2237	//     "pageToken": {
2238	//       "description": "A page token, received from a previous `ListStaticIps` call. will likely not be specified.",
2239	//       "location": "query",
2240	//       "type": "string"
2241	//     }
2242	//   },
2243	//   "path": "v1alpha1/{+name}:fetchStaticIps",
2244	//   "response": {
2245	//     "$ref": "FetchStaticIpsResponse"
2246	//   },
2247	//   "scopes": [
2248	//     "https://www.googleapis.com/auth/cloud-platform"
2249	//   ]
2250	// }
2251
2252}
2253
2254// Pages invokes f for each page of results.
2255// A non-nil error returned from f will halt the iteration.
2256// The provided context supersedes any context provided to the Context method.
2257func (c *ProjectsLocationsFetchStaticIpsCall) Pages(ctx context.Context, f func(*FetchStaticIpsResponse) error) error {
2258	c.ctx_ = ctx
2259	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2260	for {
2261		x, err := c.Do()
2262		if err != nil {
2263			return err
2264		}
2265		if err := f(x); err != nil {
2266			return err
2267		}
2268		if x.NextPageToken == "" {
2269			return nil
2270		}
2271		c.PageToken(x.NextPageToken)
2272	}
2273}
2274
2275// method id "datastream.projects.locations.get":
2276
2277type ProjectsLocationsGetCall struct {
2278	s            *Service
2279	name         string
2280	urlParams_   gensupport.URLParams
2281	ifNoneMatch_ string
2282	ctx_         context.Context
2283	header_      http.Header
2284}
2285
2286// Get: Gets information about a location.
2287//
2288// - name: Resource name for the location.
2289func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
2290	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2291	c.name = name
2292	return c
2293}
2294
2295// Fields allows partial responses to be retrieved. See
2296// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2297// for more information.
2298func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
2299	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2300	return c
2301}
2302
2303// IfNoneMatch sets the optional parameter which makes the operation
2304// fail if the object's ETag matches the given value. This is useful for
2305// getting updates only after the object has changed since the last
2306// request. Use googleapi.IsNotModified to check whether the response
2307// error from Do is the result of In-None-Match.
2308func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
2309	c.ifNoneMatch_ = entityTag
2310	return c
2311}
2312
2313// Context sets the context to be used in this call's Do method. Any
2314// pending HTTP request will be aborted if the provided context is
2315// canceled.
2316func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
2317	c.ctx_ = ctx
2318	return c
2319}
2320
2321// Header returns an http.Header that can be modified by the caller to
2322// add HTTP headers to the request.
2323func (c *ProjectsLocationsGetCall) Header() http.Header {
2324	if c.header_ == nil {
2325		c.header_ = make(http.Header)
2326	}
2327	return c.header_
2328}
2329
2330func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2331	reqHeaders := make(http.Header)
2332	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2333	for k, v := range c.header_ {
2334		reqHeaders[k] = v
2335	}
2336	reqHeaders.Set("User-Agent", c.s.userAgent())
2337	if c.ifNoneMatch_ != "" {
2338		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2339	}
2340	var body io.Reader = nil
2341	c.urlParams_.Set("alt", alt)
2342	c.urlParams_.Set("prettyPrint", "false")
2343	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2344	urls += "?" + c.urlParams_.Encode()
2345	req, err := http.NewRequest("GET", urls, body)
2346	if err != nil {
2347		return nil, err
2348	}
2349	req.Header = reqHeaders
2350	googleapi.Expand(req.URL, map[string]string{
2351		"name": c.name,
2352	})
2353	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2354}
2355
2356// Do executes the "datastream.projects.locations.get" call.
2357// Exactly one of *Location or error will be non-nil. Any non-2xx status
2358// code is an error. Response headers are in either
2359// *Location.ServerResponse.Header or (if a response was returned at
2360// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2361// to check whether the returned error was because
2362// http.StatusNotModified was returned.
2363func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2364	gensupport.SetOptions(c.urlParams_, opts...)
2365	res, err := c.doRequest("json")
2366	if res != nil && res.StatusCode == http.StatusNotModified {
2367		if res.Body != nil {
2368			res.Body.Close()
2369		}
2370		return nil, &googleapi.Error{
2371			Code:   res.StatusCode,
2372			Header: res.Header,
2373		}
2374	}
2375	if err != nil {
2376		return nil, err
2377	}
2378	defer googleapi.CloseBody(res)
2379	if err := googleapi.CheckResponse(res); err != nil {
2380		return nil, err
2381	}
2382	ret := &Location{
2383		ServerResponse: googleapi.ServerResponse{
2384			Header:         res.Header,
2385			HTTPStatusCode: res.StatusCode,
2386		},
2387	}
2388	target := &ret
2389	if err := gensupport.DecodeResponse(target, res); err != nil {
2390		return nil, err
2391	}
2392	return ret, nil
2393	// {
2394	//   "description": "Gets information about a location.",
2395	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}",
2396	//   "httpMethod": "GET",
2397	//   "id": "datastream.projects.locations.get",
2398	//   "parameterOrder": [
2399	//     "name"
2400	//   ],
2401	//   "parameters": {
2402	//     "name": {
2403	//       "description": "Resource name for the location.",
2404	//       "location": "path",
2405	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2406	//       "required": true,
2407	//       "type": "string"
2408	//     }
2409	//   },
2410	//   "path": "v1alpha1/{+name}",
2411	//   "response": {
2412	//     "$ref": "Location"
2413	//   },
2414	//   "scopes": [
2415	//     "https://www.googleapis.com/auth/cloud-platform"
2416	//   ]
2417	// }
2418
2419}
2420
2421// method id "datastream.projects.locations.list":
2422
2423type ProjectsLocationsListCall struct {
2424	s            *Service
2425	name         string
2426	urlParams_   gensupport.URLParams
2427	ifNoneMatch_ string
2428	ctx_         context.Context
2429	header_      http.Header
2430}
2431
2432// List: Lists information about the supported locations for this
2433// service.
2434//
2435// - name: The resource that owns the locations collection, if
2436//   applicable.
2437func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
2438	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2439	c.name = name
2440	return c
2441}
2442
2443// Filter sets the optional parameter "filter": A filter to narrow down
2444// results to a preferred subset. The filtering language accepts strings
2445// like "displayName=tokyo", and is documented in more detail in AIP-160
2446// (https://google.aip.dev/160).
2447func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
2448	c.urlParams_.Set("filter", filter)
2449	return c
2450}
2451
2452// PageSize sets the optional parameter "pageSize": The maximum number
2453// of results to return. If not set, the service selects a default.
2454func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
2455	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2456	return c
2457}
2458
2459// PageToken sets the optional parameter "pageToken": A page token
2460// received from the `next_page_token` field in the response. Send that
2461// page token to receive the subsequent page.
2462func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
2463	c.urlParams_.Set("pageToken", pageToken)
2464	return c
2465}
2466
2467// Fields allows partial responses to be retrieved. See
2468// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2469// for more information.
2470func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
2471	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2472	return c
2473}
2474
2475// IfNoneMatch sets the optional parameter which makes the operation
2476// fail if the object's ETag matches the given value. This is useful for
2477// getting updates only after the object has changed since the last
2478// request. Use googleapi.IsNotModified to check whether the response
2479// error from Do is the result of In-None-Match.
2480func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
2481	c.ifNoneMatch_ = entityTag
2482	return c
2483}
2484
2485// Context sets the context to be used in this call's Do method. Any
2486// pending HTTP request will be aborted if the provided context is
2487// canceled.
2488func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
2489	c.ctx_ = ctx
2490	return c
2491}
2492
2493// Header returns an http.Header that can be modified by the caller to
2494// add HTTP headers to the request.
2495func (c *ProjectsLocationsListCall) Header() http.Header {
2496	if c.header_ == nil {
2497		c.header_ = make(http.Header)
2498	}
2499	return c.header_
2500}
2501
2502func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2503	reqHeaders := make(http.Header)
2504	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2505	for k, v := range c.header_ {
2506		reqHeaders[k] = v
2507	}
2508	reqHeaders.Set("User-Agent", c.s.userAgent())
2509	if c.ifNoneMatch_ != "" {
2510		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2511	}
2512	var body io.Reader = nil
2513	c.urlParams_.Set("alt", alt)
2514	c.urlParams_.Set("prettyPrint", "false")
2515	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/locations")
2516	urls += "?" + c.urlParams_.Encode()
2517	req, err := http.NewRequest("GET", urls, body)
2518	if err != nil {
2519		return nil, err
2520	}
2521	req.Header = reqHeaders
2522	googleapi.Expand(req.URL, map[string]string{
2523		"name": c.name,
2524	})
2525	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2526}
2527
2528// Do executes the "datastream.projects.locations.list" call.
2529// Exactly one of *ListLocationsResponse or error will be non-nil. Any
2530// non-2xx status code is an error. Response headers are in either
2531// *ListLocationsResponse.ServerResponse.Header or (if a response was
2532// returned at all) in error.(*googleapi.Error).Header. Use
2533// googleapi.IsNotModified to check whether the returned error was
2534// because http.StatusNotModified was returned.
2535func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2536	gensupport.SetOptions(c.urlParams_, opts...)
2537	res, err := c.doRequest("json")
2538	if res != nil && res.StatusCode == http.StatusNotModified {
2539		if res.Body != nil {
2540			res.Body.Close()
2541		}
2542		return nil, &googleapi.Error{
2543			Code:   res.StatusCode,
2544			Header: res.Header,
2545		}
2546	}
2547	if err != nil {
2548		return nil, err
2549	}
2550	defer googleapi.CloseBody(res)
2551	if err := googleapi.CheckResponse(res); err != nil {
2552		return nil, err
2553	}
2554	ret := &ListLocationsResponse{
2555		ServerResponse: googleapi.ServerResponse{
2556			Header:         res.Header,
2557			HTTPStatusCode: res.StatusCode,
2558		},
2559	}
2560	target := &ret
2561	if err := gensupport.DecodeResponse(target, res); err != nil {
2562		return nil, err
2563	}
2564	return ret, nil
2565	// {
2566	//   "description": "Lists information about the supported locations for this service.",
2567	//   "flatPath": "v1alpha1/projects/{projectsId}/locations",
2568	//   "httpMethod": "GET",
2569	//   "id": "datastream.projects.locations.list",
2570	//   "parameterOrder": [
2571	//     "name"
2572	//   ],
2573	//   "parameters": {
2574	//     "filter": {
2575	//       "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).",
2576	//       "location": "query",
2577	//       "type": "string"
2578	//     },
2579	//     "name": {
2580	//       "description": "The resource that owns the locations collection, if applicable.",
2581	//       "location": "path",
2582	//       "pattern": "^projects/[^/]+$",
2583	//       "required": true,
2584	//       "type": "string"
2585	//     },
2586	//     "pageSize": {
2587	//       "description": "The maximum number of results to return. If not set, the service selects a default.",
2588	//       "format": "int32",
2589	//       "location": "query",
2590	//       "type": "integer"
2591	//     },
2592	//     "pageToken": {
2593	//       "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.",
2594	//       "location": "query",
2595	//       "type": "string"
2596	//     }
2597	//   },
2598	//   "path": "v1alpha1/{+name}/locations",
2599	//   "response": {
2600	//     "$ref": "ListLocationsResponse"
2601	//   },
2602	//   "scopes": [
2603	//     "https://www.googleapis.com/auth/cloud-platform"
2604	//   ]
2605	// }
2606
2607}
2608
2609// Pages invokes f for each page of results.
2610// A non-nil error returned from f will halt the iteration.
2611// The provided context supersedes any context provided to the Context method.
2612func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2613	c.ctx_ = ctx
2614	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2615	for {
2616		x, err := c.Do()
2617		if err != nil {
2618			return err
2619		}
2620		if err := f(x); err != nil {
2621			return err
2622		}
2623		if x.NextPageToken == "" {
2624			return nil
2625		}
2626		c.PageToken(x.NextPageToken)
2627	}
2628}
2629
2630// method id "datastream.projects.locations.connectionProfiles.create":
2631
2632type ProjectsLocationsConnectionProfilesCreateCall struct {
2633	s                 *Service
2634	parent            string
2635	connectionprofile *ConnectionProfile
2636	urlParams_        gensupport.URLParams
2637	ctx_              context.Context
2638	header_           http.Header
2639}
2640
2641// Create: Use this method to create a connection profile in a project
2642// and location.
2643//
2644// - parent: The parent that owns the collection of ConnectionProfiles.
2645func (r *ProjectsLocationsConnectionProfilesService) Create(parent string, connectionprofile *ConnectionProfile) *ProjectsLocationsConnectionProfilesCreateCall {
2646	c := &ProjectsLocationsConnectionProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2647	c.parent = parent
2648	c.connectionprofile = connectionprofile
2649	return c
2650}
2651
2652// ConnectionProfileId sets the optional parameter
2653// "connectionProfileId": Required. The connection profile identifier.
2654func (c *ProjectsLocationsConnectionProfilesCreateCall) ConnectionProfileId(connectionProfileId string) *ProjectsLocationsConnectionProfilesCreateCall {
2655	c.urlParams_.Set("connectionProfileId", connectionProfileId)
2656	return c
2657}
2658
2659// RequestId sets the optional parameter "requestId": A request ID to
2660// identify requests. Specify a unique request ID so that if you must
2661// retry your request, the server will know to ignore the request if it
2662// has already been completed. The server will guarantee that for at
2663// least 60 minutes since the first request. For example, consider a
2664// situation where you make an initial request and the request times
2665// out. If you make the request again with the same request ID, the
2666// server can check if original operation with the same request ID was
2667// received, and if so, will ignore the second request. This prevents
2668// clients from accidentally creating duplicate commitments. The request
2669// ID must be a valid UUID with the exception that zero UUID is not
2670// supported (00000000-0000-0000-0000-000000000000).
2671func (c *ProjectsLocationsConnectionProfilesCreateCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesCreateCall {
2672	c.urlParams_.Set("requestId", requestId)
2673	return c
2674}
2675
2676// Fields allows partial responses to be retrieved. See
2677// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2678// for more information.
2679func (c *ProjectsLocationsConnectionProfilesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesCreateCall {
2680	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2681	return c
2682}
2683
2684// Context sets the context to be used in this call's Do method. Any
2685// pending HTTP request will be aborted if the provided context is
2686// canceled.
2687func (c *ProjectsLocationsConnectionProfilesCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesCreateCall {
2688	c.ctx_ = ctx
2689	return c
2690}
2691
2692// Header returns an http.Header that can be modified by the caller to
2693// add HTTP headers to the request.
2694func (c *ProjectsLocationsConnectionProfilesCreateCall) Header() http.Header {
2695	if c.header_ == nil {
2696		c.header_ = make(http.Header)
2697	}
2698	return c.header_
2699}
2700
2701func (c *ProjectsLocationsConnectionProfilesCreateCall) doRequest(alt string) (*http.Response, error) {
2702	reqHeaders := make(http.Header)
2703	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2704	for k, v := range c.header_ {
2705		reqHeaders[k] = v
2706	}
2707	reqHeaders.Set("User-Agent", c.s.userAgent())
2708	var body io.Reader = nil
2709	body, err := googleapi.WithoutDataWrapper.JSONReader(c.connectionprofile)
2710	if err != nil {
2711		return nil, err
2712	}
2713	reqHeaders.Set("Content-Type", "application/json")
2714	c.urlParams_.Set("alt", alt)
2715	c.urlParams_.Set("prettyPrint", "false")
2716	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/connectionProfiles")
2717	urls += "?" + c.urlParams_.Encode()
2718	req, err := http.NewRequest("POST", urls, body)
2719	if err != nil {
2720		return nil, err
2721	}
2722	req.Header = reqHeaders
2723	googleapi.Expand(req.URL, map[string]string{
2724		"parent": c.parent,
2725	})
2726	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2727}
2728
2729// Do executes the "datastream.projects.locations.connectionProfiles.create" call.
2730// Exactly one of *Operation or error will be non-nil. Any non-2xx
2731// status code is an error. Response headers are in either
2732// *Operation.ServerResponse.Header or (if a response was returned at
2733// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2734// to check whether the returned error was because
2735// http.StatusNotModified was returned.
2736func (c *ProjectsLocationsConnectionProfilesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2737	gensupport.SetOptions(c.urlParams_, opts...)
2738	res, err := c.doRequest("json")
2739	if res != nil && res.StatusCode == http.StatusNotModified {
2740		if res.Body != nil {
2741			res.Body.Close()
2742		}
2743		return nil, &googleapi.Error{
2744			Code:   res.StatusCode,
2745			Header: res.Header,
2746		}
2747	}
2748	if err != nil {
2749		return nil, err
2750	}
2751	defer googleapi.CloseBody(res)
2752	if err := googleapi.CheckResponse(res); err != nil {
2753		return nil, err
2754	}
2755	ret := &Operation{
2756		ServerResponse: googleapi.ServerResponse{
2757			Header:         res.Header,
2758			HTTPStatusCode: res.StatusCode,
2759		},
2760	}
2761	target := &ret
2762	if err := gensupport.DecodeResponse(target, res); err != nil {
2763		return nil, err
2764	}
2765	return ret, nil
2766	// {
2767	//   "description": "Use this method to create a connection profile in a project and location.",
2768	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionProfiles",
2769	//   "httpMethod": "POST",
2770	//   "id": "datastream.projects.locations.connectionProfiles.create",
2771	//   "parameterOrder": [
2772	//     "parent"
2773	//   ],
2774	//   "parameters": {
2775	//     "connectionProfileId": {
2776	//       "description": "Required. The connection profile identifier.",
2777	//       "location": "query",
2778	//       "type": "string"
2779	//     },
2780	//     "parent": {
2781	//       "description": "Required. The parent that owns the collection of ConnectionProfiles.",
2782	//       "location": "path",
2783	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2784	//       "required": true,
2785	//       "type": "string"
2786	//     },
2787	//     "requestId": {
2788	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
2789	//       "location": "query",
2790	//       "type": "string"
2791	//     }
2792	//   },
2793	//   "path": "v1alpha1/{+parent}/connectionProfiles",
2794	//   "request": {
2795	//     "$ref": "ConnectionProfile"
2796	//   },
2797	//   "response": {
2798	//     "$ref": "Operation"
2799	//   },
2800	//   "scopes": [
2801	//     "https://www.googleapis.com/auth/cloud-platform"
2802	//   ]
2803	// }
2804
2805}
2806
2807// method id "datastream.projects.locations.connectionProfiles.delete":
2808
2809type ProjectsLocationsConnectionProfilesDeleteCall struct {
2810	s          *Service
2811	name       string
2812	urlParams_ gensupport.URLParams
2813	ctx_       context.Context
2814	header_    http.Header
2815}
2816
2817// Delete: Use this method to delete a connection profile..
2818//
2819// - name: The name of the connection profile resource to delete.
2820func (r *ProjectsLocationsConnectionProfilesService) Delete(name string) *ProjectsLocationsConnectionProfilesDeleteCall {
2821	c := &ProjectsLocationsConnectionProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2822	c.name = name
2823	return c
2824}
2825
2826// RequestId sets the optional parameter "requestId": A request ID to
2827// identify requests. Specify a unique request ID so that if you must
2828// retry your request, the server will know to ignore the request if it
2829// has already been completed. The server will guarantee that for at
2830// least 60 minutes after the first request. For example, consider a
2831// situation where you make an initial request and the request times
2832// out. If you make the request again with the same request ID, the
2833// server can check if original operation with the same request ID was
2834// received, and if so, will ignore the second request. This prevents
2835// clients from accidentally creating duplicate commitments. The request
2836// ID must be a valid UUID with the exception that zero UUID is not
2837// supported (00000000-0000-0000-0000-000000000000).
2838func (c *ProjectsLocationsConnectionProfilesDeleteCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesDeleteCall {
2839	c.urlParams_.Set("requestId", requestId)
2840	return c
2841}
2842
2843// Fields allows partial responses to be retrieved. See
2844// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2845// for more information.
2846func (c *ProjectsLocationsConnectionProfilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesDeleteCall {
2847	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2848	return c
2849}
2850
2851// Context sets the context to be used in this call's Do method. Any
2852// pending HTTP request will be aborted if the provided context is
2853// canceled.
2854func (c *ProjectsLocationsConnectionProfilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesDeleteCall {
2855	c.ctx_ = ctx
2856	return c
2857}
2858
2859// Header returns an http.Header that can be modified by the caller to
2860// add HTTP headers to the request.
2861func (c *ProjectsLocationsConnectionProfilesDeleteCall) Header() http.Header {
2862	if c.header_ == nil {
2863		c.header_ = make(http.Header)
2864	}
2865	return c.header_
2866}
2867
2868func (c *ProjectsLocationsConnectionProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
2869	reqHeaders := make(http.Header)
2870	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2871	for k, v := range c.header_ {
2872		reqHeaders[k] = v
2873	}
2874	reqHeaders.Set("User-Agent", c.s.userAgent())
2875	var body io.Reader = nil
2876	c.urlParams_.Set("alt", alt)
2877	c.urlParams_.Set("prettyPrint", "false")
2878	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2879	urls += "?" + c.urlParams_.Encode()
2880	req, err := http.NewRequest("DELETE", urls, body)
2881	if err != nil {
2882		return nil, err
2883	}
2884	req.Header = reqHeaders
2885	googleapi.Expand(req.URL, map[string]string{
2886		"name": c.name,
2887	})
2888	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2889}
2890
2891// Do executes the "datastream.projects.locations.connectionProfiles.delete" call.
2892// Exactly one of *Operation or error will be non-nil. Any non-2xx
2893// status code is an error. Response headers are in either
2894// *Operation.ServerResponse.Header or (if a response was returned at
2895// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2896// to check whether the returned error was because
2897// http.StatusNotModified was returned.
2898func (c *ProjectsLocationsConnectionProfilesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2899	gensupport.SetOptions(c.urlParams_, opts...)
2900	res, err := c.doRequest("json")
2901	if res != nil && res.StatusCode == http.StatusNotModified {
2902		if res.Body != nil {
2903			res.Body.Close()
2904		}
2905		return nil, &googleapi.Error{
2906			Code:   res.StatusCode,
2907			Header: res.Header,
2908		}
2909	}
2910	if err != nil {
2911		return nil, err
2912	}
2913	defer googleapi.CloseBody(res)
2914	if err := googleapi.CheckResponse(res); err != nil {
2915		return nil, err
2916	}
2917	ret := &Operation{
2918		ServerResponse: googleapi.ServerResponse{
2919			Header:         res.Header,
2920			HTTPStatusCode: res.StatusCode,
2921		},
2922	}
2923	target := &ret
2924	if err := gensupport.DecodeResponse(target, res); err != nil {
2925		return nil, err
2926	}
2927	return ret, nil
2928	// {
2929	//   "description": "Use this method to delete a connection profile..",
2930	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}",
2931	//   "httpMethod": "DELETE",
2932	//   "id": "datastream.projects.locations.connectionProfiles.delete",
2933	//   "parameterOrder": [
2934	//     "name"
2935	//   ],
2936	//   "parameters": {
2937	//     "name": {
2938	//       "description": "Required. The name of the connection profile resource to delete.",
2939	//       "location": "path",
2940	//       "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$",
2941	//       "required": true,
2942	//       "type": "string"
2943	//     },
2944	//     "requestId": {
2945	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
2946	//       "location": "query",
2947	//       "type": "string"
2948	//     }
2949	//   },
2950	//   "path": "v1alpha1/{+name}",
2951	//   "response": {
2952	//     "$ref": "Operation"
2953	//   },
2954	//   "scopes": [
2955	//     "https://www.googleapis.com/auth/cloud-platform"
2956	//   ]
2957	// }
2958
2959}
2960
2961// method id "datastream.projects.locations.connectionProfiles.discover":
2962
2963type ProjectsLocationsConnectionProfilesDiscoverCall struct {
2964	s                                *Service
2965	parent                           string
2966	discoverconnectionprofilerequest *DiscoverConnectionProfileRequest
2967	urlParams_                       gensupport.URLParams
2968	ctx_                             context.Context
2969	header_                          http.Header
2970}
2971
2972// Discover: Use this method to discover a connection profile. The
2973// discover API call exposes the data objects and metadata belonging to
2974// the profile. Typically, a request returns children data objects under
2975// a parent data object that's optionally supplied in the request.
2976//
2977// - parent: The parent resource of the ConnectionProfile type. Must be
2978//   in the format `projects/*/locations/*`.
2979func (r *ProjectsLocationsConnectionProfilesService) Discover(parent string, discoverconnectionprofilerequest *DiscoverConnectionProfileRequest) *ProjectsLocationsConnectionProfilesDiscoverCall {
2980	c := &ProjectsLocationsConnectionProfilesDiscoverCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2981	c.parent = parent
2982	c.discoverconnectionprofilerequest = discoverconnectionprofilerequest
2983	return c
2984}
2985
2986// Fields allows partial responses to be retrieved. See
2987// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2988// for more information.
2989func (c *ProjectsLocationsConnectionProfilesDiscoverCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesDiscoverCall {
2990	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2991	return c
2992}
2993
2994// Context sets the context to be used in this call's Do method. Any
2995// pending HTTP request will be aborted if the provided context is
2996// canceled.
2997func (c *ProjectsLocationsConnectionProfilesDiscoverCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesDiscoverCall {
2998	c.ctx_ = ctx
2999	return c
3000}
3001
3002// Header returns an http.Header that can be modified by the caller to
3003// add HTTP headers to the request.
3004func (c *ProjectsLocationsConnectionProfilesDiscoverCall) Header() http.Header {
3005	if c.header_ == nil {
3006		c.header_ = make(http.Header)
3007	}
3008	return c.header_
3009}
3010
3011func (c *ProjectsLocationsConnectionProfilesDiscoverCall) doRequest(alt string) (*http.Response, error) {
3012	reqHeaders := make(http.Header)
3013	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3014	for k, v := range c.header_ {
3015		reqHeaders[k] = v
3016	}
3017	reqHeaders.Set("User-Agent", c.s.userAgent())
3018	var body io.Reader = nil
3019	body, err := googleapi.WithoutDataWrapper.JSONReader(c.discoverconnectionprofilerequest)
3020	if err != nil {
3021		return nil, err
3022	}
3023	reqHeaders.Set("Content-Type", "application/json")
3024	c.urlParams_.Set("alt", alt)
3025	c.urlParams_.Set("prettyPrint", "false")
3026	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/connectionProfiles:discover")
3027	urls += "?" + c.urlParams_.Encode()
3028	req, err := http.NewRequest("POST", urls, body)
3029	if err != nil {
3030		return nil, err
3031	}
3032	req.Header = reqHeaders
3033	googleapi.Expand(req.URL, map[string]string{
3034		"parent": c.parent,
3035	})
3036	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3037}
3038
3039// Do executes the "datastream.projects.locations.connectionProfiles.discover" call.
3040// Exactly one of *DiscoverConnectionProfileResponse or error will be
3041// non-nil. Any non-2xx status code is an error. Response headers are in
3042// either *DiscoverConnectionProfileResponse.ServerResponse.Header or
3043// (if a response was returned at all) in
3044// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3045// whether the returned error was because http.StatusNotModified was
3046// returned.
3047func (c *ProjectsLocationsConnectionProfilesDiscoverCall) Do(opts ...googleapi.CallOption) (*DiscoverConnectionProfileResponse, error) {
3048	gensupport.SetOptions(c.urlParams_, opts...)
3049	res, err := c.doRequest("json")
3050	if res != nil && res.StatusCode == http.StatusNotModified {
3051		if res.Body != nil {
3052			res.Body.Close()
3053		}
3054		return nil, &googleapi.Error{
3055			Code:   res.StatusCode,
3056			Header: res.Header,
3057		}
3058	}
3059	if err != nil {
3060		return nil, err
3061	}
3062	defer googleapi.CloseBody(res)
3063	if err := googleapi.CheckResponse(res); err != nil {
3064		return nil, err
3065	}
3066	ret := &DiscoverConnectionProfileResponse{
3067		ServerResponse: googleapi.ServerResponse{
3068			Header:         res.Header,
3069			HTTPStatusCode: res.StatusCode,
3070		},
3071	}
3072	target := &ret
3073	if err := gensupport.DecodeResponse(target, res); err != nil {
3074		return nil, err
3075	}
3076	return ret, nil
3077	// {
3078	//   "description": "Use this method to discover a connection profile. The discover API call exposes the data objects and metadata belonging to the profile. Typically, a request returns children data objects under a parent data object that's optionally supplied in the request.",
3079	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionProfiles:discover",
3080	//   "httpMethod": "POST",
3081	//   "id": "datastream.projects.locations.connectionProfiles.discover",
3082	//   "parameterOrder": [
3083	//     "parent"
3084	//   ],
3085	//   "parameters": {
3086	//     "parent": {
3087	//       "description": "Required. The parent resource of the ConnectionProfile type. Must be in the format `projects/*/locations/*`.",
3088	//       "location": "path",
3089	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
3090	//       "required": true,
3091	//       "type": "string"
3092	//     }
3093	//   },
3094	//   "path": "v1alpha1/{+parent}/connectionProfiles:discover",
3095	//   "request": {
3096	//     "$ref": "DiscoverConnectionProfileRequest"
3097	//   },
3098	//   "response": {
3099	//     "$ref": "DiscoverConnectionProfileResponse"
3100	//   },
3101	//   "scopes": [
3102	//     "https://www.googleapis.com/auth/cloud-platform"
3103	//   ]
3104	// }
3105
3106}
3107
3108// method id "datastream.projects.locations.connectionProfiles.get":
3109
3110type ProjectsLocationsConnectionProfilesGetCall struct {
3111	s            *Service
3112	name         string
3113	urlParams_   gensupport.URLParams
3114	ifNoneMatch_ string
3115	ctx_         context.Context
3116	header_      http.Header
3117}
3118
3119// Get: Use this method to get details about a connection profile.
3120//
3121// - name: The name of the connection profile resource to get.
3122func (r *ProjectsLocationsConnectionProfilesService) Get(name string) *ProjectsLocationsConnectionProfilesGetCall {
3123	c := &ProjectsLocationsConnectionProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3124	c.name = name
3125	return c
3126}
3127
3128// Fields allows partial responses to be retrieved. See
3129// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3130// for more information.
3131func (c *ProjectsLocationsConnectionProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesGetCall {
3132	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3133	return c
3134}
3135
3136// IfNoneMatch sets the optional parameter which makes the operation
3137// fail if the object's ETag matches the given value. This is useful for
3138// getting updates only after the object has changed since the last
3139// request. Use googleapi.IsNotModified to check whether the response
3140// error from Do is the result of In-None-Match.
3141func (c *ProjectsLocationsConnectionProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesGetCall {
3142	c.ifNoneMatch_ = entityTag
3143	return c
3144}
3145
3146// Context sets the context to be used in this call's Do method. Any
3147// pending HTTP request will be aborted if the provided context is
3148// canceled.
3149func (c *ProjectsLocationsConnectionProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesGetCall {
3150	c.ctx_ = ctx
3151	return c
3152}
3153
3154// Header returns an http.Header that can be modified by the caller to
3155// add HTTP headers to the request.
3156func (c *ProjectsLocationsConnectionProfilesGetCall) Header() http.Header {
3157	if c.header_ == nil {
3158		c.header_ = make(http.Header)
3159	}
3160	return c.header_
3161}
3162
3163func (c *ProjectsLocationsConnectionProfilesGetCall) doRequest(alt string) (*http.Response, error) {
3164	reqHeaders := make(http.Header)
3165	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3166	for k, v := range c.header_ {
3167		reqHeaders[k] = v
3168	}
3169	reqHeaders.Set("User-Agent", c.s.userAgent())
3170	if c.ifNoneMatch_ != "" {
3171		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3172	}
3173	var body io.Reader = nil
3174	c.urlParams_.Set("alt", alt)
3175	c.urlParams_.Set("prettyPrint", "false")
3176	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3177	urls += "?" + c.urlParams_.Encode()
3178	req, err := http.NewRequest("GET", urls, body)
3179	if err != nil {
3180		return nil, err
3181	}
3182	req.Header = reqHeaders
3183	googleapi.Expand(req.URL, map[string]string{
3184		"name": c.name,
3185	})
3186	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3187}
3188
3189// Do executes the "datastream.projects.locations.connectionProfiles.get" call.
3190// Exactly one of *ConnectionProfile or error will be non-nil. Any
3191// non-2xx status code is an error. Response headers are in either
3192// *ConnectionProfile.ServerResponse.Header or (if a response was
3193// returned at all) in error.(*googleapi.Error).Header. Use
3194// googleapi.IsNotModified to check whether the returned error was
3195// because http.StatusNotModified was returned.
3196func (c *ProjectsLocationsConnectionProfilesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionProfile, error) {
3197	gensupport.SetOptions(c.urlParams_, opts...)
3198	res, err := c.doRequest("json")
3199	if res != nil && res.StatusCode == http.StatusNotModified {
3200		if res.Body != nil {
3201			res.Body.Close()
3202		}
3203		return nil, &googleapi.Error{
3204			Code:   res.StatusCode,
3205			Header: res.Header,
3206		}
3207	}
3208	if err != nil {
3209		return nil, err
3210	}
3211	defer googleapi.CloseBody(res)
3212	if err := googleapi.CheckResponse(res); err != nil {
3213		return nil, err
3214	}
3215	ret := &ConnectionProfile{
3216		ServerResponse: googleapi.ServerResponse{
3217			Header:         res.Header,
3218			HTTPStatusCode: res.StatusCode,
3219		},
3220	}
3221	target := &ret
3222	if err := gensupport.DecodeResponse(target, res); err != nil {
3223		return nil, err
3224	}
3225	return ret, nil
3226	// {
3227	//   "description": "Use this method to get details about a connection profile.",
3228	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}",
3229	//   "httpMethod": "GET",
3230	//   "id": "datastream.projects.locations.connectionProfiles.get",
3231	//   "parameterOrder": [
3232	//     "name"
3233	//   ],
3234	//   "parameters": {
3235	//     "name": {
3236	//       "description": "Required. The name of the connection profile resource to get.",
3237	//       "location": "path",
3238	//       "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$",
3239	//       "required": true,
3240	//       "type": "string"
3241	//     }
3242	//   },
3243	//   "path": "v1alpha1/{+name}",
3244	//   "response": {
3245	//     "$ref": "ConnectionProfile"
3246	//   },
3247	//   "scopes": [
3248	//     "https://www.googleapis.com/auth/cloud-platform"
3249	//   ]
3250	// }
3251
3252}
3253
3254// method id "datastream.projects.locations.connectionProfiles.list":
3255
3256type ProjectsLocationsConnectionProfilesListCall struct {
3257	s            *Service
3258	parent       string
3259	urlParams_   gensupport.URLParams
3260	ifNoneMatch_ string
3261	ctx_         context.Context
3262	header_      http.Header
3263}
3264
3265// List: Use this method to list connection profiles created in a
3266// project and location.
3267//
3268// - parent: The parent that owns the collection of connection profiles.
3269func (r *ProjectsLocationsConnectionProfilesService) List(parent string) *ProjectsLocationsConnectionProfilesListCall {
3270	c := &ProjectsLocationsConnectionProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3271	c.parent = parent
3272	return c
3273}
3274
3275// Filter sets the optional parameter "filter": Filter request.
3276func (c *ProjectsLocationsConnectionProfilesListCall) Filter(filter string) *ProjectsLocationsConnectionProfilesListCall {
3277	c.urlParams_.Set("filter", filter)
3278	return c
3279}
3280
3281// OrderBy sets the optional parameter "orderBy": Order by fields for
3282// the result.
3283func (c *ProjectsLocationsConnectionProfilesListCall) OrderBy(orderBy string) *ProjectsLocationsConnectionProfilesListCall {
3284	c.urlParams_.Set("orderBy", orderBy)
3285	return c
3286}
3287
3288// PageSize sets the optional parameter "pageSize": Maximum number of
3289// connection profiles to return. If unspecified, at most 50 connection
3290// profiles will be returned. The maximum value is 1000; values above
3291// 1000 will be coerced to 1000.
3292func (c *ProjectsLocationsConnectionProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionProfilesListCall {
3293	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3294	return c
3295}
3296
3297// PageToken sets the optional parameter "pageToken": Page token
3298// received from a previous `ListConnectionProfiles` call. Provide this
3299// to retrieve the subsequent page. When paginating, all other
3300// parameters provided to `ListConnectionProfiles` must match the call
3301// that provided the page token.
3302func (c *ProjectsLocationsConnectionProfilesListCall) PageToken(pageToken string) *ProjectsLocationsConnectionProfilesListCall {
3303	c.urlParams_.Set("pageToken", pageToken)
3304	return c
3305}
3306
3307// Fields allows partial responses to be retrieved. See
3308// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3309// for more information.
3310func (c *ProjectsLocationsConnectionProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesListCall {
3311	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3312	return c
3313}
3314
3315// IfNoneMatch sets the optional parameter which makes the operation
3316// fail if the object's ETag matches the given value. This is useful for
3317// getting updates only after the object has changed since the last
3318// request. Use googleapi.IsNotModified to check whether the response
3319// error from Do is the result of In-None-Match.
3320func (c *ProjectsLocationsConnectionProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesListCall {
3321	c.ifNoneMatch_ = entityTag
3322	return c
3323}
3324
3325// Context sets the context to be used in this call's Do method. Any
3326// pending HTTP request will be aborted if the provided context is
3327// canceled.
3328func (c *ProjectsLocationsConnectionProfilesListCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesListCall {
3329	c.ctx_ = ctx
3330	return c
3331}
3332
3333// Header returns an http.Header that can be modified by the caller to
3334// add HTTP headers to the request.
3335func (c *ProjectsLocationsConnectionProfilesListCall) Header() http.Header {
3336	if c.header_ == nil {
3337		c.header_ = make(http.Header)
3338	}
3339	return c.header_
3340}
3341
3342func (c *ProjectsLocationsConnectionProfilesListCall) doRequest(alt string) (*http.Response, error) {
3343	reqHeaders := make(http.Header)
3344	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3345	for k, v := range c.header_ {
3346		reqHeaders[k] = v
3347	}
3348	reqHeaders.Set("User-Agent", c.s.userAgent())
3349	if c.ifNoneMatch_ != "" {
3350		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3351	}
3352	var body io.Reader = nil
3353	c.urlParams_.Set("alt", alt)
3354	c.urlParams_.Set("prettyPrint", "false")
3355	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/connectionProfiles")
3356	urls += "?" + c.urlParams_.Encode()
3357	req, err := http.NewRequest("GET", urls, body)
3358	if err != nil {
3359		return nil, err
3360	}
3361	req.Header = reqHeaders
3362	googleapi.Expand(req.URL, map[string]string{
3363		"parent": c.parent,
3364	})
3365	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3366}
3367
3368// Do executes the "datastream.projects.locations.connectionProfiles.list" call.
3369// Exactly one of *ListConnectionProfilesResponse or error will be
3370// non-nil. Any non-2xx status code is an error. Response headers are in
3371// either *ListConnectionProfilesResponse.ServerResponse.Header or (if a
3372// response was returned at all) in error.(*googleapi.Error).Header. Use
3373// googleapi.IsNotModified to check whether the returned error was
3374// because http.StatusNotModified was returned.
3375func (c *ProjectsLocationsConnectionProfilesListCall) Do(opts ...googleapi.CallOption) (*ListConnectionProfilesResponse, error) {
3376	gensupport.SetOptions(c.urlParams_, opts...)
3377	res, err := c.doRequest("json")
3378	if res != nil && res.StatusCode == http.StatusNotModified {
3379		if res.Body != nil {
3380			res.Body.Close()
3381		}
3382		return nil, &googleapi.Error{
3383			Code:   res.StatusCode,
3384			Header: res.Header,
3385		}
3386	}
3387	if err != nil {
3388		return nil, err
3389	}
3390	defer googleapi.CloseBody(res)
3391	if err := googleapi.CheckResponse(res); err != nil {
3392		return nil, err
3393	}
3394	ret := &ListConnectionProfilesResponse{
3395		ServerResponse: googleapi.ServerResponse{
3396			Header:         res.Header,
3397			HTTPStatusCode: res.StatusCode,
3398		},
3399	}
3400	target := &ret
3401	if err := gensupport.DecodeResponse(target, res); err != nil {
3402		return nil, err
3403	}
3404	return ret, nil
3405	// {
3406	//   "description": "Use this method to list connection profiles created in a project and location.",
3407	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionProfiles",
3408	//   "httpMethod": "GET",
3409	//   "id": "datastream.projects.locations.connectionProfiles.list",
3410	//   "parameterOrder": [
3411	//     "parent"
3412	//   ],
3413	//   "parameters": {
3414	//     "filter": {
3415	//       "description": "Filter request.",
3416	//       "location": "query",
3417	//       "type": "string"
3418	//     },
3419	//     "orderBy": {
3420	//       "description": "Order by fields for the result.",
3421	//       "location": "query",
3422	//       "type": "string"
3423	//     },
3424	//     "pageSize": {
3425	//       "description": "Maximum number of connection profiles to return. If unspecified, at most 50 connection profiles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
3426	//       "format": "int32",
3427	//       "location": "query",
3428	//       "type": "integer"
3429	//     },
3430	//     "pageToken": {
3431	//       "description": "Page token received from a previous `ListConnectionProfiles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListConnectionProfiles` must match the call that provided the page token.",
3432	//       "location": "query",
3433	//       "type": "string"
3434	//     },
3435	//     "parent": {
3436	//       "description": "Required. The parent that owns the collection of connection profiles.",
3437	//       "location": "path",
3438	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
3439	//       "required": true,
3440	//       "type": "string"
3441	//     }
3442	//   },
3443	//   "path": "v1alpha1/{+parent}/connectionProfiles",
3444	//   "response": {
3445	//     "$ref": "ListConnectionProfilesResponse"
3446	//   },
3447	//   "scopes": [
3448	//     "https://www.googleapis.com/auth/cloud-platform"
3449	//   ]
3450	// }
3451
3452}
3453
3454// Pages invokes f for each page of results.
3455// A non-nil error returned from f will halt the iteration.
3456// The provided context supersedes any context provided to the Context method.
3457func (c *ProjectsLocationsConnectionProfilesListCall) Pages(ctx context.Context, f func(*ListConnectionProfilesResponse) error) error {
3458	c.ctx_ = ctx
3459	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3460	for {
3461		x, err := c.Do()
3462		if err != nil {
3463			return err
3464		}
3465		if err := f(x); err != nil {
3466			return err
3467		}
3468		if x.NextPageToken == "" {
3469			return nil
3470		}
3471		c.PageToken(x.NextPageToken)
3472	}
3473}
3474
3475// method id "datastream.projects.locations.connectionProfiles.patch":
3476
3477type ProjectsLocationsConnectionProfilesPatchCall struct {
3478	s                 *Service
3479	name              string
3480	connectionprofile *ConnectionProfile
3481	urlParams_        gensupport.URLParams
3482	ctx_              context.Context
3483	header_           http.Header
3484}
3485
3486// Patch: Use this method to update the parameters of a connection
3487// profile.
3488//
3489// - name: Output only. The resource's name.
3490func (r *ProjectsLocationsConnectionProfilesService) Patch(name string, connectionprofile *ConnectionProfile) *ProjectsLocationsConnectionProfilesPatchCall {
3491	c := &ProjectsLocationsConnectionProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3492	c.name = name
3493	c.connectionprofile = connectionprofile
3494	return c
3495}
3496
3497// RequestId sets the optional parameter "requestId": A request ID to
3498// identify requests. Specify a unique request ID so that if you must
3499// retry your request, the server will know to ignore the request if it
3500// has already been completed. The server will guarantee that for at
3501// least 60 minutes since the first request. For example, consider a
3502// situation where you make an initial request and the request times
3503// out. If you make the request again with the same request ID, the
3504// server can check if original operation with the same request ID was
3505// received, and if so, will ignore the second request. This prevents
3506// clients from accidentally creating duplicate commitments. The request
3507// ID must be a valid UUID with the exception that zero UUID is not
3508// supported (00000000-0000-0000-0000-000000000000).
3509func (c *ProjectsLocationsConnectionProfilesPatchCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesPatchCall {
3510	c.urlParams_.Set("requestId", requestId)
3511	return c
3512}
3513
3514// UpdateMask sets the optional parameter "updateMask": Field mask is
3515// used to specify the fields to be overwritten in the ConnectionProfile
3516// resource by the update. The fields specified in the update_mask are
3517// relative to the resource, not the full request. A field will be
3518// overwritten if it is in the mask. If the user does not provide a mask
3519// then all fields will be overwritten.
3520func (c *ProjectsLocationsConnectionProfilesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionProfilesPatchCall {
3521	c.urlParams_.Set("updateMask", updateMask)
3522	return c
3523}
3524
3525// ValidateOnly sets the optional parameter "validateOnly": Only
3526// validate the connection profile, but do not update any resources. The
3527// default is false.
3528func (c *ProjectsLocationsConnectionProfilesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionProfilesPatchCall {
3529	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
3530	return c
3531}
3532
3533// Fields allows partial responses to be retrieved. See
3534// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3535// for more information.
3536func (c *ProjectsLocationsConnectionProfilesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesPatchCall {
3537	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3538	return c
3539}
3540
3541// Context sets the context to be used in this call's Do method. Any
3542// pending HTTP request will be aborted if the provided context is
3543// canceled.
3544func (c *ProjectsLocationsConnectionProfilesPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesPatchCall {
3545	c.ctx_ = ctx
3546	return c
3547}
3548
3549// Header returns an http.Header that can be modified by the caller to
3550// add HTTP headers to the request.
3551func (c *ProjectsLocationsConnectionProfilesPatchCall) Header() http.Header {
3552	if c.header_ == nil {
3553		c.header_ = make(http.Header)
3554	}
3555	return c.header_
3556}
3557
3558func (c *ProjectsLocationsConnectionProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
3559	reqHeaders := make(http.Header)
3560	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3561	for k, v := range c.header_ {
3562		reqHeaders[k] = v
3563	}
3564	reqHeaders.Set("User-Agent", c.s.userAgent())
3565	var body io.Reader = nil
3566	body, err := googleapi.WithoutDataWrapper.JSONReader(c.connectionprofile)
3567	if err != nil {
3568		return nil, err
3569	}
3570	reqHeaders.Set("Content-Type", "application/json")
3571	c.urlParams_.Set("alt", alt)
3572	c.urlParams_.Set("prettyPrint", "false")
3573	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3574	urls += "?" + c.urlParams_.Encode()
3575	req, err := http.NewRequest("PATCH", urls, body)
3576	if err != nil {
3577		return nil, err
3578	}
3579	req.Header = reqHeaders
3580	googleapi.Expand(req.URL, map[string]string{
3581		"name": c.name,
3582	})
3583	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3584}
3585
3586// Do executes the "datastream.projects.locations.connectionProfiles.patch" call.
3587// Exactly one of *Operation or error will be non-nil. Any non-2xx
3588// status code is an error. Response headers are in either
3589// *Operation.ServerResponse.Header or (if a response was returned at
3590// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3591// to check whether the returned error was because
3592// http.StatusNotModified was returned.
3593func (c *ProjectsLocationsConnectionProfilesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3594	gensupport.SetOptions(c.urlParams_, opts...)
3595	res, err := c.doRequest("json")
3596	if res != nil && res.StatusCode == http.StatusNotModified {
3597		if res.Body != nil {
3598			res.Body.Close()
3599		}
3600		return nil, &googleapi.Error{
3601			Code:   res.StatusCode,
3602			Header: res.Header,
3603		}
3604	}
3605	if err != nil {
3606		return nil, err
3607	}
3608	defer googleapi.CloseBody(res)
3609	if err := googleapi.CheckResponse(res); err != nil {
3610		return nil, err
3611	}
3612	ret := &Operation{
3613		ServerResponse: googleapi.ServerResponse{
3614			Header:         res.Header,
3615			HTTPStatusCode: res.StatusCode,
3616		},
3617	}
3618	target := &ret
3619	if err := gensupport.DecodeResponse(target, res); err != nil {
3620		return nil, err
3621	}
3622	return ret, nil
3623	// {
3624	//   "description": "Use this method to update the parameters of a connection profile.",
3625	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}",
3626	//   "httpMethod": "PATCH",
3627	//   "id": "datastream.projects.locations.connectionProfiles.patch",
3628	//   "parameterOrder": [
3629	//     "name"
3630	//   ],
3631	//   "parameters": {
3632	//     "name": {
3633	//       "description": "Output only. The resource's name.",
3634	//       "location": "path",
3635	//       "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$",
3636	//       "required": true,
3637	//       "type": "string"
3638	//     },
3639	//     "requestId": {
3640	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
3641	//       "location": "query",
3642	//       "type": "string"
3643	//     },
3644	//     "updateMask": {
3645	//       "description": "Optional. Field mask is used to specify the fields to be overwritten in the ConnectionProfile resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.",
3646	//       "format": "google-fieldmask",
3647	//       "location": "query",
3648	//       "type": "string"
3649	//     },
3650	//     "validateOnly": {
3651	//       "description": "Optional. Only validate the connection profile, but do not update any resources. The default is false.",
3652	//       "location": "query",
3653	//       "type": "boolean"
3654	//     }
3655	//   },
3656	//   "path": "v1alpha1/{+name}",
3657	//   "request": {
3658	//     "$ref": "ConnectionProfile"
3659	//   },
3660	//   "response": {
3661	//     "$ref": "Operation"
3662	//   },
3663	//   "scopes": [
3664	//     "https://www.googleapis.com/auth/cloud-platform"
3665	//   ]
3666	// }
3667
3668}
3669
3670// method id "datastream.projects.locations.operations.cancel":
3671
3672type ProjectsLocationsOperationsCancelCall struct {
3673	s                      *Service
3674	name                   string
3675	canceloperationrequest *CancelOperationRequest
3676	urlParams_             gensupport.URLParams
3677	ctx_                   context.Context
3678	header_                http.Header
3679}
3680
3681// Cancel: Starts asynchronous cancellation on a long-running operation.
3682// The server makes a best effort to cancel the operation, but success
3683// is not guaranteed. If the server doesn't support this method, it
3684// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
3685// Operations.GetOperation or other methods to check whether the
3686// cancellation succeeded or whether the operation completed despite
3687// cancellation. On successful cancellation, the operation is not
3688// deleted; instead, it becomes an operation with an Operation.error
3689// value with a google.rpc.Status.code of 1, corresponding to
3690// `Code.CANCELLED`.
3691//
3692// - name: The name of the operation resource to be cancelled.
3693func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
3694	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3695	c.name = name
3696	c.canceloperationrequest = canceloperationrequest
3697	return c
3698}
3699
3700// Fields allows partial responses to be retrieved. See
3701// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3702// for more information.
3703func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
3704	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3705	return c
3706}
3707
3708// Context sets the context to be used in this call's Do method. Any
3709// pending HTTP request will be aborted if the provided context is
3710// canceled.
3711func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
3712	c.ctx_ = ctx
3713	return c
3714}
3715
3716// Header returns an http.Header that can be modified by the caller to
3717// add HTTP headers to the request.
3718func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
3719	if c.header_ == nil {
3720		c.header_ = make(http.Header)
3721	}
3722	return c.header_
3723}
3724
3725func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
3726	reqHeaders := make(http.Header)
3727	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3728	for k, v := range c.header_ {
3729		reqHeaders[k] = v
3730	}
3731	reqHeaders.Set("User-Agent", c.s.userAgent())
3732	var body io.Reader = nil
3733	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
3734	if err != nil {
3735		return nil, err
3736	}
3737	reqHeaders.Set("Content-Type", "application/json")
3738	c.urlParams_.Set("alt", alt)
3739	c.urlParams_.Set("prettyPrint", "false")
3740	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel")
3741	urls += "?" + c.urlParams_.Encode()
3742	req, err := http.NewRequest("POST", urls, body)
3743	if err != nil {
3744		return nil, err
3745	}
3746	req.Header = reqHeaders
3747	googleapi.Expand(req.URL, map[string]string{
3748		"name": c.name,
3749	})
3750	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3751}
3752
3753// Do executes the "datastream.projects.locations.operations.cancel" call.
3754// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3755// code is an error. Response headers are in either
3756// *Empty.ServerResponse.Header or (if a response was returned at all)
3757// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3758// check whether the returned error was because http.StatusNotModified
3759// was returned.
3760func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3761	gensupport.SetOptions(c.urlParams_, opts...)
3762	res, err := c.doRequest("json")
3763	if res != nil && res.StatusCode == http.StatusNotModified {
3764		if res.Body != nil {
3765			res.Body.Close()
3766		}
3767		return nil, &googleapi.Error{
3768			Code:   res.StatusCode,
3769			Header: res.Header,
3770		}
3771	}
3772	if err != nil {
3773		return nil, err
3774	}
3775	defer googleapi.CloseBody(res)
3776	if err := googleapi.CheckResponse(res); err != nil {
3777		return nil, err
3778	}
3779	ret := &Empty{
3780		ServerResponse: googleapi.ServerResponse{
3781			Header:         res.Header,
3782			HTTPStatusCode: res.StatusCode,
3783		},
3784	}
3785	target := &ret
3786	if err := gensupport.DecodeResponse(target, res); err != nil {
3787		return nil, err
3788	}
3789	return ret, nil
3790	// {
3791	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
3792	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
3793	//   "httpMethod": "POST",
3794	//   "id": "datastream.projects.locations.operations.cancel",
3795	//   "parameterOrder": [
3796	//     "name"
3797	//   ],
3798	//   "parameters": {
3799	//     "name": {
3800	//       "description": "The name of the operation resource to be cancelled.",
3801	//       "location": "path",
3802	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
3803	//       "required": true,
3804	//       "type": "string"
3805	//     }
3806	//   },
3807	//   "path": "v1alpha1/{+name}:cancel",
3808	//   "request": {
3809	//     "$ref": "CancelOperationRequest"
3810	//   },
3811	//   "response": {
3812	//     "$ref": "Empty"
3813	//   },
3814	//   "scopes": [
3815	//     "https://www.googleapis.com/auth/cloud-platform"
3816	//   ]
3817	// }
3818
3819}
3820
3821// method id "datastream.projects.locations.operations.delete":
3822
3823type ProjectsLocationsOperationsDeleteCall struct {
3824	s          *Service
3825	name       string
3826	urlParams_ gensupport.URLParams
3827	ctx_       context.Context
3828	header_    http.Header
3829}
3830
3831// Delete: Deletes a long-running operation. This method indicates that
3832// the client is no longer interested in the operation result. It does
3833// not cancel the operation. If the server doesn't support this method,
3834// it returns `google.rpc.Code.UNIMPLEMENTED`.
3835//
3836// - name: The name of the operation resource to be deleted.
3837func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
3838	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3839	c.name = name
3840	return c
3841}
3842
3843// Fields allows partial responses to be retrieved. See
3844// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3845// for more information.
3846func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
3847	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3848	return c
3849}
3850
3851// Context sets the context to be used in this call's Do method. Any
3852// pending HTTP request will be aborted if the provided context is
3853// canceled.
3854func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
3855	c.ctx_ = ctx
3856	return c
3857}
3858
3859// Header returns an http.Header that can be modified by the caller to
3860// add HTTP headers to the request.
3861func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
3862	if c.header_ == nil {
3863		c.header_ = make(http.Header)
3864	}
3865	return c.header_
3866}
3867
3868func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
3869	reqHeaders := make(http.Header)
3870	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3871	for k, v := range c.header_ {
3872		reqHeaders[k] = v
3873	}
3874	reqHeaders.Set("User-Agent", c.s.userAgent())
3875	var body io.Reader = nil
3876	c.urlParams_.Set("alt", alt)
3877	c.urlParams_.Set("prettyPrint", "false")
3878	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3879	urls += "?" + c.urlParams_.Encode()
3880	req, err := http.NewRequest("DELETE", urls, body)
3881	if err != nil {
3882		return nil, err
3883	}
3884	req.Header = reqHeaders
3885	googleapi.Expand(req.URL, map[string]string{
3886		"name": c.name,
3887	})
3888	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3889}
3890
3891// Do executes the "datastream.projects.locations.operations.delete" call.
3892// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3893// code is an error. Response headers are in either
3894// *Empty.ServerResponse.Header or (if a response was returned at all)
3895// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3896// check whether the returned error was because http.StatusNotModified
3897// was returned.
3898func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3899	gensupport.SetOptions(c.urlParams_, opts...)
3900	res, err := c.doRequest("json")
3901	if res != nil && res.StatusCode == http.StatusNotModified {
3902		if res.Body != nil {
3903			res.Body.Close()
3904		}
3905		return nil, &googleapi.Error{
3906			Code:   res.StatusCode,
3907			Header: res.Header,
3908		}
3909	}
3910	if err != nil {
3911		return nil, err
3912	}
3913	defer googleapi.CloseBody(res)
3914	if err := googleapi.CheckResponse(res); err != nil {
3915		return nil, err
3916	}
3917	ret := &Empty{
3918		ServerResponse: googleapi.ServerResponse{
3919			Header:         res.Header,
3920			HTTPStatusCode: res.StatusCode,
3921		},
3922	}
3923	target := &ret
3924	if err := gensupport.DecodeResponse(target, res); err != nil {
3925		return nil, err
3926	}
3927	return ret, nil
3928	// {
3929	//   "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.",
3930	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
3931	//   "httpMethod": "DELETE",
3932	//   "id": "datastream.projects.locations.operations.delete",
3933	//   "parameterOrder": [
3934	//     "name"
3935	//   ],
3936	//   "parameters": {
3937	//     "name": {
3938	//       "description": "The name of the operation resource to be deleted.",
3939	//       "location": "path",
3940	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
3941	//       "required": true,
3942	//       "type": "string"
3943	//     }
3944	//   },
3945	//   "path": "v1alpha1/{+name}",
3946	//   "response": {
3947	//     "$ref": "Empty"
3948	//   },
3949	//   "scopes": [
3950	//     "https://www.googleapis.com/auth/cloud-platform"
3951	//   ]
3952	// }
3953
3954}
3955
3956// method id "datastream.projects.locations.operations.get":
3957
3958type ProjectsLocationsOperationsGetCall struct {
3959	s            *Service
3960	name         string
3961	urlParams_   gensupport.URLParams
3962	ifNoneMatch_ string
3963	ctx_         context.Context
3964	header_      http.Header
3965}
3966
3967// Get: Gets the latest state of a long-running operation. Clients can
3968// use this method to poll the operation result at intervals as
3969// recommended by the API service.
3970//
3971// - name: The name of the operation resource.
3972func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
3973	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3974	c.name = name
3975	return c
3976}
3977
3978// Fields allows partial responses to be retrieved. See
3979// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3980// for more information.
3981func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
3982	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3983	return c
3984}
3985
3986// IfNoneMatch sets the optional parameter which makes the operation
3987// fail if the object's ETag matches the given value. This is useful for
3988// getting updates only after the object has changed since the last
3989// request. Use googleapi.IsNotModified to check whether the response
3990// error from Do is the result of In-None-Match.
3991func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
3992	c.ifNoneMatch_ = entityTag
3993	return c
3994}
3995
3996// Context sets the context to be used in this call's Do method. Any
3997// pending HTTP request will be aborted if the provided context is
3998// canceled.
3999func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
4000	c.ctx_ = ctx
4001	return c
4002}
4003
4004// Header returns an http.Header that can be modified by the caller to
4005// add HTTP headers to the request.
4006func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
4007	if c.header_ == nil {
4008		c.header_ = make(http.Header)
4009	}
4010	return c.header_
4011}
4012
4013func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4014	reqHeaders := make(http.Header)
4015	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4016	for k, v := range c.header_ {
4017		reqHeaders[k] = v
4018	}
4019	reqHeaders.Set("User-Agent", c.s.userAgent())
4020	if c.ifNoneMatch_ != "" {
4021		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4022	}
4023	var body io.Reader = nil
4024	c.urlParams_.Set("alt", alt)
4025	c.urlParams_.Set("prettyPrint", "false")
4026	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4027	urls += "?" + c.urlParams_.Encode()
4028	req, err := http.NewRequest("GET", urls, body)
4029	if err != nil {
4030		return nil, err
4031	}
4032	req.Header = reqHeaders
4033	googleapi.Expand(req.URL, map[string]string{
4034		"name": c.name,
4035	})
4036	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4037}
4038
4039// Do executes the "datastream.projects.locations.operations.get" call.
4040// Exactly one of *Operation or error will be non-nil. Any non-2xx
4041// status code is an error. Response headers are in either
4042// *Operation.ServerResponse.Header or (if a response was returned at
4043// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4044// to check whether the returned error was because
4045// http.StatusNotModified was returned.
4046func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4047	gensupport.SetOptions(c.urlParams_, opts...)
4048	res, err := c.doRequest("json")
4049	if res != nil && res.StatusCode == http.StatusNotModified {
4050		if res.Body != nil {
4051			res.Body.Close()
4052		}
4053		return nil, &googleapi.Error{
4054			Code:   res.StatusCode,
4055			Header: res.Header,
4056		}
4057	}
4058	if err != nil {
4059		return nil, err
4060	}
4061	defer googleapi.CloseBody(res)
4062	if err := googleapi.CheckResponse(res); err != nil {
4063		return nil, err
4064	}
4065	ret := &Operation{
4066		ServerResponse: googleapi.ServerResponse{
4067			Header:         res.Header,
4068			HTTPStatusCode: res.StatusCode,
4069		},
4070	}
4071	target := &ret
4072	if err := gensupport.DecodeResponse(target, res); err != nil {
4073		return nil, err
4074	}
4075	return ret, nil
4076	// {
4077	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
4078	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
4079	//   "httpMethod": "GET",
4080	//   "id": "datastream.projects.locations.operations.get",
4081	//   "parameterOrder": [
4082	//     "name"
4083	//   ],
4084	//   "parameters": {
4085	//     "name": {
4086	//       "description": "The name of the operation resource.",
4087	//       "location": "path",
4088	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
4089	//       "required": true,
4090	//       "type": "string"
4091	//     }
4092	//   },
4093	//   "path": "v1alpha1/{+name}",
4094	//   "response": {
4095	//     "$ref": "Operation"
4096	//   },
4097	//   "scopes": [
4098	//     "https://www.googleapis.com/auth/cloud-platform"
4099	//   ]
4100	// }
4101
4102}
4103
4104// method id "datastream.projects.locations.operations.list":
4105
4106type ProjectsLocationsOperationsListCall struct {
4107	s            *Service
4108	name         string
4109	urlParams_   gensupport.URLParams
4110	ifNoneMatch_ string
4111	ctx_         context.Context
4112	header_      http.Header
4113}
4114
4115// List: Lists operations that match the specified filter in the
4116// request. If the server doesn't support this method, it returns
4117// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
4118// override the binding to use different resource name schemes, such as
4119// `users/*/operations`. To override the binding, API services can add a
4120// binding such as "/v1/{name=users/*}/operations" to their service
4121// configuration. For backwards compatibility, the default name includes
4122// the operations collection id, however overriding users must ensure
4123// the name binding is the parent resource, without the operations
4124// collection id.
4125//
4126// - name: The name of the operation's parent resource.
4127func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
4128	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4129	c.name = name
4130	return c
4131}
4132
4133// Filter sets the optional parameter "filter": The standard list
4134// filter.
4135func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
4136	c.urlParams_.Set("filter", filter)
4137	return c
4138}
4139
4140// PageSize sets the optional parameter "pageSize": The standard list
4141// page size.
4142func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
4143	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4144	return c
4145}
4146
4147// PageToken sets the optional parameter "pageToken": The standard list
4148// page token.
4149func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
4150	c.urlParams_.Set("pageToken", pageToken)
4151	return c
4152}
4153
4154// Fields allows partial responses to be retrieved. See
4155// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4156// for more information.
4157func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
4158	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4159	return c
4160}
4161
4162// IfNoneMatch sets the optional parameter which makes the operation
4163// fail if the object's ETag matches the given value. This is useful for
4164// getting updates only after the object has changed since the last
4165// request. Use googleapi.IsNotModified to check whether the response
4166// error from Do is the result of In-None-Match.
4167func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
4168	c.ifNoneMatch_ = entityTag
4169	return c
4170}
4171
4172// Context sets the context to be used in this call's Do method. Any
4173// pending HTTP request will be aborted if the provided context is
4174// canceled.
4175func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
4176	c.ctx_ = ctx
4177	return c
4178}
4179
4180// Header returns an http.Header that can be modified by the caller to
4181// add HTTP headers to the request.
4182func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
4183	if c.header_ == nil {
4184		c.header_ = make(http.Header)
4185	}
4186	return c.header_
4187}
4188
4189func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
4190	reqHeaders := make(http.Header)
4191	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4192	for k, v := range c.header_ {
4193		reqHeaders[k] = v
4194	}
4195	reqHeaders.Set("User-Agent", c.s.userAgent())
4196	if c.ifNoneMatch_ != "" {
4197		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4198	}
4199	var body io.Reader = nil
4200	c.urlParams_.Set("alt", alt)
4201	c.urlParams_.Set("prettyPrint", "false")
4202	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/operations")
4203	urls += "?" + c.urlParams_.Encode()
4204	req, err := http.NewRequest("GET", urls, body)
4205	if err != nil {
4206		return nil, err
4207	}
4208	req.Header = reqHeaders
4209	googleapi.Expand(req.URL, map[string]string{
4210		"name": c.name,
4211	})
4212	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4213}
4214
4215// Do executes the "datastream.projects.locations.operations.list" call.
4216// Exactly one of *ListOperationsResponse or error will be non-nil. Any
4217// non-2xx status code is an error. Response headers are in either
4218// *ListOperationsResponse.ServerResponse.Header or (if a response was
4219// returned at all) in error.(*googleapi.Error).Header. Use
4220// googleapi.IsNotModified to check whether the returned error was
4221// because http.StatusNotModified was returned.
4222func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
4223	gensupport.SetOptions(c.urlParams_, opts...)
4224	res, err := c.doRequest("json")
4225	if res != nil && res.StatusCode == http.StatusNotModified {
4226		if res.Body != nil {
4227			res.Body.Close()
4228		}
4229		return nil, &googleapi.Error{
4230			Code:   res.StatusCode,
4231			Header: res.Header,
4232		}
4233	}
4234	if err != nil {
4235		return nil, err
4236	}
4237	defer googleapi.CloseBody(res)
4238	if err := googleapi.CheckResponse(res); err != nil {
4239		return nil, err
4240	}
4241	ret := &ListOperationsResponse{
4242		ServerResponse: googleapi.ServerResponse{
4243			Header:         res.Header,
4244			HTTPStatusCode: res.StatusCode,
4245		},
4246	}
4247	target := &ret
4248	if err := gensupport.DecodeResponse(target, res); err != nil {
4249		return nil, err
4250	}
4251	return ret, nil
4252	// {
4253	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
4254	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations",
4255	//   "httpMethod": "GET",
4256	//   "id": "datastream.projects.locations.operations.list",
4257	//   "parameterOrder": [
4258	//     "name"
4259	//   ],
4260	//   "parameters": {
4261	//     "filter": {
4262	//       "description": "The standard list filter.",
4263	//       "location": "query",
4264	//       "type": "string"
4265	//     },
4266	//     "name": {
4267	//       "description": "The name of the operation's parent resource.",
4268	//       "location": "path",
4269	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4270	//       "required": true,
4271	//       "type": "string"
4272	//     },
4273	//     "pageSize": {
4274	//       "description": "The standard list page size.",
4275	//       "format": "int32",
4276	//       "location": "query",
4277	//       "type": "integer"
4278	//     },
4279	//     "pageToken": {
4280	//       "description": "The standard list page token.",
4281	//       "location": "query",
4282	//       "type": "string"
4283	//     }
4284	//   },
4285	//   "path": "v1alpha1/{+name}/operations",
4286	//   "response": {
4287	//     "$ref": "ListOperationsResponse"
4288	//   },
4289	//   "scopes": [
4290	//     "https://www.googleapis.com/auth/cloud-platform"
4291	//   ]
4292	// }
4293
4294}
4295
4296// Pages invokes f for each page of results.
4297// A non-nil error returned from f will halt the iteration.
4298// The provided context supersedes any context provided to the Context method.
4299func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
4300	c.ctx_ = ctx
4301	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4302	for {
4303		x, err := c.Do()
4304		if err != nil {
4305			return err
4306		}
4307		if err := f(x); err != nil {
4308			return err
4309		}
4310		if x.NextPageToken == "" {
4311			return nil
4312		}
4313		c.PageToken(x.NextPageToken)
4314	}
4315}
4316
4317// method id "datastream.projects.locations.privateConnections.create":
4318
4319type ProjectsLocationsPrivateConnectionsCreateCall struct {
4320	s                 *Service
4321	parent            string
4322	privateconnection *PrivateConnection
4323	urlParams_        gensupport.URLParams
4324	ctx_              context.Context
4325	header_           http.Header
4326}
4327
4328// Create: Use this method to create a private connectivity
4329// configuration.
4330//
4331// - parent: The parent that owns the collection of PrivateConnections.
4332func (r *ProjectsLocationsPrivateConnectionsService) Create(parent string, privateconnection *PrivateConnection) *ProjectsLocationsPrivateConnectionsCreateCall {
4333	c := &ProjectsLocationsPrivateConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4334	c.parent = parent
4335	c.privateconnection = privateconnection
4336	return c
4337}
4338
4339// PrivateConnectionId sets the optional parameter
4340// "privateConnectionId": Required. The private connectivity identifier.
4341func (c *ProjectsLocationsPrivateConnectionsCreateCall) PrivateConnectionId(privateConnectionId string) *ProjectsLocationsPrivateConnectionsCreateCall {
4342	c.urlParams_.Set("privateConnectionId", privateConnectionId)
4343	return c
4344}
4345
4346// RequestId sets the optional parameter "requestId": A request ID to
4347// identify requests. Specify a unique request ID so that if you must
4348// retry your request, the server will know to ignore the request if it
4349// has already been completed. The server will guarantee that for at
4350// least 60 minutes since the first request. For example, consider a
4351// situation where you make an initial request and the request times
4352// out. If you make the request again with the same request ID, the
4353// server can check if original operation with the same request ID was
4354// received, and if so, will ignore the second request. This prevents
4355// clients from accidentally creating duplicate commitments. The request
4356// ID must be a valid UUID with the exception that zero UUID is not
4357// supported (00000000-0000-0000-0000-000000000000).
4358func (c *ProjectsLocationsPrivateConnectionsCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateConnectionsCreateCall {
4359	c.urlParams_.Set("requestId", requestId)
4360	return c
4361}
4362
4363// Fields allows partial responses to be retrieved. See
4364// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4365// for more information.
4366func (c *ProjectsLocationsPrivateConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsCreateCall {
4367	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4368	return c
4369}
4370
4371// Context sets the context to be used in this call's Do method. Any
4372// pending HTTP request will be aborted if the provided context is
4373// canceled.
4374func (c *ProjectsLocationsPrivateConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsCreateCall {
4375	c.ctx_ = ctx
4376	return c
4377}
4378
4379// Header returns an http.Header that can be modified by the caller to
4380// add HTTP headers to the request.
4381func (c *ProjectsLocationsPrivateConnectionsCreateCall) Header() http.Header {
4382	if c.header_ == nil {
4383		c.header_ = make(http.Header)
4384	}
4385	return c.header_
4386}
4387
4388func (c *ProjectsLocationsPrivateConnectionsCreateCall) doRequest(alt string) (*http.Response, error) {
4389	reqHeaders := make(http.Header)
4390	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4391	for k, v := range c.header_ {
4392		reqHeaders[k] = v
4393	}
4394	reqHeaders.Set("User-Agent", c.s.userAgent())
4395	var body io.Reader = nil
4396	body, err := googleapi.WithoutDataWrapper.JSONReader(c.privateconnection)
4397	if err != nil {
4398		return nil, err
4399	}
4400	reqHeaders.Set("Content-Type", "application/json")
4401	c.urlParams_.Set("alt", alt)
4402	c.urlParams_.Set("prettyPrint", "false")
4403	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/privateConnections")
4404	urls += "?" + c.urlParams_.Encode()
4405	req, err := http.NewRequest("POST", urls, body)
4406	if err != nil {
4407		return nil, err
4408	}
4409	req.Header = reqHeaders
4410	googleapi.Expand(req.URL, map[string]string{
4411		"parent": c.parent,
4412	})
4413	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4414}
4415
4416// Do executes the "datastream.projects.locations.privateConnections.create" call.
4417// Exactly one of *Operation or error will be non-nil. Any non-2xx
4418// status code is an error. Response headers are in either
4419// *Operation.ServerResponse.Header or (if a response was returned at
4420// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4421// to check whether the returned error was because
4422// http.StatusNotModified was returned.
4423func (c *ProjectsLocationsPrivateConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4424	gensupport.SetOptions(c.urlParams_, opts...)
4425	res, err := c.doRequest("json")
4426	if res != nil && res.StatusCode == http.StatusNotModified {
4427		if res.Body != nil {
4428			res.Body.Close()
4429		}
4430		return nil, &googleapi.Error{
4431			Code:   res.StatusCode,
4432			Header: res.Header,
4433		}
4434	}
4435	if err != nil {
4436		return nil, err
4437	}
4438	defer googleapi.CloseBody(res)
4439	if err := googleapi.CheckResponse(res); err != nil {
4440		return nil, err
4441	}
4442	ret := &Operation{
4443		ServerResponse: googleapi.ServerResponse{
4444			Header:         res.Header,
4445			HTTPStatusCode: res.StatusCode,
4446		},
4447	}
4448	target := &ret
4449	if err := gensupport.DecodeResponse(target, res); err != nil {
4450		return nil, err
4451	}
4452	return ret, nil
4453	// {
4454	//   "description": "Use this method to create a private connectivity configuration.",
4455	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/privateConnections",
4456	//   "httpMethod": "POST",
4457	//   "id": "datastream.projects.locations.privateConnections.create",
4458	//   "parameterOrder": [
4459	//     "parent"
4460	//   ],
4461	//   "parameters": {
4462	//     "parent": {
4463	//       "description": "Required. The parent that owns the collection of PrivateConnections.",
4464	//       "location": "path",
4465	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4466	//       "required": true,
4467	//       "type": "string"
4468	//     },
4469	//     "privateConnectionId": {
4470	//       "description": "Required. The private connectivity identifier.",
4471	//       "location": "query",
4472	//       "type": "string"
4473	//     },
4474	//     "requestId": {
4475	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
4476	//       "location": "query",
4477	//       "type": "string"
4478	//     }
4479	//   },
4480	//   "path": "v1alpha1/{+parent}/privateConnections",
4481	//   "request": {
4482	//     "$ref": "PrivateConnection"
4483	//   },
4484	//   "response": {
4485	//     "$ref": "Operation"
4486	//   },
4487	//   "scopes": [
4488	//     "https://www.googleapis.com/auth/cloud-platform"
4489	//   ]
4490	// }
4491
4492}
4493
4494// method id "datastream.projects.locations.privateConnections.delete":
4495
4496type ProjectsLocationsPrivateConnectionsDeleteCall struct {
4497	s          *Service
4498	name       string
4499	urlParams_ gensupport.URLParams
4500	ctx_       context.Context
4501	header_    http.Header
4502}
4503
4504// Delete: Use this method to delete a private connectivity
4505// configuration.
4506//
4507// - name: The name of the private connectivity configuration to delete.
4508func (r *ProjectsLocationsPrivateConnectionsService) Delete(name string) *ProjectsLocationsPrivateConnectionsDeleteCall {
4509	c := &ProjectsLocationsPrivateConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4510	c.name = name
4511	return c
4512}
4513
4514// Force sets the optional parameter "force": If set to true, any child
4515// routes that belong to this PrivateConnection will also be deleted.
4516func (c *ProjectsLocationsPrivateConnectionsDeleteCall) Force(force bool) *ProjectsLocationsPrivateConnectionsDeleteCall {
4517	c.urlParams_.Set("force", fmt.Sprint(force))
4518	return c
4519}
4520
4521// RequestId sets the optional parameter "requestId": A request ID to
4522// identify requests. Specify a unique request ID so that if you must
4523// retry your request, the server will know to ignore the request if it
4524// has already been completed. The server will guarantee that for at
4525// least 60 minutes after the first request. For example, consider a
4526// situation where you make an initial request and the request times
4527// out. If you make the request again with the same request ID, the
4528// server can check if original operation with the same request ID was
4529// received, and if so, will ignore the second request. This prevents
4530// clients from accidentally creating duplicate commitments. The request
4531// ID must be a valid UUID with the exception that zero UUID is not
4532// supported (00000000-0000-0000-0000-000000000000).
4533func (c *ProjectsLocationsPrivateConnectionsDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateConnectionsDeleteCall {
4534	c.urlParams_.Set("requestId", requestId)
4535	return c
4536}
4537
4538// Fields allows partial responses to be retrieved. See
4539// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4540// for more information.
4541func (c *ProjectsLocationsPrivateConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsDeleteCall {
4542	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4543	return c
4544}
4545
4546// Context sets the context to be used in this call's Do method. Any
4547// pending HTTP request will be aborted if the provided context is
4548// canceled.
4549func (c *ProjectsLocationsPrivateConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsDeleteCall {
4550	c.ctx_ = ctx
4551	return c
4552}
4553
4554// Header returns an http.Header that can be modified by the caller to
4555// add HTTP headers to the request.
4556func (c *ProjectsLocationsPrivateConnectionsDeleteCall) Header() http.Header {
4557	if c.header_ == nil {
4558		c.header_ = make(http.Header)
4559	}
4560	return c.header_
4561}
4562
4563func (c *ProjectsLocationsPrivateConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) {
4564	reqHeaders := make(http.Header)
4565	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4566	for k, v := range c.header_ {
4567		reqHeaders[k] = v
4568	}
4569	reqHeaders.Set("User-Agent", c.s.userAgent())
4570	var body io.Reader = nil
4571	c.urlParams_.Set("alt", alt)
4572	c.urlParams_.Set("prettyPrint", "false")
4573	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4574	urls += "?" + c.urlParams_.Encode()
4575	req, err := http.NewRequest("DELETE", urls, body)
4576	if err != nil {
4577		return nil, err
4578	}
4579	req.Header = reqHeaders
4580	googleapi.Expand(req.URL, map[string]string{
4581		"name": c.name,
4582	})
4583	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4584}
4585
4586// Do executes the "datastream.projects.locations.privateConnections.delete" call.
4587// Exactly one of *Operation or error will be non-nil. Any non-2xx
4588// status code is an error. Response headers are in either
4589// *Operation.ServerResponse.Header or (if a response was returned at
4590// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4591// to check whether the returned error was because
4592// http.StatusNotModified was returned.
4593func (c *ProjectsLocationsPrivateConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4594	gensupport.SetOptions(c.urlParams_, opts...)
4595	res, err := c.doRequest("json")
4596	if res != nil && res.StatusCode == http.StatusNotModified {
4597		if res.Body != nil {
4598			res.Body.Close()
4599		}
4600		return nil, &googleapi.Error{
4601			Code:   res.StatusCode,
4602			Header: res.Header,
4603		}
4604	}
4605	if err != nil {
4606		return nil, err
4607	}
4608	defer googleapi.CloseBody(res)
4609	if err := googleapi.CheckResponse(res); err != nil {
4610		return nil, err
4611	}
4612	ret := &Operation{
4613		ServerResponse: googleapi.ServerResponse{
4614			Header:         res.Header,
4615			HTTPStatusCode: res.StatusCode,
4616		},
4617	}
4618	target := &ret
4619	if err := gensupport.DecodeResponse(target, res); err != nil {
4620		return nil, err
4621	}
4622	return ret, nil
4623	// {
4624	//   "description": "Use this method to delete a private connectivity configuration.",
4625	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}",
4626	//   "httpMethod": "DELETE",
4627	//   "id": "datastream.projects.locations.privateConnections.delete",
4628	//   "parameterOrder": [
4629	//     "name"
4630	//   ],
4631	//   "parameters": {
4632	//     "force": {
4633	//       "description": "Optional. If set to true, any child routes that belong to this PrivateConnection will also be deleted.",
4634	//       "location": "query",
4635	//       "type": "boolean"
4636	//     },
4637	//     "name": {
4638	//       "description": "Required. The name of the private connectivity configuration to delete.",
4639	//       "location": "path",
4640	//       "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$",
4641	//       "required": true,
4642	//       "type": "string"
4643	//     },
4644	//     "requestId": {
4645	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
4646	//       "location": "query",
4647	//       "type": "string"
4648	//     }
4649	//   },
4650	//   "path": "v1alpha1/{+name}",
4651	//   "response": {
4652	//     "$ref": "Operation"
4653	//   },
4654	//   "scopes": [
4655	//     "https://www.googleapis.com/auth/cloud-platform"
4656	//   ]
4657	// }
4658
4659}
4660
4661// method id "datastream.projects.locations.privateConnections.get":
4662
4663type ProjectsLocationsPrivateConnectionsGetCall struct {
4664	s            *Service
4665	name         string
4666	urlParams_   gensupport.URLParams
4667	ifNoneMatch_ string
4668	ctx_         context.Context
4669	header_      http.Header
4670}
4671
4672// Get: Use this method to get details about a private connectivity
4673// configuration.
4674//
4675// - name: The name of the private connectivity configuration to get.
4676func (r *ProjectsLocationsPrivateConnectionsService) Get(name string) *ProjectsLocationsPrivateConnectionsGetCall {
4677	c := &ProjectsLocationsPrivateConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4678	c.name = name
4679	return c
4680}
4681
4682// Fields allows partial responses to be retrieved. See
4683// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4684// for more information.
4685func (c *ProjectsLocationsPrivateConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsGetCall {
4686	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4687	return c
4688}
4689
4690// IfNoneMatch sets the optional parameter which makes the operation
4691// fail if the object's ETag matches the given value. This is useful for
4692// getting updates only after the object has changed since the last
4693// request. Use googleapi.IsNotModified to check whether the response
4694// error from Do is the result of In-None-Match.
4695func (c *ProjectsLocationsPrivateConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateConnectionsGetCall {
4696	c.ifNoneMatch_ = entityTag
4697	return c
4698}
4699
4700// Context sets the context to be used in this call's Do method. Any
4701// pending HTTP request will be aborted if the provided context is
4702// canceled.
4703func (c *ProjectsLocationsPrivateConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsGetCall {
4704	c.ctx_ = ctx
4705	return c
4706}
4707
4708// Header returns an http.Header that can be modified by the caller to
4709// add HTTP headers to the request.
4710func (c *ProjectsLocationsPrivateConnectionsGetCall) Header() http.Header {
4711	if c.header_ == nil {
4712		c.header_ = make(http.Header)
4713	}
4714	return c.header_
4715}
4716
4717func (c *ProjectsLocationsPrivateConnectionsGetCall) doRequest(alt string) (*http.Response, error) {
4718	reqHeaders := make(http.Header)
4719	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4720	for k, v := range c.header_ {
4721		reqHeaders[k] = v
4722	}
4723	reqHeaders.Set("User-Agent", c.s.userAgent())
4724	if c.ifNoneMatch_ != "" {
4725		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4726	}
4727	var body io.Reader = nil
4728	c.urlParams_.Set("alt", alt)
4729	c.urlParams_.Set("prettyPrint", "false")
4730	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4731	urls += "?" + c.urlParams_.Encode()
4732	req, err := http.NewRequest("GET", urls, body)
4733	if err != nil {
4734		return nil, err
4735	}
4736	req.Header = reqHeaders
4737	googleapi.Expand(req.URL, map[string]string{
4738		"name": c.name,
4739	})
4740	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4741}
4742
4743// Do executes the "datastream.projects.locations.privateConnections.get" call.
4744// Exactly one of *PrivateConnection or error will be non-nil. Any
4745// non-2xx status code is an error. Response headers are in either
4746// *PrivateConnection.ServerResponse.Header or (if a response was
4747// returned at all) in error.(*googleapi.Error).Header. Use
4748// googleapi.IsNotModified to check whether the returned error was
4749// because http.StatusNotModified was returned.
4750func (c *ProjectsLocationsPrivateConnectionsGetCall) Do(opts ...googleapi.CallOption) (*PrivateConnection, error) {
4751	gensupport.SetOptions(c.urlParams_, opts...)
4752	res, err := c.doRequest("json")
4753	if res != nil && res.StatusCode == http.StatusNotModified {
4754		if res.Body != nil {
4755			res.Body.Close()
4756		}
4757		return nil, &googleapi.Error{
4758			Code:   res.StatusCode,
4759			Header: res.Header,
4760		}
4761	}
4762	if err != nil {
4763		return nil, err
4764	}
4765	defer googleapi.CloseBody(res)
4766	if err := googleapi.CheckResponse(res); err != nil {
4767		return nil, err
4768	}
4769	ret := &PrivateConnection{
4770		ServerResponse: googleapi.ServerResponse{
4771			Header:         res.Header,
4772			HTTPStatusCode: res.StatusCode,
4773		},
4774	}
4775	target := &ret
4776	if err := gensupport.DecodeResponse(target, res); err != nil {
4777		return nil, err
4778	}
4779	return ret, nil
4780	// {
4781	//   "description": "Use this method to get details about a private connectivity configuration.",
4782	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}",
4783	//   "httpMethod": "GET",
4784	//   "id": "datastream.projects.locations.privateConnections.get",
4785	//   "parameterOrder": [
4786	//     "name"
4787	//   ],
4788	//   "parameters": {
4789	//     "name": {
4790	//       "description": "Required. The name of the private connectivity configuration to get.",
4791	//       "location": "path",
4792	//       "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$",
4793	//       "required": true,
4794	//       "type": "string"
4795	//     }
4796	//   },
4797	//   "path": "v1alpha1/{+name}",
4798	//   "response": {
4799	//     "$ref": "PrivateConnection"
4800	//   },
4801	//   "scopes": [
4802	//     "https://www.googleapis.com/auth/cloud-platform"
4803	//   ]
4804	// }
4805
4806}
4807
4808// method id "datastream.projects.locations.privateConnections.list":
4809
4810type ProjectsLocationsPrivateConnectionsListCall struct {
4811	s            *Service
4812	parent       string
4813	urlParams_   gensupport.URLParams
4814	ifNoneMatch_ string
4815	ctx_         context.Context
4816	header_      http.Header
4817}
4818
4819// List: Use this method to list private connectivity configurations in
4820// a project and location.
4821//
4822// - parent: The parent that owns the collection of private connectivity
4823//   configurations.
4824func (r *ProjectsLocationsPrivateConnectionsService) List(parent string) *ProjectsLocationsPrivateConnectionsListCall {
4825	c := &ProjectsLocationsPrivateConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4826	c.parent = parent
4827	return c
4828}
4829
4830// Filter sets the optional parameter "filter": Filter request.
4831func (c *ProjectsLocationsPrivateConnectionsListCall) Filter(filter string) *ProjectsLocationsPrivateConnectionsListCall {
4832	c.urlParams_.Set("filter", filter)
4833	return c
4834}
4835
4836// OrderBy sets the optional parameter "orderBy": Order by fields for
4837// the result.
4838func (c *ProjectsLocationsPrivateConnectionsListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateConnectionsListCall {
4839	c.urlParams_.Set("orderBy", orderBy)
4840	return c
4841}
4842
4843// PageSize sets the optional parameter "pageSize": Maximum number of
4844// private connectivity configurations to return. If unspecified, at
4845// most 50 private connectivity configurations that will be returned.
4846// The maximum value is 1000; values above 1000 will be coerced to 1000.
4847func (c *ProjectsLocationsPrivateConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateConnectionsListCall {
4848	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4849	return c
4850}
4851
4852// PageToken sets the optional parameter "pageToken": Page token
4853// received from a previous `ListPrivateConnections` call. Provide this
4854// to retrieve the subsequent page. When paginating, all other
4855// parameters provided to `ListPrivateConnections` must match the call
4856// that provided the page token.
4857func (c *ProjectsLocationsPrivateConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsPrivateConnectionsListCall {
4858	c.urlParams_.Set("pageToken", pageToken)
4859	return c
4860}
4861
4862// Fields allows partial responses to be retrieved. See
4863// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4864// for more information.
4865func (c *ProjectsLocationsPrivateConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsListCall {
4866	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4867	return c
4868}
4869
4870// IfNoneMatch sets the optional parameter which makes the operation
4871// fail if the object's ETag matches the given value. This is useful for
4872// getting updates only after the object has changed since the last
4873// request. Use googleapi.IsNotModified to check whether the response
4874// error from Do is the result of In-None-Match.
4875func (c *ProjectsLocationsPrivateConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateConnectionsListCall {
4876	c.ifNoneMatch_ = entityTag
4877	return c
4878}
4879
4880// Context sets the context to be used in this call's Do method. Any
4881// pending HTTP request will be aborted if the provided context is
4882// canceled.
4883func (c *ProjectsLocationsPrivateConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsListCall {
4884	c.ctx_ = ctx
4885	return c
4886}
4887
4888// Header returns an http.Header that can be modified by the caller to
4889// add HTTP headers to the request.
4890func (c *ProjectsLocationsPrivateConnectionsListCall) Header() http.Header {
4891	if c.header_ == nil {
4892		c.header_ = make(http.Header)
4893	}
4894	return c.header_
4895}
4896
4897func (c *ProjectsLocationsPrivateConnectionsListCall) doRequest(alt string) (*http.Response, error) {
4898	reqHeaders := make(http.Header)
4899	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4900	for k, v := range c.header_ {
4901		reqHeaders[k] = v
4902	}
4903	reqHeaders.Set("User-Agent", c.s.userAgent())
4904	if c.ifNoneMatch_ != "" {
4905		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4906	}
4907	var body io.Reader = nil
4908	c.urlParams_.Set("alt", alt)
4909	c.urlParams_.Set("prettyPrint", "false")
4910	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/privateConnections")
4911	urls += "?" + c.urlParams_.Encode()
4912	req, err := http.NewRequest("GET", urls, body)
4913	if err != nil {
4914		return nil, err
4915	}
4916	req.Header = reqHeaders
4917	googleapi.Expand(req.URL, map[string]string{
4918		"parent": c.parent,
4919	})
4920	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4921}
4922
4923// Do executes the "datastream.projects.locations.privateConnections.list" call.
4924// Exactly one of *ListPrivateConnectionsResponse or error will be
4925// non-nil. Any non-2xx status code is an error. Response headers are in
4926// either *ListPrivateConnectionsResponse.ServerResponse.Header or (if a
4927// response was returned at all) in error.(*googleapi.Error).Header. Use
4928// googleapi.IsNotModified to check whether the returned error was
4929// because http.StatusNotModified was returned.
4930func (c *ProjectsLocationsPrivateConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListPrivateConnectionsResponse, error) {
4931	gensupport.SetOptions(c.urlParams_, opts...)
4932	res, err := c.doRequest("json")
4933	if res != nil && res.StatusCode == http.StatusNotModified {
4934		if res.Body != nil {
4935			res.Body.Close()
4936		}
4937		return nil, &googleapi.Error{
4938			Code:   res.StatusCode,
4939			Header: res.Header,
4940		}
4941	}
4942	if err != nil {
4943		return nil, err
4944	}
4945	defer googleapi.CloseBody(res)
4946	if err := googleapi.CheckResponse(res); err != nil {
4947		return nil, err
4948	}
4949	ret := &ListPrivateConnectionsResponse{
4950		ServerResponse: googleapi.ServerResponse{
4951			Header:         res.Header,
4952			HTTPStatusCode: res.StatusCode,
4953		},
4954	}
4955	target := &ret
4956	if err := gensupport.DecodeResponse(target, res); err != nil {
4957		return nil, err
4958	}
4959	return ret, nil
4960	// {
4961	//   "description": "Use this method to list private connectivity configurations in a project and location.",
4962	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/privateConnections",
4963	//   "httpMethod": "GET",
4964	//   "id": "datastream.projects.locations.privateConnections.list",
4965	//   "parameterOrder": [
4966	//     "parent"
4967	//   ],
4968	//   "parameters": {
4969	//     "filter": {
4970	//       "description": "Filter request.",
4971	//       "location": "query",
4972	//       "type": "string"
4973	//     },
4974	//     "orderBy": {
4975	//       "description": "Order by fields for the result.",
4976	//       "location": "query",
4977	//       "type": "string"
4978	//     },
4979	//     "pageSize": {
4980	//       "description": "Maximum number of private connectivity configurations to return. If unspecified, at most 50 private connectivity configurations that will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
4981	//       "format": "int32",
4982	//       "location": "query",
4983	//       "type": "integer"
4984	//     },
4985	//     "pageToken": {
4986	//       "description": "Page token received from a previous `ListPrivateConnections` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateConnections` must match the call that provided the page token.",
4987	//       "location": "query",
4988	//       "type": "string"
4989	//     },
4990	//     "parent": {
4991	//       "description": "Required. The parent that owns the collection of private connectivity configurations.",
4992	//       "location": "path",
4993	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4994	//       "required": true,
4995	//       "type": "string"
4996	//     }
4997	//   },
4998	//   "path": "v1alpha1/{+parent}/privateConnections",
4999	//   "response": {
5000	//     "$ref": "ListPrivateConnectionsResponse"
5001	//   },
5002	//   "scopes": [
5003	//     "https://www.googleapis.com/auth/cloud-platform"
5004	//   ]
5005	// }
5006
5007}
5008
5009// Pages invokes f for each page of results.
5010// A non-nil error returned from f will halt the iteration.
5011// The provided context supersedes any context provided to the Context method.
5012func (c *ProjectsLocationsPrivateConnectionsListCall) Pages(ctx context.Context, f func(*ListPrivateConnectionsResponse) error) error {
5013	c.ctx_ = ctx
5014	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5015	for {
5016		x, err := c.Do()
5017		if err != nil {
5018			return err
5019		}
5020		if err := f(x); err != nil {
5021			return err
5022		}
5023		if x.NextPageToken == "" {
5024			return nil
5025		}
5026		c.PageToken(x.NextPageToken)
5027	}
5028}
5029
5030// method id "datastream.projects.locations.privateConnections.routes.create":
5031
5032type ProjectsLocationsPrivateConnectionsRoutesCreateCall struct {
5033	s          *Service
5034	parent     string
5035	route      *Route
5036	urlParams_ gensupport.URLParams
5037	ctx_       context.Context
5038	header_    http.Header
5039}
5040
5041// Create: Use this method to create a route for a private connectivity
5042// in a project and location.
5043//
5044// - parent: The parent that owns the collection of Routes.
5045func (r *ProjectsLocationsPrivateConnectionsRoutesService) Create(parent string, route *Route) *ProjectsLocationsPrivateConnectionsRoutesCreateCall {
5046	c := &ProjectsLocationsPrivateConnectionsRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5047	c.parent = parent
5048	c.route = route
5049	return c
5050}
5051
5052// RequestId sets the optional parameter "requestId": A request ID to
5053// identify requests. Specify a unique request ID so that if you must
5054// retry your request, the server will know to ignore the request if it
5055// has already been completed. The server will guarantee that for at
5056// least 60 minutes since the first request. For example, consider a
5057// situation where you make an initial request and the request times
5058// out. If you make the request again with the same request ID, the
5059// server can check if original operation with the same request ID was
5060// received, and if so, will ignore the second request. This prevents
5061// clients from accidentally creating duplicate commitments. The request
5062// ID must be a valid UUID with the exception that zero UUID is not
5063// supported (00000000-0000-0000-0000-000000000000).
5064func (c *ProjectsLocationsPrivateConnectionsRoutesCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateConnectionsRoutesCreateCall {
5065	c.urlParams_.Set("requestId", requestId)
5066	return c
5067}
5068
5069// RouteId sets the optional parameter "routeId": Required. The Route
5070// identifier.
5071func (c *ProjectsLocationsPrivateConnectionsRoutesCreateCall) RouteId(routeId string) *ProjectsLocationsPrivateConnectionsRoutesCreateCall {
5072	c.urlParams_.Set("routeId", routeId)
5073	return c
5074}
5075
5076// Fields allows partial responses to be retrieved. See
5077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5078// for more information.
5079func (c *ProjectsLocationsPrivateConnectionsRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsRoutesCreateCall {
5080	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5081	return c
5082}
5083
5084// Context sets the context to be used in this call's Do method. Any
5085// pending HTTP request will be aborted if the provided context is
5086// canceled.
5087func (c *ProjectsLocationsPrivateConnectionsRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsRoutesCreateCall {
5088	c.ctx_ = ctx
5089	return c
5090}
5091
5092// Header returns an http.Header that can be modified by the caller to
5093// add HTTP headers to the request.
5094func (c *ProjectsLocationsPrivateConnectionsRoutesCreateCall) Header() http.Header {
5095	if c.header_ == nil {
5096		c.header_ = make(http.Header)
5097	}
5098	return c.header_
5099}
5100
5101func (c *ProjectsLocationsPrivateConnectionsRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
5102	reqHeaders := make(http.Header)
5103	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5104	for k, v := range c.header_ {
5105		reqHeaders[k] = v
5106	}
5107	reqHeaders.Set("User-Agent", c.s.userAgent())
5108	var body io.Reader = nil
5109	body, err := googleapi.WithoutDataWrapper.JSONReader(c.route)
5110	if err != nil {
5111		return nil, err
5112	}
5113	reqHeaders.Set("Content-Type", "application/json")
5114	c.urlParams_.Set("alt", alt)
5115	c.urlParams_.Set("prettyPrint", "false")
5116	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/routes")
5117	urls += "?" + c.urlParams_.Encode()
5118	req, err := http.NewRequest("POST", urls, body)
5119	if err != nil {
5120		return nil, err
5121	}
5122	req.Header = reqHeaders
5123	googleapi.Expand(req.URL, map[string]string{
5124		"parent": c.parent,
5125	})
5126	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5127}
5128
5129// Do executes the "datastream.projects.locations.privateConnections.routes.create" call.
5130// Exactly one of *Operation or error will be non-nil. Any non-2xx
5131// status code is an error. Response headers are in either
5132// *Operation.ServerResponse.Header or (if a response was returned at
5133// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5134// to check whether the returned error was because
5135// http.StatusNotModified was returned.
5136func (c *ProjectsLocationsPrivateConnectionsRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5137	gensupport.SetOptions(c.urlParams_, opts...)
5138	res, err := c.doRequest("json")
5139	if res != nil && res.StatusCode == http.StatusNotModified {
5140		if res.Body != nil {
5141			res.Body.Close()
5142		}
5143		return nil, &googleapi.Error{
5144			Code:   res.StatusCode,
5145			Header: res.Header,
5146		}
5147	}
5148	if err != nil {
5149		return nil, err
5150	}
5151	defer googleapi.CloseBody(res)
5152	if err := googleapi.CheckResponse(res); err != nil {
5153		return nil, err
5154	}
5155	ret := &Operation{
5156		ServerResponse: googleapi.ServerResponse{
5157			Header:         res.Header,
5158			HTTPStatusCode: res.StatusCode,
5159		},
5160	}
5161	target := &ret
5162	if err := gensupport.DecodeResponse(target, res); err != nil {
5163		return nil, err
5164	}
5165	return ret, nil
5166	// {
5167	//   "description": "Use this method to create a route for a private connectivity in a project and location.",
5168	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}/routes",
5169	//   "httpMethod": "POST",
5170	//   "id": "datastream.projects.locations.privateConnections.routes.create",
5171	//   "parameterOrder": [
5172	//     "parent"
5173	//   ],
5174	//   "parameters": {
5175	//     "parent": {
5176	//       "description": "Required. The parent that owns the collection of Routes.",
5177	//       "location": "path",
5178	//       "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$",
5179	//       "required": true,
5180	//       "type": "string"
5181	//     },
5182	//     "requestId": {
5183	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
5184	//       "location": "query",
5185	//       "type": "string"
5186	//     },
5187	//     "routeId": {
5188	//       "description": "Required. The Route identifier.",
5189	//       "location": "query",
5190	//       "type": "string"
5191	//     }
5192	//   },
5193	//   "path": "v1alpha1/{+parent}/routes",
5194	//   "request": {
5195	//     "$ref": "Route"
5196	//   },
5197	//   "response": {
5198	//     "$ref": "Operation"
5199	//   },
5200	//   "scopes": [
5201	//     "https://www.googleapis.com/auth/cloud-platform"
5202	//   ]
5203	// }
5204
5205}
5206
5207// method id "datastream.projects.locations.privateConnections.routes.delete":
5208
5209type ProjectsLocationsPrivateConnectionsRoutesDeleteCall struct {
5210	s          *Service
5211	name       string
5212	urlParams_ gensupport.URLParams
5213	ctx_       context.Context
5214	header_    http.Header
5215}
5216
5217// Delete: Use this method to delete a route.
5218//
5219// - name: The name of the Route resource to delete.
5220func (r *ProjectsLocationsPrivateConnectionsRoutesService) Delete(name string) *ProjectsLocationsPrivateConnectionsRoutesDeleteCall {
5221	c := &ProjectsLocationsPrivateConnectionsRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5222	c.name = name
5223	return c
5224}
5225
5226// RequestId sets the optional parameter "requestId": A request ID to
5227// identify requests. Specify a unique request ID so that if you must
5228// retry your request, the server will know to ignore the request if it
5229// has already been completed. The server will guarantee that for at
5230// least 60 minutes after the first request. For example, consider a
5231// situation where you make an initial request and the request times
5232// out. If you make the request again with the same request ID, the
5233// server can check if original operation with the same request ID was
5234// received, and if so, will ignore the second request. This prevents
5235// clients from accidentally creating duplicate commitments. The request
5236// ID must be a valid UUID with the exception that zero UUID is not
5237// supported (00000000-0000-0000-0000-000000000000).
5238func (c *ProjectsLocationsPrivateConnectionsRoutesDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateConnectionsRoutesDeleteCall {
5239	c.urlParams_.Set("requestId", requestId)
5240	return c
5241}
5242
5243// Fields allows partial responses to be retrieved. See
5244// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5245// for more information.
5246func (c *ProjectsLocationsPrivateConnectionsRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsRoutesDeleteCall {
5247	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5248	return c
5249}
5250
5251// Context sets the context to be used in this call's Do method. Any
5252// pending HTTP request will be aborted if the provided context is
5253// canceled.
5254func (c *ProjectsLocationsPrivateConnectionsRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsRoutesDeleteCall {
5255	c.ctx_ = ctx
5256	return c
5257}
5258
5259// Header returns an http.Header that can be modified by the caller to
5260// add HTTP headers to the request.
5261func (c *ProjectsLocationsPrivateConnectionsRoutesDeleteCall) Header() http.Header {
5262	if c.header_ == nil {
5263		c.header_ = make(http.Header)
5264	}
5265	return c.header_
5266}
5267
5268func (c *ProjectsLocationsPrivateConnectionsRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
5269	reqHeaders := make(http.Header)
5270	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5271	for k, v := range c.header_ {
5272		reqHeaders[k] = v
5273	}
5274	reqHeaders.Set("User-Agent", c.s.userAgent())
5275	var body io.Reader = nil
5276	c.urlParams_.Set("alt", alt)
5277	c.urlParams_.Set("prettyPrint", "false")
5278	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
5279	urls += "?" + c.urlParams_.Encode()
5280	req, err := http.NewRequest("DELETE", urls, body)
5281	if err != nil {
5282		return nil, err
5283	}
5284	req.Header = reqHeaders
5285	googleapi.Expand(req.URL, map[string]string{
5286		"name": c.name,
5287	})
5288	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5289}
5290
5291// Do executes the "datastream.projects.locations.privateConnections.routes.delete" call.
5292// Exactly one of *Operation or error will be non-nil. Any non-2xx
5293// status code is an error. Response headers are in either
5294// *Operation.ServerResponse.Header or (if a response was returned at
5295// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5296// to check whether the returned error was because
5297// http.StatusNotModified was returned.
5298func (c *ProjectsLocationsPrivateConnectionsRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5299	gensupport.SetOptions(c.urlParams_, opts...)
5300	res, err := c.doRequest("json")
5301	if res != nil && res.StatusCode == http.StatusNotModified {
5302		if res.Body != nil {
5303			res.Body.Close()
5304		}
5305		return nil, &googleapi.Error{
5306			Code:   res.StatusCode,
5307			Header: res.Header,
5308		}
5309	}
5310	if err != nil {
5311		return nil, err
5312	}
5313	defer googleapi.CloseBody(res)
5314	if err := googleapi.CheckResponse(res); err != nil {
5315		return nil, err
5316	}
5317	ret := &Operation{
5318		ServerResponse: googleapi.ServerResponse{
5319			Header:         res.Header,
5320			HTTPStatusCode: res.StatusCode,
5321		},
5322	}
5323	target := &ret
5324	if err := gensupport.DecodeResponse(target, res); err != nil {
5325		return nil, err
5326	}
5327	return ret, nil
5328	// {
5329	//   "description": "Use this method to delete a route.",
5330	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}/routes/{routesId}",
5331	//   "httpMethod": "DELETE",
5332	//   "id": "datastream.projects.locations.privateConnections.routes.delete",
5333	//   "parameterOrder": [
5334	//     "name"
5335	//   ],
5336	//   "parameters": {
5337	//     "name": {
5338	//       "description": "Required. The name of the Route resource to delete.",
5339	//       "location": "path",
5340	//       "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+/routes/[^/]+$",
5341	//       "required": true,
5342	//       "type": "string"
5343	//     },
5344	//     "requestId": {
5345	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
5346	//       "location": "query",
5347	//       "type": "string"
5348	//     }
5349	//   },
5350	//   "path": "v1alpha1/{+name}",
5351	//   "response": {
5352	//     "$ref": "Operation"
5353	//   },
5354	//   "scopes": [
5355	//     "https://www.googleapis.com/auth/cloud-platform"
5356	//   ]
5357	// }
5358
5359}
5360
5361// method id "datastream.projects.locations.privateConnections.routes.get":
5362
5363type ProjectsLocationsPrivateConnectionsRoutesGetCall struct {
5364	s            *Service
5365	name         string
5366	urlParams_   gensupport.URLParams
5367	ifNoneMatch_ string
5368	ctx_         context.Context
5369	header_      http.Header
5370}
5371
5372// Get: Use this method to get details about a route.
5373//
5374// - name: The name of the Route resource to get.
5375func (r *ProjectsLocationsPrivateConnectionsRoutesService) Get(name string) *ProjectsLocationsPrivateConnectionsRoutesGetCall {
5376	c := &ProjectsLocationsPrivateConnectionsRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5377	c.name = name
5378	return c
5379}
5380
5381// Fields allows partial responses to be retrieved. See
5382// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5383// for more information.
5384func (c *ProjectsLocationsPrivateConnectionsRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsRoutesGetCall {
5385	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5386	return c
5387}
5388
5389// IfNoneMatch sets the optional parameter which makes the operation
5390// fail if the object's ETag matches the given value. This is useful for
5391// getting updates only after the object has changed since the last
5392// request. Use googleapi.IsNotModified to check whether the response
5393// error from Do is the result of In-None-Match.
5394func (c *ProjectsLocationsPrivateConnectionsRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateConnectionsRoutesGetCall {
5395	c.ifNoneMatch_ = entityTag
5396	return c
5397}
5398
5399// Context sets the context to be used in this call's Do method. Any
5400// pending HTTP request will be aborted if the provided context is
5401// canceled.
5402func (c *ProjectsLocationsPrivateConnectionsRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsRoutesGetCall {
5403	c.ctx_ = ctx
5404	return c
5405}
5406
5407// Header returns an http.Header that can be modified by the caller to
5408// add HTTP headers to the request.
5409func (c *ProjectsLocationsPrivateConnectionsRoutesGetCall) Header() http.Header {
5410	if c.header_ == nil {
5411		c.header_ = make(http.Header)
5412	}
5413	return c.header_
5414}
5415
5416func (c *ProjectsLocationsPrivateConnectionsRoutesGetCall) doRequest(alt string) (*http.Response, error) {
5417	reqHeaders := make(http.Header)
5418	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5419	for k, v := range c.header_ {
5420		reqHeaders[k] = v
5421	}
5422	reqHeaders.Set("User-Agent", c.s.userAgent())
5423	if c.ifNoneMatch_ != "" {
5424		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5425	}
5426	var body io.Reader = nil
5427	c.urlParams_.Set("alt", alt)
5428	c.urlParams_.Set("prettyPrint", "false")
5429	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
5430	urls += "?" + c.urlParams_.Encode()
5431	req, err := http.NewRequest("GET", urls, body)
5432	if err != nil {
5433		return nil, err
5434	}
5435	req.Header = reqHeaders
5436	googleapi.Expand(req.URL, map[string]string{
5437		"name": c.name,
5438	})
5439	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5440}
5441
5442// Do executes the "datastream.projects.locations.privateConnections.routes.get" call.
5443// Exactly one of *Route or error will be non-nil. Any non-2xx status
5444// code is an error. Response headers are in either
5445// *Route.ServerResponse.Header or (if a response was returned at all)
5446// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5447// check whether the returned error was because http.StatusNotModified
5448// was returned.
5449func (c *ProjectsLocationsPrivateConnectionsRoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) {
5450	gensupport.SetOptions(c.urlParams_, opts...)
5451	res, err := c.doRequest("json")
5452	if res != nil && res.StatusCode == http.StatusNotModified {
5453		if res.Body != nil {
5454			res.Body.Close()
5455		}
5456		return nil, &googleapi.Error{
5457			Code:   res.StatusCode,
5458			Header: res.Header,
5459		}
5460	}
5461	if err != nil {
5462		return nil, err
5463	}
5464	defer googleapi.CloseBody(res)
5465	if err := googleapi.CheckResponse(res); err != nil {
5466		return nil, err
5467	}
5468	ret := &Route{
5469		ServerResponse: googleapi.ServerResponse{
5470			Header:         res.Header,
5471			HTTPStatusCode: res.StatusCode,
5472		},
5473	}
5474	target := &ret
5475	if err := gensupport.DecodeResponse(target, res); err != nil {
5476		return nil, err
5477	}
5478	return ret, nil
5479	// {
5480	//   "description": "Use this method to get details about a route.",
5481	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}/routes/{routesId}",
5482	//   "httpMethod": "GET",
5483	//   "id": "datastream.projects.locations.privateConnections.routes.get",
5484	//   "parameterOrder": [
5485	//     "name"
5486	//   ],
5487	//   "parameters": {
5488	//     "name": {
5489	//       "description": "Required. The name of the Route resource to get.",
5490	//       "location": "path",
5491	//       "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+/routes/[^/]+$",
5492	//       "required": true,
5493	//       "type": "string"
5494	//     }
5495	//   },
5496	//   "path": "v1alpha1/{+name}",
5497	//   "response": {
5498	//     "$ref": "Route"
5499	//   },
5500	//   "scopes": [
5501	//     "https://www.googleapis.com/auth/cloud-platform"
5502	//   ]
5503	// }
5504
5505}
5506
5507// method id "datastream.projects.locations.privateConnections.routes.list":
5508
5509type ProjectsLocationsPrivateConnectionsRoutesListCall struct {
5510	s            *Service
5511	parent       string
5512	urlParams_   gensupport.URLParams
5513	ifNoneMatch_ string
5514	ctx_         context.Context
5515	header_      http.Header
5516}
5517
5518// List: Use this method to list routes created for a private
5519// connectivity in a project and location.
5520//
5521// - parent: The parent that owns the collection of Routess.
5522func (r *ProjectsLocationsPrivateConnectionsRoutesService) List(parent string) *ProjectsLocationsPrivateConnectionsRoutesListCall {
5523	c := &ProjectsLocationsPrivateConnectionsRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5524	c.parent = parent
5525	return c
5526}
5527
5528// Filter sets the optional parameter "filter": Filter request.
5529func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) Filter(filter string) *ProjectsLocationsPrivateConnectionsRoutesListCall {
5530	c.urlParams_.Set("filter", filter)
5531	return c
5532}
5533
5534// OrderBy sets the optional parameter "orderBy": Order by fields for
5535// the result.
5536func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateConnectionsRoutesListCall {
5537	c.urlParams_.Set("orderBy", orderBy)
5538	return c
5539}
5540
5541// PageSize sets the optional parameter "pageSize": Maximum number of
5542// Routes to return. The service may return fewer than this value. If
5543// unspecified, at most 50 Routes will be returned. The maximum value is
5544// 1000; values above 1000 will be coerced to 1000.
5545func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateConnectionsRoutesListCall {
5546	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5547	return c
5548}
5549
5550// PageToken sets the optional parameter "pageToken": Page token
5551// received from a previous `ListRoutes` call. Provide this to retrieve
5552// the subsequent page. When paginating, all other parameters provided
5553// to `ListRoutes` must match the call that provided the page token.
5554func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) PageToken(pageToken string) *ProjectsLocationsPrivateConnectionsRoutesListCall {
5555	c.urlParams_.Set("pageToken", pageToken)
5556	return c
5557}
5558
5559// Fields allows partial responses to be retrieved. See
5560// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5561// for more information.
5562func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsRoutesListCall {
5563	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5564	return c
5565}
5566
5567// IfNoneMatch sets the optional parameter which makes the operation
5568// fail if the object's ETag matches the given value. This is useful for
5569// getting updates only after the object has changed since the last
5570// request. Use googleapi.IsNotModified to check whether the response
5571// error from Do is the result of In-None-Match.
5572func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateConnectionsRoutesListCall {
5573	c.ifNoneMatch_ = entityTag
5574	return c
5575}
5576
5577// Context sets the context to be used in this call's Do method. Any
5578// pending HTTP request will be aborted if the provided context is
5579// canceled.
5580func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsRoutesListCall {
5581	c.ctx_ = ctx
5582	return c
5583}
5584
5585// Header returns an http.Header that can be modified by the caller to
5586// add HTTP headers to the request.
5587func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) Header() http.Header {
5588	if c.header_ == nil {
5589		c.header_ = make(http.Header)
5590	}
5591	return c.header_
5592}
5593
5594func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) doRequest(alt string) (*http.Response, error) {
5595	reqHeaders := make(http.Header)
5596	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5597	for k, v := range c.header_ {
5598		reqHeaders[k] = v
5599	}
5600	reqHeaders.Set("User-Agent", c.s.userAgent())
5601	if c.ifNoneMatch_ != "" {
5602		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5603	}
5604	var body io.Reader = nil
5605	c.urlParams_.Set("alt", alt)
5606	c.urlParams_.Set("prettyPrint", "false")
5607	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/routes")
5608	urls += "?" + c.urlParams_.Encode()
5609	req, err := http.NewRequest("GET", urls, body)
5610	if err != nil {
5611		return nil, err
5612	}
5613	req.Header = reqHeaders
5614	googleapi.Expand(req.URL, map[string]string{
5615		"parent": c.parent,
5616	})
5617	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5618}
5619
5620// Do executes the "datastream.projects.locations.privateConnections.routes.list" call.
5621// Exactly one of *ListRoutesResponse or error will be non-nil. Any
5622// non-2xx status code is an error. Response headers are in either
5623// *ListRoutesResponse.ServerResponse.Header or (if a response was
5624// returned at all) in error.(*googleapi.Error).Header. Use
5625// googleapi.IsNotModified to check whether the returned error was
5626// because http.StatusNotModified was returned.
5627func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) Do(opts ...googleapi.CallOption) (*ListRoutesResponse, error) {
5628	gensupport.SetOptions(c.urlParams_, opts...)
5629	res, err := c.doRequest("json")
5630	if res != nil && res.StatusCode == http.StatusNotModified {
5631		if res.Body != nil {
5632			res.Body.Close()
5633		}
5634		return nil, &googleapi.Error{
5635			Code:   res.StatusCode,
5636			Header: res.Header,
5637		}
5638	}
5639	if err != nil {
5640		return nil, err
5641	}
5642	defer googleapi.CloseBody(res)
5643	if err := googleapi.CheckResponse(res); err != nil {
5644		return nil, err
5645	}
5646	ret := &ListRoutesResponse{
5647		ServerResponse: googleapi.ServerResponse{
5648			Header:         res.Header,
5649			HTTPStatusCode: res.StatusCode,
5650		},
5651	}
5652	target := &ret
5653	if err := gensupport.DecodeResponse(target, res); err != nil {
5654		return nil, err
5655	}
5656	return ret, nil
5657	// {
5658	//   "description": "Use this method to list routes created for a private connectivity in a project and location.",
5659	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}/routes",
5660	//   "httpMethod": "GET",
5661	//   "id": "datastream.projects.locations.privateConnections.routes.list",
5662	//   "parameterOrder": [
5663	//     "parent"
5664	//   ],
5665	//   "parameters": {
5666	//     "filter": {
5667	//       "description": "Filter request.",
5668	//       "location": "query",
5669	//       "type": "string"
5670	//     },
5671	//     "orderBy": {
5672	//       "description": "Order by fields for the result.",
5673	//       "location": "query",
5674	//       "type": "string"
5675	//     },
5676	//     "pageSize": {
5677	//       "description": "Maximum number of Routes to return. The service may return fewer than this value. If unspecified, at most 50 Routes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
5678	//       "format": "int32",
5679	//       "location": "query",
5680	//       "type": "integer"
5681	//     },
5682	//     "pageToken": {
5683	//       "description": "Page token received from a previous `ListRoutes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRoutes` must match the call that provided the page token.",
5684	//       "location": "query",
5685	//       "type": "string"
5686	//     },
5687	//     "parent": {
5688	//       "description": "Required. The parent that owns the collection of Routess.",
5689	//       "location": "path",
5690	//       "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$",
5691	//       "required": true,
5692	//       "type": "string"
5693	//     }
5694	//   },
5695	//   "path": "v1alpha1/{+parent}/routes",
5696	//   "response": {
5697	//     "$ref": "ListRoutesResponse"
5698	//   },
5699	//   "scopes": [
5700	//     "https://www.googleapis.com/auth/cloud-platform"
5701	//   ]
5702	// }
5703
5704}
5705
5706// Pages invokes f for each page of results.
5707// A non-nil error returned from f will halt the iteration.
5708// The provided context supersedes any context provided to the Context method.
5709func (c *ProjectsLocationsPrivateConnectionsRoutesListCall) Pages(ctx context.Context, f func(*ListRoutesResponse) error) error {
5710	c.ctx_ = ctx
5711	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5712	for {
5713		x, err := c.Do()
5714		if err != nil {
5715			return err
5716		}
5717		if err := f(x); err != nil {
5718			return err
5719		}
5720		if x.NextPageToken == "" {
5721			return nil
5722		}
5723		c.PageToken(x.NextPageToken)
5724	}
5725}
5726
5727// method id "datastream.projects.locations.streams.create":
5728
5729type ProjectsLocationsStreamsCreateCall struct {
5730	s          *Service
5731	parent     string
5732	stream     *Stream
5733	urlParams_ gensupport.URLParams
5734	ctx_       context.Context
5735	header_    http.Header
5736}
5737
5738// Create: Use this method to create a stream.
5739//
5740// - parent: The parent that owns the collection of streams.
5741func (r *ProjectsLocationsStreamsService) Create(parent string, stream *Stream) *ProjectsLocationsStreamsCreateCall {
5742	c := &ProjectsLocationsStreamsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5743	c.parent = parent
5744	c.stream = stream
5745	return c
5746}
5747
5748// Force sets the optional parameter "force": Create the stream without
5749// validating it.
5750func (c *ProjectsLocationsStreamsCreateCall) Force(force bool) *ProjectsLocationsStreamsCreateCall {
5751	c.urlParams_.Set("force", fmt.Sprint(force))
5752	return c
5753}
5754
5755// RequestId sets the optional parameter "requestId": A request ID to
5756// identify requests. Specify a unique request ID so that if you must
5757// retry your request, the server will know to ignore the request if it
5758// has already been completed. The server will guarantee that for at
5759// least 60 minutes since the first request. For example, consider a
5760// situation where you make an initial request and the request times
5761// out. If you make the request again with the same request ID, the
5762// server can check if original operation with the same request ID was
5763// received, and if so, will ignore the second request. This prevents
5764// clients from accidentally creating duplicate commitments. The request
5765// ID must be a valid UUID with the exception that zero UUID is not
5766// supported (00000000-0000-0000-0000-000000000000).
5767func (c *ProjectsLocationsStreamsCreateCall) RequestId(requestId string) *ProjectsLocationsStreamsCreateCall {
5768	c.urlParams_.Set("requestId", requestId)
5769	return c
5770}
5771
5772// StreamId sets the optional parameter "streamId": Required. The stream
5773// identifier.
5774func (c *ProjectsLocationsStreamsCreateCall) StreamId(streamId string) *ProjectsLocationsStreamsCreateCall {
5775	c.urlParams_.Set("streamId", streamId)
5776	return c
5777}
5778
5779// ValidateOnly sets the optional parameter "validateOnly": Only
5780// validate the stream, but do not create any resources. The default is
5781// false.
5782func (c *ProjectsLocationsStreamsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsStreamsCreateCall {
5783	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
5784	return c
5785}
5786
5787// Fields allows partial responses to be retrieved. See
5788// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5789// for more information.
5790func (c *ProjectsLocationsStreamsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStreamsCreateCall {
5791	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5792	return c
5793}
5794
5795// Context sets the context to be used in this call's Do method. Any
5796// pending HTTP request will be aborted if the provided context is
5797// canceled.
5798func (c *ProjectsLocationsStreamsCreateCall) Context(ctx context.Context) *ProjectsLocationsStreamsCreateCall {
5799	c.ctx_ = ctx
5800	return c
5801}
5802
5803// Header returns an http.Header that can be modified by the caller to
5804// add HTTP headers to the request.
5805func (c *ProjectsLocationsStreamsCreateCall) Header() http.Header {
5806	if c.header_ == nil {
5807		c.header_ = make(http.Header)
5808	}
5809	return c.header_
5810}
5811
5812func (c *ProjectsLocationsStreamsCreateCall) doRequest(alt string) (*http.Response, error) {
5813	reqHeaders := make(http.Header)
5814	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5815	for k, v := range c.header_ {
5816		reqHeaders[k] = v
5817	}
5818	reqHeaders.Set("User-Agent", c.s.userAgent())
5819	var body io.Reader = nil
5820	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stream)
5821	if err != nil {
5822		return nil, err
5823	}
5824	reqHeaders.Set("Content-Type", "application/json")
5825	c.urlParams_.Set("alt", alt)
5826	c.urlParams_.Set("prettyPrint", "false")
5827	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/streams")
5828	urls += "?" + c.urlParams_.Encode()
5829	req, err := http.NewRequest("POST", urls, body)
5830	if err != nil {
5831		return nil, err
5832	}
5833	req.Header = reqHeaders
5834	googleapi.Expand(req.URL, map[string]string{
5835		"parent": c.parent,
5836	})
5837	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5838}
5839
5840// Do executes the "datastream.projects.locations.streams.create" call.
5841// Exactly one of *Operation or error will be non-nil. Any non-2xx
5842// status code is an error. Response headers are in either
5843// *Operation.ServerResponse.Header or (if a response was returned at
5844// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5845// to check whether the returned error was because
5846// http.StatusNotModified was returned.
5847func (c *ProjectsLocationsStreamsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5848	gensupport.SetOptions(c.urlParams_, opts...)
5849	res, err := c.doRequest("json")
5850	if res != nil && res.StatusCode == http.StatusNotModified {
5851		if res.Body != nil {
5852			res.Body.Close()
5853		}
5854		return nil, &googleapi.Error{
5855			Code:   res.StatusCode,
5856			Header: res.Header,
5857		}
5858	}
5859	if err != nil {
5860		return nil, err
5861	}
5862	defer googleapi.CloseBody(res)
5863	if err := googleapi.CheckResponse(res); err != nil {
5864		return nil, err
5865	}
5866	ret := &Operation{
5867		ServerResponse: googleapi.ServerResponse{
5868			Header:         res.Header,
5869			HTTPStatusCode: res.StatusCode,
5870		},
5871	}
5872	target := &ret
5873	if err := gensupport.DecodeResponse(target, res); err != nil {
5874		return nil, err
5875	}
5876	return ret, nil
5877	// {
5878	//   "description": "Use this method to create a stream.",
5879	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/streams",
5880	//   "httpMethod": "POST",
5881	//   "id": "datastream.projects.locations.streams.create",
5882	//   "parameterOrder": [
5883	//     "parent"
5884	//   ],
5885	//   "parameters": {
5886	//     "force": {
5887	//       "description": "Optional. Create the stream without validating it.",
5888	//       "location": "query",
5889	//       "type": "boolean"
5890	//     },
5891	//     "parent": {
5892	//       "description": "Required. The parent that owns the collection of streams.",
5893	//       "location": "path",
5894	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
5895	//       "required": true,
5896	//       "type": "string"
5897	//     },
5898	//     "requestId": {
5899	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
5900	//       "location": "query",
5901	//       "type": "string"
5902	//     },
5903	//     "streamId": {
5904	//       "description": "Required. The stream identifier.",
5905	//       "location": "query",
5906	//       "type": "string"
5907	//     },
5908	//     "validateOnly": {
5909	//       "description": "Optional. Only validate the stream, but do not create any resources. The default is false.",
5910	//       "location": "query",
5911	//       "type": "boolean"
5912	//     }
5913	//   },
5914	//   "path": "v1alpha1/{+parent}/streams",
5915	//   "request": {
5916	//     "$ref": "Stream"
5917	//   },
5918	//   "response": {
5919	//     "$ref": "Operation"
5920	//   },
5921	//   "scopes": [
5922	//     "https://www.googleapis.com/auth/cloud-platform"
5923	//   ]
5924	// }
5925
5926}
5927
5928// method id "datastream.projects.locations.streams.delete":
5929
5930type ProjectsLocationsStreamsDeleteCall struct {
5931	s          *Service
5932	name       string
5933	urlParams_ gensupport.URLParams
5934	ctx_       context.Context
5935	header_    http.Header
5936}
5937
5938// Delete: Use this method to delete a stream.
5939//
5940// - name: The name of the stream resource to delete.
5941func (r *ProjectsLocationsStreamsService) Delete(name string) *ProjectsLocationsStreamsDeleteCall {
5942	c := &ProjectsLocationsStreamsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5943	c.name = name
5944	return c
5945}
5946
5947// RequestId sets the optional parameter "requestId": A request ID to
5948// identify requests. Specify a unique request ID so that if you must
5949// retry your request, the server will know to ignore the request if it
5950// has already been completed. The server will guarantee that for at
5951// least 60 minutes after the first request. For example, consider a
5952// situation where you make an initial request and the request times
5953// out. If you make the request again with the same request ID, the
5954// server can check if original operation with the same request ID was
5955// received, and if so, will ignore the second request. This prevents
5956// clients from accidentally creating duplicate commitments. The request
5957// ID must be a valid UUID with the exception that zero UUID is not
5958// supported (00000000-0000-0000-0000-000000000000).
5959func (c *ProjectsLocationsStreamsDeleteCall) RequestId(requestId string) *ProjectsLocationsStreamsDeleteCall {
5960	c.urlParams_.Set("requestId", requestId)
5961	return c
5962}
5963
5964// Fields allows partial responses to be retrieved. See
5965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5966// for more information.
5967func (c *ProjectsLocationsStreamsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStreamsDeleteCall {
5968	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5969	return c
5970}
5971
5972// Context sets the context to be used in this call's Do method. Any
5973// pending HTTP request will be aborted if the provided context is
5974// canceled.
5975func (c *ProjectsLocationsStreamsDeleteCall) Context(ctx context.Context) *ProjectsLocationsStreamsDeleteCall {
5976	c.ctx_ = ctx
5977	return c
5978}
5979
5980// Header returns an http.Header that can be modified by the caller to
5981// add HTTP headers to the request.
5982func (c *ProjectsLocationsStreamsDeleteCall) Header() http.Header {
5983	if c.header_ == nil {
5984		c.header_ = make(http.Header)
5985	}
5986	return c.header_
5987}
5988
5989func (c *ProjectsLocationsStreamsDeleteCall) doRequest(alt string) (*http.Response, error) {
5990	reqHeaders := make(http.Header)
5991	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5992	for k, v := range c.header_ {
5993		reqHeaders[k] = v
5994	}
5995	reqHeaders.Set("User-Agent", c.s.userAgent())
5996	var body io.Reader = nil
5997	c.urlParams_.Set("alt", alt)
5998	c.urlParams_.Set("prettyPrint", "false")
5999	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
6000	urls += "?" + c.urlParams_.Encode()
6001	req, err := http.NewRequest("DELETE", urls, body)
6002	if err != nil {
6003		return nil, err
6004	}
6005	req.Header = reqHeaders
6006	googleapi.Expand(req.URL, map[string]string{
6007		"name": c.name,
6008	})
6009	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6010}
6011
6012// Do executes the "datastream.projects.locations.streams.delete" call.
6013// Exactly one of *Operation or error will be non-nil. Any non-2xx
6014// status code is an error. Response headers are in either
6015// *Operation.ServerResponse.Header or (if a response was returned at
6016// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6017// to check whether the returned error was because
6018// http.StatusNotModified was returned.
6019func (c *ProjectsLocationsStreamsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6020	gensupport.SetOptions(c.urlParams_, opts...)
6021	res, err := c.doRequest("json")
6022	if res != nil && res.StatusCode == http.StatusNotModified {
6023		if res.Body != nil {
6024			res.Body.Close()
6025		}
6026		return nil, &googleapi.Error{
6027			Code:   res.StatusCode,
6028			Header: res.Header,
6029		}
6030	}
6031	if err != nil {
6032		return nil, err
6033	}
6034	defer googleapi.CloseBody(res)
6035	if err := googleapi.CheckResponse(res); err != nil {
6036		return nil, err
6037	}
6038	ret := &Operation{
6039		ServerResponse: googleapi.ServerResponse{
6040			Header:         res.Header,
6041			HTTPStatusCode: res.StatusCode,
6042		},
6043	}
6044	target := &ret
6045	if err := gensupport.DecodeResponse(target, res); err != nil {
6046		return nil, err
6047	}
6048	return ret, nil
6049	// {
6050	//   "description": "Use this method to delete a stream.",
6051	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/streams/{streamsId}",
6052	//   "httpMethod": "DELETE",
6053	//   "id": "datastream.projects.locations.streams.delete",
6054	//   "parameterOrder": [
6055	//     "name"
6056	//   ],
6057	//   "parameters": {
6058	//     "name": {
6059	//       "description": "Required. The name of the stream resource to delete.",
6060	//       "location": "path",
6061	//       "pattern": "^projects/[^/]+/locations/[^/]+/streams/[^/]+$",
6062	//       "required": true,
6063	//       "type": "string"
6064	//     },
6065	//     "requestId": {
6066	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
6067	//       "location": "query",
6068	//       "type": "string"
6069	//     }
6070	//   },
6071	//   "path": "v1alpha1/{+name}",
6072	//   "response": {
6073	//     "$ref": "Operation"
6074	//   },
6075	//   "scopes": [
6076	//     "https://www.googleapis.com/auth/cloud-platform"
6077	//   ]
6078	// }
6079
6080}
6081
6082// method id "datastream.projects.locations.streams.fetchErrors":
6083
6084type ProjectsLocationsStreamsFetchErrorsCall struct {
6085	s                  *Service
6086	stream             string
6087	fetcherrorsrequest *FetchErrorsRequest
6088	urlParams_         gensupport.URLParams
6089	ctx_               context.Context
6090	header_            http.Header
6091}
6092
6093// FetchErrors: Use this method to fetch any errors associated with a
6094// stream.
6095//
6096// - stream: Name of the Stream resource for which to fetch any errors.
6097func (r *ProjectsLocationsStreamsService) FetchErrors(stream string, fetcherrorsrequest *FetchErrorsRequest) *ProjectsLocationsStreamsFetchErrorsCall {
6098	c := &ProjectsLocationsStreamsFetchErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6099	c.stream = stream
6100	c.fetcherrorsrequest = fetcherrorsrequest
6101	return c
6102}
6103
6104// Fields allows partial responses to be retrieved. See
6105// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6106// for more information.
6107func (c *ProjectsLocationsStreamsFetchErrorsCall) Fields(s ...googleapi.Field) *ProjectsLocationsStreamsFetchErrorsCall {
6108	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6109	return c
6110}
6111
6112// Context sets the context to be used in this call's Do method. Any
6113// pending HTTP request will be aborted if the provided context is
6114// canceled.
6115func (c *ProjectsLocationsStreamsFetchErrorsCall) Context(ctx context.Context) *ProjectsLocationsStreamsFetchErrorsCall {
6116	c.ctx_ = ctx
6117	return c
6118}
6119
6120// Header returns an http.Header that can be modified by the caller to
6121// add HTTP headers to the request.
6122func (c *ProjectsLocationsStreamsFetchErrorsCall) Header() http.Header {
6123	if c.header_ == nil {
6124		c.header_ = make(http.Header)
6125	}
6126	return c.header_
6127}
6128
6129func (c *ProjectsLocationsStreamsFetchErrorsCall) doRequest(alt string) (*http.Response, error) {
6130	reqHeaders := make(http.Header)
6131	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6132	for k, v := range c.header_ {
6133		reqHeaders[k] = v
6134	}
6135	reqHeaders.Set("User-Agent", c.s.userAgent())
6136	var body io.Reader = nil
6137	body, err := googleapi.WithoutDataWrapper.JSONReader(c.fetcherrorsrequest)
6138	if err != nil {
6139		return nil, err
6140	}
6141	reqHeaders.Set("Content-Type", "application/json")
6142	c.urlParams_.Set("alt", alt)
6143	c.urlParams_.Set("prettyPrint", "false")
6144	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+stream}:fetchErrors")
6145	urls += "?" + c.urlParams_.Encode()
6146	req, err := http.NewRequest("POST", urls, body)
6147	if err != nil {
6148		return nil, err
6149	}
6150	req.Header = reqHeaders
6151	googleapi.Expand(req.URL, map[string]string{
6152		"stream": c.stream,
6153	})
6154	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6155}
6156
6157// Do executes the "datastream.projects.locations.streams.fetchErrors" call.
6158// Exactly one of *Operation or error will be non-nil. Any non-2xx
6159// status code is an error. Response headers are in either
6160// *Operation.ServerResponse.Header or (if a response was returned at
6161// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6162// to check whether the returned error was because
6163// http.StatusNotModified was returned.
6164func (c *ProjectsLocationsStreamsFetchErrorsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6165	gensupport.SetOptions(c.urlParams_, opts...)
6166	res, err := c.doRequest("json")
6167	if res != nil && res.StatusCode == http.StatusNotModified {
6168		if res.Body != nil {
6169			res.Body.Close()
6170		}
6171		return nil, &googleapi.Error{
6172			Code:   res.StatusCode,
6173			Header: res.Header,
6174		}
6175	}
6176	if err != nil {
6177		return nil, err
6178	}
6179	defer googleapi.CloseBody(res)
6180	if err := googleapi.CheckResponse(res); err != nil {
6181		return nil, err
6182	}
6183	ret := &Operation{
6184		ServerResponse: googleapi.ServerResponse{
6185			Header:         res.Header,
6186			HTTPStatusCode: res.StatusCode,
6187		},
6188	}
6189	target := &ret
6190	if err := gensupport.DecodeResponse(target, res); err != nil {
6191		return nil, err
6192	}
6193	return ret, nil
6194	// {
6195	//   "description": "Use this method to fetch any errors associated with a stream.",
6196	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/streams/{streamsId}:fetchErrors",
6197	//   "httpMethod": "POST",
6198	//   "id": "datastream.projects.locations.streams.fetchErrors",
6199	//   "parameterOrder": [
6200	//     "stream"
6201	//   ],
6202	//   "parameters": {
6203	//     "stream": {
6204	//       "description": "Name of the Stream resource for which to fetch any errors.",
6205	//       "location": "path",
6206	//       "pattern": "^projects/[^/]+/locations/[^/]+/streams/[^/]+$",
6207	//       "required": true,
6208	//       "type": "string"
6209	//     }
6210	//   },
6211	//   "path": "v1alpha1/{+stream}:fetchErrors",
6212	//   "request": {
6213	//     "$ref": "FetchErrorsRequest"
6214	//   },
6215	//   "response": {
6216	//     "$ref": "Operation"
6217	//   },
6218	//   "scopes": [
6219	//     "https://www.googleapis.com/auth/cloud-platform"
6220	//   ]
6221	// }
6222
6223}
6224
6225// method id "datastream.projects.locations.streams.get":
6226
6227type ProjectsLocationsStreamsGetCall struct {
6228	s            *Service
6229	name         string
6230	urlParams_   gensupport.URLParams
6231	ifNoneMatch_ string
6232	ctx_         context.Context
6233	header_      http.Header
6234}
6235
6236// Get: Use this method to get details about a stream.
6237//
6238// - name: The name of the stream resource to get.
6239func (r *ProjectsLocationsStreamsService) Get(name string) *ProjectsLocationsStreamsGetCall {
6240	c := &ProjectsLocationsStreamsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6241	c.name = name
6242	return c
6243}
6244
6245// Fields allows partial responses to be retrieved. See
6246// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6247// for more information.
6248func (c *ProjectsLocationsStreamsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStreamsGetCall {
6249	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6250	return c
6251}
6252
6253// IfNoneMatch sets the optional parameter which makes the operation
6254// fail if the object's ETag matches the given value. This is useful for
6255// getting updates only after the object has changed since the last
6256// request. Use googleapi.IsNotModified to check whether the response
6257// error from Do is the result of In-None-Match.
6258func (c *ProjectsLocationsStreamsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStreamsGetCall {
6259	c.ifNoneMatch_ = entityTag
6260	return c
6261}
6262
6263// Context sets the context to be used in this call's Do method. Any
6264// pending HTTP request will be aborted if the provided context is
6265// canceled.
6266func (c *ProjectsLocationsStreamsGetCall) Context(ctx context.Context) *ProjectsLocationsStreamsGetCall {
6267	c.ctx_ = ctx
6268	return c
6269}
6270
6271// Header returns an http.Header that can be modified by the caller to
6272// add HTTP headers to the request.
6273func (c *ProjectsLocationsStreamsGetCall) Header() http.Header {
6274	if c.header_ == nil {
6275		c.header_ = make(http.Header)
6276	}
6277	return c.header_
6278}
6279
6280func (c *ProjectsLocationsStreamsGetCall) doRequest(alt string) (*http.Response, error) {
6281	reqHeaders := make(http.Header)
6282	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6283	for k, v := range c.header_ {
6284		reqHeaders[k] = v
6285	}
6286	reqHeaders.Set("User-Agent", c.s.userAgent())
6287	if c.ifNoneMatch_ != "" {
6288		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6289	}
6290	var body io.Reader = nil
6291	c.urlParams_.Set("alt", alt)
6292	c.urlParams_.Set("prettyPrint", "false")
6293	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
6294	urls += "?" + c.urlParams_.Encode()
6295	req, err := http.NewRequest("GET", urls, body)
6296	if err != nil {
6297		return nil, err
6298	}
6299	req.Header = reqHeaders
6300	googleapi.Expand(req.URL, map[string]string{
6301		"name": c.name,
6302	})
6303	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6304}
6305
6306// Do executes the "datastream.projects.locations.streams.get" call.
6307// Exactly one of *Stream or error will be non-nil. Any non-2xx status
6308// code is an error. Response headers are in either
6309// *Stream.ServerResponse.Header or (if a response was returned at all)
6310// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6311// check whether the returned error was because http.StatusNotModified
6312// was returned.
6313func (c *ProjectsLocationsStreamsGetCall) Do(opts ...googleapi.CallOption) (*Stream, error) {
6314	gensupport.SetOptions(c.urlParams_, opts...)
6315	res, err := c.doRequest("json")
6316	if res != nil && res.StatusCode == http.StatusNotModified {
6317		if res.Body != nil {
6318			res.Body.Close()
6319		}
6320		return nil, &googleapi.Error{
6321			Code:   res.StatusCode,
6322			Header: res.Header,
6323		}
6324	}
6325	if err != nil {
6326		return nil, err
6327	}
6328	defer googleapi.CloseBody(res)
6329	if err := googleapi.CheckResponse(res); err != nil {
6330		return nil, err
6331	}
6332	ret := &Stream{
6333		ServerResponse: googleapi.ServerResponse{
6334			Header:         res.Header,
6335			HTTPStatusCode: res.StatusCode,
6336		},
6337	}
6338	target := &ret
6339	if err := gensupport.DecodeResponse(target, res); err != nil {
6340		return nil, err
6341	}
6342	return ret, nil
6343	// {
6344	//   "description": "Use this method to get details about a stream.",
6345	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/streams/{streamsId}",
6346	//   "httpMethod": "GET",
6347	//   "id": "datastream.projects.locations.streams.get",
6348	//   "parameterOrder": [
6349	//     "name"
6350	//   ],
6351	//   "parameters": {
6352	//     "name": {
6353	//       "description": "Required. The name of the stream resource to get.",
6354	//       "location": "path",
6355	//       "pattern": "^projects/[^/]+/locations/[^/]+/streams/[^/]+$",
6356	//       "required": true,
6357	//       "type": "string"
6358	//     }
6359	//   },
6360	//   "path": "v1alpha1/{+name}",
6361	//   "response": {
6362	//     "$ref": "Stream"
6363	//   },
6364	//   "scopes": [
6365	//     "https://www.googleapis.com/auth/cloud-platform"
6366	//   ]
6367	// }
6368
6369}
6370
6371// method id "datastream.projects.locations.streams.list":
6372
6373type ProjectsLocationsStreamsListCall struct {
6374	s            *Service
6375	parent       string
6376	urlParams_   gensupport.URLParams
6377	ifNoneMatch_ string
6378	ctx_         context.Context
6379	header_      http.Header
6380}
6381
6382// List: Use this method to list streams in a project and location.
6383//
6384// - parent: The parent that owns the collection of streams.
6385func (r *ProjectsLocationsStreamsService) List(parent string) *ProjectsLocationsStreamsListCall {
6386	c := &ProjectsLocationsStreamsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6387	c.parent = parent
6388	return c
6389}
6390
6391// Filter sets the optional parameter "filter": Filter request.
6392func (c *ProjectsLocationsStreamsListCall) Filter(filter string) *ProjectsLocationsStreamsListCall {
6393	c.urlParams_.Set("filter", filter)
6394	return c
6395}
6396
6397// OrderBy sets the optional parameter "orderBy": Order by fields for
6398// the result.
6399func (c *ProjectsLocationsStreamsListCall) OrderBy(orderBy string) *ProjectsLocationsStreamsListCall {
6400	c.urlParams_.Set("orderBy", orderBy)
6401	return c
6402}
6403
6404// PageSize sets the optional parameter "pageSize": Maximum number of
6405// streams to return. If unspecified, at most 50 streams will be
6406// returned. The maximum value is 1000; values above 1000 will be
6407// coerced to 1000.
6408func (c *ProjectsLocationsStreamsListCall) PageSize(pageSize int64) *ProjectsLocationsStreamsListCall {
6409	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6410	return c
6411}
6412
6413// PageToken sets the optional parameter "pageToken": Page token
6414// received from a previous `ListStreams` call. Provide this to retrieve
6415// the subsequent page. When paginating, all other parameters provided
6416// to `ListStreams` must match the call that provided the page token.
6417func (c *ProjectsLocationsStreamsListCall) PageToken(pageToken string) *ProjectsLocationsStreamsListCall {
6418	c.urlParams_.Set("pageToken", pageToken)
6419	return c
6420}
6421
6422// Fields allows partial responses to be retrieved. See
6423// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6424// for more information.
6425func (c *ProjectsLocationsStreamsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStreamsListCall {
6426	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6427	return c
6428}
6429
6430// IfNoneMatch sets the optional parameter which makes the operation
6431// fail if the object's ETag matches the given value. This is useful for
6432// getting updates only after the object has changed since the last
6433// request. Use googleapi.IsNotModified to check whether the response
6434// error from Do is the result of In-None-Match.
6435func (c *ProjectsLocationsStreamsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStreamsListCall {
6436	c.ifNoneMatch_ = entityTag
6437	return c
6438}
6439
6440// Context sets the context to be used in this call's Do method. Any
6441// pending HTTP request will be aborted if the provided context is
6442// canceled.
6443func (c *ProjectsLocationsStreamsListCall) Context(ctx context.Context) *ProjectsLocationsStreamsListCall {
6444	c.ctx_ = ctx
6445	return c
6446}
6447
6448// Header returns an http.Header that can be modified by the caller to
6449// add HTTP headers to the request.
6450func (c *ProjectsLocationsStreamsListCall) Header() http.Header {
6451	if c.header_ == nil {
6452		c.header_ = make(http.Header)
6453	}
6454	return c.header_
6455}
6456
6457func (c *ProjectsLocationsStreamsListCall) doRequest(alt string) (*http.Response, error) {
6458	reqHeaders := make(http.Header)
6459	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6460	for k, v := range c.header_ {
6461		reqHeaders[k] = v
6462	}
6463	reqHeaders.Set("User-Agent", c.s.userAgent())
6464	if c.ifNoneMatch_ != "" {
6465		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6466	}
6467	var body io.Reader = nil
6468	c.urlParams_.Set("alt", alt)
6469	c.urlParams_.Set("prettyPrint", "false")
6470	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/streams")
6471	urls += "?" + c.urlParams_.Encode()
6472	req, err := http.NewRequest("GET", urls, body)
6473	if err != nil {
6474		return nil, err
6475	}
6476	req.Header = reqHeaders
6477	googleapi.Expand(req.URL, map[string]string{
6478		"parent": c.parent,
6479	})
6480	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6481}
6482
6483// Do executes the "datastream.projects.locations.streams.list" call.
6484// Exactly one of *ListStreamsResponse or error will be non-nil. Any
6485// non-2xx status code is an error. Response headers are in either
6486// *ListStreamsResponse.ServerResponse.Header or (if a response was
6487// returned at all) in error.(*googleapi.Error).Header. Use
6488// googleapi.IsNotModified to check whether the returned error was
6489// because http.StatusNotModified was returned.
6490func (c *ProjectsLocationsStreamsListCall) Do(opts ...googleapi.CallOption) (*ListStreamsResponse, error) {
6491	gensupport.SetOptions(c.urlParams_, opts...)
6492	res, err := c.doRequest("json")
6493	if res != nil && res.StatusCode == http.StatusNotModified {
6494		if res.Body != nil {
6495			res.Body.Close()
6496		}
6497		return nil, &googleapi.Error{
6498			Code:   res.StatusCode,
6499			Header: res.Header,
6500		}
6501	}
6502	if err != nil {
6503		return nil, err
6504	}
6505	defer googleapi.CloseBody(res)
6506	if err := googleapi.CheckResponse(res); err != nil {
6507		return nil, err
6508	}
6509	ret := &ListStreamsResponse{
6510		ServerResponse: googleapi.ServerResponse{
6511			Header:         res.Header,
6512			HTTPStatusCode: res.StatusCode,
6513		},
6514	}
6515	target := &ret
6516	if err := gensupport.DecodeResponse(target, res); err != nil {
6517		return nil, err
6518	}
6519	return ret, nil
6520	// {
6521	//   "description": "Use this method to list streams in a project and location.",
6522	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/streams",
6523	//   "httpMethod": "GET",
6524	//   "id": "datastream.projects.locations.streams.list",
6525	//   "parameterOrder": [
6526	//     "parent"
6527	//   ],
6528	//   "parameters": {
6529	//     "filter": {
6530	//       "description": "Filter request.",
6531	//       "location": "query",
6532	//       "type": "string"
6533	//     },
6534	//     "orderBy": {
6535	//       "description": "Order by fields for the result.",
6536	//       "location": "query",
6537	//       "type": "string"
6538	//     },
6539	//     "pageSize": {
6540	//       "description": "Maximum number of streams to return. If unspecified, at most 50 streams will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
6541	//       "format": "int32",
6542	//       "location": "query",
6543	//       "type": "integer"
6544	//     },
6545	//     "pageToken": {
6546	//       "description": "Page token received from a previous `ListStreams` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListStreams` must match the call that provided the page token.",
6547	//       "location": "query",
6548	//       "type": "string"
6549	//     },
6550	//     "parent": {
6551	//       "description": "Required. The parent that owns the collection of streams.",
6552	//       "location": "path",
6553	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
6554	//       "required": true,
6555	//       "type": "string"
6556	//     }
6557	//   },
6558	//   "path": "v1alpha1/{+parent}/streams",
6559	//   "response": {
6560	//     "$ref": "ListStreamsResponse"
6561	//   },
6562	//   "scopes": [
6563	//     "https://www.googleapis.com/auth/cloud-platform"
6564	//   ]
6565	// }
6566
6567}
6568
6569// Pages invokes f for each page of results.
6570// A non-nil error returned from f will halt the iteration.
6571// The provided context supersedes any context provided to the Context method.
6572func (c *ProjectsLocationsStreamsListCall) Pages(ctx context.Context, f func(*ListStreamsResponse) error) error {
6573	c.ctx_ = ctx
6574	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6575	for {
6576		x, err := c.Do()
6577		if err != nil {
6578			return err
6579		}
6580		if err := f(x); err != nil {
6581			return err
6582		}
6583		if x.NextPageToken == "" {
6584			return nil
6585		}
6586		c.PageToken(x.NextPageToken)
6587	}
6588}
6589
6590// method id "datastream.projects.locations.streams.patch":
6591
6592type ProjectsLocationsStreamsPatchCall struct {
6593	s          *Service
6594	name       string
6595	stream     *Stream
6596	urlParams_ gensupport.URLParams
6597	ctx_       context.Context
6598	header_    http.Header
6599}
6600
6601// Patch: Use this method to update the configuration of a stream.
6602//
6603// - name: Output only. The stream's name.
6604func (r *ProjectsLocationsStreamsService) Patch(name string, stream *Stream) *ProjectsLocationsStreamsPatchCall {
6605	c := &ProjectsLocationsStreamsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6606	c.name = name
6607	c.stream = stream
6608	return c
6609}
6610
6611// Force sets the optional parameter "force": Execute the update without
6612// validating it.
6613func (c *ProjectsLocationsStreamsPatchCall) Force(force bool) *ProjectsLocationsStreamsPatchCall {
6614	c.urlParams_.Set("force", fmt.Sprint(force))
6615	return c
6616}
6617
6618// RequestId sets the optional parameter "requestId": A request ID to
6619// identify requests. Specify a unique request ID so that if you must
6620// retry your request, the server will know to ignore the request if it
6621// has already been completed. The server will guarantee that for at
6622// least 60 minutes since the first request. For example, consider a
6623// situation where you make an initial request and the request times
6624// out. If you make the request again with the same request ID, the
6625// server can check if original operation with the same request ID was
6626// received, and if so, will ignore the second request. This prevents
6627// clients from accidentally creating duplicate commitments. The request
6628// ID must be a valid UUID with the exception that zero UUID is not
6629// supported (00000000-0000-0000-0000-000000000000).
6630func (c *ProjectsLocationsStreamsPatchCall) RequestId(requestId string) *ProjectsLocationsStreamsPatchCall {
6631	c.urlParams_.Set("requestId", requestId)
6632	return c
6633}
6634
6635// UpdateMask sets the optional parameter "updateMask": Field mask is
6636// used to specify the fields to be overwritten in the stream resource
6637// by the update. The fields specified in the update_mask are relative
6638// to the resource, not the full request. A field will be overwritten if
6639// it is in the mask. If the user does not provide a mask then all
6640// fields will be overwritten.
6641func (c *ProjectsLocationsStreamsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsStreamsPatchCall {
6642	c.urlParams_.Set("updateMask", updateMask)
6643	return c
6644}
6645
6646// ValidateOnly sets the optional parameter "validateOnly": Only
6647// validate the stream with the changes, without actually updating it.
6648// The default is false.
6649func (c *ProjectsLocationsStreamsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsStreamsPatchCall {
6650	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
6651	return c
6652}
6653
6654// Fields allows partial responses to be retrieved. See
6655// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6656// for more information.
6657func (c *ProjectsLocationsStreamsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsStreamsPatchCall {
6658	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6659	return c
6660}
6661
6662// Context sets the context to be used in this call's Do method. Any
6663// pending HTTP request will be aborted if the provided context is
6664// canceled.
6665func (c *ProjectsLocationsStreamsPatchCall) Context(ctx context.Context) *ProjectsLocationsStreamsPatchCall {
6666	c.ctx_ = ctx
6667	return c
6668}
6669
6670// Header returns an http.Header that can be modified by the caller to
6671// add HTTP headers to the request.
6672func (c *ProjectsLocationsStreamsPatchCall) Header() http.Header {
6673	if c.header_ == nil {
6674		c.header_ = make(http.Header)
6675	}
6676	return c.header_
6677}
6678
6679func (c *ProjectsLocationsStreamsPatchCall) doRequest(alt string) (*http.Response, error) {
6680	reqHeaders := make(http.Header)
6681	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6682	for k, v := range c.header_ {
6683		reqHeaders[k] = v
6684	}
6685	reqHeaders.Set("User-Agent", c.s.userAgent())
6686	var body io.Reader = nil
6687	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stream)
6688	if err != nil {
6689		return nil, err
6690	}
6691	reqHeaders.Set("Content-Type", "application/json")
6692	c.urlParams_.Set("alt", alt)
6693	c.urlParams_.Set("prettyPrint", "false")
6694	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
6695	urls += "?" + c.urlParams_.Encode()
6696	req, err := http.NewRequest("PATCH", urls, body)
6697	if err != nil {
6698		return nil, err
6699	}
6700	req.Header = reqHeaders
6701	googleapi.Expand(req.URL, map[string]string{
6702		"name": c.name,
6703	})
6704	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6705}
6706
6707// Do executes the "datastream.projects.locations.streams.patch" call.
6708// Exactly one of *Operation or error will be non-nil. Any non-2xx
6709// status code is an error. Response headers are in either
6710// *Operation.ServerResponse.Header or (if a response was returned at
6711// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6712// to check whether the returned error was because
6713// http.StatusNotModified was returned.
6714func (c *ProjectsLocationsStreamsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6715	gensupport.SetOptions(c.urlParams_, opts...)
6716	res, err := c.doRequest("json")
6717	if res != nil && res.StatusCode == http.StatusNotModified {
6718		if res.Body != nil {
6719			res.Body.Close()
6720		}
6721		return nil, &googleapi.Error{
6722			Code:   res.StatusCode,
6723			Header: res.Header,
6724		}
6725	}
6726	if err != nil {
6727		return nil, err
6728	}
6729	defer googleapi.CloseBody(res)
6730	if err := googleapi.CheckResponse(res); err != nil {
6731		return nil, err
6732	}
6733	ret := &Operation{
6734		ServerResponse: googleapi.ServerResponse{
6735			Header:         res.Header,
6736			HTTPStatusCode: res.StatusCode,
6737		},
6738	}
6739	target := &ret
6740	if err := gensupport.DecodeResponse(target, res); err != nil {
6741		return nil, err
6742	}
6743	return ret, nil
6744	// {
6745	//   "description": "Use this method to update the configuration of a stream.",
6746	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/streams/{streamsId}",
6747	//   "httpMethod": "PATCH",
6748	//   "id": "datastream.projects.locations.streams.patch",
6749	//   "parameterOrder": [
6750	//     "name"
6751	//   ],
6752	//   "parameters": {
6753	//     "force": {
6754	//       "description": "Optional. Execute the update without validating it.",
6755	//       "location": "query",
6756	//       "type": "boolean"
6757	//     },
6758	//     "name": {
6759	//       "description": "Output only. The stream's name.",
6760	//       "location": "path",
6761	//       "pattern": "^projects/[^/]+/locations/[^/]+/streams/[^/]+$",
6762	//       "required": true,
6763	//       "type": "string"
6764	//     },
6765	//     "requestId": {
6766	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
6767	//       "location": "query",
6768	//       "type": "string"
6769	//     },
6770	//     "updateMask": {
6771	//       "description": "Optional. Field mask is used to specify the fields to be overwritten in the stream resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.",
6772	//       "format": "google-fieldmask",
6773	//       "location": "query",
6774	//       "type": "string"
6775	//     },
6776	//     "validateOnly": {
6777	//       "description": "Optional. Only validate the stream with the changes, without actually updating it. The default is false.",
6778	//       "location": "query",
6779	//       "type": "boolean"
6780	//     }
6781	//   },
6782	//   "path": "v1alpha1/{+name}",
6783	//   "request": {
6784	//     "$ref": "Stream"
6785	//   },
6786	//   "response": {
6787	//     "$ref": "Operation"
6788	//   },
6789	//   "scopes": [
6790	//     "https://www.googleapis.com/auth/cloud-platform"
6791	//   ]
6792	// }
6793
6794}
6795