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 baremetalsolution provides access to the Bare Metal Solution API.
8//
9// For product documentation, see: https://cloud.google.com/bare-metal
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/baremetalsolution/v1alpha1"
16//   ...
17//   ctx := context.Background()
18//   baremetalsolutionService, err := baremetalsolution.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//   baremetalsolutionService, err := baremetalsolution.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//   baremetalsolutionService, err := baremetalsolution.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package baremetalsolution // import "google.golang.org/api/baremetalsolution/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 = "baremetalsolution:v1alpha1"
75const apiName = "baremetalsolution"
76const apiVersion = "v1alpha1"
77const basePath = "https://baremetalsolution.googleapis.com/"
78const mtlsBasePath = "https://baremetalsolution.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	rs.ProvisioningQuotas = NewProjectsProvisioningQuotasService(s)
143	rs.SnapshotSchedulePolicies = NewProjectsSnapshotSchedulePoliciesService(s)
144	rs.SshKeys = NewProjectsSshKeysService(s)
145	return rs
146}
147
148type ProjectsService struct {
149	s *Service
150
151	Locations *ProjectsLocationsService
152
153	ProvisioningQuotas *ProjectsProvisioningQuotasService
154
155	SnapshotSchedulePolicies *ProjectsSnapshotSchedulePoliciesService
156
157	SshKeys *ProjectsSshKeysService
158}
159
160func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
161	rs := &ProjectsLocationsService{s: s}
162	rs.Instances = NewProjectsLocationsInstancesService(s)
163	rs.Luns = NewProjectsLocationsLunsService(s)
164	rs.Volumes = NewProjectsLocationsVolumesService(s)
165	return rs
166}
167
168type ProjectsLocationsService struct {
169	s *Service
170
171	Instances *ProjectsLocationsInstancesService
172
173	Luns *ProjectsLocationsLunsService
174
175	Volumes *ProjectsLocationsVolumesService
176}
177
178func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
179	rs := &ProjectsLocationsInstancesService{s: s}
180	return rs
181}
182
183type ProjectsLocationsInstancesService struct {
184	s *Service
185}
186
187func NewProjectsLocationsLunsService(s *Service) *ProjectsLocationsLunsService {
188	rs := &ProjectsLocationsLunsService{s: s}
189	return rs
190}
191
192type ProjectsLocationsLunsService struct {
193	s *Service
194}
195
196func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesService {
197	rs := &ProjectsLocationsVolumesService{s: s}
198	rs.Snapshots = NewProjectsLocationsVolumesSnapshotsService(s)
199	return rs
200}
201
202type ProjectsLocationsVolumesService struct {
203	s *Service
204
205	Snapshots *ProjectsLocationsVolumesSnapshotsService
206}
207
208func NewProjectsLocationsVolumesSnapshotsService(s *Service) *ProjectsLocationsVolumesSnapshotsService {
209	rs := &ProjectsLocationsVolumesSnapshotsService{s: s}
210	return rs
211}
212
213type ProjectsLocationsVolumesSnapshotsService struct {
214	s *Service
215}
216
217func NewProjectsProvisioningQuotasService(s *Service) *ProjectsProvisioningQuotasService {
218	rs := &ProjectsProvisioningQuotasService{s: s}
219	return rs
220}
221
222type ProjectsProvisioningQuotasService struct {
223	s *Service
224}
225
226func NewProjectsSnapshotSchedulePoliciesService(s *Service) *ProjectsSnapshotSchedulePoliciesService {
227	rs := &ProjectsSnapshotSchedulePoliciesService{s: s}
228	return rs
229}
230
231type ProjectsSnapshotSchedulePoliciesService struct {
232	s *Service
233}
234
235func NewProjectsSshKeysService(s *Service) *ProjectsSshKeysService {
236	rs := &ProjectsSshKeysService{s: s}
237	return rs
238}
239
240type ProjectsSshKeysService struct {
241	s *Service
242}
243
244// DisableInteractiveSerialConsoleRequest: Request for
245// DisableInteractiveSerialConsole.
246type DisableInteractiveSerialConsoleRequest struct {
247}
248
249// DisableInteractiveSerialConsoleResponse: Response for
250// DisableInteractiveSerialConsole.
251type DisableInteractiveSerialConsoleResponse struct {
252	// ServerResponse contains the HTTP response code and headers from the
253	// server.
254	googleapi.ServerResponse `json:"-"`
255}
256
257// Empty: A generic empty message that you can re-use to avoid defining
258// duplicated empty messages in your APIs. A typical example is to use
259// it as the request or the response type of an API method. For
260// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
261// (google.protobuf.Empty); } The JSON representation for `Empty` is
262// empty JSON object `{}`.
263type Empty struct {
264	// ServerResponse contains the HTTP response code and headers from the
265	// server.
266	googleapi.ServerResponse `json:"-"`
267}
268
269// EnableInteractiveSerialConsoleRequest: Request for
270// EnableInteractiveSerialConsole.
271type EnableInteractiveSerialConsoleRequest struct {
272}
273
274// EnableInteractiveSerialConsoleResponse: Response for
275// EnableInteractiveSerialConsole.
276type EnableInteractiveSerialConsoleResponse struct {
277	// ServerResponse contains the HTTP response code and headers from the
278	// server.
279	googleapi.ServerResponse `json:"-"`
280}
281
282// Instance: An Instance.
283type Instance struct {
284	// HyperthreadingEnabled: Is hyperthreading enabled for this instance?
285	HyperthreadingEnabled bool `json:"hyperthreadingEnabled,omitempty"`
286
287	// Luns: The Luns attached to this instance
288	Luns []*Lun `json:"luns,omitempty"`
289
290	// Name: Output only. The name of this Instance.
291	Name string `json:"name,omitempty"`
292
293	// ScheduledPowerResetTime: The scheduled power reset time.
294	ScheduledPowerResetTime string `json:"scheduledPowerResetTime,omitempty"`
295
296	// SshEnabled: Is SSH enabled for this instance?
297	SshEnabled bool `json:"sshEnabled,omitempty"`
298
299	// State: The state of this Instance.
300	//
301	// Possible values:
302	//   "STATE_UNSPECIFIED" - The unspecified state.
303	//   "RESERVED" - The Instance has been reserved.
304	//   "PROVISIONING" - The Instance is being provisioned.
305	//   "PROVISIONED" - The Instance has been provisioned.
306	//   "DEPROVISIONING" - The Instance is being deprovisioned.
307	//   "DEPROVISIONED" - The Instance has been deprovisioned.
308	//   "UPDATING" - The Instance is being updated.
309	State string `json:"state,omitempty"`
310
311	// ServerResponse contains the HTTP response code and headers from the
312	// server.
313	googleapi.ServerResponse `json:"-"`
314
315	// ForceSendFields is a list of field names (e.g.
316	// "HyperthreadingEnabled") to unconditionally include in API requests.
317	// By default, fields with empty or default values are omitted from API
318	// requests. However, any non-pointer, non-interface field appearing in
319	// ForceSendFields will be sent to the server regardless of whether the
320	// field is empty or not. This may be used to include empty fields in
321	// Patch requests.
322	ForceSendFields []string `json:"-"`
323
324	// NullFields is a list of field names (e.g. "HyperthreadingEnabled") to
325	// include in API requests with the JSON null value. By default, fields
326	// with empty values are omitted from API requests. However, any field
327	// with an empty value appearing in NullFields will be sent to the
328	// server as null. It is an error if a field in this list has a
329	// non-empty value. This may be used to include null fields in Patch
330	// requests.
331	NullFields []string `json:"-"`
332}
333
334func (s *Instance) MarshalJSON() ([]byte, error) {
335	type NoMethod Instance
336	raw := NoMethod(*s)
337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
338}
339
340// InstanceConfig: Configuration parameters for a new instance.
341type InstanceConfig struct {
342	// ClientNetwork: Client network address.
343	ClientNetwork *NetworkAddress `json:"clientNetwork,omitempty"`
344
345	// Hyperthreading: Whether the instance should be provisioned with
346	// Hyperthreading enabled.
347	Hyperthreading bool `json:"hyperthreading,omitempty"`
348
349	// Id: A transient unique identifier to idenfity an instance within an
350	// ProvisioningConfig request.
351	Id string `json:"id,omitempty"`
352
353	// InstanceType: Instance type.
354	InstanceType string `json:"instanceType,omitempty"`
355
356	// Location: Location where to deploy the instance.
357	Location string `json:"location,omitempty"`
358
359	// OsImage: OS image to initialize the instance.
360	OsImage string `json:"osImage,omitempty"`
361
362	// PrivateNetwork: Private network address, if any.
363	PrivateNetwork *NetworkAddress `json:"privateNetwork,omitempty"`
364
365	// UserNote: User note field, it can be used by customers to add
366	// additional information for the BMS Ops team (b/194021617).
367	UserNote string `json:"userNote,omitempty"`
368
369	// ForceSendFields is a list of field names (e.g. "ClientNetwork") to
370	// unconditionally include in API requests. By default, fields with
371	// empty or default values are omitted from API requests. However, any
372	// non-pointer, non-interface field appearing in ForceSendFields will be
373	// sent to the server regardless of whether the field is empty or not.
374	// This may be used to include empty fields in Patch requests.
375	ForceSendFields []string `json:"-"`
376
377	// NullFields is a list of field names (e.g. "ClientNetwork") to include
378	// in API requests with the JSON null value. By default, fields with
379	// empty values are omitted from API requests. However, any field with
380	// an empty value appearing in NullFields will be sent to the server as
381	// null. It is an error if a field in this list has a non-empty value.
382	// This may be used to include null fields in Patch requests.
383	NullFields []string `json:"-"`
384}
385
386func (s *InstanceConfig) MarshalJSON() ([]byte, error) {
387	type NoMethod InstanceConfig
388	raw := NoMethod(*s)
389	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
390}
391
392// InstanceQuota: A resource budget.
393type InstanceQuota struct {
394	// AvailableMachineCount: Number of machines than can be created for the
395	// given location and instance_type.
396	AvailableMachineCount int64 `json:"availableMachineCount,omitempty"`
397
398	// InstanceType: Instance type.
399	InstanceType string `json:"instanceType,omitempty"`
400
401	// Location: Location where the quota applies.
402	Location string `json:"location,omitempty"`
403
404	// ForceSendFields is a list of field names (e.g.
405	// "AvailableMachineCount") to unconditionally include in API requests.
406	// By default, fields with empty or default values are omitted from API
407	// requests. However, any non-pointer, non-interface field appearing in
408	// ForceSendFields will be sent to the server regardless of whether the
409	// field is empty or not. This may be used to include empty fields in
410	// Patch requests.
411	ForceSendFields []string `json:"-"`
412
413	// NullFields is a list of field names (e.g. "AvailableMachineCount") to
414	// include in API requests with the JSON null value. By default, fields
415	// with empty values are omitted from API requests. However, any field
416	// with an empty value appearing in NullFields will be sent to the
417	// server as null. It is an error if a field in this list has a
418	// non-empty value. This may be used to include null fields in Patch
419	// requests.
420	NullFields []string `json:"-"`
421}
422
423func (s *InstanceQuota) MarshalJSON() ([]byte, error) {
424	type NoMethod InstanceQuota
425	raw := NoMethod(*s)
426	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
427}
428
429// ListInstancesResponse: Response for ListInstances.
430type ListInstancesResponse struct {
431	// Instances: The Instances in this project.
432	Instances []*Instance `json:"instances,omitempty"`
433
434	// NextPageToken: Token to retrieve the next page of results, or empty
435	// if there are no more results in the list.
436	NextPageToken string `json:"nextPageToken,omitempty"`
437
438	// ServerResponse contains the HTTP response code and headers from the
439	// server.
440	googleapi.ServerResponse `json:"-"`
441
442	// ForceSendFields is a list of field names (e.g. "Instances") to
443	// unconditionally include in API requests. By default, fields with
444	// empty or default values are omitted from API requests. However, any
445	// non-pointer, non-interface field appearing in ForceSendFields will be
446	// sent to the server regardless of whether the field is empty or not.
447	// This may be used to include empty fields in Patch requests.
448	ForceSendFields []string `json:"-"`
449
450	// NullFields is a list of field names (e.g. "Instances") to include in
451	// API requests with the JSON null value. By default, fields with empty
452	// values are omitted from API requests. However, any field with an
453	// empty value appearing in NullFields will be sent to the server as
454	// null. It is an error if a field in this list has a non-empty value.
455	// This may be used to include null fields in Patch requests.
456	NullFields []string `json:"-"`
457}
458
459func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
460	type NoMethod ListInstancesResponse
461	raw := NoMethod(*s)
462	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
463}
464
465// ListLunsResponse: Response for ListLuns.
466type ListLunsResponse struct {
467	// Luns: The Luns in this project.
468	Luns []*Lun `json:"luns,omitempty"`
469
470	// NextPageToken: Token to retrieve the next page of results, or empty
471	// if there are no more results in the list.
472	NextPageToken string `json:"nextPageToken,omitempty"`
473
474	// ServerResponse contains the HTTP response code and headers from the
475	// server.
476	googleapi.ServerResponse `json:"-"`
477
478	// ForceSendFields is a list of field names (e.g. "Luns") to
479	// unconditionally include in API requests. By default, fields with
480	// empty or default values are omitted from API requests. However, any
481	// non-pointer, non-interface field appearing in ForceSendFields will be
482	// sent to the server regardless of whether the field is empty or not.
483	// This may be used to include empty fields in Patch requests.
484	ForceSendFields []string `json:"-"`
485
486	// NullFields is a list of field names (e.g. "Luns") to include in API
487	// requests with the JSON null value. By default, fields with empty
488	// values are omitted from API requests. However, any field with an
489	// empty value appearing in NullFields will be sent to the server as
490	// null. It is an error if a field in this list has a non-empty value.
491	// This may be used to include null fields in Patch requests.
492	NullFields []string `json:"-"`
493}
494
495func (s *ListLunsResponse) MarshalJSON() ([]byte, error) {
496	type NoMethod ListLunsResponse
497	raw := NoMethod(*s)
498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
499}
500
501// ListProvisioningQuotasResponse: Response for ListProvisioningQuotas.
502type ListProvisioningQuotasResponse struct {
503	// NextPageToken: Token to retrieve the next page of results, or empty
504	// if there are no more results in the list.
505	NextPageToken string `json:"nextPageToken,omitempty"`
506
507	// ProvisioningQuotas: The provisioning quotas registered in this
508	// project.
509	ProvisioningQuotas []*ProvisioningQuota `json:"provisioningQuotas,omitempty"`
510
511	// ServerResponse contains the HTTP response code and headers from the
512	// server.
513	googleapi.ServerResponse `json:"-"`
514
515	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
516	// unconditionally include in API requests. By default, fields with
517	// empty or default values are omitted from API requests. However, any
518	// non-pointer, non-interface field appearing in ForceSendFields will be
519	// sent to the server regardless of whether the field is empty or not.
520	// This may be used to include empty fields in Patch requests.
521	ForceSendFields []string `json:"-"`
522
523	// NullFields is a list of field names (e.g. "NextPageToken") to include
524	// in API requests with the JSON null value. By default, fields with
525	// empty values are omitted from API requests. However, any field with
526	// an empty value appearing in NullFields will be sent to the server as
527	// null. It is an error if a field in this list has a non-empty value.
528	// This may be used to include null fields in Patch requests.
529	NullFields []string `json:"-"`
530}
531
532func (s *ListProvisioningQuotasResponse) MarshalJSON() ([]byte, error) {
533	type NoMethod ListProvisioningQuotasResponse
534	raw := NoMethod(*s)
535	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
536}
537
538// ListSSHKeysResponse: Response for ListSSHKeys.
539type ListSSHKeysResponse struct {
540	// NextPageToken: Token to retrieve the next page of results, or empty
541	// if there are no more results in the list.
542	NextPageToken string `json:"nextPageToken,omitempty"`
543
544	// SshKeys: The SSH keys registered in this project.
545	SshKeys []*SSHKey `json:"sshKeys,omitempty"`
546
547	// ServerResponse contains the HTTP response code and headers from the
548	// server.
549	googleapi.ServerResponse `json:"-"`
550
551	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
552	// unconditionally include in API requests. By default, fields with
553	// empty or default values are omitted from API requests. However, any
554	// non-pointer, non-interface field appearing in ForceSendFields will be
555	// sent to the server regardless of whether the field is empty or not.
556	// This may be used to include empty fields in Patch requests.
557	ForceSendFields []string `json:"-"`
558
559	// NullFields is a list of field names (e.g. "NextPageToken") to include
560	// in API requests with the JSON null value. By default, fields with
561	// empty values are omitted from API requests. However, any field with
562	// an empty value appearing in NullFields will be sent to the server as
563	// null. It is an error if a field in this list has a non-empty value.
564	// This may be used to include null fields in Patch requests.
565	NullFields []string `json:"-"`
566}
567
568func (s *ListSSHKeysResponse) MarshalJSON() ([]byte, error) {
569	type NoMethod ListSSHKeysResponse
570	raw := NoMethod(*s)
571	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
572}
573
574// ListSnapshotSchedulePoliciesResponse: Response for
575// ListSnapshotSchedulePolicies.
576type ListSnapshotSchedulePoliciesResponse struct {
577	// NextPageToken: Token to retrieve the next page of results, or empty
578	// if there are no more results in the list.
579	NextPageToken string `json:"nextPageToken,omitempty"`
580
581	// SnapshotSchedulePolicies: The snapshot schedule policies registered
582	// in this project.
583	SnapshotSchedulePolicies []*SnapshotSchedulePolicy `json:"snapshotSchedulePolicies,omitempty"`
584
585	// ServerResponse contains the HTTP response code and headers from the
586	// server.
587	googleapi.ServerResponse `json:"-"`
588
589	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
590	// unconditionally include in API requests. By default, fields with
591	// empty or default values are omitted from API requests. However, any
592	// non-pointer, non-interface field appearing in ForceSendFields will be
593	// sent to the server regardless of whether the field is empty or not.
594	// This may be used to include empty fields in Patch requests.
595	ForceSendFields []string `json:"-"`
596
597	// NullFields is a list of field names (e.g. "NextPageToken") to include
598	// in API requests with the JSON null value. By default, fields with
599	// empty values are omitted from API requests. However, any field with
600	// an empty value appearing in NullFields will be sent to the server as
601	// null. It is an error if a field in this list has a non-empty value.
602	// This may be used to include null fields in Patch requests.
603	NullFields []string `json:"-"`
604}
605
606func (s *ListSnapshotSchedulePoliciesResponse) MarshalJSON() ([]byte, error) {
607	type NoMethod ListSnapshotSchedulePoliciesResponse
608	raw := NoMethod(*s)
609	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
610}
611
612// ListVolumeSnapshotsResponse: Response for ListVolumeSnapshots.
613type ListVolumeSnapshotsResponse struct {
614	// NextPageToken: Token to retrieve the next page of results, or empty
615	// if there are no more results in the list.
616	NextPageToken string `json:"nextPageToken,omitempty"`
617
618	// VolumeSnapshots: The VolumeSnapshots for the volume.
619	VolumeSnapshots []*VolumeSnapshot `json:"volumeSnapshots,omitempty"`
620
621	// ServerResponse contains the HTTP response code and headers from the
622	// server.
623	googleapi.ServerResponse `json:"-"`
624
625	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
626	// unconditionally include in API requests. By default, fields with
627	// empty or default values are omitted from API requests. However, any
628	// non-pointer, non-interface field appearing in ForceSendFields will be
629	// sent to the server regardless of whether the field is empty or not.
630	// This may be used to include empty fields in Patch requests.
631	ForceSendFields []string `json:"-"`
632
633	// NullFields is a list of field names (e.g. "NextPageToken") to include
634	// in API requests with the JSON null value. By default, fields with
635	// empty values are omitted from API requests. However, any field with
636	// an empty value appearing in NullFields will be sent to the server as
637	// null. It is an error if a field in this list has a non-empty value.
638	// This may be used to include null fields in Patch requests.
639	NullFields []string `json:"-"`
640}
641
642func (s *ListVolumeSnapshotsResponse) MarshalJSON() ([]byte, error) {
643	type NoMethod ListVolumeSnapshotsResponse
644	raw := NoMethod(*s)
645	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
646}
647
648// ListVolumesResponse: Response for ListVolumes.
649type ListVolumesResponse struct {
650	// NextPageToken: Token to retrieve the next page of results, or empty
651	// if there are no more results in the list.
652	NextPageToken string `json:"nextPageToken,omitempty"`
653
654	// Volumes: The volumes registered in this project.
655	Volumes []*Volume `json:"volumes,omitempty"`
656
657	// ServerResponse contains the HTTP response code and headers from the
658	// server.
659	googleapi.ServerResponse `json:"-"`
660
661	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
662	// unconditionally include in API requests. By default, fields with
663	// empty or default values are omitted from API requests. However, any
664	// non-pointer, non-interface field appearing in ForceSendFields will be
665	// sent to the server regardless of whether the field is empty or not.
666	// This may be used to include empty fields in Patch requests.
667	ForceSendFields []string `json:"-"`
668
669	// NullFields is a list of field names (e.g. "NextPageToken") to include
670	// in API requests with the JSON null value. By default, fields with
671	// empty values are omitted from API requests. However, any field with
672	// an empty value appearing in NullFields will be sent to the server as
673	// null. It is an error if a field in this list has a non-empty value.
674	// This may be used to include null fields in Patch requests.
675	NullFields []string `json:"-"`
676}
677
678func (s *ListVolumesResponse) MarshalJSON() ([]byte, error) {
679	type NoMethod ListVolumesResponse
680	raw := NoMethod(*s)
681	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
682}
683
684// Lun: A storage Lun.
685type Lun struct {
686	// IsBoot: Whether this Lun is a boot Lun.
687	IsBoot bool `json:"isBoot,omitempty"`
688
689	// MultiprotocolType: The multiprotocol type of this Lun.
690	MultiprotocolType string `json:"multiprotocolType,omitempty"`
691
692	// Name: Output only. The name of this Lun.
693	Name string `json:"name,omitempty"`
694
695	// RemoteVolume: The storage volume that this Lun is attached to.
696	RemoteVolume *Volume `json:"remoteVolume,omitempty"`
697
698	// SerialNumber: The serial number of this Lun
699	SerialNumber string `json:"serialNumber,omitempty"`
700
701	// Shareable: Whether this Lun is allowed to be shared between multiple
702	// physical servers.
703	Shareable bool `json:"shareable,omitempty"`
704
705	// SizeGb: The size of this Lun, in gigabytes.
706	SizeGb int64 `json:"sizeGb,omitempty,string"`
707
708	// State: The state of this Lun.
709	//
710	// Possible values:
711	//   "STATE_UNSPECIFIED" - The unspecified state.
712	//   "RESERVED" - The Lun has been reserved.
713	//   "PROVISIONING" - The Lun is being provisioned.
714	//   "PROVISIONED" - The Lun has been provisioned.
715	//   "DEPROVISIONING" - The Lun is being deprovisioned.
716	//   "DEPROVISIONED" - The Lun has been deprovisioned.
717	//   "UPDATING" - The Lun is being updated.
718	State string `json:"state,omitempty"`
719
720	// Wwid: World Wide IDentifier of this Lun
721	Wwid string `json:"wwid,omitempty"`
722
723	// ServerResponse contains the HTTP response code and headers from the
724	// server.
725	googleapi.ServerResponse `json:"-"`
726
727	// ForceSendFields is a list of field names (e.g. "IsBoot") to
728	// unconditionally include in API requests. By default, fields with
729	// empty or default values are omitted from API requests. However, any
730	// non-pointer, non-interface field appearing in ForceSendFields will be
731	// sent to the server regardless of whether the field is empty or not.
732	// This may be used to include empty fields in Patch requests.
733	ForceSendFields []string `json:"-"`
734
735	// NullFields is a list of field names (e.g. "IsBoot") to include in API
736	// requests with the JSON null value. By default, fields with empty
737	// values are omitted from API requests. However, any field with an
738	// empty value appearing in NullFields will be sent to the server as
739	// null. It is an error if a field in this list has a non-empty value.
740	// This may be used to include null fields in Patch requests.
741	NullFields []string `json:"-"`
742}
743
744func (s *Lun) MarshalJSON() ([]byte, error) {
745	type NoMethod Lun
746	raw := NoMethod(*s)
747	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
748}
749
750// LunRange: A LUN range.
751type LunRange struct {
752	// Quantity: Number of LUNs to create.
753	Quantity int64 `json:"quantity,omitempty"`
754
755	// SizeGb: The requested size of each LUN, in GB.
756	SizeGb int64 `json:"sizeGb,omitempty"`
757
758	// ForceSendFields is a list of field names (e.g. "Quantity") to
759	// unconditionally include in API requests. By default, fields with
760	// empty or default values are omitted from API requests. However, any
761	// non-pointer, non-interface field appearing in ForceSendFields will be
762	// sent to the server regardless of whether the field is empty or not.
763	// This may be used to include empty fields in Patch requests.
764	ForceSendFields []string `json:"-"`
765
766	// NullFields is a list of field names (e.g. "Quantity") to include in
767	// API requests with the JSON null value. By default, fields with empty
768	// values are omitted from API requests. However, any field with an
769	// empty value appearing in NullFields will be sent to the server as
770	// null. It is an error if a field in this list has a non-empty value.
771	// This may be used to include null fields in Patch requests.
772	NullFields []string `json:"-"`
773}
774
775func (s *LunRange) MarshalJSON() ([]byte, error) {
776	type NoMethod LunRange
777	raw := NoMethod(*s)
778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
779}
780
781// NetworkAddress: A network.
782type NetworkAddress struct {
783	// Address: IP address to be assigned to the server.
784	Address string `json:"address,omitempty"`
785
786	// NetworkId: Id of the network to use, within the same
787	// ProvisioningConfig request.
788	NetworkId string `json:"networkId,omitempty"`
789
790	// ForceSendFields is a list of field names (e.g. "Address") to
791	// unconditionally include in API requests. By default, fields with
792	// empty or default values are omitted from API requests. However, any
793	// non-pointer, non-interface field appearing in ForceSendFields will be
794	// sent to the server regardless of whether the field is empty or not.
795	// This may be used to include empty fields in Patch requests.
796	ForceSendFields []string `json:"-"`
797
798	// NullFields is a list of field names (e.g. "Address") to include in
799	// API requests with the JSON null value. By default, fields with empty
800	// values are omitted from API requests. However, any field with an
801	// empty value appearing in NullFields will be sent to the server as
802	// null. It is an error if a field in this list has a non-empty value.
803	// This may be used to include null fields in Patch requests.
804	NullFields []string `json:"-"`
805}
806
807func (s *NetworkAddress) MarshalJSON() ([]byte, error) {
808	type NoMethod NetworkAddress
809	raw := NoMethod(*s)
810	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
811}
812
813// NetworkConfig: Configuration parameters for a new network.
814type NetworkConfig struct {
815	// Bandwidth: Interconnect bandwidth. Set only when type is CLIENT.
816	//
817	// Possible values:
818	//   "BANDWIDTH_UNSPECIFIED" - Unspecified value.
819	//   "BW_1_GBPS" - 1 Gbps.
820	//   "BW_2_GBPS" - 2 Gbps.
821	//   "BW_5_GBPS" - 5 Gbps.
822	//   "BW_10_GBPS" - 10 Gbps.
823	Bandwidth string `json:"bandwidth,omitempty"`
824
825	// Cidr: CIDR range of the network.
826	Cidr string `json:"cidr,omitempty"`
827
828	// Id: A transient unique identifier to identify a volume within an
829	// ProvisioningConfig request.
830	Id string `json:"id,omitempty"`
831
832	// Location: Location where to deploy the network.
833	Location string `json:"location,omitempty"`
834
835	// ServiceCidr: Service CIDR, if any.
836	//
837	// Possible values:
838	//   "SERVICE_CIDR_UNSPECIFIED" - Unspecified value.
839	//   "DISABLED" - Services are disabled for the given network.
840	//   "HIGH_26" - Use the highest /26 block of the network to host
841	// services.
842	//   "HIGH_27" - Use the highest /27 block of the network to host
843	// services.
844	//   "HIGH_28" - Use the highest /28 block of the network to host
845	// services.
846	ServiceCidr string `json:"serviceCidr,omitempty"`
847
848	// Type: The type of this network.
849	//
850	// Possible values:
851	//   "TYPE_UNSPECIFIED" - Unspecified value.
852	//   "CLIENT" - Client network, that is a network peered to a GCP VPC.
853	//   "PRIVATE" - Private network, that is a network local to the BMS
854	// POD.
855	Type string `json:"type,omitempty"`
856
857	// UserNote: User note field, it can be used by customers to add
858	// additional information for the BMS Ops team (b/194021617).
859	UserNote string `json:"userNote,omitempty"`
860
861	// VlanAttachments: List of VLAN attachments. As of now there are always
862	// 2 attachments, but it is going to change in the future (multi vlan).
863	VlanAttachments []*VlanAttachment `json:"vlanAttachments,omitempty"`
864
865	// ForceSendFields is a list of field names (e.g. "Bandwidth") to
866	// unconditionally include in API requests. By default, fields with
867	// empty or default values are omitted from API requests. However, any
868	// non-pointer, non-interface field appearing in ForceSendFields will be
869	// sent to the server regardless of whether the field is empty or not.
870	// This may be used to include empty fields in Patch requests.
871	ForceSendFields []string `json:"-"`
872
873	// NullFields is a list of field names (e.g. "Bandwidth") to include in
874	// API requests with the JSON null value. By default, fields with empty
875	// values are omitted from API requests. However, any field with an
876	// empty value appearing in NullFields will be sent to the server as
877	// null. It is an error if a field in this list has a non-empty value.
878	// This may be used to include null fields in Patch requests.
879	NullFields []string `json:"-"`
880}
881
882func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
883	type NoMethod NetworkConfig
884	raw := NoMethod(*s)
885	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
886}
887
888// NfsExport: A NFS export entry.
889type NfsExport struct {
890	// AllowDev: Allow dev.
891	AllowDev bool `json:"allowDev,omitempty"`
892
893	// AllowSuid: Allow the setuid flag.
894	AllowSuid bool `json:"allowSuid,omitempty"`
895
896	// Cidr: A CIDR range.
897	Cidr string `json:"cidr,omitempty"`
898
899	// MachineId: A single machine, identified by an ID.
900	MachineId string `json:"machineId,omitempty"`
901
902	// NetworkId: Network to use to publish the export.
903	NetworkId string `json:"networkId,omitempty"`
904
905	// NoRootSquash: Disable root squashing.
906	NoRootSquash bool `json:"noRootSquash,omitempty"`
907
908	// Permissions: Export permissions.
909	//
910	// Possible values:
911	//   "PERMISSIONS_UNSPECIFIED" - Unspecified value.
912	//   "READ_ONLY" - Read-only permission.
913	//   "READ_WRITE" - Read-write permission.
914	Permissions string `json:"permissions,omitempty"`
915
916	// ForceSendFields is a list of field names (e.g. "AllowDev") to
917	// unconditionally include in API requests. By default, fields with
918	// empty or default values are omitted from API requests. However, any
919	// non-pointer, non-interface field appearing in ForceSendFields will be
920	// sent to the server regardless of whether the field is empty or not.
921	// This may be used to include empty fields in Patch requests.
922	ForceSendFields []string `json:"-"`
923
924	// NullFields is a list of field names (e.g. "AllowDev") to include in
925	// API requests with the JSON null value. By default, fields with empty
926	// values are omitted from API requests. However, any field with an
927	// empty value appearing in NullFields will be sent to the server as
928	// null. It is an error if a field in this list has a non-empty value.
929	// This may be used to include null fields in Patch requests.
930	NullFields []string `json:"-"`
931}
932
933func (s *NfsExport) MarshalJSON() ([]byte, error) {
934	type NoMethod NfsExport
935	raw := NoMethod(*s)
936	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
937}
938
939// ProvisioningConfig: An provisioning configuration.
940type ProvisioningConfig struct {
941	// Instances: Instances to be created.
942	Instances []*InstanceConfig `json:"instances,omitempty"`
943
944	// Networks: Networks to be created.
945	Networks []*NetworkConfig `json:"networks,omitempty"`
946
947	// TicketId: A reference to track the request.
948	TicketId string `json:"ticketId,omitempty"`
949
950	// Volumes: Volumes to be created.
951	Volumes []*VolumeConfig `json:"volumes,omitempty"`
952
953	// ServerResponse contains the HTTP response code and headers from the
954	// server.
955	googleapi.ServerResponse `json:"-"`
956
957	// ForceSendFields is a list of field names (e.g. "Instances") to
958	// unconditionally include in API requests. By default, fields with
959	// empty or default values are omitted from API requests. However, any
960	// non-pointer, non-interface field appearing in ForceSendFields will be
961	// sent to the server regardless of whether the field is empty or not.
962	// This may be used to include empty fields in Patch requests.
963	ForceSendFields []string `json:"-"`
964
965	// NullFields is a list of field names (e.g. "Instances") to include in
966	// API requests with the JSON null value. By default, fields with empty
967	// values are omitted from API requests. However, any field with an
968	// empty value appearing in NullFields will be sent to the server as
969	// null. It is an error if a field in this list has a non-empty value.
970	// This may be used to include null fields in Patch requests.
971	NullFields []string `json:"-"`
972}
973
974func (s *ProvisioningConfig) MarshalJSON() ([]byte, error) {
975	type NoMethod ProvisioningConfig
976	raw := NoMethod(*s)
977	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
978}
979
980// ProvisioningQuota: A provisioning quota for a given project.
981type ProvisioningQuota struct {
982	// InstanceQuota: Instance quota.
983	InstanceQuota *InstanceQuota `json:"instanceQuota,omitempty"`
984
985	// ForceSendFields is a list of field names (e.g. "InstanceQuota") to
986	// unconditionally include in API requests. By default, fields with
987	// empty or default values are omitted from API requests. However, any
988	// non-pointer, non-interface field appearing in ForceSendFields will be
989	// sent to the server regardless of whether the field is empty or not.
990	// This may be used to include empty fields in Patch requests.
991	ForceSendFields []string `json:"-"`
992
993	// NullFields is a list of field names (e.g. "InstanceQuota") to include
994	// in API requests with the JSON null value. By default, fields with
995	// empty values are omitted from API requests. However, any field with
996	// an empty value appearing in NullFields will be sent to the server as
997	// null. It is an error if a field in this list has a non-empty value.
998	// This may be used to include null fields in Patch requests.
999	NullFields []string `json:"-"`
1000}
1001
1002func (s *ProvisioningQuota) MarshalJSON() ([]byte, error) {
1003	type NoMethod ProvisioningQuota
1004	raw := NoMethod(*s)
1005	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1006}
1007
1008// ResetInstanceRequest: Request for ResetInstance.
1009type ResetInstanceRequest struct {
1010}
1011
1012// ResetInstanceResponse: Response for ResetInstance.
1013type ResetInstanceResponse struct {
1014	// ServerResponse contains the HTTP response code and headers from the
1015	// server.
1016	googleapi.ServerResponse `json:"-"`
1017}
1018
1019// RestoreVolumeSnapshotRequest: Request for RestoreVolumeSnapshot.
1020type RestoreVolumeSnapshotRequest struct {
1021}
1022
1023// SSHKey: A public SSH key registered in the project. Used primarily
1024// for the interactive serial console feature.
1025type SSHKey struct {
1026	// Name: Output only. The name of this SSH key.
1027	Name string `json:"name,omitempty"`
1028
1029	// PublicKey: The public SSH key.
1030	PublicKey string `json:"publicKey,omitempty"`
1031
1032	// ServerResponse contains the HTTP response code and headers from the
1033	// server.
1034	googleapi.ServerResponse `json:"-"`
1035
1036	// ForceSendFields is a list of field names (e.g. "Name") to
1037	// unconditionally include in API requests. By default, fields with
1038	// empty or default values are omitted from API requests. However, any
1039	// non-pointer, non-interface field appearing in ForceSendFields will be
1040	// sent to the server regardless of whether the field is empty or not.
1041	// This may be used to include empty fields in Patch requests.
1042	ForceSendFields []string `json:"-"`
1043
1044	// NullFields is a list of field names (e.g. "Name") to include in API
1045	// requests with the JSON null value. By default, fields with empty
1046	// values are omitted from API requests. However, any field with an
1047	// empty value appearing in NullFields will be sent to the server as
1048	// null. It is an error if a field in this list has a non-empty value.
1049	// This may be used to include null fields in Patch requests.
1050	NullFields []string `json:"-"`
1051}
1052
1053func (s *SSHKey) MarshalJSON() ([]byte, error) {
1054	type NoMethod SSHKey
1055	raw := NoMethod(*s)
1056	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1057}
1058
1059// Schedule: A snapshot schedule.
1060type Schedule struct {
1061	// CrontabSpec: The crontab-like specification that this Schedule will
1062	// use to take snapshots.
1063	CrontabSpec string `json:"crontabSpec,omitempty"`
1064
1065	// Prefix: A string to prefix names of snapshots created under this
1066	// Schedule.
1067	Prefix string `json:"prefix,omitempty"`
1068
1069	// RetentionCount: The maximum number of snapshots to retain under this
1070	// Schedule.
1071	RetentionCount int64 `json:"retentionCount,omitempty"`
1072
1073	// ForceSendFields is a list of field names (e.g. "CrontabSpec") to
1074	// unconditionally include in API requests. By default, fields with
1075	// empty or default values are omitted from API requests. However, any
1076	// non-pointer, non-interface field appearing in ForceSendFields will be
1077	// sent to the server regardless of whether the field is empty or not.
1078	// This may be used to include empty fields in Patch requests.
1079	ForceSendFields []string `json:"-"`
1080
1081	// NullFields is a list of field names (e.g. "CrontabSpec") to include
1082	// in API requests with the JSON null value. By default, fields with
1083	// empty values are omitted from API requests. However, any field with
1084	// an empty value appearing in NullFields will be sent to the server as
1085	// null. It is an error if a field in this list has a non-empty value.
1086	// This may be used to include null fields in Patch requests.
1087	NullFields []string `json:"-"`
1088}
1089
1090func (s *Schedule) MarshalJSON() ([]byte, error) {
1091	type NoMethod Schedule
1092	raw := NoMethod(*s)
1093	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1094}
1095
1096// SerialPortOutput: Response for ReadSerialPortOutput.
1097type SerialPortOutput struct {
1098	// Contents: The serial port output.
1099	Contents string `json:"contents,omitempty"`
1100
1101	// NextStartByte: The byte index to use in a subsequent call to
1102	// ReadSerialPortOutput to get more output.
1103	NextStartByte int64 `json:"nextStartByte,omitempty,string"`
1104
1105	// Start: The start byte index of the included contents.
1106	Start int64 `json:"start,omitempty,string"`
1107
1108	// ServerResponse contains the HTTP response code and headers from the
1109	// server.
1110	googleapi.ServerResponse `json:"-"`
1111
1112	// ForceSendFields is a list of field names (e.g. "Contents") to
1113	// unconditionally include in API requests. By default, fields with
1114	// empty or default values are omitted from API requests. However, any
1115	// non-pointer, non-interface field appearing in ForceSendFields will be
1116	// sent to the server regardless of whether the field is empty or not.
1117	// This may be used to include empty fields in Patch requests.
1118	ForceSendFields []string `json:"-"`
1119
1120	// NullFields is a list of field names (e.g. "Contents") to include in
1121	// API requests with the JSON null value. By default, fields with empty
1122	// values are omitted from API requests. However, any field with an
1123	// empty value appearing in NullFields will be sent to the server as
1124	// null. It is an error if a field in this list has a non-empty value.
1125	// This may be used to include null fields in Patch requests.
1126	NullFields []string `json:"-"`
1127}
1128
1129func (s *SerialPortOutput) MarshalJSON() ([]byte, error) {
1130	type NoMethod SerialPortOutput
1131	raw := NoMethod(*s)
1132	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1133}
1134
1135// SetVolumeSnapshotSchedulePolicyRequest: Request for
1136// SetVolumeSnapshotSchedulePolicy.
1137type SetVolumeSnapshotSchedulePolicyRequest struct {
1138	// SnapshotSchedulePolicy: Required. The name of the policy to set on
1139	// the volume.
1140	SnapshotSchedulePolicy string `json:"snapshotSchedulePolicy,omitempty"`
1141
1142	// ForceSendFields is a list of field names (e.g.
1143	// "SnapshotSchedulePolicy") to unconditionally include in API requests.
1144	// By default, fields with empty or default values are omitted from API
1145	// requests. However, any non-pointer, non-interface field appearing in
1146	// ForceSendFields will be sent to the server regardless of whether the
1147	// field is empty or not. This may be used to include empty fields in
1148	// Patch requests.
1149	ForceSendFields []string `json:"-"`
1150
1151	// NullFields is a list of field names (e.g. "SnapshotSchedulePolicy")
1152	// to include in API requests with the JSON null value. By default,
1153	// fields with empty values are omitted from API requests. However, any
1154	// field with an empty value appearing in NullFields will be sent to the
1155	// server as null. It is an error if a field in this list has a
1156	// non-empty value. This may be used to include null fields in Patch
1157	// requests.
1158	NullFields []string `json:"-"`
1159}
1160
1161func (s *SetVolumeSnapshotSchedulePolicyRequest) MarshalJSON() ([]byte, error) {
1162	type NoMethod SetVolumeSnapshotSchedulePolicyRequest
1163	raw := NoMethod(*s)
1164	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1165}
1166
1167// SetVolumeSnapshotSchedulePolicyResponse: Response for
1168// SetVolumeSnapshotSchedulePolicy.
1169type SetVolumeSnapshotSchedulePolicyResponse struct {
1170	// ServerResponse contains the HTTP response code and headers from the
1171	// server.
1172	googleapi.ServerResponse `json:"-"`
1173}
1174
1175// SnapshotSchedulePolicy: A snapshot schedule policy.
1176type SnapshotSchedulePolicy struct {
1177	// Description: The description of this SnapshotSchedulePolicy.
1178	Description string `json:"description,omitempty"`
1179
1180	// Name: Output only. The name of this SnapshotSchedulePolicy.
1181	Name string `json:"name,omitempty"`
1182
1183	// Schedules: The snapshot Schedules contained in this Policy. At most 5
1184	// Schedules may be specified.
1185	Schedules []*Schedule `json:"schedules,omitempty"`
1186
1187	// Volumes: The names of the Volumes this policy is associated with.
1188	Volumes []string `json:"volumes,omitempty"`
1189
1190	// ServerResponse contains the HTTP response code and headers from the
1191	// server.
1192	googleapi.ServerResponse `json:"-"`
1193
1194	// ForceSendFields is a list of field names (e.g. "Description") to
1195	// unconditionally include in API requests. By default, fields with
1196	// empty or default values are omitted from API requests. However, any
1197	// non-pointer, non-interface field appearing in ForceSendFields will be
1198	// sent to the server regardless of whether the field is empty or not.
1199	// This may be used to include empty fields in Patch requests.
1200	ForceSendFields []string `json:"-"`
1201
1202	// NullFields is a list of field names (e.g. "Description") to include
1203	// in API requests with the JSON null value. By default, fields with
1204	// empty values are omitted from API requests. However, any field with
1205	// an empty value appearing in NullFields will be sent to the server as
1206	// null. It is an error if a field in this list has a non-empty value.
1207	// This may be used to include null fields in Patch requests.
1208	NullFields []string `json:"-"`
1209}
1210
1211func (s *SnapshotSchedulePolicy) MarshalJSON() ([]byte, error) {
1212	type NoMethod SnapshotSchedulePolicy
1213	raw := NoMethod(*s)
1214	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1215}
1216
1217// SubmitProvisioningConfigRequest: Request for
1218// SubmitProvisioningConfig.
1219type SubmitProvisioningConfigRequest struct {
1220	// ProvisioningConfig: Required. The ProvisioningConfig to submit.
1221	ProvisioningConfig *ProvisioningConfig `json:"provisioningConfig,omitempty"`
1222
1223	// ForceSendFields is a list of field names (e.g. "ProvisioningConfig")
1224	// to unconditionally include in API requests. By default, fields with
1225	// empty or default values are omitted from API requests. However, any
1226	// non-pointer, non-interface field appearing in ForceSendFields will be
1227	// sent to the server regardless of whether the field is empty or not.
1228	// This may be used to include empty fields in Patch requests.
1229	ForceSendFields []string `json:"-"`
1230
1231	// NullFields is a list of field names (e.g. "ProvisioningConfig") to
1232	// include in API requests with the JSON null value. By default, fields
1233	// with empty values are omitted from API requests. However, any field
1234	// with an empty value appearing in NullFields will be sent to the
1235	// server as null. It is an error if a field in this list has a
1236	// non-empty value. This may be used to include null fields in Patch
1237	// requests.
1238	NullFields []string `json:"-"`
1239}
1240
1241func (s *SubmitProvisioningConfigRequest) MarshalJSON() ([]byte, error) {
1242	type NoMethod SubmitProvisioningConfigRequest
1243	raw := NoMethod(*s)
1244	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1245}
1246
1247// VlanAttachment: A GCP vlan attachment.
1248type VlanAttachment struct {
1249	// Id: Identifier of the VLAN attachment.
1250	Id string `json:"id,omitempty"`
1251
1252	// PairingKey: Attachment pairing key.
1253	PairingKey string `json:"pairingKey,omitempty"`
1254
1255	// ForceSendFields is a list of field names (e.g. "Id") to
1256	// unconditionally include in API requests. By default, fields with
1257	// empty or default values are omitted from API requests. However, any
1258	// non-pointer, non-interface field appearing in ForceSendFields will be
1259	// sent to the server regardless of whether the field is empty or not.
1260	// This may be used to include empty fields in Patch requests.
1261	ForceSendFields []string `json:"-"`
1262
1263	// NullFields is a list of field names (e.g. "Id") to include in API
1264	// requests with the JSON null value. By default, fields with empty
1265	// values are omitted from API requests. However, any field with an
1266	// empty value appearing in NullFields will be sent to the server as
1267	// null. It is an error if a field in this list has a non-empty value.
1268	// This may be used to include null fields in Patch requests.
1269	NullFields []string `json:"-"`
1270}
1271
1272func (s *VlanAttachment) MarshalJSON() ([]byte, error) {
1273	type NoMethod VlanAttachment
1274	raw := NoMethod(*s)
1275	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1276}
1277
1278// Volume: Volume registered in the project.
1279type Volume struct {
1280	// AutoGrownSizeGb: The size, in GB, that this Volume has expanded as a
1281	// result of an auto grow policy.
1282	AutoGrownSizeGb int64 `json:"autoGrownSizeGb,omitempty,string"`
1283
1284	// CurrentSizeGb: The current size of this Volume, in GB, including
1285	// space reserved for snapshots. This size may be different than the
1286	// requested size if the Volume has been configured with auto grow or
1287	// auto shrink.
1288	CurrentSizeGb int64 `json:"currentSizeGb,omitempty,string"`
1289
1290	// Name: Output only. The name of this Volume.
1291	Name string `json:"name,omitempty"`
1292
1293	// RemainingSpaceGb: The space remaining in the Volume for new LUNs, in
1294	// GB, excluding space reserved for snapshots.
1295	RemainingSpaceGb int64 `json:"remainingSpaceGb,omitempty,string"`
1296
1297	// RequestedSizeGb: The requested size of this Volume, in GB.
1298	RequestedSizeGb int64 `json:"requestedSizeGb,omitempty,string"`
1299
1300	// SnapshotAutoDeleteBehavior: The behavior to use when snapshot
1301	// reserved space is full.
1302	//
1303	// Possible values:
1304	//   "SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED" - The unspecified
1305	// behavior.
1306	//   "DISABLE" - Don't delete any snapshots. This disables new snapshot
1307	// creation, as long as the snapshot reserved space is full.
1308	//   "OLDEST" - Delete the oldest snapshots first.
1309	//   "NEWEST" - Delete the newest snapshots first.
1310	SnapshotAutoDeleteBehavior string `json:"snapshotAutoDeleteBehavior,omitempty"`
1311
1312	// SnapshotReservedSpacePercent: The percent of space on this Volume
1313	// reserved for snapshots.
1314	SnapshotReservedSpacePercent int64 `json:"snapshotReservedSpacePercent,omitempty"`
1315
1316	// SnapshotReservedSpaceRemainingGb: The amount, in GB, of space
1317	// available in this Volume's reserved snapshot space.
1318	SnapshotReservedSpaceRemainingGb int64 `json:"snapshotReservedSpaceRemainingGb,omitempty,string"`
1319
1320	// SnapshotReservedSpaceUsedPercent: The percent of reserved snapshot
1321	// space on this Volume that is actually used by snapshot copies. This
1322	// may be higher than 100% if snapshot copies are occupying more space
1323	// than has been reserved on the Volume.
1324	SnapshotReservedSpaceUsedPercent int64 `json:"snapshotReservedSpaceUsedPercent,omitempty"`
1325
1326	// State: The state of this Volume.
1327	//
1328	// Possible values:
1329	//   "STATE_UNSPECIFIED" - The unspecified state.
1330	//   "PROVISIONED" - The Volume has been provisioned.
1331	//   "DEPROVISIONING_REQUESTED" - The Volume has been requested to be
1332	// deprovisioned.
1333	//   "DEPROVISIONING_COOLOFF" - The Volume is in deprovisioning cooloff:
1334	// a deprovisioning has been requested, but data has not yet been
1335	// deleted.
1336	State string `json:"state,omitempty"`
1337
1338	// Type: The type of this Volume.
1339	//
1340	// Possible values:
1341	//   "TYPE_UNSPECIFIED" - The unspecified type.
1342	//   "FLASH" - This Volume is on flash.
1343	//   "DISK" - This Volume is on disk.
1344	Type string `json:"type,omitempty"`
1345
1346	// ServerResponse contains the HTTP response code and headers from the
1347	// server.
1348	googleapi.ServerResponse `json:"-"`
1349
1350	// ForceSendFields is a list of field names (e.g. "AutoGrownSizeGb") to
1351	// unconditionally include in API requests. By default, fields with
1352	// empty or default values are omitted from API requests. However, any
1353	// non-pointer, non-interface field appearing in ForceSendFields will be
1354	// sent to the server regardless of whether the field is empty or not.
1355	// This may be used to include empty fields in Patch requests.
1356	ForceSendFields []string `json:"-"`
1357
1358	// NullFields is a list of field names (e.g. "AutoGrownSizeGb") to
1359	// include in API requests with the JSON null value. By default, fields
1360	// with empty values are omitted from API requests. However, any field
1361	// with an empty value appearing in NullFields will be sent to the
1362	// server as null. It is an error if a field in this list has a
1363	// non-empty value. This may be used to include null fields in Patch
1364	// requests.
1365	NullFields []string `json:"-"`
1366}
1367
1368func (s *Volume) MarshalJSON() ([]byte, error) {
1369	type NoMethod Volume
1370	raw := NoMethod(*s)
1371	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1372}
1373
1374// VolumeConfig: Configuration parameters for a new volume.
1375type VolumeConfig struct {
1376	// Id: A transient unique identifier to identify a volume within an
1377	// ProvisioningConfig request.
1378	Id string `json:"id,omitempty"`
1379
1380	// Location: Location where to deploy the volume.
1381	Location string `json:"location,omitempty"`
1382
1383	// LunRanges: LUN ranges to be configured. Set only when protocol is
1384	// PROTOCOL_FC.
1385	LunRanges []*LunRange `json:"lunRanges,omitempty"`
1386
1387	// MachineIds: Machine ids connected to this volume. Set only when
1388	// protocol is PROTOCOL_FC.
1389	MachineIds []string `json:"machineIds,omitempty"`
1390
1391	// NfsExports: NFS exports. Set only when protocol is PROTOCOL_NFS.
1392	NfsExports []*NfsExport `json:"nfsExports,omitempty"`
1393
1394	// Protocol: Volume protocol.
1395	//
1396	// Possible values:
1397	//   "PROTOCOL_UNSPECIFIED" - Unspecified value.
1398	//   "PROTOCOL_FC" - Fibre channel.
1399	//   "PROTOCOL_NFS" - Network file system.
1400	Protocol string `json:"protocol,omitempty"`
1401
1402	// SizeGb: The requested size of this volume, in GB. This will be
1403	// updated in a later iteration with a generic size field.
1404	SizeGb int64 `json:"sizeGb,omitempty"`
1405
1406	// SnapshotsEnabled: Whether snapshots should be enabled.
1407	SnapshotsEnabled bool `json:"snapshotsEnabled,omitempty"`
1408
1409	// Type: The type of this Volume.
1410	//
1411	// Possible values:
1412	//   "TYPE_UNSPECIFIED" - The unspecified type.
1413	//   "FLASH" - This Volume is on flash.
1414	//   "DISK" - This Volume is on disk.
1415	Type string `json:"type,omitempty"`
1416
1417	// UserNote: User note field, it can be used by customers to add
1418	// additional information for the BMS Ops team (b/194021617).
1419	UserNote string `json:"userNote,omitempty"`
1420
1421	// ForceSendFields is a list of field names (e.g. "Id") to
1422	// unconditionally include in API requests. By default, fields with
1423	// empty or default values are omitted from API requests. However, any
1424	// non-pointer, non-interface field appearing in ForceSendFields will be
1425	// sent to the server regardless of whether the field is empty or not.
1426	// This may be used to include empty fields in Patch requests.
1427	ForceSendFields []string `json:"-"`
1428
1429	// NullFields is a list of field names (e.g. "Id") to include in API
1430	// requests with the JSON null value. By default, fields with empty
1431	// values are omitted from API requests. However, any field with an
1432	// empty value appearing in NullFields will be sent to the server as
1433	// null. It is an error if a field in this list has a non-empty value.
1434	// This may be used to include null fields in Patch requests.
1435	NullFields []string `json:"-"`
1436}
1437
1438func (s *VolumeConfig) MarshalJSON() ([]byte, error) {
1439	type NoMethod VolumeConfig
1440	raw := NoMethod(*s)
1441	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1442}
1443
1444// VolumeSnapshot: VolumeSnapshot registered for given Volume
1445type VolumeSnapshot struct {
1446	// CreationTime: The creation time of this Snapshot.
1447	CreationTime string `json:"creationTime,omitempty"`
1448
1449	// Description: The description of this Snapshot.
1450	Description string `json:"description,omitempty"`
1451
1452	// Name: Output only. The name of this Snapshot.
1453	Name string `json:"name,omitempty"`
1454
1455	// SizeBytes: The real size of this Snapshot, in bytes.
1456	SizeBytes int64 `json:"sizeBytes,omitempty,string"`
1457
1458	// State: The state of this Snapshot.
1459	//
1460	// Possible values:
1461	//   "STATE_UNSPECIFIED" - The unspecified state.
1462	//   "CREATING" - The Snapshot is currently being created.
1463	//   "ACTIVE" - The Snapshot has been created, and can be used to
1464	// restore.
1465	State string `json:"state,omitempty"`
1466
1467	// ServerResponse contains the HTTP response code and headers from the
1468	// server.
1469	googleapi.ServerResponse `json:"-"`
1470
1471	// ForceSendFields is a list of field names (e.g. "CreationTime") to
1472	// unconditionally include in API requests. By default, fields with
1473	// empty or default values are omitted from API requests. However, any
1474	// non-pointer, non-interface field appearing in ForceSendFields will be
1475	// sent to the server regardless of whether the field is empty or not.
1476	// This may be used to include empty fields in Patch requests.
1477	ForceSendFields []string `json:"-"`
1478
1479	// NullFields is a list of field names (e.g. "CreationTime") to include
1480	// in API requests with the JSON null value. By default, fields with
1481	// empty values are omitted from API requests. However, any field with
1482	// an empty value appearing in NullFields will be sent to the server as
1483	// null. It is an error if a field in this list has a non-empty value.
1484	// This may be used to include null fields in Patch requests.
1485	NullFields []string `json:"-"`
1486}
1487
1488func (s *VolumeSnapshot) MarshalJSON() ([]byte, error) {
1489	type NoMethod VolumeSnapshot
1490	raw := NoMethod(*s)
1491	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1492}
1493
1494// method id "baremetalsolution.projects.locations.submitProvisioningConfig":
1495
1496type ProjectsLocationsSubmitProvisioningConfigCall struct {
1497	s                               *Service
1498	project                         string
1499	location                        string
1500	submitprovisioningconfigrequest *SubmitProvisioningConfigRequest
1501	urlParams_                      gensupport.URLParams
1502	ctx_                            context.Context
1503	header_                         http.Header
1504}
1505
1506// SubmitProvisioningConfig: Submit a provisiong configuration for a
1507// given project.
1508//
1509// - location: The target location of the provisioning request.
1510// - project: The target project of the provisioning request.
1511func (r *ProjectsLocationsService) SubmitProvisioningConfig(project string, location string, submitprovisioningconfigrequest *SubmitProvisioningConfigRequest) *ProjectsLocationsSubmitProvisioningConfigCall {
1512	c := &ProjectsLocationsSubmitProvisioningConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1513	c.project = project
1514	c.location = location
1515	c.submitprovisioningconfigrequest = submitprovisioningconfigrequest
1516	return c
1517}
1518
1519// Fields allows partial responses to be retrieved. See
1520// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1521// for more information.
1522func (c *ProjectsLocationsSubmitProvisioningConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubmitProvisioningConfigCall {
1523	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1524	return c
1525}
1526
1527// Context sets the context to be used in this call's Do method. Any
1528// pending HTTP request will be aborted if the provided context is
1529// canceled.
1530func (c *ProjectsLocationsSubmitProvisioningConfigCall) Context(ctx context.Context) *ProjectsLocationsSubmitProvisioningConfigCall {
1531	c.ctx_ = ctx
1532	return c
1533}
1534
1535// Header returns an http.Header that can be modified by the caller to
1536// add HTTP headers to the request.
1537func (c *ProjectsLocationsSubmitProvisioningConfigCall) Header() http.Header {
1538	if c.header_ == nil {
1539		c.header_ = make(http.Header)
1540	}
1541	return c.header_
1542}
1543
1544func (c *ProjectsLocationsSubmitProvisioningConfigCall) doRequest(alt string) (*http.Response, error) {
1545	reqHeaders := make(http.Header)
1546	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
1547	for k, v := range c.header_ {
1548		reqHeaders[k] = v
1549	}
1550	reqHeaders.Set("User-Agent", c.s.userAgent())
1551	var body io.Reader = nil
1552	body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitprovisioningconfigrequest)
1553	if err != nil {
1554		return nil, err
1555	}
1556	reqHeaders.Set("Content-Type", "application/json")
1557	c.urlParams_.Set("alt", alt)
1558	c.urlParams_.Set("prettyPrint", "false")
1559	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+project}/{+location}:submitProvisioningConfig")
1560	urls += "?" + c.urlParams_.Encode()
1561	req, err := http.NewRequest("POST", urls, body)
1562	if err != nil {
1563		return nil, err
1564	}
1565	req.Header = reqHeaders
1566	googleapi.Expand(req.URL, map[string]string{
1567		"project":  c.project,
1568		"location": c.location,
1569	})
1570	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1571}
1572
1573// Do executes the "baremetalsolution.projects.locations.submitProvisioningConfig" call.
1574// Exactly one of *ProvisioningConfig or error will be non-nil. Any
1575// non-2xx status code is an error. Response headers are in either
1576// *ProvisioningConfig.ServerResponse.Header or (if a response was
1577// returned at all) in error.(*googleapi.Error).Header. Use
1578// googleapi.IsNotModified to check whether the returned error was
1579// because http.StatusNotModified was returned.
1580func (c *ProjectsLocationsSubmitProvisioningConfigCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) {
1581	gensupport.SetOptions(c.urlParams_, opts...)
1582	res, err := c.doRequest("json")
1583	if res != nil && res.StatusCode == http.StatusNotModified {
1584		if res.Body != nil {
1585			res.Body.Close()
1586		}
1587		return nil, &googleapi.Error{
1588			Code:   res.StatusCode,
1589			Header: res.Header,
1590		}
1591	}
1592	if err != nil {
1593		return nil, err
1594	}
1595	defer googleapi.CloseBody(res)
1596	if err := googleapi.CheckResponse(res); err != nil {
1597		return nil, err
1598	}
1599	ret := &ProvisioningConfig{
1600		ServerResponse: googleapi.ServerResponse{
1601			Header:         res.Header,
1602			HTTPStatusCode: res.StatusCode,
1603		},
1604	}
1605	target := &ret
1606	if err := gensupport.DecodeResponse(target, res); err != nil {
1607		return nil, err
1608	}
1609	return ret, nil
1610	// {
1611	//   "description": "Submit a provisiong configuration for a given project.",
1612	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}:submitProvisioningConfig",
1613	//   "httpMethod": "POST",
1614	//   "id": "baremetalsolution.projects.locations.submitProvisioningConfig",
1615	//   "parameterOrder": [
1616	//     "project",
1617	//     "location"
1618	//   ],
1619	//   "parameters": {
1620	//     "location": {
1621	//       "description": "Required. The target location of the provisioning request.",
1622	//       "location": "path",
1623	//       "pattern": "^locations/[^/]+$",
1624	//       "required": true,
1625	//       "type": "string"
1626	//     },
1627	//     "project": {
1628	//       "description": "Required. The target project of the provisioning request.",
1629	//       "location": "path",
1630	//       "pattern": "^projects/[^/]+$",
1631	//       "required": true,
1632	//       "type": "string"
1633	//     }
1634	//   },
1635	//   "path": "v1alpha1/{+project}/{+location}:submitProvisioningConfig",
1636	//   "request": {
1637	//     "$ref": "SubmitProvisioningConfigRequest"
1638	//   },
1639	//   "response": {
1640	//     "$ref": "ProvisioningConfig"
1641	//   },
1642	//   "scopes": [
1643	//     "https://www.googleapis.com/auth/cloud-platform"
1644	//   ]
1645	// }
1646
1647}
1648
1649// method id "baremetalsolution.projects.locations.instances.disableInteractiveSerialConsole":
1650
1651type ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall struct {
1652	s                                      *Service
1653	instance                               string
1654	disableinteractiveserialconsolerequest *DisableInteractiveSerialConsoleRequest
1655	urlParams_                             gensupport.URLParams
1656	ctx_                                   context.Context
1657	header_                                http.Header
1658}
1659
1660// DisableInteractiveSerialConsole: Disable the interactive serial
1661// console feature on a specific machine.
1662//
1663// - instance: Name of the instance to disable the interactive serial
1664//   console feature on.
1665func (r *ProjectsLocationsInstancesService) DisableInteractiveSerialConsole(instance string, disableinteractiveserialconsolerequest *DisableInteractiveSerialConsoleRequest) *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall {
1666	c := &ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1667	c.instance = instance
1668	c.disableinteractiveserialconsolerequest = disableinteractiveserialconsolerequest
1669	return c
1670}
1671
1672// Fields allows partial responses to be retrieved. See
1673// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1674// for more information.
1675func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall {
1676	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1677	return c
1678}
1679
1680// Context sets the context to be used in this call's Do method. Any
1681// pending HTTP request will be aborted if the provided context is
1682// canceled.
1683func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Context(ctx context.Context) *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall {
1684	c.ctx_ = ctx
1685	return c
1686}
1687
1688// Header returns an http.Header that can be modified by the caller to
1689// add HTTP headers to the request.
1690func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Header() http.Header {
1691	if c.header_ == nil {
1692		c.header_ = make(http.Header)
1693	}
1694	return c.header_
1695}
1696
1697func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) doRequest(alt string) (*http.Response, error) {
1698	reqHeaders := make(http.Header)
1699	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
1700	for k, v := range c.header_ {
1701		reqHeaders[k] = v
1702	}
1703	reqHeaders.Set("User-Agent", c.s.userAgent())
1704	var body io.Reader = nil
1705	body, err := googleapi.WithoutDataWrapper.JSONReader(c.disableinteractiveserialconsolerequest)
1706	if err != nil {
1707		return nil, err
1708	}
1709	reqHeaders.Set("Content-Type", "application/json")
1710	c.urlParams_.Set("alt", alt)
1711	c.urlParams_.Set("prettyPrint", "false")
1712	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+instance}:disableInteractiveSerialConsole")
1713	urls += "?" + c.urlParams_.Encode()
1714	req, err := http.NewRequest("POST", urls, body)
1715	if err != nil {
1716		return nil, err
1717	}
1718	req.Header = reqHeaders
1719	googleapi.Expand(req.URL, map[string]string{
1720		"instance": c.instance,
1721	})
1722	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1723}
1724
1725// Do executes the "baremetalsolution.projects.locations.instances.disableInteractiveSerialConsole" call.
1726// Exactly one of *DisableInteractiveSerialConsoleResponse or error will
1727// be non-nil. Any non-2xx status code is an error. Response headers are
1728// in either
1729// *DisableInteractiveSerialConsoleResponse.ServerResponse.Header or (if
1730// a response was returned at all) in error.(*googleapi.Error).Header.
1731// Use googleapi.IsNotModified to check whether the returned error was
1732// because http.StatusNotModified was returned.
1733func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Do(opts ...googleapi.CallOption) (*DisableInteractiveSerialConsoleResponse, error) {
1734	gensupport.SetOptions(c.urlParams_, opts...)
1735	res, err := c.doRequest("json")
1736	if res != nil && res.StatusCode == http.StatusNotModified {
1737		if res.Body != nil {
1738			res.Body.Close()
1739		}
1740		return nil, &googleapi.Error{
1741			Code:   res.StatusCode,
1742			Header: res.Header,
1743		}
1744	}
1745	if err != nil {
1746		return nil, err
1747	}
1748	defer googleapi.CloseBody(res)
1749	if err := googleapi.CheckResponse(res); err != nil {
1750		return nil, err
1751	}
1752	ret := &DisableInteractiveSerialConsoleResponse{
1753		ServerResponse: googleapi.ServerResponse{
1754			Header:         res.Header,
1755			HTTPStatusCode: res.StatusCode,
1756		},
1757	}
1758	target := &ret
1759	if err := gensupport.DecodeResponse(target, res); err != nil {
1760		return nil, err
1761	}
1762	return ret, nil
1763	// {
1764	//   "description": "Disable the interactive serial console feature on a specific machine.",
1765	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:disableInteractiveSerialConsole",
1766	//   "httpMethod": "POST",
1767	//   "id": "baremetalsolution.projects.locations.instances.disableInteractiveSerialConsole",
1768	//   "parameterOrder": [
1769	//     "instance"
1770	//   ],
1771	//   "parameters": {
1772	//     "instance": {
1773	//       "description": "Required. Name of the instance to disable the interactive serial console feature on.",
1774	//       "location": "path",
1775	//       "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
1776	//       "required": true,
1777	//       "type": "string"
1778	//     }
1779	//   },
1780	//   "path": "v1alpha1/{+instance}:disableInteractiveSerialConsole",
1781	//   "request": {
1782	//     "$ref": "DisableInteractiveSerialConsoleRequest"
1783	//   },
1784	//   "response": {
1785	//     "$ref": "DisableInteractiveSerialConsoleResponse"
1786	//   },
1787	//   "scopes": [
1788	//     "https://www.googleapis.com/auth/cloud-platform"
1789	//   ]
1790	// }
1791
1792}
1793
1794// method id "baremetalsolution.projects.locations.instances.enableInteractiveSerialConsole":
1795
1796type ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall struct {
1797	s                                     *Service
1798	instance                              string
1799	enableinteractiveserialconsolerequest *EnableInteractiveSerialConsoleRequest
1800	urlParams_                            gensupport.URLParams
1801	ctx_                                  context.Context
1802	header_                               http.Header
1803}
1804
1805// EnableInteractiveSerialConsole: Enable the interactive serial console
1806// feature on a specific machine.
1807//
1808// - instance: Name of the instance to enable the interactive serial
1809//   console feature on.
1810func (r *ProjectsLocationsInstancesService) EnableInteractiveSerialConsole(instance string, enableinteractiveserialconsolerequest *EnableInteractiveSerialConsoleRequest) *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall {
1811	c := &ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1812	c.instance = instance
1813	c.enableinteractiveserialconsolerequest = enableinteractiveserialconsolerequest
1814	return c
1815}
1816
1817// Fields allows partial responses to be retrieved. See
1818// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1819// for more information.
1820func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall {
1821	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1822	return c
1823}
1824
1825// Context sets the context to be used in this call's Do method. Any
1826// pending HTTP request will be aborted if the provided context is
1827// canceled.
1828func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Context(ctx context.Context) *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall {
1829	c.ctx_ = ctx
1830	return c
1831}
1832
1833// Header returns an http.Header that can be modified by the caller to
1834// add HTTP headers to the request.
1835func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Header() http.Header {
1836	if c.header_ == nil {
1837		c.header_ = make(http.Header)
1838	}
1839	return c.header_
1840}
1841
1842func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) doRequest(alt string) (*http.Response, error) {
1843	reqHeaders := make(http.Header)
1844	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
1845	for k, v := range c.header_ {
1846		reqHeaders[k] = v
1847	}
1848	reqHeaders.Set("User-Agent", c.s.userAgent())
1849	var body io.Reader = nil
1850	body, err := googleapi.WithoutDataWrapper.JSONReader(c.enableinteractiveserialconsolerequest)
1851	if err != nil {
1852		return nil, err
1853	}
1854	reqHeaders.Set("Content-Type", "application/json")
1855	c.urlParams_.Set("alt", alt)
1856	c.urlParams_.Set("prettyPrint", "false")
1857	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+instance}:enableInteractiveSerialConsole")
1858	urls += "?" + c.urlParams_.Encode()
1859	req, err := http.NewRequest("POST", urls, body)
1860	if err != nil {
1861		return nil, err
1862	}
1863	req.Header = reqHeaders
1864	googleapi.Expand(req.URL, map[string]string{
1865		"instance": c.instance,
1866	})
1867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1868}
1869
1870// Do executes the "baremetalsolution.projects.locations.instances.enableInteractiveSerialConsole" call.
1871// Exactly one of *EnableInteractiveSerialConsoleResponse or error will
1872// be non-nil. Any non-2xx status code is an error. Response headers are
1873// in either
1874// *EnableInteractiveSerialConsoleResponse.ServerResponse.Header or (if
1875// a response was returned at all) in error.(*googleapi.Error).Header.
1876// Use googleapi.IsNotModified to check whether the returned error was
1877// because http.StatusNotModified was returned.
1878func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Do(opts ...googleapi.CallOption) (*EnableInteractiveSerialConsoleResponse, error) {
1879	gensupport.SetOptions(c.urlParams_, opts...)
1880	res, err := c.doRequest("json")
1881	if res != nil && res.StatusCode == http.StatusNotModified {
1882		if res.Body != nil {
1883			res.Body.Close()
1884		}
1885		return nil, &googleapi.Error{
1886			Code:   res.StatusCode,
1887			Header: res.Header,
1888		}
1889	}
1890	if err != nil {
1891		return nil, err
1892	}
1893	defer googleapi.CloseBody(res)
1894	if err := googleapi.CheckResponse(res); err != nil {
1895		return nil, err
1896	}
1897	ret := &EnableInteractiveSerialConsoleResponse{
1898		ServerResponse: googleapi.ServerResponse{
1899			Header:         res.Header,
1900			HTTPStatusCode: res.StatusCode,
1901		},
1902	}
1903	target := &ret
1904	if err := gensupport.DecodeResponse(target, res); err != nil {
1905		return nil, err
1906	}
1907	return ret, nil
1908	// {
1909	//   "description": "Enable the interactive serial console feature on a specific machine.",
1910	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:enableInteractiveSerialConsole",
1911	//   "httpMethod": "POST",
1912	//   "id": "baremetalsolution.projects.locations.instances.enableInteractiveSerialConsole",
1913	//   "parameterOrder": [
1914	//     "instance"
1915	//   ],
1916	//   "parameters": {
1917	//     "instance": {
1918	//       "description": "Required. Name of the instance to enable the interactive serial console feature on.",
1919	//       "location": "path",
1920	//       "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
1921	//       "required": true,
1922	//       "type": "string"
1923	//     }
1924	//   },
1925	//   "path": "v1alpha1/{+instance}:enableInteractiveSerialConsole",
1926	//   "request": {
1927	//     "$ref": "EnableInteractiveSerialConsoleRequest"
1928	//   },
1929	//   "response": {
1930	//     "$ref": "EnableInteractiveSerialConsoleResponse"
1931	//   },
1932	//   "scopes": [
1933	//     "https://www.googleapis.com/auth/cloud-platform"
1934	//   ]
1935	// }
1936
1937}
1938
1939// method id "baremetalsolution.projects.locations.instances.get":
1940
1941type ProjectsLocationsInstancesGetCall struct {
1942	s            *Service
1943	name         string
1944	urlParams_   gensupport.URLParams
1945	ifNoneMatch_ string
1946	ctx_         context.Context
1947	header_      http.Header
1948}
1949
1950// Get: Get details for a specific named Instance.
1951//
1952// - name: The name of the Instance to retrieve.
1953func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall {
1954	c := &ProjectsLocationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1955	c.name = name
1956	return c
1957}
1958
1959// Fields allows partial responses to be retrieved. See
1960// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1961// for more information.
1962func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall {
1963	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1964	return c
1965}
1966
1967// IfNoneMatch sets the optional parameter which makes the operation
1968// fail if the object's ETag matches the given value. This is useful for
1969// getting updates only after the object has changed since the last
1970// request. Use googleapi.IsNotModified to check whether the response
1971// error from Do is the result of In-None-Match.
1972func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall {
1973	c.ifNoneMatch_ = entityTag
1974	return c
1975}
1976
1977// Context sets the context to be used in this call's Do method. Any
1978// pending HTTP request will be aborted if the provided context is
1979// canceled.
1980func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall {
1981	c.ctx_ = ctx
1982	return c
1983}
1984
1985// Header returns an http.Header that can be modified by the caller to
1986// add HTTP headers to the request.
1987func (c *ProjectsLocationsInstancesGetCall) Header() http.Header {
1988	if c.header_ == nil {
1989		c.header_ = make(http.Header)
1990	}
1991	return c.header_
1992}
1993
1994func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
1995	reqHeaders := make(http.Header)
1996	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
1997	for k, v := range c.header_ {
1998		reqHeaders[k] = v
1999	}
2000	reqHeaders.Set("User-Agent", c.s.userAgent())
2001	if c.ifNoneMatch_ != "" {
2002		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2003	}
2004	var body io.Reader = nil
2005	c.urlParams_.Set("alt", alt)
2006	c.urlParams_.Set("prettyPrint", "false")
2007	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2008	urls += "?" + c.urlParams_.Encode()
2009	req, err := http.NewRequest("GET", urls, body)
2010	if err != nil {
2011		return nil, err
2012	}
2013	req.Header = reqHeaders
2014	googleapi.Expand(req.URL, map[string]string{
2015		"name": c.name,
2016	})
2017	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2018}
2019
2020// Do executes the "baremetalsolution.projects.locations.instances.get" call.
2021// Exactly one of *Instance or error will be non-nil. Any non-2xx status
2022// code is an error. Response headers are in either
2023// *Instance.ServerResponse.Header or (if a response was returned at
2024// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2025// to check whether the returned error was because
2026// http.StatusNotModified was returned.
2027func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
2028	gensupport.SetOptions(c.urlParams_, opts...)
2029	res, err := c.doRequest("json")
2030	if res != nil && res.StatusCode == http.StatusNotModified {
2031		if res.Body != nil {
2032			res.Body.Close()
2033		}
2034		return nil, &googleapi.Error{
2035			Code:   res.StatusCode,
2036			Header: res.Header,
2037		}
2038	}
2039	if err != nil {
2040		return nil, err
2041	}
2042	defer googleapi.CloseBody(res)
2043	if err := googleapi.CheckResponse(res); err != nil {
2044		return nil, err
2045	}
2046	ret := &Instance{
2047		ServerResponse: googleapi.ServerResponse{
2048			Header:         res.Header,
2049			HTTPStatusCode: res.StatusCode,
2050		},
2051	}
2052	target := &ret
2053	if err := gensupport.DecodeResponse(target, res); err != nil {
2054		return nil, err
2055	}
2056	return ret, nil
2057	// {
2058	//   "description": "Get details for a specific named Instance.",
2059	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}",
2060	//   "httpMethod": "GET",
2061	//   "id": "baremetalsolution.projects.locations.instances.get",
2062	//   "parameterOrder": [
2063	//     "name"
2064	//   ],
2065	//   "parameters": {
2066	//     "name": {
2067	//       "description": "Required. The name of the Instance to retrieve.",
2068	//       "location": "path",
2069	//       "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
2070	//       "required": true,
2071	//       "type": "string"
2072	//     }
2073	//   },
2074	//   "path": "v1alpha1/{+name}",
2075	//   "response": {
2076	//     "$ref": "Instance"
2077	//   },
2078	//   "scopes": [
2079	//     "https://www.googleapis.com/auth/cloud-platform"
2080	//   ]
2081	// }
2082
2083}
2084
2085// method id "baremetalsolution.projects.locations.instances.list":
2086
2087type ProjectsLocationsInstancesListCall struct {
2088	s            *Service
2089	parent       string
2090	urlParams_   gensupport.URLParams
2091	ifNoneMatch_ string
2092	ctx_         context.Context
2093	header_      http.Header
2094}
2095
2096// List: List Instances (physical servers).
2097//
2098// - parent: The location to list Instances in.
2099func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall {
2100	c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2101	c.parent = parent
2102	return c
2103}
2104
2105// PageSize sets the optional parameter "pageSize": The maximum number
2106// of items to return.
2107func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall {
2108	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2109	return c
2110}
2111
2112// PageToken sets the optional parameter "pageToken": The
2113// next_page_token value returned from a previous List request, if any.
2114func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall {
2115	c.urlParams_.Set("pageToken", pageToken)
2116	return c
2117}
2118
2119// Fields allows partial responses to be retrieved. See
2120// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2121// for more information.
2122func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall {
2123	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2124	return c
2125}
2126
2127// IfNoneMatch sets the optional parameter which makes the operation
2128// fail if the object's ETag matches the given value. This is useful for
2129// getting updates only after the object has changed since the last
2130// request. Use googleapi.IsNotModified to check whether the response
2131// error from Do is the result of In-None-Match.
2132func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall {
2133	c.ifNoneMatch_ = entityTag
2134	return c
2135}
2136
2137// Context sets the context to be used in this call's Do method. Any
2138// pending HTTP request will be aborted if the provided context is
2139// canceled.
2140func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall {
2141	c.ctx_ = ctx
2142	return c
2143}
2144
2145// Header returns an http.Header that can be modified by the caller to
2146// add HTTP headers to the request.
2147func (c *ProjectsLocationsInstancesListCall) Header() http.Header {
2148	if c.header_ == nil {
2149		c.header_ = make(http.Header)
2150	}
2151	return c.header_
2152}
2153
2154func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) {
2155	reqHeaders := make(http.Header)
2156	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
2157	for k, v := range c.header_ {
2158		reqHeaders[k] = v
2159	}
2160	reqHeaders.Set("User-Agent", c.s.userAgent())
2161	if c.ifNoneMatch_ != "" {
2162		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2163	}
2164	var body io.Reader = nil
2165	c.urlParams_.Set("alt", alt)
2166	c.urlParams_.Set("prettyPrint", "false")
2167	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/instances")
2168	urls += "?" + c.urlParams_.Encode()
2169	req, err := http.NewRequest("GET", urls, body)
2170	if err != nil {
2171		return nil, err
2172	}
2173	req.Header = reqHeaders
2174	googleapi.Expand(req.URL, map[string]string{
2175		"parent": c.parent,
2176	})
2177	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2178}
2179
2180// Do executes the "baremetalsolution.projects.locations.instances.list" call.
2181// Exactly one of *ListInstancesResponse or error will be non-nil. Any
2182// non-2xx status code is an error. Response headers are in either
2183// *ListInstancesResponse.ServerResponse.Header or (if a response was
2184// returned at all) in error.(*googleapi.Error).Header. Use
2185// googleapi.IsNotModified to check whether the returned error was
2186// because http.StatusNotModified was returned.
2187func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
2188	gensupport.SetOptions(c.urlParams_, opts...)
2189	res, err := c.doRequest("json")
2190	if res != nil && res.StatusCode == http.StatusNotModified {
2191		if res.Body != nil {
2192			res.Body.Close()
2193		}
2194		return nil, &googleapi.Error{
2195			Code:   res.StatusCode,
2196			Header: res.Header,
2197		}
2198	}
2199	if err != nil {
2200		return nil, err
2201	}
2202	defer googleapi.CloseBody(res)
2203	if err := googleapi.CheckResponse(res); err != nil {
2204		return nil, err
2205	}
2206	ret := &ListInstancesResponse{
2207		ServerResponse: googleapi.ServerResponse{
2208			Header:         res.Header,
2209			HTTPStatusCode: res.StatusCode,
2210		},
2211	}
2212	target := &ret
2213	if err := gensupport.DecodeResponse(target, res); err != nil {
2214		return nil, err
2215	}
2216	return ret, nil
2217	// {
2218	//   "description": "List Instances (physical servers).",
2219	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/instances",
2220	//   "httpMethod": "GET",
2221	//   "id": "baremetalsolution.projects.locations.instances.list",
2222	//   "parameterOrder": [
2223	//     "parent"
2224	//   ],
2225	//   "parameters": {
2226	//     "pageSize": {
2227	//       "description": "The maximum number of items to return.",
2228	//       "format": "int32",
2229	//       "location": "query",
2230	//       "type": "integer"
2231	//     },
2232	//     "pageToken": {
2233	//       "description": "The next_page_token value returned from a previous List request, if any.",
2234	//       "location": "query",
2235	//       "type": "string"
2236	//     },
2237	//     "parent": {
2238	//       "description": "Required. The location to list Instances in.",
2239	//       "location": "path",
2240	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2241	//       "required": true,
2242	//       "type": "string"
2243	//     }
2244	//   },
2245	//   "path": "v1alpha1/{+parent}/instances",
2246	//   "response": {
2247	//     "$ref": "ListInstancesResponse"
2248	//   },
2249	//   "scopes": [
2250	//     "https://www.googleapis.com/auth/cloud-platform"
2251	//   ]
2252	// }
2253
2254}
2255
2256// Pages invokes f for each page of results.
2257// A non-nil error returned from f will halt the iteration.
2258// The provided context supersedes any context provided to the Context method.
2259func (c *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
2260	c.ctx_ = ctx
2261	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2262	for {
2263		x, err := c.Do()
2264		if err != nil {
2265			return err
2266		}
2267		if err := f(x); err != nil {
2268			return err
2269		}
2270		if x.NextPageToken == "" {
2271			return nil
2272		}
2273		c.PageToken(x.NextPageToken)
2274	}
2275}
2276
2277// method id "baremetalsolution.projects.locations.instances.readSerialPortOutput":
2278
2279type ProjectsLocationsInstancesReadSerialPortOutputCall struct {
2280	s            *Service
2281	instance     string
2282	urlParams_   gensupport.URLParams
2283	ifNoneMatch_ string
2284	ctx_         context.Context
2285	header_      http.Header
2286}
2287
2288// ReadSerialPortOutput: Read the most recent serial port output from a
2289// machine.
2290//
2291// - instance: Name of the instance to get serial port output of.
2292func (r *ProjectsLocationsInstancesService) ReadSerialPortOutput(instance string) *ProjectsLocationsInstancesReadSerialPortOutputCall {
2293	c := &ProjectsLocationsInstancesReadSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2294	c.instance = instance
2295	return c
2296}
2297
2298// StartByte sets the optional parameter "startByte": The start byte of
2299// the serial port output to return.
2300func (c *ProjectsLocationsInstancesReadSerialPortOutputCall) StartByte(startByte int64) *ProjectsLocationsInstancesReadSerialPortOutputCall {
2301	c.urlParams_.Set("startByte", fmt.Sprint(startByte))
2302	return c
2303}
2304
2305// Fields allows partial responses to be retrieved. See
2306// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2307// for more information.
2308func (c *ProjectsLocationsInstancesReadSerialPortOutputCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesReadSerialPortOutputCall {
2309	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2310	return c
2311}
2312
2313// IfNoneMatch sets the optional parameter which makes the operation
2314// fail if the object's ETag matches the given value. This is useful for
2315// getting updates only after the object has changed since the last
2316// request. Use googleapi.IsNotModified to check whether the response
2317// error from Do is the result of In-None-Match.
2318func (c *ProjectsLocationsInstancesReadSerialPortOutputCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesReadSerialPortOutputCall {
2319	c.ifNoneMatch_ = entityTag
2320	return c
2321}
2322
2323// Context sets the context to be used in this call's Do method. Any
2324// pending HTTP request will be aborted if the provided context is
2325// canceled.
2326func (c *ProjectsLocationsInstancesReadSerialPortOutputCall) Context(ctx context.Context) *ProjectsLocationsInstancesReadSerialPortOutputCall {
2327	c.ctx_ = ctx
2328	return c
2329}
2330
2331// Header returns an http.Header that can be modified by the caller to
2332// add HTTP headers to the request.
2333func (c *ProjectsLocationsInstancesReadSerialPortOutputCall) Header() http.Header {
2334	if c.header_ == nil {
2335		c.header_ = make(http.Header)
2336	}
2337	return c.header_
2338}
2339
2340func (c *ProjectsLocationsInstancesReadSerialPortOutputCall) doRequest(alt string) (*http.Response, error) {
2341	reqHeaders := make(http.Header)
2342	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
2343	for k, v := range c.header_ {
2344		reqHeaders[k] = v
2345	}
2346	reqHeaders.Set("User-Agent", c.s.userAgent())
2347	if c.ifNoneMatch_ != "" {
2348		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2349	}
2350	var body io.Reader = nil
2351	c.urlParams_.Set("alt", alt)
2352	c.urlParams_.Set("prettyPrint", "false")
2353	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+instance}:readSerialPortOutput")
2354	urls += "?" + c.urlParams_.Encode()
2355	req, err := http.NewRequest("GET", urls, body)
2356	if err != nil {
2357		return nil, err
2358	}
2359	req.Header = reqHeaders
2360	googleapi.Expand(req.URL, map[string]string{
2361		"instance": c.instance,
2362	})
2363	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2364}
2365
2366// Do executes the "baremetalsolution.projects.locations.instances.readSerialPortOutput" call.
2367// Exactly one of *SerialPortOutput or error will be non-nil. Any
2368// non-2xx status code is an error. Response headers are in either
2369// *SerialPortOutput.ServerResponse.Header or (if a response was
2370// returned at all) in error.(*googleapi.Error).Header. Use
2371// googleapi.IsNotModified to check whether the returned error was
2372// because http.StatusNotModified was returned.
2373func (c *ProjectsLocationsInstancesReadSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) {
2374	gensupport.SetOptions(c.urlParams_, opts...)
2375	res, err := c.doRequest("json")
2376	if res != nil && res.StatusCode == http.StatusNotModified {
2377		if res.Body != nil {
2378			res.Body.Close()
2379		}
2380		return nil, &googleapi.Error{
2381			Code:   res.StatusCode,
2382			Header: res.Header,
2383		}
2384	}
2385	if err != nil {
2386		return nil, err
2387	}
2388	defer googleapi.CloseBody(res)
2389	if err := googleapi.CheckResponse(res); err != nil {
2390		return nil, err
2391	}
2392	ret := &SerialPortOutput{
2393		ServerResponse: googleapi.ServerResponse{
2394			Header:         res.Header,
2395			HTTPStatusCode: res.StatusCode,
2396		},
2397	}
2398	target := &ret
2399	if err := gensupport.DecodeResponse(target, res); err != nil {
2400		return nil, err
2401	}
2402	return ret, nil
2403	// {
2404	//   "description": "Read the most recent serial port output from a machine.",
2405	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:readSerialPortOutput",
2406	//   "httpMethod": "GET",
2407	//   "id": "baremetalsolution.projects.locations.instances.readSerialPortOutput",
2408	//   "parameterOrder": [
2409	//     "instance"
2410	//   ],
2411	//   "parameters": {
2412	//     "instance": {
2413	//       "description": "Required. Name of the instance to get serial port output of.",
2414	//       "location": "path",
2415	//       "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
2416	//       "required": true,
2417	//       "type": "string"
2418	//     },
2419	//     "startByte": {
2420	//       "description": "Optional. The start byte of the serial port output to return.",
2421	//       "format": "int64",
2422	//       "location": "query",
2423	//       "type": "string"
2424	//     }
2425	//   },
2426	//   "path": "v1alpha1/{+instance}:readSerialPortOutput",
2427	//   "response": {
2428	//     "$ref": "SerialPortOutput"
2429	//   },
2430	//   "scopes": [
2431	//     "https://www.googleapis.com/auth/cloud-platform"
2432	//   ]
2433	// }
2434
2435}
2436
2437// method id "baremetalsolution.projects.locations.instances.resetInstance":
2438
2439type ProjectsLocationsInstancesResetInstanceCall struct {
2440	s                    *Service
2441	instance             string
2442	resetinstancerequest *ResetInstanceRequest
2443	urlParams_           gensupport.URLParams
2444	ctx_                 context.Context
2445	header_              http.Header
2446}
2447
2448// ResetInstance: Perform an ungraceful, hard reset on a machine
2449// (equivalent to physically turning power off and then back on).
2450//
2451// - instance: Name of the instance to reset.
2452func (r *ProjectsLocationsInstancesService) ResetInstance(instance string, resetinstancerequest *ResetInstanceRequest) *ProjectsLocationsInstancesResetInstanceCall {
2453	c := &ProjectsLocationsInstancesResetInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2454	c.instance = instance
2455	c.resetinstancerequest = resetinstancerequest
2456	return c
2457}
2458
2459// Fields allows partial responses to be retrieved. See
2460// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2461// for more information.
2462func (c *ProjectsLocationsInstancesResetInstanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesResetInstanceCall {
2463	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2464	return c
2465}
2466
2467// Context sets the context to be used in this call's Do method. Any
2468// pending HTTP request will be aborted if the provided context is
2469// canceled.
2470func (c *ProjectsLocationsInstancesResetInstanceCall) Context(ctx context.Context) *ProjectsLocationsInstancesResetInstanceCall {
2471	c.ctx_ = ctx
2472	return c
2473}
2474
2475// Header returns an http.Header that can be modified by the caller to
2476// add HTTP headers to the request.
2477func (c *ProjectsLocationsInstancesResetInstanceCall) Header() http.Header {
2478	if c.header_ == nil {
2479		c.header_ = make(http.Header)
2480	}
2481	return c.header_
2482}
2483
2484func (c *ProjectsLocationsInstancesResetInstanceCall) doRequest(alt string) (*http.Response, error) {
2485	reqHeaders := make(http.Header)
2486	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
2487	for k, v := range c.header_ {
2488		reqHeaders[k] = v
2489	}
2490	reqHeaders.Set("User-Agent", c.s.userAgent())
2491	var body io.Reader = nil
2492	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetinstancerequest)
2493	if err != nil {
2494		return nil, err
2495	}
2496	reqHeaders.Set("Content-Type", "application/json")
2497	c.urlParams_.Set("alt", alt)
2498	c.urlParams_.Set("prettyPrint", "false")
2499	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+instance}:resetInstance")
2500	urls += "?" + c.urlParams_.Encode()
2501	req, err := http.NewRequest("POST", urls, body)
2502	if err != nil {
2503		return nil, err
2504	}
2505	req.Header = reqHeaders
2506	googleapi.Expand(req.URL, map[string]string{
2507		"instance": c.instance,
2508	})
2509	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2510}
2511
2512// Do executes the "baremetalsolution.projects.locations.instances.resetInstance" call.
2513// Exactly one of *ResetInstanceResponse or error will be non-nil. Any
2514// non-2xx status code is an error. Response headers are in either
2515// *ResetInstanceResponse.ServerResponse.Header or (if a response was
2516// returned at all) in error.(*googleapi.Error).Header. Use
2517// googleapi.IsNotModified to check whether the returned error was
2518// because http.StatusNotModified was returned.
2519func (c *ProjectsLocationsInstancesResetInstanceCall) Do(opts ...googleapi.CallOption) (*ResetInstanceResponse, error) {
2520	gensupport.SetOptions(c.urlParams_, opts...)
2521	res, err := c.doRequest("json")
2522	if res != nil && res.StatusCode == http.StatusNotModified {
2523		if res.Body != nil {
2524			res.Body.Close()
2525		}
2526		return nil, &googleapi.Error{
2527			Code:   res.StatusCode,
2528			Header: res.Header,
2529		}
2530	}
2531	if err != nil {
2532		return nil, err
2533	}
2534	defer googleapi.CloseBody(res)
2535	if err := googleapi.CheckResponse(res); err != nil {
2536		return nil, err
2537	}
2538	ret := &ResetInstanceResponse{
2539		ServerResponse: googleapi.ServerResponse{
2540			Header:         res.Header,
2541			HTTPStatusCode: res.StatusCode,
2542		},
2543	}
2544	target := &ret
2545	if err := gensupport.DecodeResponse(target, res); err != nil {
2546		return nil, err
2547	}
2548	return ret, nil
2549	// {
2550	//   "description": "Perform an ungraceful, hard reset on a machine (equivalent to physically turning power off and then back on).",
2551	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:resetInstance",
2552	//   "httpMethod": "POST",
2553	//   "id": "baremetalsolution.projects.locations.instances.resetInstance",
2554	//   "parameterOrder": [
2555	//     "instance"
2556	//   ],
2557	//   "parameters": {
2558	//     "instance": {
2559	//       "description": "Required. Name of the instance to reset.",
2560	//       "location": "path",
2561	//       "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
2562	//       "required": true,
2563	//       "type": "string"
2564	//     }
2565	//   },
2566	//   "path": "v1alpha1/{+instance}:resetInstance",
2567	//   "request": {
2568	//     "$ref": "ResetInstanceRequest"
2569	//   },
2570	//   "response": {
2571	//     "$ref": "ResetInstanceResponse"
2572	//   },
2573	//   "scopes": [
2574	//     "https://www.googleapis.com/auth/cloud-platform"
2575	//   ]
2576	// }
2577
2578}
2579
2580// method id "baremetalsolution.projects.locations.luns.get":
2581
2582type ProjectsLocationsLunsGetCall struct {
2583	s            *Service
2584	name         string
2585	urlParams_   gensupport.URLParams
2586	ifNoneMatch_ string
2587	ctx_         context.Context
2588	header_      http.Header
2589}
2590
2591// Get: Get details for a specific named Lun.
2592//
2593// - name: The name of the Lun to retrieve.
2594func (r *ProjectsLocationsLunsService) Get(name string) *ProjectsLocationsLunsGetCall {
2595	c := &ProjectsLocationsLunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2596	c.name = name
2597	return c
2598}
2599
2600// Fields allows partial responses to be retrieved. See
2601// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2602// for more information.
2603func (c *ProjectsLocationsLunsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLunsGetCall {
2604	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2605	return c
2606}
2607
2608// IfNoneMatch sets the optional parameter which makes the operation
2609// fail if the object's ETag matches the given value. This is useful for
2610// getting updates only after the object has changed since the last
2611// request. Use googleapi.IsNotModified to check whether the response
2612// error from Do is the result of In-None-Match.
2613func (c *ProjectsLocationsLunsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLunsGetCall {
2614	c.ifNoneMatch_ = entityTag
2615	return c
2616}
2617
2618// Context sets the context to be used in this call's Do method. Any
2619// pending HTTP request will be aborted if the provided context is
2620// canceled.
2621func (c *ProjectsLocationsLunsGetCall) Context(ctx context.Context) *ProjectsLocationsLunsGetCall {
2622	c.ctx_ = ctx
2623	return c
2624}
2625
2626// Header returns an http.Header that can be modified by the caller to
2627// add HTTP headers to the request.
2628func (c *ProjectsLocationsLunsGetCall) Header() http.Header {
2629	if c.header_ == nil {
2630		c.header_ = make(http.Header)
2631	}
2632	return c.header_
2633}
2634
2635func (c *ProjectsLocationsLunsGetCall) doRequest(alt string) (*http.Response, error) {
2636	reqHeaders := make(http.Header)
2637	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
2638	for k, v := range c.header_ {
2639		reqHeaders[k] = v
2640	}
2641	reqHeaders.Set("User-Agent", c.s.userAgent())
2642	if c.ifNoneMatch_ != "" {
2643		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2644	}
2645	var body io.Reader = nil
2646	c.urlParams_.Set("alt", alt)
2647	c.urlParams_.Set("prettyPrint", "false")
2648	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2649	urls += "?" + c.urlParams_.Encode()
2650	req, err := http.NewRequest("GET", urls, body)
2651	if err != nil {
2652		return nil, err
2653	}
2654	req.Header = reqHeaders
2655	googleapi.Expand(req.URL, map[string]string{
2656		"name": c.name,
2657	})
2658	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2659}
2660
2661// Do executes the "baremetalsolution.projects.locations.luns.get" call.
2662// Exactly one of *Lun or error will be non-nil. Any non-2xx status code
2663// is an error. Response headers are in either
2664// *Lun.ServerResponse.Header or (if a response was returned at all) in
2665// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2666// whether the returned error was because http.StatusNotModified was
2667// returned.
2668func (c *ProjectsLocationsLunsGetCall) Do(opts ...googleapi.CallOption) (*Lun, error) {
2669	gensupport.SetOptions(c.urlParams_, opts...)
2670	res, err := c.doRequest("json")
2671	if res != nil && res.StatusCode == http.StatusNotModified {
2672		if res.Body != nil {
2673			res.Body.Close()
2674		}
2675		return nil, &googleapi.Error{
2676			Code:   res.StatusCode,
2677			Header: res.Header,
2678		}
2679	}
2680	if err != nil {
2681		return nil, err
2682	}
2683	defer googleapi.CloseBody(res)
2684	if err := googleapi.CheckResponse(res); err != nil {
2685		return nil, err
2686	}
2687	ret := &Lun{
2688		ServerResponse: googleapi.ServerResponse{
2689			Header:         res.Header,
2690			HTTPStatusCode: res.StatusCode,
2691		},
2692	}
2693	target := &ret
2694	if err := gensupport.DecodeResponse(target, res); err != nil {
2695		return nil, err
2696	}
2697	return ret, nil
2698	// {
2699	//   "description": "Get details for a specific named Lun.",
2700	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/luns/{lunsId}",
2701	//   "httpMethod": "GET",
2702	//   "id": "baremetalsolution.projects.locations.luns.get",
2703	//   "parameterOrder": [
2704	//     "name"
2705	//   ],
2706	//   "parameters": {
2707	//     "name": {
2708	//       "description": "Required. The name of the Lun to retrieve.",
2709	//       "location": "path",
2710	//       "pattern": "^projects/[^/]+/locations/[^/]+/luns/[^/]+$",
2711	//       "required": true,
2712	//       "type": "string"
2713	//     }
2714	//   },
2715	//   "path": "v1alpha1/{+name}",
2716	//   "response": {
2717	//     "$ref": "Lun"
2718	//   },
2719	//   "scopes": [
2720	//     "https://www.googleapis.com/auth/cloud-platform"
2721	//   ]
2722	// }
2723
2724}
2725
2726// method id "baremetalsolution.projects.locations.luns.list":
2727
2728type ProjectsLocationsLunsListCall struct {
2729	s            *Service
2730	parent       string
2731	urlParams_   gensupport.URLParams
2732	ifNoneMatch_ string
2733	ctx_         context.Context
2734	header_      http.Header
2735}
2736
2737// List: List Luns.
2738//
2739// - parent: The location to list Luns in.
2740func (r *ProjectsLocationsLunsService) List(parent string) *ProjectsLocationsLunsListCall {
2741	c := &ProjectsLocationsLunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2742	c.parent = parent
2743	return c
2744}
2745
2746// PageSize sets the optional parameter "pageSize": The maximum number
2747// of items to return.
2748func (c *ProjectsLocationsLunsListCall) PageSize(pageSize int64) *ProjectsLocationsLunsListCall {
2749	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2750	return c
2751}
2752
2753// PageToken sets the optional parameter "pageToken": The
2754// next_page_token value returned from a previous List request, if any.
2755func (c *ProjectsLocationsLunsListCall) PageToken(pageToken string) *ProjectsLocationsLunsListCall {
2756	c.urlParams_.Set("pageToken", pageToken)
2757	return c
2758}
2759
2760// Fields allows partial responses to be retrieved. See
2761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2762// for more information.
2763func (c *ProjectsLocationsLunsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLunsListCall {
2764	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2765	return c
2766}
2767
2768// IfNoneMatch sets the optional parameter which makes the operation
2769// fail if the object's ETag matches the given value. This is useful for
2770// getting updates only after the object has changed since the last
2771// request. Use googleapi.IsNotModified to check whether the response
2772// error from Do is the result of In-None-Match.
2773func (c *ProjectsLocationsLunsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLunsListCall {
2774	c.ifNoneMatch_ = entityTag
2775	return c
2776}
2777
2778// Context sets the context to be used in this call's Do method. Any
2779// pending HTTP request will be aborted if the provided context is
2780// canceled.
2781func (c *ProjectsLocationsLunsListCall) Context(ctx context.Context) *ProjectsLocationsLunsListCall {
2782	c.ctx_ = ctx
2783	return c
2784}
2785
2786// Header returns an http.Header that can be modified by the caller to
2787// add HTTP headers to the request.
2788func (c *ProjectsLocationsLunsListCall) Header() http.Header {
2789	if c.header_ == nil {
2790		c.header_ = make(http.Header)
2791	}
2792	return c.header_
2793}
2794
2795func (c *ProjectsLocationsLunsListCall) doRequest(alt string) (*http.Response, error) {
2796	reqHeaders := make(http.Header)
2797	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
2798	for k, v := range c.header_ {
2799		reqHeaders[k] = v
2800	}
2801	reqHeaders.Set("User-Agent", c.s.userAgent())
2802	if c.ifNoneMatch_ != "" {
2803		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2804	}
2805	var body io.Reader = nil
2806	c.urlParams_.Set("alt", alt)
2807	c.urlParams_.Set("prettyPrint", "false")
2808	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/luns")
2809	urls += "?" + c.urlParams_.Encode()
2810	req, err := http.NewRequest("GET", urls, body)
2811	if err != nil {
2812		return nil, err
2813	}
2814	req.Header = reqHeaders
2815	googleapi.Expand(req.URL, map[string]string{
2816		"parent": c.parent,
2817	})
2818	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2819}
2820
2821// Do executes the "baremetalsolution.projects.locations.luns.list" call.
2822// Exactly one of *ListLunsResponse or error will be non-nil. Any
2823// non-2xx status code is an error. Response headers are in either
2824// *ListLunsResponse.ServerResponse.Header or (if a response was
2825// returned at all) in error.(*googleapi.Error).Header. Use
2826// googleapi.IsNotModified to check whether the returned error was
2827// because http.StatusNotModified was returned.
2828func (c *ProjectsLocationsLunsListCall) Do(opts ...googleapi.CallOption) (*ListLunsResponse, error) {
2829	gensupport.SetOptions(c.urlParams_, opts...)
2830	res, err := c.doRequest("json")
2831	if res != nil && res.StatusCode == http.StatusNotModified {
2832		if res.Body != nil {
2833			res.Body.Close()
2834		}
2835		return nil, &googleapi.Error{
2836			Code:   res.StatusCode,
2837			Header: res.Header,
2838		}
2839	}
2840	if err != nil {
2841		return nil, err
2842	}
2843	defer googleapi.CloseBody(res)
2844	if err := googleapi.CheckResponse(res); err != nil {
2845		return nil, err
2846	}
2847	ret := &ListLunsResponse{
2848		ServerResponse: googleapi.ServerResponse{
2849			Header:         res.Header,
2850			HTTPStatusCode: res.StatusCode,
2851		},
2852	}
2853	target := &ret
2854	if err := gensupport.DecodeResponse(target, res); err != nil {
2855		return nil, err
2856	}
2857	return ret, nil
2858	// {
2859	//   "description": "List Luns.",
2860	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/luns",
2861	//   "httpMethod": "GET",
2862	//   "id": "baremetalsolution.projects.locations.luns.list",
2863	//   "parameterOrder": [
2864	//     "parent"
2865	//   ],
2866	//   "parameters": {
2867	//     "pageSize": {
2868	//       "description": "The maximum number of items to return.",
2869	//       "format": "int32",
2870	//       "location": "query",
2871	//       "type": "integer"
2872	//     },
2873	//     "pageToken": {
2874	//       "description": "The next_page_token value returned from a previous List request, if any.",
2875	//       "location": "query",
2876	//       "type": "string"
2877	//     },
2878	//     "parent": {
2879	//       "description": "Required. The location to list Luns in.",
2880	//       "location": "path",
2881	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2882	//       "required": true,
2883	//       "type": "string"
2884	//     }
2885	//   },
2886	//   "path": "v1alpha1/{+parent}/luns",
2887	//   "response": {
2888	//     "$ref": "ListLunsResponse"
2889	//   },
2890	//   "scopes": [
2891	//     "https://www.googleapis.com/auth/cloud-platform"
2892	//   ]
2893	// }
2894
2895}
2896
2897// Pages invokes f for each page of results.
2898// A non-nil error returned from f will halt the iteration.
2899// The provided context supersedes any context provided to the Context method.
2900func (c *ProjectsLocationsLunsListCall) Pages(ctx context.Context, f func(*ListLunsResponse) error) error {
2901	c.ctx_ = ctx
2902	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2903	for {
2904		x, err := c.Do()
2905		if err != nil {
2906			return err
2907		}
2908		if err := f(x); err != nil {
2909			return err
2910		}
2911		if x.NextPageToken == "" {
2912			return nil
2913		}
2914		c.PageToken(x.NextPageToken)
2915	}
2916}
2917
2918// method id "baremetalsolution.projects.locations.volumes.get":
2919
2920type ProjectsLocationsVolumesGetCall struct {
2921	s            *Service
2922	name         string
2923	urlParams_   gensupport.URLParams
2924	ifNoneMatch_ string
2925	ctx_         context.Context
2926	header_      http.Header
2927}
2928
2929// Get: Get details for a specific named Volume.
2930//
2931// - name: The name of the Volume to retrieve.
2932func (r *ProjectsLocationsVolumesService) Get(name string) *ProjectsLocationsVolumesGetCall {
2933	c := &ProjectsLocationsVolumesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2934	c.name = name
2935	return c
2936}
2937
2938// Fields allows partial responses to be retrieved. See
2939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2940// for more information.
2941func (c *ProjectsLocationsVolumesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesGetCall {
2942	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2943	return c
2944}
2945
2946// IfNoneMatch sets the optional parameter which makes the operation
2947// fail if the object's ETag matches the given value. This is useful for
2948// getting updates only after the object has changed since the last
2949// request. Use googleapi.IsNotModified to check whether the response
2950// error from Do is the result of In-None-Match.
2951func (c *ProjectsLocationsVolumesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesGetCall {
2952	c.ifNoneMatch_ = entityTag
2953	return c
2954}
2955
2956// Context sets the context to be used in this call's Do method. Any
2957// pending HTTP request will be aborted if the provided context is
2958// canceled.
2959func (c *ProjectsLocationsVolumesGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesGetCall {
2960	c.ctx_ = ctx
2961	return c
2962}
2963
2964// Header returns an http.Header that can be modified by the caller to
2965// add HTTP headers to the request.
2966func (c *ProjectsLocationsVolumesGetCall) Header() http.Header {
2967	if c.header_ == nil {
2968		c.header_ = make(http.Header)
2969	}
2970	return c.header_
2971}
2972
2973func (c *ProjectsLocationsVolumesGetCall) doRequest(alt string) (*http.Response, error) {
2974	reqHeaders := make(http.Header)
2975	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
2976	for k, v := range c.header_ {
2977		reqHeaders[k] = v
2978	}
2979	reqHeaders.Set("User-Agent", c.s.userAgent())
2980	if c.ifNoneMatch_ != "" {
2981		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2982	}
2983	var body io.Reader = nil
2984	c.urlParams_.Set("alt", alt)
2985	c.urlParams_.Set("prettyPrint", "false")
2986	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2987	urls += "?" + c.urlParams_.Encode()
2988	req, err := http.NewRequest("GET", urls, body)
2989	if err != nil {
2990		return nil, err
2991	}
2992	req.Header = reqHeaders
2993	googleapi.Expand(req.URL, map[string]string{
2994		"name": c.name,
2995	})
2996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2997}
2998
2999// Do executes the "baremetalsolution.projects.locations.volumes.get" call.
3000// Exactly one of *Volume or error will be non-nil. Any non-2xx status
3001// code is an error. Response headers are in either
3002// *Volume.ServerResponse.Header or (if a response was returned at all)
3003// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3004// check whether the returned error was because http.StatusNotModified
3005// was returned.
3006func (c *ProjectsLocationsVolumesGetCall) Do(opts ...googleapi.CallOption) (*Volume, error) {
3007	gensupport.SetOptions(c.urlParams_, opts...)
3008	res, err := c.doRequest("json")
3009	if res != nil && res.StatusCode == http.StatusNotModified {
3010		if res.Body != nil {
3011			res.Body.Close()
3012		}
3013		return nil, &googleapi.Error{
3014			Code:   res.StatusCode,
3015			Header: res.Header,
3016		}
3017	}
3018	if err != nil {
3019		return nil, err
3020	}
3021	defer googleapi.CloseBody(res)
3022	if err := googleapi.CheckResponse(res); err != nil {
3023		return nil, err
3024	}
3025	ret := &Volume{
3026		ServerResponse: googleapi.ServerResponse{
3027			Header:         res.Header,
3028			HTTPStatusCode: res.StatusCode,
3029		},
3030	}
3031	target := &ret
3032	if err := gensupport.DecodeResponse(target, res); err != nil {
3033		return nil, err
3034	}
3035	return ret, nil
3036	// {
3037	//   "description": "Get details for a specific named Volume.",
3038	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}",
3039	//   "httpMethod": "GET",
3040	//   "id": "baremetalsolution.projects.locations.volumes.get",
3041	//   "parameterOrder": [
3042	//     "name"
3043	//   ],
3044	//   "parameters": {
3045	//     "name": {
3046	//       "description": "Required. The name of the Volume to retrieve.",
3047	//       "location": "path",
3048	//       "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$",
3049	//       "required": true,
3050	//       "type": "string"
3051	//     }
3052	//   },
3053	//   "path": "v1alpha1/{+name}",
3054	//   "response": {
3055	//     "$ref": "Volume"
3056	//   },
3057	//   "scopes": [
3058	//     "https://www.googleapis.com/auth/cloud-platform"
3059	//   ]
3060	// }
3061
3062}
3063
3064// method id "baremetalsolution.projects.locations.volumes.list":
3065
3066type ProjectsLocationsVolumesListCall struct {
3067	s            *Service
3068	parent       string
3069	urlParams_   gensupport.URLParams
3070	ifNoneMatch_ string
3071	ctx_         context.Context
3072	header_      http.Header
3073}
3074
3075// List: List the volumes for the specified project
3076//
3077// - parent: The location to list Volumes in.
3078func (r *ProjectsLocationsVolumesService) List(parent string) *ProjectsLocationsVolumesListCall {
3079	c := &ProjectsLocationsVolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3080	c.parent = parent
3081	return c
3082}
3083
3084// PageSize sets the optional parameter "pageSize": The maximum number
3085// of items to return.
3086func (c *ProjectsLocationsVolumesListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesListCall {
3087	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3088	return c
3089}
3090
3091// PageToken sets the optional parameter "pageToken": The
3092// next_page_token value returned from a previous List request, if any.
3093func (c *ProjectsLocationsVolumesListCall) PageToken(pageToken string) *ProjectsLocationsVolumesListCall {
3094	c.urlParams_.Set("pageToken", pageToken)
3095	return c
3096}
3097
3098// Fields allows partial responses to be retrieved. See
3099// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3100// for more information.
3101func (c *ProjectsLocationsVolumesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesListCall {
3102	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3103	return c
3104}
3105
3106// IfNoneMatch sets the optional parameter which makes the operation
3107// fail if the object's ETag matches the given value. This is useful for
3108// getting updates only after the object has changed since the last
3109// request. Use googleapi.IsNotModified to check whether the response
3110// error from Do is the result of In-None-Match.
3111func (c *ProjectsLocationsVolumesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesListCall {
3112	c.ifNoneMatch_ = entityTag
3113	return c
3114}
3115
3116// Context sets the context to be used in this call's Do method. Any
3117// pending HTTP request will be aborted if the provided context is
3118// canceled.
3119func (c *ProjectsLocationsVolumesListCall) Context(ctx context.Context) *ProjectsLocationsVolumesListCall {
3120	c.ctx_ = ctx
3121	return c
3122}
3123
3124// Header returns an http.Header that can be modified by the caller to
3125// add HTTP headers to the request.
3126func (c *ProjectsLocationsVolumesListCall) Header() http.Header {
3127	if c.header_ == nil {
3128		c.header_ = make(http.Header)
3129	}
3130	return c.header_
3131}
3132
3133func (c *ProjectsLocationsVolumesListCall) doRequest(alt string) (*http.Response, error) {
3134	reqHeaders := make(http.Header)
3135	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
3136	for k, v := range c.header_ {
3137		reqHeaders[k] = v
3138	}
3139	reqHeaders.Set("User-Agent", c.s.userAgent())
3140	if c.ifNoneMatch_ != "" {
3141		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3142	}
3143	var body io.Reader = nil
3144	c.urlParams_.Set("alt", alt)
3145	c.urlParams_.Set("prettyPrint", "false")
3146	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/volumes")
3147	urls += "?" + c.urlParams_.Encode()
3148	req, err := http.NewRequest("GET", urls, body)
3149	if err != nil {
3150		return nil, err
3151	}
3152	req.Header = reqHeaders
3153	googleapi.Expand(req.URL, map[string]string{
3154		"parent": c.parent,
3155	})
3156	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3157}
3158
3159// Do executes the "baremetalsolution.projects.locations.volumes.list" call.
3160// Exactly one of *ListVolumesResponse or error will be non-nil. Any
3161// non-2xx status code is an error. Response headers are in either
3162// *ListVolumesResponse.ServerResponse.Header or (if a response was
3163// returned at all) in error.(*googleapi.Error).Header. Use
3164// googleapi.IsNotModified to check whether the returned error was
3165// because http.StatusNotModified was returned.
3166func (c *ProjectsLocationsVolumesListCall) Do(opts ...googleapi.CallOption) (*ListVolumesResponse, error) {
3167	gensupport.SetOptions(c.urlParams_, opts...)
3168	res, err := c.doRequest("json")
3169	if res != nil && res.StatusCode == http.StatusNotModified {
3170		if res.Body != nil {
3171			res.Body.Close()
3172		}
3173		return nil, &googleapi.Error{
3174			Code:   res.StatusCode,
3175			Header: res.Header,
3176		}
3177	}
3178	if err != nil {
3179		return nil, err
3180	}
3181	defer googleapi.CloseBody(res)
3182	if err := googleapi.CheckResponse(res); err != nil {
3183		return nil, err
3184	}
3185	ret := &ListVolumesResponse{
3186		ServerResponse: googleapi.ServerResponse{
3187			Header:         res.Header,
3188			HTTPStatusCode: res.StatusCode,
3189		},
3190	}
3191	target := &ret
3192	if err := gensupport.DecodeResponse(target, res); err != nil {
3193		return nil, err
3194	}
3195	return ret, nil
3196	// {
3197	//   "description": "List the volumes for the specified project",
3198	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/volumes",
3199	//   "httpMethod": "GET",
3200	//   "id": "baremetalsolution.projects.locations.volumes.list",
3201	//   "parameterOrder": [
3202	//     "parent"
3203	//   ],
3204	//   "parameters": {
3205	//     "pageSize": {
3206	//       "description": "The maximum number of items to return.",
3207	//       "format": "int32",
3208	//       "location": "query",
3209	//       "type": "integer"
3210	//     },
3211	//     "pageToken": {
3212	//       "description": "The next_page_token value returned from a previous List request, if any.",
3213	//       "location": "query",
3214	//       "type": "string"
3215	//     },
3216	//     "parent": {
3217	//       "description": "Required. The location to list Volumes in.",
3218	//       "location": "path",
3219	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
3220	//       "required": true,
3221	//       "type": "string"
3222	//     }
3223	//   },
3224	//   "path": "v1alpha1/{+parent}/volumes",
3225	//   "response": {
3226	//     "$ref": "ListVolumesResponse"
3227	//   },
3228	//   "scopes": [
3229	//     "https://www.googleapis.com/auth/cloud-platform"
3230	//   ]
3231	// }
3232
3233}
3234
3235// Pages invokes f for each page of results.
3236// A non-nil error returned from f will halt the iteration.
3237// The provided context supersedes any context provided to the Context method.
3238func (c *ProjectsLocationsVolumesListCall) Pages(ctx context.Context, f func(*ListVolumesResponse) error) error {
3239	c.ctx_ = ctx
3240	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3241	for {
3242		x, err := c.Do()
3243		if err != nil {
3244			return err
3245		}
3246		if err := f(x); err != nil {
3247			return err
3248		}
3249		if x.NextPageToken == "" {
3250			return nil
3251		}
3252		c.PageToken(x.NextPageToken)
3253	}
3254}
3255
3256// method id "baremetalsolution.projects.locations.volumes.patch":
3257
3258type ProjectsLocationsVolumesPatchCall struct {
3259	s          *Service
3260	name       string
3261	volume     *Volume
3262	urlParams_ gensupport.URLParams
3263	ctx_       context.Context
3264	header_    http.Header
3265}
3266
3267// Patch: Update certain parameters on a Volume.
3268//
3269// - name: Output only. The name of this Volume.
3270func (r *ProjectsLocationsVolumesService) Patch(name string, volume *Volume) *ProjectsLocationsVolumesPatchCall {
3271	c := &ProjectsLocationsVolumesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3272	c.name = name
3273	c.volume = volume
3274	return c
3275}
3276
3277// UpdateMask sets the optional parameter "updateMask": The list of
3278// fields to update. The only currently supported field is
3279// `snapshot_auto_delete_behavior`.
3280func (c *ProjectsLocationsVolumesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesPatchCall {
3281	c.urlParams_.Set("updateMask", updateMask)
3282	return c
3283}
3284
3285// Fields allows partial responses to be retrieved. See
3286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3287// for more information.
3288func (c *ProjectsLocationsVolumesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesPatchCall {
3289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3290	return c
3291}
3292
3293// Context sets the context to be used in this call's Do method. Any
3294// pending HTTP request will be aborted if the provided context is
3295// canceled.
3296func (c *ProjectsLocationsVolumesPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesPatchCall {
3297	c.ctx_ = ctx
3298	return c
3299}
3300
3301// Header returns an http.Header that can be modified by the caller to
3302// add HTTP headers to the request.
3303func (c *ProjectsLocationsVolumesPatchCall) Header() http.Header {
3304	if c.header_ == nil {
3305		c.header_ = make(http.Header)
3306	}
3307	return c.header_
3308}
3309
3310func (c *ProjectsLocationsVolumesPatchCall) doRequest(alt string) (*http.Response, error) {
3311	reqHeaders := make(http.Header)
3312	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
3313	for k, v := range c.header_ {
3314		reqHeaders[k] = v
3315	}
3316	reqHeaders.Set("User-Agent", c.s.userAgent())
3317	var body io.Reader = nil
3318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.volume)
3319	if err != nil {
3320		return nil, err
3321	}
3322	reqHeaders.Set("Content-Type", "application/json")
3323	c.urlParams_.Set("alt", alt)
3324	c.urlParams_.Set("prettyPrint", "false")
3325	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3326	urls += "?" + c.urlParams_.Encode()
3327	req, err := http.NewRequest("PATCH", urls, body)
3328	if err != nil {
3329		return nil, err
3330	}
3331	req.Header = reqHeaders
3332	googleapi.Expand(req.URL, map[string]string{
3333		"name": c.name,
3334	})
3335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3336}
3337
3338// Do executes the "baremetalsolution.projects.locations.volumes.patch" call.
3339// Exactly one of *Volume or error will be non-nil. Any non-2xx status
3340// code is an error. Response headers are in either
3341// *Volume.ServerResponse.Header or (if a response was returned at all)
3342// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3343// check whether the returned error was because http.StatusNotModified
3344// was returned.
3345func (c *ProjectsLocationsVolumesPatchCall) Do(opts ...googleapi.CallOption) (*Volume, error) {
3346	gensupport.SetOptions(c.urlParams_, opts...)
3347	res, err := c.doRequest("json")
3348	if res != nil && res.StatusCode == http.StatusNotModified {
3349		if res.Body != nil {
3350			res.Body.Close()
3351		}
3352		return nil, &googleapi.Error{
3353			Code:   res.StatusCode,
3354			Header: res.Header,
3355		}
3356	}
3357	if err != nil {
3358		return nil, err
3359	}
3360	defer googleapi.CloseBody(res)
3361	if err := googleapi.CheckResponse(res); err != nil {
3362		return nil, err
3363	}
3364	ret := &Volume{
3365		ServerResponse: googleapi.ServerResponse{
3366			Header:         res.Header,
3367			HTTPStatusCode: res.StatusCode,
3368		},
3369	}
3370	target := &ret
3371	if err := gensupport.DecodeResponse(target, res); err != nil {
3372		return nil, err
3373	}
3374	return ret, nil
3375	// {
3376	//   "description": "Update certain parameters on a Volume.",
3377	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}",
3378	//   "httpMethod": "PATCH",
3379	//   "id": "baremetalsolution.projects.locations.volumes.patch",
3380	//   "parameterOrder": [
3381	//     "name"
3382	//   ],
3383	//   "parameters": {
3384	//     "name": {
3385	//       "description": "Output only. The name of this Volume.",
3386	//       "location": "path",
3387	//       "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$",
3388	//       "required": true,
3389	//       "type": "string"
3390	//     },
3391	//     "updateMask": {
3392	//       "description": "The list of fields to update. The only currently supported field is `snapshot_auto_delete_behavior`.",
3393	//       "format": "google-fieldmask",
3394	//       "location": "query",
3395	//       "type": "string"
3396	//     }
3397	//   },
3398	//   "path": "v1alpha1/{+name}",
3399	//   "request": {
3400	//     "$ref": "Volume"
3401	//   },
3402	//   "response": {
3403	//     "$ref": "Volume"
3404	//   },
3405	//   "scopes": [
3406	//     "https://www.googleapis.com/auth/cloud-platform"
3407	//   ]
3408	// }
3409
3410}
3411
3412// method id "baremetalsolution.projects.locations.volumes.setVolumeSnapshotSchedulePolicy":
3413
3414type ProjectsLocationsVolumesSetVolumeSnapshotSchedulePolicyCall struct {
3415	s                                      *Service
3416	volume                                 string
3417	setvolumesnapshotschedulepolicyrequest *SetVolumeSnapshotSchedulePolicyRequest
3418	urlParams_                             gensupport.URLParams
3419	ctx_                                   context.Context
3420	header_                                http.Header
3421}
3422
3423// SetVolumeSnapshotSchedulePolicy: Sets the specified snapshot schedule
3424// policy on the specified volume.
3425//
3426// - volume: Name of the volume to set snapshot schedule policy on.
3427func (r *ProjectsLocationsVolumesService) SetVolumeSnapshotSchedulePolicy(volume string, setvolumesnapshotschedulepolicyrequest *SetVolumeSnapshotSchedulePolicyRequest) *ProjectsLocationsVolumesSetVolumeSnapshotSchedulePolicyCall {
3428	c := &ProjectsLocationsVolumesSetVolumeSnapshotSchedulePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3429	c.volume = volume
3430	c.setvolumesnapshotschedulepolicyrequest = setvolumesnapshotschedulepolicyrequest
3431	return c
3432}
3433
3434// Fields allows partial responses to be retrieved. See
3435// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3436// for more information.
3437func (c *ProjectsLocationsVolumesSetVolumeSnapshotSchedulePolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSetVolumeSnapshotSchedulePolicyCall {
3438	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3439	return c
3440}
3441
3442// Context sets the context to be used in this call's Do method. Any
3443// pending HTTP request will be aborted if the provided context is
3444// canceled.
3445func (c *ProjectsLocationsVolumesSetVolumeSnapshotSchedulePolicyCall) Context(ctx context.Context) *ProjectsLocationsVolumesSetVolumeSnapshotSchedulePolicyCall {
3446	c.ctx_ = ctx
3447	return c
3448}
3449
3450// Header returns an http.Header that can be modified by the caller to
3451// add HTTP headers to the request.
3452func (c *ProjectsLocationsVolumesSetVolumeSnapshotSchedulePolicyCall) Header() http.Header {
3453	if c.header_ == nil {
3454		c.header_ = make(http.Header)
3455	}
3456	return c.header_
3457}
3458
3459func (c *ProjectsLocationsVolumesSetVolumeSnapshotSchedulePolicyCall) doRequest(alt string) (*http.Response, error) {
3460	reqHeaders := make(http.Header)
3461	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
3462	for k, v := range c.header_ {
3463		reqHeaders[k] = v
3464	}
3465	reqHeaders.Set("User-Agent", c.s.userAgent())
3466	var body io.Reader = nil
3467	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setvolumesnapshotschedulepolicyrequest)
3468	if err != nil {
3469		return nil, err
3470	}
3471	reqHeaders.Set("Content-Type", "application/json")
3472	c.urlParams_.Set("alt", alt)
3473	c.urlParams_.Set("prettyPrint", "false")
3474	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+volume}:setVolumeSnapshotSchedulePolicy")
3475	urls += "?" + c.urlParams_.Encode()
3476	req, err := http.NewRequest("POST", urls, body)
3477	if err != nil {
3478		return nil, err
3479	}
3480	req.Header = reqHeaders
3481	googleapi.Expand(req.URL, map[string]string{
3482		"volume": c.volume,
3483	})
3484	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3485}
3486
3487// Do executes the "baremetalsolution.projects.locations.volumes.setVolumeSnapshotSchedulePolicy" call.
3488// Exactly one of *SetVolumeSnapshotSchedulePolicyResponse or error will
3489// be non-nil. Any non-2xx status code is an error. Response headers are
3490// in either
3491// *SetVolumeSnapshotSchedulePolicyResponse.ServerResponse.Header or (if
3492// a response was returned at all) in error.(*googleapi.Error).Header.
3493// Use googleapi.IsNotModified to check whether the returned error was
3494// because http.StatusNotModified was returned.
3495func (c *ProjectsLocationsVolumesSetVolumeSnapshotSchedulePolicyCall) Do(opts ...googleapi.CallOption) (*SetVolumeSnapshotSchedulePolicyResponse, error) {
3496	gensupport.SetOptions(c.urlParams_, opts...)
3497	res, err := c.doRequest("json")
3498	if res != nil && res.StatusCode == http.StatusNotModified {
3499		if res.Body != nil {
3500			res.Body.Close()
3501		}
3502		return nil, &googleapi.Error{
3503			Code:   res.StatusCode,
3504			Header: res.Header,
3505		}
3506	}
3507	if err != nil {
3508		return nil, err
3509	}
3510	defer googleapi.CloseBody(res)
3511	if err := googleapi.CheckResponse(res); err != nil {
3512		return nil, err
3513	}
3514	ret := &SetVolumeSnapshotSchedulePolicyResponse{
3515		ServerResponse: googleapi.ServerResponse{
3516			Header:         res.Header,
3517			HTTPStatusCode: res.StatusCode,
3518		},
3519	}
3520	target := &ret
3521	if err := gensupport.DecodeResponse(target, res); err != nil {
3522		return nil, err
3523	}
3524	return ret, nil
3525	// {
3526	//   "description": "Sets the specified snapshot schedule policy on the specified volume.",
3527	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}:setVolumeSnapshotSchedulePolicy",
3528	//   "httpMethod": "POST",
3529	//   "id": "baremetalsolution.projects.locations.volumes.setVolumeSnapshotSchedulePolicy",
3530	//   "parameterOrder": [
3531	//     "volume"
3532	//   ],
3533	//   "parameters": {
3534	//     "volume": {
3535	//       "description": "Required. Name of the volume to set snapshot schedule policy on.",
3536	//       "location": "path",
3537	//       "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$",
3538	//       "required": true,
3539	//       "type": "string"
3540	//     }
3541	//   },
3542	//   "path": "v1alpha1/{+volume}:setVolumeSnapshotSchedulePolicy",
3543	//   "request": {
3544	//     "$ref": "SetVolumeSnapshotSchedulePolicyRequest"
3545	//   },
3546	//   "response": {
3547	//     "$ref": "SetVolumeSnapshotSchedulePolicyResponse"
3548	//   },
3549	//   "scopes": [
3550	//     "https://www.googleapis.com/auth/cloud-platform"
3551	//   ]
3552	// }
3553
3554}
3555
3556// method id "baremetalsolution.projects.locations.volumes.snapshots.create":
3557
3558type ProjectsLocationsVolumesSnapshotsCreateCall struct {
3559	s              *Service
3560	parent         string
3561	volumesnapshot *VolumeSnapshot
3562	urlParams_     gensupport.URLParams
3563	ctx_           context.Context
3564	header_        http.Header
3565}
3566
3567// Create: Create snapshot of the specified Volume
3568//
3569// - parent: The Volume containing the VolumeSnapshots.
3570func (r *ProjectsLocationsVolumesSnapshotsService) Create(parent string, volumesnapshot *VolumeSnapshot) *ProjectsLocationsVolumesSnapshotsCreateCall {
3571	c := &ProjectsLocationsVolumesSnapshotsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3572	c.parent = parent
3573	c.volumesnapshot = volumesnapshot
3574	return c
3575}
3576
3577// Fields allows partial responses to be retrieved. See
3578// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3579// for more information.
3580func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsCreateCall {
3581	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3582	return c
3583}
3584
3585// Context sets the context to be used in this call's Do method. Any
3586// pending HTTP request will be aborted if the provided context is
3587// canceled.
3588func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsCreateCall {
3589	c.ctx_ = ctx
3590	return c
3591}
3592
3593// Header returns an http.Header that can be modified by the caller to
3594// add HTTP headers to the request.
3595func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Header() http.Header {
3596	if c.header_ == nil {
3597		c.header_ = make(http.Header)
3598	}
3599	return c.header_
3600}
3601
3602func (c *ProjectsLocationsVolumesSnapshotsCreateCall) doRequest(alt string) (*http.Response, error) {
3603	reqHeaders := make(http.Header)
3604	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
3605	for k, v := range c.header_ {
3606		reqHeaders[k] = v
3607	}
3608	reqHeaders.Set("User-Agent", c.s.userAgent())
3609	var body io.Reader = nil
3610	body, err := googleapi.WithoutDataWrapper.JSONReader(c.volumesnapshot)
3611	if err != nil {
3612		return nil, err
3613	}
3614	reqHeaders.Set("Content-Type", "application/json")
3615	c.urlParams_.Set("alt", alt)
3616	c.urlParams_.Set("prettyPrint", "false")
3617	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/snapshots")
3618	urls += "?" + c.urlParams_.Encode()
3619	req, err := http.NewRequest("POST", urls, body)
3620	if err != nil {
3621		return nil, err
3622	}
3623	req.Header = reqHeaders
3624	googleapi.Expand(req.URL, map[string]string{
3625		"parent": c.parent,
3626	})
3627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3628}
3629
3630// Do executes the "baremetalsolution.projects.locations.volumes.snapshots.create" call.
3631// Exactly one of *VolumeSnapshot or error will be non-nil. Any non-2xx
3632// status code is an error. Response headers are in either
3633// *VolumeSnapshot.ServerResponse.Header or (if a response was returned
3634// at all) in error.(*googleapi.Error).Header. Use
3635// googleapi.IsNotModified to check whether the returned error was
3636// because http.StatusNotModified was returned.
3637func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Do(opts ...googleapi.CallOption) (*VolumeSnapshot, error) {
3638	gensupport.SetOptions(c.urlParams_, opts...)
3639	res, err := c.doRequest("json")
3640	if res != nil && res.StatusCode == http.StatusNotModified {
3641		if res.Body != nil {
3642			res.Body.Close()
3643		}
3644		return nil, &googleapi.Error{
3645			Code:   res.StatusCode,
3646			Header: res.Header,
3647		}
3648	}
3649	if err != nil {
3650		return nil, err
3651	}
3652	defer googleapi.CloseBody(res)
3653	if err := googleapi.CheckResponse(res); err != nil {
3654		return nil, err
3655	}
3656	ret := &VolumeSnapshot{
3657		ServerResponse: googleapi.ServerResponse{
3658			Header:         res.Header,
3659			HTTPStatusCode: res.StatusCode,
3660		},
3661	}
3662	target := &ret
3663	if err := gensupport.DecodeResponse(target, res); err != nil {
3664		return nil, err
3665	}
3666	return ret, nil
3667	// {
3668	//   "description": "Create snapshot of the specified Volume",
3669	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots",
3670	//   "httpMethod": "POST",
3671	//   "id": "baremetalsolution.projects.locations.volumes.snapshots.create",
3672	//   "parameterOrder": [
3673	//     "parent"
3674	//   ],
3675	//   "parameters": {
3676	//     "parent": {
3677	//       "description": "Required. The Volume containing the VolumeSnapshots.",
3678	//       "location": "path",
3679	//       "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$",
3680	//       "required": true,
3681	//       "type": "string"
3682	//     }
3683	//   },
3684	//   "path": "v1alpha1/{+parent}/snapshots",
3685	//   "request": {
3686	//     "$ref": "VolumeSnapshot"
3687	//   },
3688	//   "response": {
3689	//     "$ref": "VolumeSnapshot"
3690	//   },
3691	//   "scopes": [
3692	//     "https://www.googleapis.com/auth/cloud-platform"
3693	//   ]
3694	// }
3695
3696}
3697
3698// method id "baremetalsolution.projects.locations.volumes.snapshots.delete":
3699
3700type ProjectsLocationsVolumesSnapshotsDeleteCall struct {
3701	s          *Service
3702	name       string
3703	urlParams_ gensupport.URLParams
3704	ctx_       context.Context
3705	header_    http.Header
3706}
3707
3708// Delete: Delete specific named snapshot.
3709//
3710// - name: The name of the snapshot to delete.
3711func (r *ProjectsLocationsVolumesSnapshotsService) Delete(name string) *ProjectsLocationsVolumesSnapshotsDeleteCall {
3712	c := &ProjectsLocationsVolumesSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3713	c.name = name
3714	return c
3715}
3716
3717// Fields allows partial responses to be retrieved. See
3718// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3719// for more information.
3720func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsDeleteCall {
3721	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3722	return c
3723}
3724
3725// Context sets the context to be used in this call's Do method. Any
3726// pending HTTP request will be aborted if the provided context is
3727// canceled.
3728func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsDeleteCall {
3729	c.ctx_ = ctx
3730	return c
3731}
3732
3733// Header returns an http.Header that can be modified by the caller to
3734// add HTTP headers to the request.
3735func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Header() http.Header {
3736	if c.header_ == nil {
3737		c.header_ = make(http.Header)
3738	}
3739	return c.header_
3740}
3741
3742func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) {
3743	reqHeaders := make(http.Header)
3744	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
3745	for k, v := range c.header_ {
3746		reqHeaders[k] = v
3747	}
3748	reqHeaders.Set("User-Agent", c.s.userAgent())
3749	var body io.Reader = nil
3750	c.urlParams_.Set("alt", alt)
3751	c.urlParams_.Set("prettyPrint", "false")
3752	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3753	urls += "?" + c.urlParams_.Encode()
3754	req, err := http.NewRequest("DELETE", urls, body)
3755	if err != nil {
3756		return nil, err
3757	}
3758	req.Header = reqHeaders
3759	googleapi.Expand(req.URL, map[string]string{
3760		"name": c.name,
3761	})
3762	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3763}
3764
3765// Do executes the "baremetalsolution.projects.locations.volumes.snapshots.delete" call.
3766// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3767// code is an error. Response headers are in either
3768// *Empty.ServerResponse.Header or (if a response was returned at all)
3769// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3770// check whether the returned error was because http.StatusNotModified
3771// was returned.
3772func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3773	gensupport.SetOptions(c.urlParams_, opts...)
3774	res, err := c.doRequest("json")
3775	if res != nil && res.StatusCode == http.StatusNotModified {
3776		if res.Body != nil {
3777			res.Body.Close()
3778		}
3779		return nil, &googleapi.Error{
3780			Code:   res.StatusCode,
3781			Header: res.Header,
3782		}
3783	}
3784	if err != nil {
3785		return nil, err
3786	}
3787	defer googleapi.CloseBody(res)
3788	if err := googleapi.CheckResponse(res); err != nil {
3789		return nil, err
3790	}
3791	ret := &Empty{
3792		ServerResponse: googleapi.ServerResponse{
3793			Header:         res.Header,
3794			HTTPStatusCode: res.StatusCode,
3795		},
3796	}
3797	target := &ret
3798	if err := gensupport.DecodeResponse(target, res); err != nil {
3799		return nil, err
3800	}
3801	return ret, nil
3802	// {
3803	//   "description": "Delete specific named snapshot.",
3804	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots/{snapshotsId}",
3805	//   "httpMethod": "DELETE",
3806	//   "id": "baremetalsolution.projects.locations.volumes.snapshots.delete",
3807	//   "parameterOrder": [
3808	//     "name"
3809	//   ],
3810	//   "parameters": {
3811	//     "name": {
3812	//       "description": "Required. The name of the snapshot to delete.",
3813	//       "location": "path",
3814	//       "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+$",
3815	//       "required": true,
3816	//       "type": "string"
3817	//     }
3818	//   },
3819	//   "path": "v1alpha1/{+name}",
3820	//   "response": {
3821	//     "$ref": "Empty"
3822	//   },
3823	//   "scopes": [
3824	//     "https://www.googleapis.com/auth/cloud-platform"
3825	//   ]
3826	// }
3827
3828}
3829
3830// method id "baremetalsolution.projects.locations.volumes.snapshots.get":
3831
3832type ProjectsLocationsVolumesSnapshotsGetCall struct {
3833	s            *Service
3834	name         string
3835	urlParams_   gensupport.URLParams
3836	ifNoneMatch_ string
3837	ctx_         context.Context
3838	header_      http.Header
3839}
3840
3841// Get: Get details for a specific named snapshot.
3842//
3843// - name: The name of the snapshot to retrieve.
3844func (r *ProjectsLocationsVolumesSnapshotsService) Get(name string) *ProjectsLocationsVolumesSnapshotsGetCall {
3845	c := &ProjectsLocationsVolumesSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3846	c.name = name
3847	return c
3848}
3849
3850// Fields allows partial responses to be retrieved. See
3851// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3852// for more information.
3853func (c *ProjectsLocationsVolumesSnapshotsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsGetCall {
3854	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3855	return c
3856}
3857
3858// IfNoneMatch sets the optional parameter which makes the operation
3859// fail if the object's ETag matches the given value. This is useful for
3860// getting updates only after the object has changed since the last
3861// request. Use googleapi.IsNotModified to check whether the response
3862// error from Do is the result of In-None-Match.
3863func (c *ProjectsLocationsVolumesSnapshotsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesSnapshotsGetCall {
3864	c.ifNoneMatch_ = entityTag
3865	return c
3866}
3867
3868// Context sets the context to be used in this call's Do method. Any
3869// pending HTTP request will be aborted if the provided context is
3870// canceled.
3871func (c *ProjectsLocationsVolumesSnapshotsGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsGetCall {
3872	c.ctx_ = ctx
3873	return c
3874}
3875
3876// Header returns an http.Header that can be modified by the caller to
3877// add HTTP headers to the request.
3878func (c *ProjectsLocationsVolumesSnapshotsGetCall) Header() http.Header {
3879	if c.header_ == nil {
3880		c.header_ = make(http.Header)
3881	}
3882	return c.header_
3883}
3884
3885func (c *ProjectsLocationsVolumesSnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
3886	reqHeaders := make(http.Header)
3887	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
3888	for k, v := range c.header_ {
3889		reqHeaders[k] = v
3890	}
3891	reqHeaders.Set("User-Agent", c.s.userAgent())
3892	if c.ifNoneMatch_ != "" {
3893		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3894	}
3895	var body io.Reader = nil
3896	c.urlParams_.Set("alt", alt)
3897	c.urlParams_.Set("prettyPrint", "false")
3898	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3899	urls += "?" + c.urlParams_.Encode()
3900	req, err := http.NewRequest("GET", urls, body)
3901	if err != nil {
3902		return nil, err
3903	}
3904	req.Header = reqHeaders
3905	googleapi.Expand(req.URL, map[string]string{
3906		"name": c.name,
3907	})
3908	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3909}
3910
3911// Do executes the "baremetalsolution.projects.locations.volumes.snapshots.get" call.
3912// Exactly one of *VolumeSnapshot or error will be non-nil. Any non-2xx
3913// status code is an error. Response headers are in either
3914// *VolumeSnapshot.ServerResponse.Header or (if a response was returned
3915// at all) in error.(*googleapi.Error).Header. Use
3916// googleapi.IsNotModified to check whether the returned error was
3917// because http.StatusNotModified was returned.
3918func (c *ProjectsLocationsVolumesSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*VolumeSnapshot, error) {
3919	gensupport.SetOptions(c.urlParams_, opts...)
3920	res, err := c.doRequest("json")
3921	if res != nil && res.StatusCode == http.StatusNotModified {
3922		if res.Body != nil {
3923			res.Body.Close()
3924		}
3925		return nil, &googleapi.Error{
3926			Code:   res.StatusCode,
3927			Header: res.Header,
3928		}
3929	}
3930	if err != nil {
3931		return nil, err
3932	}
3933	defer googleapi.CloseBody(res)
3934	if err := googleapi.CheckResponse(res); err != nil {
3935		return nil, err
3936	}
3937	ret := &VolumeSnapshot{
3938		ServerResponse: googleapi.ServerResponse{
3939			Header:         res.Header,
3940			HTTPStatusCode: res.StatusCode,
3941		},
3942	}
3943	target := &ret
3944	if err := gensupport.DecodeResponse(target, res); err != nil {
3945		return nil, err
3946	}
3947	return ret, nil
3948	// {
3949	//   "description": "Get details for a specific named snapshot.",
3950	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots/{snapshotsId}",
3951	//   "httpMethod": "GET",
3952	//   "id": "baremetalsolution.projects.locations.volumes.snapshots.get",
3953	//   "parameterOrder": [
3954	//     "name"
3955	//   ],
3956	//   "parameters": {
3957	//     "name": {
3958	//       "description": "Required. The name of the snapshot to retrieve.",
3959	//       "location": "path",
3960	//       "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+$",
3961	//       "required": true,
3962	//       "type": "string"
3963	//     }
3964	//   },
3965	//   "path": "v1alpha1/{+name}",
3966	//   "response": {
3967	//     "$ref": "VolumeSnapshot"
3968	//   },
3969	//   "scopes": [
3970	//     "https://www.googleapis.com/auth/cloud-platform"
3971	//   ]
3972	// }
3973
3974}
3975
3976// method id "baremetalsolution.projects.locations.volumes.snapshots.list":
3977
3978type ProjectsLocationsVolumesSnapshotsListCall struct {
3979	s            *Service
3980	parent       string
3981	urlParams_   gensupport.URLParams
3982	ifNoneMatch_ string
3983	ctx_         context.Context
3984	header_      http.Header
3985}
3986
3987// List: List the Snapshots for the specified Volume
3988//
3989// - parent: The Volume containing the VolumeSnapshots.
3990func (r *ProjectsLocationsVolumesSnapshotsService) List(parent string) *ProjectsLocationsVolumesSnapshotsListCall {
3991	c := &ProjectsLocationsVolumesSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3992	c.parent = parent
3993	return c
3994}
3995
3996// PageSize sets the optional parameter "pageSize": The maximum number
3997// of items to return.
3998func (c *ProjectsLocationsVolumesSnapshotsListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesSnapshotsListCall {
3999	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4000	return c
4001}
4002
4003// PageToken sets the optional parameter "pageToken": The
4004// next_page_token value returned from a previous List request, if any.
4005func (c *ProjectsLocationsVolumesSnapshotsListCall) PageToken(pageToken string) *ProjectsLocationsVolumesSnapshotsListCall {
4006	c.urlParams_.Set("pageToken", pageToken)
4007	return c
4008}
4009
4010// Fields allows partial responses to be retrieved. See
4011// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4012// for more information.
4013func (c *ProjectsLocationsVolumesSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsListCall {
4014	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4015	return c
4016}
4017
4018// IfNoneMatch sets the optional parameter which makes the operation
4019// fail if the object's ETag matches the given value. This is useful for
4020// getting updates only after the object has changed since the last
4021// request. Use googleapi.IsNotModified to check whether the response
4022// error from Do is the result of In-None-Match.
4023func (c *ProjectsLocationsVolumesSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesSnapshotsListCall {
4024	c.ifNoneMatch_ = entityTag
4025	return c
4026}
4027
4028// Context sets the context to be used in this call's Do method. Any
4029// pending HTTP request will be aborted if the provided context is
4030// canceled.
4031func (c *ProjectsLocationsVolumesSnapshotsListCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsListCall {
4032	c.ctx_ = ctx
4033	return c
4034}
4035
4036// Header returns an http.Header that can be modified by the caller to
4037// add HTTP headers to the request.
4038func (c *ProjectsLocationsVolumesSnapshotsListCall) Header() http.Header {
4039	if c.header_ == nil {
4040		c.header_ = make(http.Header)
4041	}
4042	return c.header_
4043}
4044
4045func (c *ProjectsLocationsVolumesSnapshotsListCall) doRequest(alt string) (*http.Response, error) {
4046	reqHeaders := make(http.Header)
4047	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
4048	for k, v := range c.header_ {
4049		reqHeaders[k] = v
4050	}
4051	reqHeaders.Set("User-Agent", c.s.userAgent())
4052	if c.ifNoneMatch_ != "" {
4053		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4054	}
4055	var body io.Reader = nil
4056	c.urlParams_.Set("alt", alt)
4057	c.urlParams_.Set("prettyPrint", "false")
4058	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/snapshots")
4059	urls += "?" + c.urlParams_.Encode()
4060	req, err := http.NewRequest("GET", urls, body)
4061	if err != nil {
4062		return nil, err
4063	}
4064	req.Header = reqHeaders
4065	googleapi.Expand(req.URL, map[string]string{
4066		"parent": c.parent,
4067	})
4068	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4069}
4070
4071// Do executes the "baremetalsolution.projects.locations.volumes.snapshots.list" call.
4072// Exactly one of *ListVolumeSnapshotsResponse or error will be non-nil.
4073// Any non-2xx status code is an error. Response headers are in either
4074// *ListVolumeSnapshotsResponse.ServerResponse.Header or (if a response
4075// was returned at all) in error.(*googleapi.Error).Header. Use
4076// googleapi.IsNotModified to check whether the returned error was
4077// because http.StatusNotModified was returned.
4078func (c *ProjectsLocationsVolumesSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListVolumeSnapshotsResponse, error) {
4079	gensupport.SetOptions(c.urlParams_, opts...)
4080	res, err := c.doRequest("json")
4081	if res != nil && res.StatusCode == http.StatusNotModified {
4082		if res.Body != nil {
4083			res.Body.Close()
4084		}
4085		return nil, &googleapi.Error{
4086			Code:   res.StatusCode,
4087			Header: res.Header,
4088		}
4089	}
4090	if err != nil {
4091		return nil, err
4092	}
4093	defer googleapi.CloseBody(res)
4094	if err := googleapi.CheckResponse(res); err != nil {
4095		return nil, err
4096	}
4097	ret := &ListVolumeSnapshotsResponse{
4098		ServerResponse: googleapi.ServerResponse{
4099			Header:         res.Header,
4100			HTTPStatusCode: res.StatusCode,
4101		},
4102	}
4103	target := &ret
4104	if err := gensupport.DecodeResponse(target, res); err != nil {
4105		return nil, err
4106	}
4107	return ret, nil
4108	// {
4109	//   "description": "List the Snapshots for the specified Volume",
4110	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots",
4111	//   "httpMethod": "GET",
4112	//   "id": "baremetalsolution.projects.locations.volumes.snapshots.list",
4113	//   "parameterOrder": [
4114	//     "parent"
4115	//   ],
4116	//   "parameters": {
4117	//     "pageSize": {
4118	//       "description": "The maximum number of items to return.",
4119	//       "format": "int32",
4120	//       "location": "query",
4121	//       "type": "integer"
4122	//     },
4123	//     "pageToken": {
4124	//       "description": "The next_page_token value returned from a previous List request, if any.",
4125	//       "location": "query",
4126	//       "type": "string"
4127	//     },
4128	//     "parent": {
4129	//       "description": "Required. The Volume containing the VolumeSnapshots.",
4130	//       "location": "path",
4131	//       "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$",
4132	//       "required": true,
4133	//       "type": "string"
4134	//     }
4135	//   },
4136	//   "path": "v1alpha1/{+parent}/snapshots",
4137	//   "response": {
4138	//     "$ref": "ListVolumeSnapshotsResponse"
4139	//   },
4140	//   "scopes": [
4141	//     "https://www.googleapis.com/auth/cloud-platform"
4142	//   ]
4143	// }
4144
4145}
4146
4147// Pages invokes f for each page of results.
4148// A non-nil error returned from f will halt the iteration.
4149// The provided context supersedes any context provided to the Context method.
4150func (c *ProjectsLocationsVolumesSnapshotsListCall) Pages(ctx context.Context, f func(*ListVolumeSnapshotsResponse) error) error {
4151	c.ctx_ = ctx
4152	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4153	for {
4154		x, err := c.Do()
4155		if err != nil {
4156			return err
4157		}
4158		if err := f(x); err != nil {
4159			return err
4160		}
4161		if x.NextPageToken == "" {
4162			return nil
4163		}
4164		c.PageToken(x.NextPageToken)
4165	}
4166}
4167
4168// method id "baremetalsolution.projects.locations.volumes.snapshots.restore":
4169
4170type ProjectsLocationsVolumesSnapshotsRestoreCall struct {
4171	s                            *Service
4172	name                         string
4173	restorevolumesnapshotrequest *RestoreVolumeSnapshotRequest
4174	urlParams_                   gensupport.URLParams
4175	ctx_                         context.Context
4176	header_                      http.Header
4177}
4178
4179// Restore: Restore a VolumeSnapshot.
4180//
4181// - name: Name of the VolumeSnapshot to restore.
4182func (r *ProjectsLocationsVolumesSnapshotsService) Restore(name string, restorevolumesnapshotrequest *RestoreVolumeSnapshotRequest) *ProjectsLocationsVolumesSnapshotsRestoreCall {
4183	c := &ProjectsLocationsVolumesSnapshotsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4184	c.name = name
4185	c.restorevolumesnapshotrequest = restorevolumesnapshotrequest
4186	return c
4187}
4188
4189// Fields allows partial responses to be retrieved. See
4190// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4191// for more information.
4192func (c *ProjectsLocationsVolumesSnapshotsRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsRestoreCall {
4193	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4194	return c
4195}
4196
4197// Context sets the context to be used in this call's Do method. Any
4198// pending HTTP request will be aborted if the provided context is
4199// canceled.
4200func (c *ProjectsLocationsVolumesSnapshotsRestoreCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsRestoreCall {
4201	c.ctx_ = ctx
4202	return c
4203}
4204
4205// Header returns an http.Header that can be modified by the caller to
4206// add HTTP headers to the request.
4207func (c *ProjectsLocationsVolumesSnapshotsRestoreCall) Header() http.Header {
4208	if c.header_ == nil {
4209		c.header_ = make(http.Header)
4210	}
4211	return c.header_
4212}
4213
4214func (c *ProjectsLocationsVolumesSnapshotsRestoreCall) doRequest(alt string) (*http.Response, error) {
4215	reqHeaders := make(http.Header)
4216	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
4217	for k, v := range c.header_ {
4218		reqHeaders[k] = v
4219	}
4220	reqHeaders.Set("User-Agent", c.s.userAgent())
4221	var body io.Reader = nil
4222	body, err := googleapi.WithoutDataWrapper.JSONReader(c.restorevolumesnapshotrequest)
4223	if err != nil {
4224		return nil, err
4225	}
4226	reqHeaders.Set("Content-Type", "application/json")
4227	c.urlParams_.Set("alt", alt)
4228	c.urlParams_.Set("prettyPrint", "false")
4229	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:restore")
4230	urls += "?" + c.urlParams_.Encode()
4231	req, err := http.NewRequest("POST", urls, body)
4232	if err != nil {
4233		return nil, err
4234	}
4235	req.Header = reqHeaders
4236	googleapi.Expand(req.URL, map[string]string{
4237		"name": c.name,
4238	})
4239	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4240}
4241
4242// Do executes the "baremetalsolution.projects.locations.volumes.snapshots.restore" call.
4243// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4244// code is an error. Response headers are in either
4245// *Empty.ServerResponse.Header or (if a response was returned at all)
4246// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4247// check whether the returned error was because http.StatusNotModified
4248// was returned.
4249func (c *ProjectsLocationsVolumesSnapshotsRestoreCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4250	gensupport.SetOptions(c.urlParams_, opts...)
4251	res, err := c.doRequest("json")
4252	if res != nil && res.StatusCode == http.StatusNotModified {
4253		if res.Body != nil {
4254			res.Body.Close()
4255		}
4256		return nil, &googleapi.Error{
4257			Code:   res.StatusCode,
4258			Header: res.Header,
4259		}
4260	}
4261	if err != nil {
4262		return nil, err
4263	}
4264	defer googleapi.CloseBody(res)
4265	if err := googleapi.CheckResponse(res); err != nil {
4266		return nil, err
4267	}
4268	ret := &Empty{
4269		ServerResponse: googleapi.ServerResponse{
4270			Header:         res.Header,
4271			HTTPStatusCode: res.StatusCode,
4272		},
4273	}
4274	target := &ret
4275	if err := gensupport.DecodeResponse(target, res); err != nil {
4276		return nil, err
4277	}
4278	return ret, nil
4279	// {
4280	//   "description": "Restore a VolumeSnapshot.",
4281	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/snapshots/{snapshotsId}:restore",
4282	//   "httpMethod": "POST",
4283	//   "id": "baremetalsolution.projects.locations.volumes.snapshots.restore",
4284	//   "parameterOrder": [
4285	//     "name"
4286	//   ],
4287	//   "parameters": {
4288	//     "name": {
4289	//       "description": "Required. Name of the VolumeSnapshot to restore.",
4290	//       "location": "path",
4291	//       "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/snapshots/[^/]+$",
4292	//       "required": true,
4293	//       "type": "string"
4294	//     }
4295	//   },
4296	//   "path": "v1alpha1/{+name}:restore",
4297	//   "request": {
4298	//     "$ref": "RestoreVolumeSnapshotRequest"
4299	//   },
4300	//   "response": {
4301	//     "$ref": "Empty"
4302	//   },
4303	//   "scopes": [
4304	//     "https://www.googleapis.com/auth/cloud-platform"
4305	//   ]
4306	// }
4307
4308}
4309
4310// method id "baremetalsolution.projects.provisioningQuotas.list":
4311
4312type ProjectsProvisioningQuotasListCall struct {
4313	s            *Service
4314	parent       string
4315	urlParams_   gensupport.URLParams
4316	ifNoneMatch_ string
4317	ctx_         context.Context
4318	header_      http.Header
4319}
4320
4321// List: List the budget details to provision resources on a given
4322// project.
4323//
4324// - parent: The parent project containing the provisioning quotas.
4325func (r *ProjectsProvisioningQuotasService) List(parent string) *ProjectsProvisioningQuotasListCall {
4326	c := &ProjectsProvisioningQuotasListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4327	c.parent = parent
4328	return c
4329}
4330
4331// PageSize sets the optional parameter "pageSize": The maximum number
4332// of items to return.
4333func (c *ProjectsProvisioningQuotasListCall) PageSize(pageSize int64) *ProjectsProvisioningQuotasListCall {
4334	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4335	return c
4336}
4337
4338// PageToken sets the optional parameter "pageToken": The
4339// next_page_token value returned from a previous List request, if any.
4340func (c *ProjectsProvisioningQuotasListCall) PageToken(pageToken string) *ProjectsProvisioningQuotasListCall {
4341	c.urlParams_.Set("pageToken", pageToken)
4342	return c
4343}
4344
4345// Fields allows partial responses to be retrieved. See
4346// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4347// for more information.
4348func (c *ProjectsProvisioningQuotasListCall) Fields(s ...googleapi.Field) *ProjectsProvisioningQuotasListCall {
4349	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4350	return c
4351}
4352
4353// IfNoneMatch sets the optional parameter which makes the operation
4354// fail if the object's ETag matches the given value. This is useful for
4355// getting updates only after the object has changed since the last
4356// request. Use googleapi.IsNotModified to check whether the response
4357// error from Do is the result of In-None-Match.
4358func (c *ProjectsProvisioningQuotasListCall) IfNoneMatch(entityTag string) *ProjectsProvisioningQuotasListCall {
4359	c.ifNoneMatch_ = entityTag
4360	return c
4361}
4362
4363// Context sets the context to be used in this call's Do method. Any
4364// pending HTTP request will be aborted if the provided context is
4365// canceled.
4366func (c *ProjectsProvisioningQuotasListCall) Context(ctx context.Context) *ProjectsProvisioningQuotasListCall {
4367	c.ctx_ = ctx
4368	return c
4369}
4370
4371// Header returns an http.Header that can be modified by the caller to
4372// add HTTP headers to the request.
4373func (c *ProjectsProvisioningQuotasListCall) Header() http.Header {
4374	if c.header_ == nil {
4375		c.header_ = make(http.Header)
4376	}
4377	return c.header_
4378}
4379
4380func (c *ProjectsProvisioningQuotasListCall) doRequest(alt string) (*http.Response, error) {
4381	reqHeaders := make(http.Header)
4382	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
4383	for k, v := range c.header_ {
4384		reqHeaders[k] = v
4385	}
4386	reqHeaders.Set("User-Agent", c.s.userAgent())
4387	if c.ifNoneMatch_ != "" {
4388		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4389	}
4390	var body io.Reader = nil
4391	c.urlParams_.Set("alt", alt)
4392	c.urlParams_.Set("prettyPrint", "false")
4393	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/provisioningQuotas")
4394	urls += "?" + c.urlParams_.Encode()
4395	req, err := http.NewRequest("GET", urls, body)
4396	if err != nil {
4397		return nil, err
4398	}
4399	req.Header = reqHeaders
4400	googleapi.Expand(req.URL, map[string]string{
4401		"parent": c.parent,
4402	})
4403	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4404}
4405
4406// Do executes the "baremetalsolution.projects.provisioningQuotas.list" call.
4407// Exactly one of *ListProvisioningQuotasResponse or error will be
4408// non-nil. Any non-2xx status code is an error. Response headers are in
4409// either *ListProvisioningQuotasResponse.ServerResponse.Header or (if a
4410// response was returned at all) in error.(*googleapi.Error).Header. Use
4411// googleapi.IsNotModified to check whether the returned error was
4412// because http.StatusNotModified was returned.
4413func (c *ProjectsProvisioningQuotasListCall) Do(opts ...googleapi.CallOption) (*ListProvisioningQuotasResponse, error) {
4414	gensupport.SetOptions(c.urlParams_, opts...)
4415	res, err := c.doRequest("json")
4416	if res != nil && res.StatusCode == http.StatusNotModified {
4417		if res.Body != nil {
4418			res.Body.Close()
4419		}
4420		return nil, &googleapi.Error{
4421			Code:   res.StatusCode,
4422			Header: res.Header,
4423		}
4424	}
4425	if err != nil {
4426		return nil, err
4427	}
4428	defer googleapi.CloseBody(res)
4429	if err := googleapi.CheckResponse(res); err != nil {
4430		return nil, err
4431	}
4432	ret := &ListProvisioningQuotasResponse{
4433		ServerResponse: googleapi.ServerResponse{
4434			Header:         res.Header,
4435			HTTPStatusCode: res.StatusCode,
4436		},
4437	}
4438	target := &ret
4439	if err := gensupport.DecodeResponse(target, res); err != nil {
4440		return nil, err
4441	}
4442	return ret, nil
4443	// {
4444	//   "description": "List the budget details to provision resources on a given project.",
4445	//   "flatPath": "v1alpha1/projects/{projectsId}/provisioningQuotas",
4446	//   "httpMethod": "GET",
4447	//   "id": "baremetalsolution.projects.provisioningQuotas.list",
4448	//   "parameterOrder": [
4449	//     "parent"
4450	//   ],
4451	//   "parameters": {
4452	//     "pageSize": {
4453	//       "description": "The maximum number of items to return.",
4454	//       "format": "int32",
4455	//       "location": "query",
4456	//       "type": "integer"
4457	//     },
4458	//     "pageToken": {
4459	//       "description": "The next_page_token value returned from a previous List request, if any.",
4460	//       "location": "query",
4461	//       "type": "string"
4462	//     },
4463	//     "parent": {
4464	//       "description": "Required. The parent project containing the provisioning quotas.",
4465	//       "location": "path",
4466	//       "pattern": "^projects/[^/]+$",
4467	//       "required": true,
4468	//       "type": "string"
4469	//     }
4470	//   },
4471	//   "path": "v1alpha1/{+parent}/provisioningQuotas",
4472	//   "response": {
4473	//     "$ref": "ListProvisioningQuotasResponse"
4474	//   },
4475	//   "scopes": [
4476	//     "https://www.googleapis.com/auth/cloud-platform"
4477	//   ]
4478	// }
4479
4480}
4481
4482// Pages invokes f for each page of results.
4483// A non-nil error returned from f will halt the iteration.
4484// The provided context supersedes any context provided to the Context method.
4485func (c *ProjectsProvisioningQuotasListCall) Pages(ctx context.Context, f func(*ListProvisioningQuotasResponse) error) error {
4486	c.ctx_ = ctx
4487	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4488	for {
4489		x, err := c.Do()
4490		if err != nil {
4491			return err
4492		}
4493		if err := f(x); err != nil {
4494			return err
4495		}
4496		if x.NextPageToken == "" {
4497			return nil
4498		}
4499		c.PageToken(x.NextPageToken)
4500	}
4501}
4502
4503// method id "baremetalsolution.projects.snapshotSchedulePolicies.create":
4504
4505type ProjectsSnapshotSchedulePoliciesCreateCall struct {
4506	s                      *Service
4507	parent                 string
4508	snapshotschedulepolicy *SnapshotSchedulePolicy
4509	urlParams_             gensupport.URLParams
4510	ctx_                   context.Context
4511	header_                http.Header
4512}
4513
4514// Create: Create a SnapshotSchedulePolicy.
4515//
4516// - parent: The parent project containing the SnapshotSchedulePolicy.
4517func (r *ProjectsSnapshotSchedulePoliciesService) Create(parent string, snapshotschedulepolicy *SnapshotSchedulePolicy) *ProjectsSnapshotSchedulePoliciesCreateCall {
4518	c := &ProjectsSnapshotSchedulePoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4519	c.parent = parent
4520	c.snapshotschedulepolicy = snapshotschedulepolicy
4521	return c
4522}
4523
4524// SnapshotSchedulePolicyId sets the optional parameter
4525// "snapshotSchedulePolicyId": Required. Snapshot policy ID
4526func (c *ProjectsSnapshotSchedulePoliciesCreateCall) SnapshotSchedulePolicyId(snapshotSchedulePolicyId string) *ProjectsSnapshotSchedulePoliciesCreateCall {
4527	c.urlParams_.Set("snapshotSchedulePolicyId", snapshotSchedulePolicyId)
4528	return c
4529}
4530
4531// Fields allows partial responses to be retrieved. See
4532// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4533// for more information.
4534func (c *ProjectsSnapshotSchedulePoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsSnapshotSchedulePoliciesCreateCall {
4535	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4536	return c
4537}
4538
4539// Context sets the context to be used in this call's Do method. Any
4540// pending HTTP request will be aborted if the provided context is
4541// canceled.
4542func (c *ProjectsSnapshotSchedulePoliciesCreateCall) Context(ctx context.Context) *ProjectsSnapshotSchedulePoliciesCreateCall {
4543	c.ctx_ = ctx
4544	return c
4545}
4546
4547// Header returns an http.Header that can be modified by the caller to
4548// add HTTP headers to the request.
4549func (c *ProjectsSnapshotSchedulePoliciesCreateCall) Header() http.Header {
4550	if c.header_ == nil {
4551		c.header_ = make(http.Header)
4552	}
4553	return c.header_
4554}
4555
4556func (c *ProjectsSnapshotSchedulePoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
4557	reqHeaders := make(http.Header)
4558	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
4559	for k, v := range c.header_ {
4560		reqHeaders[k] = v
4561	}
4562	reqHeaders.Set("User-Agent", c.s.userAgent())
4563	var body io.Reader = nil
4564	body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshotschedulepolicy)
4565	if err != nil {
4566		return nil, err
4567	}
4568	reqHeaders.Set("Content-Type", "application/json")
4569	c.urlParams_.Set("alt", alt)
4570	c.urlParams_.Set("prettyPrint", "false")
4571	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/snapshotSchedulePolicies")
4572	urls += "?" + c.urlParams_.Encode()
4573	req, err := http.NewRequest("POST", urls, body)
4574	if err != nil {
4575		return nil, err
4576	}
4577	req.Header = reqHeaders
4578	googleapi.Expand(req.URL, map[string]string{
4579		"parent": c.parent,
4580	})
4581	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4582}
4583
4584// Do executes the "baremetalsolution.projects.snapshotSchedulePolicies.create" call.
4585// Exactly one of *SnapshotSchedulePolicy or error will be non-nil. Any
4586// non-2xx status code is an error. Response headers are in either
4587// *SnapshotSchedulePolicy.ServerResponse.Header or (if a response was
4588// returned at all) in error.(*googleapi.Error).Header. Use
4589// googleapi.IsNotModified to check whether the returned error was
4590// because http.StatusNotModified was returned.
4591func (c *ProjectsSnapshotSchedulePoliciesCreateCall) Do(opts ...googleapi.CallOption) (*SnapshotSchedulePolicy, error) {
4592	gensupport.SetOptions(c.urlParams_, opts...)
4593	res, err := c.doRequest("json")
4594	if res != nil && res.StatusCode == http.StatusNotModified {
4595		if res.Body != nil {
4596			res.Body.Close()
4597		}
4598		return nil, &googleapi.Error{
4599			Code:   res.StatusCode,
4600			Header: res.Header,
4601		}
4602	}
4603	if err != nil {
4604		return nil, err
4605	}
4606	defer googleapi.CloseBody(res)
4607	if err := googleapi.CheckResponse(res); err != nil {
4608		return nil, err
4609	}
4610	ret := &SnapshotSchedulePolicy{
4611		ServerResponse: googleapi.ServerResponse{
4612			Header:         res.Header,
4613			HTTPStatusCode: res.StatusCode,
4614		},
4615	}
4616	target := &ret
4617	if err := gensupport.DecodeResponse(target, res); err != nil {
4618		return nil, err
4619	}
4620	return ret, nil
4621	// {
4622	//   "description": "Create a SnapshotSchedulePolicy.",
4623	//   "flatPath": "v1alpha1/projects/{projectsId}/snapshotSchedulePolicies",
4624	//   "httpMethod": "POST",
4625	//   "id": "baremetalsolution.projects.snapshotSchedulePolicies.create",
4626	//   "parameterOrder": [
4627	//     "parent"
4628	//   ],
4629	//   "parameters": {
4630	//     "parent": {
4631	//       "description": "Required. The parent project containing the SnapshotSchedulePolicy.",
4632	//       "location": "path",
4633	//       "pattern": "^projects/[^/]+$",
4634	//       "required": true,
4635	//       "type": "string"
4636	//     },
4637	//     "snapshotSchedulePolicyId": {
4638	//       "description": "Required. Snapshot policy ID",
4639	//       "location": "query",
4640	//       "type": "string"
4641	//     }
4642	//   },
4643	//   "path": "v1alpha1/{+parent}/snapshotSchedulePolicies",
4644	//   "request": {
4645	//     "$ref": "SnapshotSchedulePolicy"
4646	//   },
4647	//   "response": {
4648	//     "$ref": "SnapshotSchedulePolicy"
4649	//   },
4650	//   "scopes": [
4651	//     "https://www.googleapis.com/auth/cloud-platform"
4652	//   ]
4653	// }
4654
4655}
4656
4657// method id "baremetalsolution.projects.snapshotSchedulePolicies.delete":
4658
4659type ProjectsSnapshotSchedulePoliciesDeleteCall struct {
4660	s          *Service
4661	name       string
4662	urlParams_ gensupport.URLParams
4663	ctx_       context.Context
4664	header_    http.Header
4665}
4666
4667// Delete: Delete removes named snapshot schedule policy
4668//
4669// - name: The name of the snapshot to delete.
4670func (r *ProjectsSnapshotSchedulePoliciesService) Delete(name string) *ProjectsSnapshotSchedulePoliciesDeleteCall {
4671	c := &ProjectsSnapshotSchedulePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4672	c.name = name
4673	return c
4674}
4675
4676// Fields allows partial responses to be retrieved. See
4677// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4678// for more information.
4679func (c *ProjectsSnapshotSchedulePoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsSnapshotSchedulePoliciesDeleteCall {
4680	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4681	return c
4682}
4683
4684// Context sets the context to be used in this call's Do method. Any
4685// pending HTTP request will be aborted if the provided context is
4686// canceled.
4687func (c *ProjectsSnapshotSchedulePoliciesDeleteCall) Context(ctx context.Context) *ProjectsSnapshotSchedulePoliciesDeleteCall {
4688	c.ctx_ = ctx
4689	return c
4690}
4691
4692// Header returns an http.Header that can be modified by the caller to
4693// add HTTP headers to the request.
4694func (c *ProjectsSnapshotSchedulePoliciesDeleteCall) Header() http.Header {
4695	if c.header_ == nil {
4696		c.header_ = make(http.Header)
4697	}
4698	return c.header_
4699}
4700
4701func (c *ProjectsSnapshotSchedulePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
4702	reqHeaders := make(http.Header)
4703	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
4704	for k, v := range c.header_ {
4705		reqHeaders[k] = v
4706	}
4707	reqHeaders.Set("User-Agent", c.s.userAgent())
4708	var body io.Reader = nil
4709	c.urlParams_.Set("alt", alt)
4710	c.urlParams_.Set("prettyPrint", "false")
4711	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4712	urls += "?" + c.urlParams_.Encode()
4713	req, err := http.NewRequest("DELETE", urls, body)
4714	if err != nil {
4715		return nil, err
4716	}
4717	req.Header = reqHeaders
4718	googleapi.Expand(req.URL, map[string]string{
4719		"name": c.name,
4720	})
4721	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4722}
4723
4724// Do executes the "baremetalsolution.projects.snapshotSchedulePolicies.delete" call.
4725// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4726// code is an error. Response headers are in either
4727// *Empty.ServerResponse.Header or (if a response was returned at all)
4728// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4729// check whether the returned error was because http.StatusNotModified
4730// was returned.
4731func (c *ProjectsSnapshotSchedulePoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4732	gensupport.SetOptions(c.urlParams_, opts...)
4733	res, err := c.doRequest("json")
4734	if res != nil && res.StatusCode == http.StatusNotModified {
4735		if res.Body != nil {
4736			res.Body.Close()
4737		}
4738		return nil, &googleapi.Error{
4739			Code:   res.StatusCode,
4740			Header: res.Header,
4741		}
4742	}
4743	if err != nil {
4744		return nil, err
4745	}
4746	defer googleapi.CloseBody(res)
4747	if err := googleapi.CheckResponse(res); err != nil {
4748		return nil, err
4749	}
4750	ret := &Empty{
4751		ServerResponse: googleapi.ServerResponse{
4752			Header:         res.Header,
4753			HTTPStatusCode: res.StatusCode,
4754		},
4755	}
4756	target := &ret
4757	if err := gensupport.DecodeResponse(target, res); err != nil {
4758		return nil, err
4759	}
4760	return ret, nil
4761	// {
4762	//   "description": "Delete removes named snapshot schedule policy",
4763	//   "flatPath": "v1alpha1/projects/{projectsId}/snapshotSchedulePolicies/{snapshotSchedulePoliciesId}",
4764	//   "httpMethod": "DELETE",
4765	//   "id": "baremetalsolution.projects.snapshotSchedulePolicies.delete",
4766	//   "parameterOrder": [
4767	//     "name"
4768	//   ],
4769	//   "parameters": {
4770	//     "name": {
4771	//       "description": "Required. The name of the snapshot to delete.",
4772	//       "location": "path",
4773	//       "pattern": "^projects/[^/]+/snapshotSchedulePolicies/[^/]+$",
4774	//       "required": true,
4775	//       "type": "string"
4776	//     }
4777	//   },
4778	//   "path": "v1alpha1/{+name}",
4779	//   "response": {
4780	//     "$ref": "Empty"
4781	//   },
4782	//   "scopes": [
4783	//     "https://www.googleapis.com/auth/cloud-platform"
4784	//   ]
4785	// }
4786
4787}
4788
4789// method id "baremetalsolution.projects.snapshotSchedulePolicies.get":
4790
4791type ProjectsSnapshotSchedulePoliciesGetCall struct {
4792	s            *Service
4793	name         string
4794	urlParams_   gensupport.URLParams
4795	ifNoneMatch_ string
4796	ctx_         context.Context
4797	header_      http.Header
4798}
4799
4800// Get: Get details for a specific snapshot schedule policy
4801//
4802// - name: The name of the policy to retrieve.
4803func (r *ProjectsSnapshotSchedulePoliciesService) Get(name string) *ProjectsSnapshotSchedulePoliciesGetCall {
4804	c := &ProjectsSnapshotSchedulePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4805	c.name = name
4806	return c
4807}
4808
4809// Fields allows partial responses to be retrieved. See
4810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4811// for more information.
4812func (c *ProjectsSnapshotSchedulePoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsSnapshotSchedulePoliciesGetCall {
4813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4814	return c
4815}
4816
4817// IfNoneMatch sets the optional parameter which makes the operation
4818// fail if the object's ETag matches the given value. This is useful for
4819// getting updates only after the object has changed since the last
4820// request. Use googleapi.IsNotModified to check whether the response
4821// error from Do is the result of In-None-Match.
4822func (c *ProjectsSnapshotSchedulePoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsSnapshotSchedulePoliciesGetCall {
4823	c.ifNoneMatch_ = entityTag
4824	return c
4825}
4826
4827// Context sets the context to be used in this call's Do method. Any
4828// pending HTTP request will be aborted if the provided context is
4829// canceled.
4830func (c *ProjectsSnapshotSchedulePoliciesGetCall) Context(ctx context.Context) *ProjectsSnapshotSchedulePoliciesGetCall {
4831	c.ctx_ = ctx
4832	return c
4833}
4834
4835// Header returns an http.Header that can be modified by the caller to
4836// add HTTP headers to the request.
4837func (c *ProjectsSnapshotSchedulePoliciesGetCall) Header() http.Header {
4838	if c.header_ == nil {
4839		c.header_ = make(http.Header)
4840	}
4841	return c.header_
4842}
4843
4844func (c *ProjectsSnapshotSchedulePoliciesGetCall) doRequest(alt string) (*http.Response, error) {
4845	reqHeaders := make(http.Header)
4846	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
4847	for k, v := range c.header_ {
4848		reqHeaders[k] = v
4849	}
4850	reqHeaders.Set("User-Agent", c.s.userAgent())
4851	if c.ifNoneMatch_ != "" {
4852		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4853	}
4854	var body io.Reader = nil
4855	c.urlParams_.Set("alt", alt)
4856	c.urlParams_.Set("prettyPrint", "false")
4857	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4858	urls += "?" + c.urlParams_.Encode()
4859	req, err := http.NewRequest("GET", urls, body)
4860	if err != nil {
4861		return nil, err
4862	}
4863	req.Header = reqHeaders
4864	googleapi.Expand(req.URL, map[string]string{
4865		"name": c.name,
4866	})
4867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4868}
4869
4870// Do executes the "baremetalsolution.projects.snapshotSchedulePolicies.get" call.
4871// Exactly one of *SnapshotSchedulePolicy or error will be non-nil. Any
4872// non-2xx status code is an error. Response headers are in either
4873// *SnapshotSchedulePolicy.ServerResponse.Header or (if a response was
4874// returned at all) in error.(*googleapi.Error).Header. Use
4875// googleapi.IsNotModified to check whether the returned error was
4876// because http.StatusNotModified was returned.
4877func (c *ProjectsSnapshotSchedulePoliciesGetCall) Do(opts ...googleapi.CallOption) (*SnapshotSchedulePolicy, error) {
4878	gensupport.SetOptions(c.urlParams_, opts...)
4879	res, err := c.doRequest("json")
4880	if res != nil && res.StatusCode == http.StatusNotModified {
4881		if res.Body != nil {
4882			res.Body.Close()
4883		}
4884		return nil, &googleapi.Error{
4885			Code:   res.StatusCode,
4886			Header: res.Header,
4887		}
4888	}
4889	if err != nil {
4890		return nil, err
4891	}
4892	defer googleapi.CloseBody(res)
4893	if err := googleapi.CheckResponse(res); err != nil {
4894		return nil, err
4895	}
4896	ret := &SnapshotSchedulePolicy{
4897		ServerResponse: googleapi.ServerResponse{
4898			Header:         res.Header,
4899			HTTPStatusCode: res.StatusCode,
4900		},
4901	}
4902	target := &ret
4903	if err := gensupport.DecodeResponse(target, res); err != nil {
4904		return nil, err
4905	}
4906	return ret, nil
4907	// {
4908	//   "description": "Get details for a specific snapshot schedule policy",
4909	//   "flatPath": "v1alpha1/projects/{projectsId}/snapshotSchedulePolicies/{snapshotSchedulePoliciesId}",
4910	//   "httpMethod": "GET",
4911	//   "id": "baremetalsolution.projects.snapshotSchedulePolicies.get",
4912	//   "parameterOrder": [
4913	//     "name"
4914	//   ],
4915	//   "parameters": {
4916	//     "name": {
4917	//       "description": "Required. The name of the policy to retrieve.",
4918	//       "location": "path",
4919	//       "pattern": "^projects/[^/]+/snapshotSchedulePolicies/[^/]+$",
4920	//       "required": true,
4921	//       "type": "string"
4922	//     }
4923	//   },
4924	//   "path": "v1alpha1/{+name}",
4925	//   "response": {
4926	//     "$ref": "SnapshotSchedulePolicy"
4927	//   },
4928	//   "scopes": [
4929	//     "https://www.googleapis.com/auth/cloud-platform"
4930	//   ]
4931	// }
4932
4933}
4934
4935// method id "baremetalsolution.projects.snapshotSchedulePolicies.list":
4936
4937type ProjectsSnapshotSchedulePoliciesListCall struct {
4938	s            *Service
4939	parent       string
4940	urlParams_   gensupport.URLParams
4941	ifNoneMatch_ string
4942	ctx_         context.Context
4943	header_      http.Header
4944}
4945
4946// List: List the snapshot schedule policies for the specified project
4947//
4948// - parent: The parent project containing the Snapshot Schedule
4949//   Policies.
4950func (r *ProjectsSnapshotSchedulePoliciesService) List(parent string) *ProjectsSnapshotSchedulePoliciesListCall {
4951	c := &ProjectsSnapshotSchedulePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4952	c.parent = parent
4953	return c
4954}
4955
4956// PageSize sets the optional parameter "pageSize": The maximum number
4957// of items to return.
4958func (c *ProjectsSnapshotSchedulePoliciesListCall) PageSize(pageSize int64) *ProjectsSnapshotSchedulePoliciesListCall {
4959	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4960	return c
4961}
4962
4963// PageToken sets the optional parameter "pageToken": The
4964// next_page_token value returned from a previous List request, if any.
4965func (c *ProjectsSnapshotSchedulePoliciesListCall) PageToken(pageToken string) *ProjectsSnapshotSchedulePoliciesListCall {
4966	c.urlParams_.Set("pageToken", pageToken)
4967	return c
4968}
4969
4970// Fields allows partial responses to be retrieved. See
4971// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4972// for more information.
4973func (c *ProjectsSnapshotSchedulePoliciesListCall) Fields(s ...googleapi.Field) *ProjectsSnapshotSchedulePoliciesListCall {
4974	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4975	return c
4976}
4977
4978// IfNoneMatch sets the optional parameter which makes the operation
4979// fail if the object's ETag matches the given value. This is useful for
4980// getting updates only after the object has changed since the last
4981// request. Use googleapi.IsNotModified to check whether the response
4982// error from Do is the result of In-None-Match.
4983func (c *ProjectsSnapshotSchedulePoliciesListCall) IfNoneMatch(entityTag string) *ProjectsSnapshotSchedulePoliciesListCall {
4984	c.ifNoneMatch_ = entityTag
4985	return c
4986}
4987
4988// Context sets the context to be used in this call's Do method. Any
4989// pending HTTP request will be aborted if the provided context is
4990// canceled.
4991func (c *ProjectsSnapshotSchedulePoliciesListCall) Context(ctx context.Context) *ProjectsSnapshotSchedulePoliciesListCall {
4992	c.ctx_ = ctx
4993	return c
4994}
4995
4996// Header returns an http.Header that can be modified by the caller to
4997// add HTTP headers to the request.
4998func (c *ProjectsSnapshotSchedulePoliciesListCall) Header() http.Header {
4999	if c.header_ == nil {
5000		c.header_ = make(http.Header)
5001	}
5002	return c.header_
5003}
5004
5005func (c *ProjectsSnapshotSchedulePoliciesListCall) doRequest(alt string) (*http.Response, error) {
5006	reqHeaders := make(http.Header)
5007	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
5008	for k, v := range c.header_ {
5009		reqHeaders[k] = v
5010	}
5011	reqHeaders.Set("User-Agent", c.s.userAgent())
5012	if c.ifNoneMatch_ != "" {
5013		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5014	}
5015	var body io.Reader = nil
5016	c.urlParams_.Set("alt", alt)
5017	c.urlParams_.Set("prettyPrint", "false")
5018	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/snapshotSchedulePolicies")
5019	urls += "?" + c.urlParams_.Encode()
5020	req, err := http.NewRequest("GET", urls, body)
5021	if err != nil {
5022		return nil, err
5023	}
5024	req.Header = reqHeaders
5025	googleapi.Expand(req.URL, map[string]string{
5026		"parent": c.parent,
5027	})
5028	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5029}
5030
5031// Do executes the "baremetalsolution.projects.snapshotSchedulePolicies.list" call.
5032// Exactly one of *ListSnapshotSchedulePoliciesResponse or error will be
5033// non-nil. Any non-2xx status code is an error. Response headers are in
5034// either *ListSnapshotSchedulePoliciesResponse.ServerResponse.Header or
5035// (if a response was returned at all) in
5036// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5037// whether the returned error was because http.StatusNotModified was
5038// returned.
5039func (c *ProjectsSnapshotSchedulePoliciesListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotSchedulePoliciesResponse, error) {
5040	gensupport.SetOptions(c.urlParams_, opts...)
5041	res, err := c.doRequest("json")
5042	if res != nil && res.StatusCode == http.StatusNotModified {
5043		if res.Body != nil {
5044			res.Body.Close()
5045		}
5046		return nil, &googleapi.Error{
5047			Code:   res.StatusCode,
5048			Header: res.Header,
5049		}
5050	}
5051	if err != nil {
5052		return nil, err
5053	}
5054	defer googleapi.CloseBody(res)
5055	if err := googleapi.CheckResponse(res); err != nil {
5056		return nil, err
5057	}
5058	ret := &ListSnapshotSchedulePoliciesResponse{
5059		ServerResponse: googleapi.ServerResponse{
5060			Header:         res.Header,
5061			HTTPStatusCode: res.StatusCode,
5062		},
5063	}
5064	target := &ret
5065	if err := gensupport.DecodeResponse(target, res); err != nil {
5066		return nil, err
5067	}
5068	return ret, nil
5069	// {
5070	//   "description": "List the snapshot schedule policies for the specified project",
5071	//   "flatPath": "v1alpha1/projects/{projectsId}/snapshotSchedulePolicies",
5072	//   "httpMethod": "GET",
5073	//   "id": "baremetalsolution.projects.snapshotSchedulePolicies.list",
5074	//   "parameterOrder": [
5075	//     "parent"
5076	//   ],
5077	//   "parameters": {
5078	//     "pageSize": {
5079	//       "description": "The maximum number of items to return.",
5080	//       "format": "int32",
5081	//       "location": "query",
5082	//       "type": "integer"
5083	//     },
5084	//     "pageToken": {
5085	//       "description": "The next_page_token value returned from a previous List request, if any.",
5086	//       "location": "query",
5087	//       "type": "string"
5088	//     },
5089	//     "parent": {
5090	//       "description": "Required. The parent project containing the Snapshot Schedule Policies.",
5091	//       "location": "path",
5092	//       "pattern": "^projects/[^/]+$",
5093	//       "required": true,
5094	//       "type": "string"
5095	//     }
5096	//   },
5097	//   "path": "v1alpha1/{+parent}/snapshotSchedulePolicies",
5098	//   "response": {
5099	//     "$ref": "ListSnapshotSchedulePoliciesResponse"
5100	//   },
5101	//   "scopes": [
5102	//     "https://www.googleapis.com/auth/cloud-platform"
5103	//   ]
5104	// }
5105
5106}
5107
5108// Pages invokes f for each page of results.
5109// A non-nil error returned from f will halt the iteration.
5110// The provided context supersedes any context provided to the Context method.
5111func (c *ProjectsSnapshotSchedulePoliciesListCall) Pages(ctx context.Context, f func(*ListSnapshotSchedulePoliciesResponse) error) error {
5112	c.ctx_ = ctx
5113	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5114	for {
5115		x, err := c.Do()
5116		if err != nil {
5117			return err
5118		}
5119		if err := f(x); err != nil {
5120			return err
5121		}
5122		if x.NextPageToken == "" {
5123			return nil
5124		}
5125		c.PageToken(x.NextPageToken)
5126	}
5127}
5128
5129// method id "baremetalsolution.projects.snapshotSchedulePolicies.patch":
5130
5131type ProjectsSnapshotSchedulePoliciesPatchCall struct {
5132	s                      *Service
5133	name                   string
5134	snapshotschedulepolicy *SnapshotSchedulePolicy
5135	urlParams_             gensupport.URLParams
5136	ctx_                   context.Context
5137	header_                http.Header
5138}
5139
5140// Patch: Update a SnapshotSchedulePolicy.
5141//
5142// - name: Output only. The name of this SnapshotSchedulePolicy.
5143func (r *ProjectsSnapshotSchedulePoliciesService) Patch(name string, snapshotschedulepolicy *SnapshotSchedulePolicy) *ProjectsSnapshotSchedulePoliciesPatchCall {
5144	c := &ProjectsSnapshotSchedulePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5145	c.name = name
5146	c.snapshotschedulepolicy = snapshotschedulepolicy
5147	return c
5148}
5149
5150// UpdateMask sets the optional parameter "updateMask": The list of
5151// fields to update.
5152func (c *ProjectsSnapshotSchedulePoliciesPatchCall) UpdateMask(updateMask string) *ProjectsSnapshotSchedulePoliciesPatchCall {
5153	c.urlParams_.Set("updateMask", updateMask)
5154	return c
5155}
5156
5157// Fields allows partial responses to be retrieved. See
5158// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5159// for more information.
5160func (c *ProjectsSnapshotSchedulePoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsSnapshotSchedulePoliciesPatchCall {
5161	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5162	return c
5163}
5164
5165// Context sets the context to be used in this call's Do method. Any
5166// pending HTTP request will be aborted if the provided context is
5167// canceled.
5168func (c *ProjectsSnapshotSchedulePoliciesPatchCall) Context(ctx context.Context) *ProjectsSnapshotSchedulePoliciesPatchCall {
5169	c.ctx_ = ctx
5170	return c
5171}
5172
5173// Header returns an http.Header that can be modified by the caller to
5174// add HTTP headers to the request.
5175func (c *ProjectsSnapshotSchedulePoliciesPatchCall) Header() http.Header {
5176	if c.header_ == nil {
5177		c.header_ = make(http.Header)
5178	}
5179	return c.header_
5180}
5181
5182func (c *ProjectsSnapshotSchedulePoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
5183	reqHeaders := make(http.Header)
5184	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
5185	for k, v := range c.header_ {
5186		reqHeaders[k] = v
5187	}
5188	reqHeaders.Set("User-Agent", c.s.userAgent())
5189	var body io.Reader = nil
5190	body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshotschedulepolicy)
5191	if err != nil {
5192		return nil, err
5193	}
5194	reqHeaders.Set("Content-Type", "application/json")
5195	c.urlParams_.Set("alt", alt)
5196	c.urlParams_.Set("prettyPrint", "false")
5197	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
5198	urls += "?" + c.urlParams_.Encode()
5199	req, err := http.NewRequest("PATCH", urls, body)
5200	if err != nil {
5201		return nil, err
5202	}
5203	req.Header = reqHeaders
5204	googleapi.Expand(req.URL, map[string]string{
5205		"name": c.name,
5206	})
5207	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5208}
5209
5210// Do executes the "baremetalsolution.projects.snapshotSchedulePolicies.patch" call.
5211// Exactly one of *SnapshotSchedulePolicy or error will be non-nil. Any
5212// non-2xx status code is an error. Response headers are in either
5213// *SnapshotSchedulePolicy.ServerResponse.Header or (if a response was
5214// returned at all) in error.(*googleapi.Error).Header. Use
5215// googleapi.IsNotModified to check whether the returned error was
5216// because http.StatusNotModified was returned.
5217func (c *ProjectsSnapshotSchedulePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*SnapshotSchedulePolicy, error) {
5218	gensupport.SetOptions(c.urlParams_, opts...)
5219	res, err := c.doRequest("json")
5220	if res != nil && res.StatusCode == http.StatusNotModified {
5221		if res.Body != nil {
5222			res.Body.Close()
5223		}
5224		return nil, &googleapi.Error{
5225			Code:   res.StatusCode,
5226			Header: res.Header,
5227		}
5228	}
5229	if err != nil {
5230		return nil, err
5231	}
5232	defer googleapi.CloseBody(res)
5233	if err := googleapi.CheckResponse(res); err != nil {
5234		return nil, err
5235	}
5236	ret := &SnapshotSchedulePolicy{
5237		ServerResponse: googleapi.ServerResponse{
5238			Header:         res.Header,
5239			HTTPStatusCode: res.StatusCode,
5240		},
5241	}
5242	target := &ret
5243	if err := gensupport.DecodeResponse(target, res); err != nil {
5244		return nil, err
5245	}
5246	return ret, nil
5247	// {
5248	//   "description": "Update a SnapshotSchedulePolicy.",
5249	//   "flatPath": "v1alpha1/projects/{projectsId}/snapshotSchedulePolicies/{snapshotSchedulePoliciesId}",
5250	//   "httpMethod": "PATCH",
5251	//   "id": "baremetalsolution.projects.snapshotSchedulePolicies.patch",
5252	//   "parameterOrder": [
5253	//     "name"
5254	//   ],
5255	//   "parameters": {
5256	//     "name": {
5257	//       "description": "Output only. The name of this SnapshotSchedulePolicy.",
5258	//       "location": "path",
5259	//       "pattern": "^projects/[^/]+/snapshotSchedulePolicies/[^/]+$",
5260	//       "required": true,
5261	//       "type": "string"
5262	//     },
5263	//     "updateMask": {
5264	//       "description": "The list of fields to update.",
5265	//       "format": "google-fieldmask",
5266	//       "location": "query",
5267	//       "type": "string"
5268	//     }
5269	//   },
5270	//   "path": "v1alpha1/{+name}",
5271	//   "request": {
5272	//     "$ref": "SnapshotSchedulePolicy"
5273	//   },
5274	//   "response": {
5275	//     "$ref": "SnapshotSchedulePolicy"
5276	//   },
5277	//   "scopes": [
5278	//     "https://www.googleapis.com/auth/cloud-platform"
5279	//   ]
5280	// }
5281
5282}
5283
5284// method id "baremetalsolution.projects.sshKeys.create":
5285
5286type ProjectsSshKeysCreateCall struct {
5287	s          *Service
5288	parent     string
5289	sshkey     *SSHKey
5290	urlParams_ gensupport.URLParams
5291	ctx_       context.Context
5292	header_    http.Header
5293}
5294
5295// Create: Create a new SSH key registration in the specified project.
5296//
5297// - parent: The parent project containing the SSH keys.
5298func (r *ProjectsSshKeysService) Create(parent string, sshkey *SSHKey) *ProjectsSshKeysCreateCall {
5299	c := &ProjectsSshKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5300	c.parent = parent
5301	c.sshkey = sshkey
5302	return c
5303}
5304
5305// SshKeyId sets the optional parameter "sshKeyId": Required. The ID to
5306// use for the key, which will become the final component of the key's
5307// resource name. This value should be match the regex:
5308// [a-zA-Z0-9@.\-_]{1,64}
5309func (c *ProjectsSshKeysCreateCall) SshKeyId(sshKeyId string) *ProjectsSshKeysCreateCall {
5310	c.urlParams_.Set("sshKeyId", sshKeyId)
5311	return c
5312}
5313
5314// Fields allows partial responses to be retrieved. See
5315// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5316// for more information.
5317func (c *ProjectsSshKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsSshKeysCreateCall {
5318	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5319	return c
5320}
5321
5322// Context sets the context to be used in this call's Do method. Any
5323// pending HTTP request will be aborted if the provided context is
5324// canceled.
5325func (c *ProjectsSshKeysCreateCall) Context(ctx context.Context) *ProjectsSshKeysCreateCall {
5326	c.ctx_ = ctx
5327	return c
5328}
5329
5330// Header returns an http.Header that can be modified by the caller to
5331// add HTTP headers to the request.
5332func (c *ProjectsSshKeysCreateCall) Header() http.Header {
5333	if c.header_ == nil {
5334		c.header_ = make(http.Header)
5335	}
5336	return c.header_
5337}
5338
5339func (c *ProjectsSshKeysCreateCall) doRequest(alt string) (*http.Response, error) {
5340	reqHeaders := make(http.Header)
5341	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
5342	for k, v := range c.header_ {
5343		reqHeaders[k] = v
5344	}
5345	reqHeaders.Set("User-Agent", c.s.userAgent())
5346	var body io.Reader = nil
5347	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sshkey)
5348	if err != nil {
5349		return nil, err
5350	}
5351	reqHeaders.Set("Content-Type", "application/json")
5352	c.urlParams_.Set("alt", alt)
5353	c.urlParams_.Set("prettyPrint", "false")
5354	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/sshKeys")
5355	urls += "?" + c.urlParams_.Encode()
5356	req, err := http.NewRequest("POST", urls, body)
5357	if err != nil {
5358		return nil, err
5359	}
5360	req.Header = reqHeaders
5361	googleapi.Expand(req.URL, map[string]string{
5362		"parent": c.parent,
5363	})
5364	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5365}
5366
5367// Do executes the "baremetalsolution.projects.sshKeys.create" call.
5368// Exactly one of *SSHKey or error will be non-nil. Any non-2xx status
5369// code is an error. Response headers are in either
5370// *SSHKey.ServerResponse.Header or (if a response was returned at all)
5371// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5372// check whether the returned error was because http.StatusNotModified
5373// was returned.
5374func (c *ProjectsSshKeysCreateCall) Do(opts ...googleapi.CallOption) (*SSHKey, error) {
5375	gensupport.SetOptions(c.urlParams_, opts...)
5376	res, err := c.doRequest("json")
5377	if res != nil && res.StatusCode == http.StatusNotModified {
5378		if res.Body != nil {
5379			res.Body.Close()
5380		}
5381		return nil, &googleapi.Error{
5382			Code:   res.StatusCode,
5383			Header: res.Header,
5384		}
5385	}
5386	if err != nil {
5387		return nil, err
5388	}
5389	defer googleapi.CloseBody(res)
5390	if err := googleapi.CheckResponse(res); err != nil {
5391		return nil, err
5392	}
5393	ret := &SSHKey{
5394		ServerResponse: googleapi.ServerResponse{
5395			Header:         res.Header,
5396			HTTPStatusCode: res.StatusCode,
5397		},
5398	}
5399	target := &ret
5400	if err := gensupport.DecodeResponse(target, res); err != nil {
5401		return nil, err
5402	}
5403	return ret, nil
5404	// {
5405	//   "description": "Create a new SSH key registration in the specified project.",
5406	//   "flatPath": "v1alpha1/projects/{projectsId}/sshKeys",
5407	//   "httpMethod": "POST",
5408	//   "id": "baremetalsolution.projects.sshKeys.create",
5409	//   "parameterOrder": [
5410	//     "parent"
5411	//   ],
5412	//   "parameters": {
5413	//     "parent": {
5414	//       "description": "Required. The parent project containing the SSH keys.",
5415	//       "location": "path",
5416	//       "pattern": "^projects/[^/]+$",
5417	//       "required": true,
5418	//       "type": "string"
5419	//     },
5420	//     "sshKeyId": {
5421	//       "description": "Required. The ID to use for the key, which will become the final component of the key's resource name. This value should be match the regex: [a-zA-Z0-9@.\\-_]{1,64}",
5422	//       "location": "query",
5423	//       "type": "string"
5424	//     }
5425	//   },
5426	//   "path": "v1alpha1/{+parent}/sshKeys",
5427	//   "request": {
5428	//     "$ref": "SSHKey"
5429	//   },
5430	//   "response": {
5431	//     "$ref": "SSHKey"
5432	//   },
5433	//   "scopes": [
5434	//     "https://www.googleapis.com/auth/cloud-platform"
5435	//   ]
5436	// }
5437
5438}
5439
5440// method id "baremetalsolution.projects.sshKeys.delete":
5441
5442type ProjectsSshKeysDeleteCall struct {
5443	s          *Service
5444	name       string
5445	urlParams_ gensupport.URLParams
5446	ctx_       context.Context
5447	header_    http.Header
5448}
5449
5450// Delete: Delete an SSH key registration in the specified project.
5451//
5452// - name: The name of the SSH key to delete.
5453func (r *ProjectsSshKeysService) Delete(name string) *ProjectsSshKeysDeleteCall {
5454	c := &ProjectsSshKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5455	c.name = name
5456	return c
5457}
5458
5459// Fields allows partial responses to be retrieved. See
5460// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5461// for more information.
5462func (c *ProjectsSshKeysDeleteCall) Fields(s ...googleapi.Field) *ProjectsSshKeysDeleteCall {
5463	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5464	return c
5465}
5466
5467// Context sets the context to be used in this call's Do method. Any
5468// pending HTTP request will be aborted if the provided context is
5469// canceled.
5470func (c *ProjectsSshKeysDeleteCall) Context(ctx context.Context) *ProjectsSshKeysDeleteCall {
5471	c.ctx_ = ctx
5472	return c
5473}
5474
5475// Header returns an http.Header that can be modified by the caller to
5476// add HTTP headers to the request.
5477func (c *ProjectsSshKeysDeleteCall) Header() http.Header {
5478	if c.header_ == nil {
5479		c.header_ = make(http.Header)
5480	}
5481	return c.header_
5482}
5483
5484func (c *ProjectsSshKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
5485	reqHeaders := make(http.Header)
5486	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
5487	for k, v := range c.header_ {
5488		reqHeaders[k] = v
5489	}
5490	reqHeaders.Set("User-Agent", c.s.userAgent())
5491	var body io.Reader = nil
5492	c.urlParams_.Set("alt", alt)
5493	c.urlParams_.Set("prettyPrint", "false")
5494	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
5495	urls += "?" + c.urlParams_.Encode()
5496	req, err := http.NewRequest("DELETE", urls, body)
5497	if err != nil {
5498		return nil, err
5499	}
5500	req.Header = reqHeaders
5501	googleapi.Expand(req.URL, map[string]string{
5502		"name": c.name,
5503	})
5504	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5505}
5506
5507// Do executes the "baremetalsolution.projects.sshKeys.delete" call.
5508// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5509// code is an error. Response headers are in either
5510// *Empty.ServerResponse.Header or (if a response was returned at all)
5511// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5512// check whether the returned error was because http.StatusNotModified
5513// was returned.
5514func (c *ProjectsSshKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5515	gensupport.SetOptions(c.urlParams_, opts...)
5516	res, err := c.doRequest("json")
5517	if res != nil && res.StatusCode == http.StatusNotModified {
5518		if res.Body != nil {
5519			res.Body.Close()
5520		}
5521		return nil, &googleapi.Error{
5522			Code:   res.StatusCode,
5523			Header: res.Header,
5524		}
5525	}
5526	if err != nil {
5527		return nil, err
5528	}
5529	defer googleapi.CloseBody(res)
5530	if err := googleapi.CheckResponse(res); err != nil {
5531		return nil, err
5532	}
5533	ret := &Empty{
5534		ServerResponse: googleapi.ServerResponse{
5535			Header:         res.Header,
5536			HTTPStatusCode: res.StatusCode,
5537		},
5538	}
5539	target := &ret
5540	if err := gensupport.DecodeResponse(target, res); err != nil {
5541		return nil, err
5542	}
5543	return ret, nil
5544	// {
5545	//   "description": "Delete an SSH key registration in the specified project.",
5546	//   "flatPath": "v1alpha1/projects/{projectsId}/sshKeys/{sshKeysId}",
5547	//   "httpMethod": "DELETE",
5548	//   "id": "baremetalsolution.projects.sshKeys.delete",
5549	//   "parameterOrder": [
5550	//     "name"
5551	//   ],
5552	//   "parameters": {
5553	//     "name": {
5554	//       "description": "Required. The name of the SSH key to delete.",
5555	//       "location": "path",
5556	//       "pattern": "^projects/[^/]+/sshKeys/[^/]+$",
5557	//       "required": true,
5558	//       "type": "string"
5559	//     }
5560	//   },
5561	//   "path": "v1alpha1/{+name}",
5562	//   "response": {
5563	//     "$ref": "Empty"
5564	//   },
5565	//   "scopes": [
5566	//     "https://www.googleapis.com/auth/cloud-platform"
5567	//   ]
5568	// }
5569
5570}
5571
5572// method id "baremetalsolution.projects.sshKeys.list":
5573
5574type ProjectsSshKeysListCall struct {
5575	s            *Service
5576	parent       string
5577	urlParams_   gensupport.URLParams
5578	ifNoneMatch_ string
5579	ctx_         context.Context
5580	header_      http.Header
5581}
5582
5583// List: List the public SSH keys registered for the specified project.
5584//
5585// - parent: The parent project containing the SSH keys.
5586func (r *ProjectsSshKeysService) List(parent string) *ProjectsSshKeysListCall {
5587	c := &ProjectsSshKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5588	c.parent = parent
5589	return c
5590}
5591
5592// PageSize sets the optional parameter "pageSize": The maximum number
5593// of items to return.
5594func (c *ProjectsSshKeysListCall) PageSize(pageSize int64) *ProjectsSshKeysListCall {
5595	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5596	return c
5597}
5598
5599// PageToken sets the optional parameter "pageToken": The
5600// next_page_token value returned from a previous List request, if any.
5601func (c *ProjectsSshKeysListCall) PageToken(pageToken string) *ProjectsSshKeysListCall {
5602	c.urlParams_.Set("pageToken", pageToken)
5603	return c
5604}
5605
5606// Fields allows partial responses to be retrieved. See
5607// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5608// for more information.
5609func (c *ProjectsSshKeysListCall) Fields(s ...googleapi.Field) *ProjectsSshKeysListCall {
5610	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5611	return c
5612}
5613
5614// IfNoneMatch sets the optional parameter which makes the operation
5615// fail if the object's ETag matches the given value. This is useful for
5616// getting updates only after the object has changed since the last
5617// request. Use googleapi.IsNotModified to check whether the response
5618// error from Do is the result of In-None-Match.
5619func (c *ProjectsSshKeysListCall) IfNoneMatch(entityTag string) *ProjectsSshKeysListCall {
5620	c.ifNoneMatch_ = entityTag
5621	return c
5622}
5623
5624// Context sets the context to be used in this call's Do method. Any
5625// pending HTTP request will be aborted if the provided context is
5626// canceled.
5627func (c *ProjectsSshKeysListCall) Context(ctx context.Context) *ProjectsSshKeysListCall {
5628	c.ctx_ = ctx
5629	return c
5630}
5631
5632// Header returns an http.Header that can be modified by the caller to
5633// add HTTP headers to the request.
5634func (c *ProjectsSshKeysListCall) Header() http.Header {
5635	if c.header_ == nil {
5636		c.header_ = make(http.Header)
5637	}
5638	return c.header_
5639}
5640
5641func (c *ProjectsSshKeysListCall) doRequest(alt string) (*http.Response, error) {
5642	reqHeaders := make(http.Header)
5643	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210825")
5644	for k, v := range c.header_ {
5645		reqHeaders[k] = v
5646	}
5647	reqHeaders.Set("User-Agent", c.s.userAgent())
5648	if c.ifNoneMatch_ != "" {
5649		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5650	}
5651	var body io.Reader = nil
5652	c.urlParams_.Set("alt", alt)
5653	c.urlParams_.Set("prettyPrint", "false")
5654	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/sshKeys")
5655	urls += "?" + c.urlParams_.Encode()
5656	req, err := http.NewRequest("GET", urls, body)
5657	if err != nil {
5658		return nil, err
5659	}
5660	req.Header = reqHeaders
5661	googleapi.Expand(req.URL, map[string]string{
5662		"parent": c.parent,
5663	})
5664	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5665}
5666
5667// Do executes the "baremetalsolution.projects.sshKeys.list" call.
5668// Exactly one of *ListSSHKeysResponse or error will be non-nil. Any
5669// non-2xx status code is an error. Response headers are in either
5670// *ListSSHKeysResponse.ServerResponse.Header or (if a response was
5671// returned at all) in error.(*googleapi.Error).Header. Use
5672// googleapi.IsNotModified to check whether the returned error was
5673// because http.StatusNotModified was returned.
5674func (c *ProjectsSshKeysListCall) Do(opts ...googleapi.CallOption) (*ListSSHKeysResponse, error) {
5675	gensupport.SetOptions(c.urlParams_, opts...)
5676	res, err := c.doRequest("json")
5677	if res != nil && res.StatusCode == http.StatusNotModified {
5678		if res.Body != nil {
5679			res.Body.Close()
5680		}
5681		return nil, &googleapi.Error{
5682			Code:   res.StatusCode,
5683			Header: res.Header,
5684		}
5685	}
5686	if err != nil {
5687		return nil, err
5688	}
5689	defer googleapi.CloseBody(res)
5690	if err := googleapi.CheckResponse(res); err != nil {
5691		return nil, err
5692	}
5693	ret := &ListSSHKeysResponse{
5694		ServerResponse: googleapi.ServerResponse{
5695			Header:         res.Header,
5696			HTTPStatusCode: res.StatusCode,
5697		},
5698	}
5699	target := &ret
5700	if err := gensupport.DecodeResponse(target, res); err != nil {
5701		return nil, err
5702	}
5703	return ret, nil
5704	// {
5705	//   "description": "List the public SSH keys registered for the specified project.",
5706	//   "flatPath": "v1alpha1/projects/{projectsId}/sshKeys",
5707	//   "httpMethod": "GET",
5708	//   "id": "baremetalsolution.projects.sshKeys.list",
5709	//   "parameterOrder": [
5710	//     "parent"
5711	//   ],
5712	//   "parameters": {
5713	//     "pageSize": {
5714	//       "description": "The maximum number of items to return.",
5715	//       "format": "int32",
5716	//       "location": "query",
5717	//       "type": "integer"
5718	//     },
5719	//     "pageToken": {
5720	//       "description": "The next_page_token value returned from a previous List request, if any.",
5721	//       "location": "query",
5722	//       "type": "string"
5723	//     },
5724	//     "parent": {
5725	//       "description": "Required. The parent project containing the SSH keys.",
5726	//       "location": "path",
5727	//       "pattern": "^projects/[^/]+$",
5728	//       "required": true,
5729	//       "type": "string"
5730	//     }
5731	//   },
5732	//   "path": "v1alpha1/{+parent}/sshKeys",
5733	//   "response": {
5734	//     "$ref": "ListSSHKeysResponse"
5735	//   },
5736	//   "scopes": [
5737	//     "https://www.googleapis.com/auth/cloud-platform"
5738	//   ]
5739	// }
5740
5741}
5742
5743// Pages invokes f for each page of results.
5744// A non-nil error returned from f will halt the iteration.
5745// The provided context supersedes any context provided to the Context method.
5746func (c *ProjectsSshKeysListCall) Pages(ctx context.Context, f func(*ListSSHKeysResponse) error) error {
5747	c.ctx_ = ctx
5748	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5749	for {
5750		x, err := c.Do()
5751		if err != nil {
5752			return err
5753		}
5754		if err := f(x); err != nil {
5755			return err
5756		}
5757		if x.NextPageToken == "" {
5758			return nil
5759		}
5760		c.PageToken(x.NextPageToken)
5761	}
5762}
5763