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 cloudbilling provides access to the Cloud Billing API.
8//
9// For product documentation, see: https://cloud.google.com/billing/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/cloudbilling/v1"
16//   ...
17//   ctx := context.Background()
18//   cloudbillingService, err := cloudbilling.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// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   cloudbillingService, err := cloudbilling.NewService(ctx, option.WithScopes(cloudbilling.CloudPlatformScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   cloudbillingService, err := cloudbilling.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   cloudbillingService, err := cloudbilling.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package cloudbilling // import "google.golang.org/api/cloudbilling/v1"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "cloudbilling:v1"
79const apiName = "cloudbilling"
80const apiVersion = "v1"
81const basePath = "https://cloudbilling.googleapis.com/"
82const mtlsBasePath = "https://cloudbilling.mtls.googleapis.com/"
83
84// OAuth2 scopes used by this API.
85const (
86	// View and manage your Google Cloud Platform billing accounts
87	CloudBillingScope = "https://www.googleapis.com/auth/cloud-billing"
88
89	// View your Google Cloud Platform billing accounts
90	CloudBillingReadonlyScope = "https://www.googleapis.com/auth/cloud-billing.readonly"
91
92	// See, edit, configure, and delete your Google Cloud Platform data
93	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
94)
95
96// NewService creates a new APIService.
97func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) {
98	scopesOption := option.WithScopes(
99		"https://www.googleapis.com/auth/cloud-billing",
100		"https://www.googleapis.com/auth/cloud-billing.readonly",
101		"https://www.googleapis.com/auth/cloud-platform",
102	)
103	// NOTE: prepend, so we don't override user-specified scopes.
104	opts = append([]option.ClientOption{scopesOption}, opts...)
105	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
106	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
107	client, endpoint, err := htransport.NewClient(ctx, opts...)
108	if err != nil {
109		return nil, err
110	}
111	s, err := New(client)
112	if err != nil {
113		return nil, err
114	}
115	if endpoint != "" {
116		s.BasePath = endpoint
117	}
118	return s, nil
119}
120
121// New creates a new APIService. It uses the provided http.Client for requests.
122//
123// Deprecated: please use NewService instead.
124// To provide a custom HTTP client, use option.WithHTTPClient.
125// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
126func New(client *http.Client) (*APIService, error) {
127	if client == nil {
128		return nil, errors.New("client is nil")
129	}
130	s := &APIService{client: client, BasePath: basePath}
131	s.BillingAccounts = NewBillingAccountsService(s)
132	s.Projects = NewProjectsService(s)
133	s.Services = NewServicesService(s)
134	return s, nil
135}
136
137type APIService struct {
138	client    *http.Client
139	BasePath  string // API endpoint base URL
140	UserAgent string // optional additional User-Agent fragment
141
142	BillingAccounts *BillingAccountsService
143
144	Projects *ProjectsService
145
146	Services *ServicesService
147}
148
149func (s *APIService) userAgent() string {
150	if s.UserAgent == "" {
151		return googleapi.UserAgent
152	}
153	return googleapi.UserAgent + " " + s.UserAgent
154}
155
156func NewBillingAccountsService(s *APIService) *BillingAccountsService {
157	rs := &BillingAccountsService{s: s}
158	rs.Projects = NewBillingAccountsProjectsService(s)
159	return rs
160}
161
162type BillingAccountsService struct {
163	s *APIService
164
165	Projects *BillingAccountsProjectsService
166}
167
168func NewBillingAccountsProjectsService(s *APIService) *BillingAccountsProjectsService {
169	rs := &BillingAccountsProjectsService{s: s}
170	return rs
171}
172
173type BillingAccountsProjectsService struct {
174	s *APIService
175}
176
177func NewProjectsService(s *APIService) *ProjectsService {
178	rs := &ProjectsService{s: s}
179	return rs
180}
181
182type ProjectsService struct {
183	s *APIService
184}
185
186func NewServicesService(s *APIService) *ServicesService {
187	rs := &ServicesService{s: s}
188	rs.Skus = NewServicesSkusService(s)
189	return rs
190}
191
192type ServicesService struct {
193	s *APIService
194
195	Skus *ServicesSkusService
196}
197
198func NewServicesSkusService(s *APIService) *ServicesSkusService {
199	rs := &ServicesSkusService{s: s}
200	return rs
201}
202
203type ServicesSkusService struct {
204	s *APIService
205}
206
207// AggregationInfo: Represents the aggregation level and interval for
208// pricing of a single SKU.
209type AggregationInfo struct {
210	// AggregationCount: The number of intervals to aggregate over. Example:
211	// If aggregation_level is "DAILY" and aggregation_count is 14,
212	// aggregation will be over 14 days.
213	AggregationCount int64 `json:"aggregationCount,omitempty"`
214
215	// Possible values:
216	//   "AGGREGATION_INTERVAL_UNSPECIFIED"
217	//   "DAILY"
218	//   "MONTHLY"
219	AggregationInterval string `json:"aggregationInterval,omitempty"`
220
221	// Possible values:
222	//   "AGGREGATION_LEVEL_UNSPECIFIED"
223	//   "ACCOUNT"
224	//   "PROJECT"
225	AggregationLevel string `json:"aggregationLevel,omitempty"`
226
227	// ForceSendFields is a list of field names (e.g. "AggregationCount") to
228	// unconditionally include in API requests. By default, fields with
229	// empty values are omitted from API requests. However, any non-pointer,
230	// non-interface field appearing in ForceSendFields will be sent to the
231	// server regardless of whether the field is empty or not. This may be
232	// used to include empty fields in Patch requests.
233	ForceSendFields []string `json:"-"`
234
235	// NullFields is a list of field names (e.g. "AggregationCount") to
236	// include in API requests with the JSON null value. By default, fields
237	// with empty values are omitted from API requests. However, any field
238	// with an empty value appearing in NullFields will be sent to the
239	// server as null. It is an error if a field in this list has a
240	// non-empty value. This may be used to include null fields in Patch
241	// requests.
242	NullFields []string `json:"-"`
243}
244
245func (s *AggregationInfo) MarshalJSON() ([]byte, error) {
246	type NoMethod AggregationInfo
247	raw := NoMethod(*s)
248	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
249}
250
251// AuditConfig: Specifies the audit configuration for a service. The
252// configuration determines which permission types are logged, and what
253// identities, if any, are exempted from logging. An AuditConfig must
254// have one or more AuditLogConfigs. If there are AuditConfigs for both
255// `allServices` and a specific service, the union of the two
256// AuditConfigs is used for that service: the log_types specified in
257// each AuditConfig are enabled, and the exempted_members in each
258// AuditLogConfig are exempted. Example Policy with multiple
259// AuditConfigs: { "audit_configs": [ { "service": "allServices",
260// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members":
261// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, {
262// "log_type": "ADMIN_READ" } ] }, { "service":
263// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type":
264// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [
265// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy
266// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts
267// jose@example.com from DATA_READ logging, and aliya@example.com from
268// DATA_WRITE logging.
269type AuditConfig struct {
270	// AuditLogConfigs: The configuration for logging of each type of
271	// permission.
272	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
273
274	// Service: Specifies a service that will be enabled for audit logging.
275	// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
276	// `allServices` is a special value that covers all services.
277	Service string `json:"service,omitempty"`
278
279	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
280	// unconditionally include in API requests. By default, fields with
281	// empty values are omitted from API requests. However, any non-pointer,
282	// non-interface field appearing in ForceSendFields will be sent to the
283	// server regardless of whether the field is empty or not. This may be
284	// used to include empty fields in Patch requests.
285	ForceSendFields []string `json:"-"`
286
287	// NullFields is a list of field names (e.g. "AuditLogConfigs") to
288	// include in API requests with the JSON null value. By default, fields
289	// with empty values are omitted from API requests. However, any field
290	// with an empty value appearing in NullFields will be sent to the
291	// server as null. It is an error if a field in this list has a
292	// non-empty value. This may be used to include null fields in Patch
293	// requests.
294	NullFields []string `json:"-"`
295}
296
297func (s *AuditConfig) MarshalJSON() ([]byte, error) {
298	type NoMethod AuditConfig
299	raw := NoMethod(*s)
300	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
301}
302
303// AuditLogConfig: Provides the configuration for logging a type of
304// permissions. Example: { "audit_log_configs": [ { "log_type":
305// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, {
306// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and
307// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ
308// logging.
309type AuditLogConfig struct {
310	// ExemptedMembers: Specifies the identities that do not cause logging
311	// for this type of permission. Follows the same format of
312	// Binding.members.
313	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
314
315	// LogType: The log type that this config enables.
316	//
317	// Possible values:
318	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
319	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
320	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
321	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
322	LogType string `json:"logType,omitempty"`
323
324	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
325	// unconditionally include in API requests. By default, fields with
326	// empty values are omitted from API requests. However, any non-pointer,
327	// non-interface field appearing in ForceSendFields will be sent to the
328	// server regardless of whether the field is empty or not. This may be
329	// used to include empty fields in Patch requests.
330	ForceSendFields []string `json:"-"`
331
332	// NullFields is a list of field names (e.g. "ExemptedMembers") to
333	// include in API requests with the JSON null value. By default, fields
334	// with empty values are omitted from API requests. However, any field
335	// with an empty value appearing in NullFields will be sent to the
336	// server as null. It is an error if a field in this list has a
337	// non-empty value. This may be used to include null fields in Patch
338	// requests.
339	NullFields []string `json:"-"`
340}
341
342func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
343	type NoMethod AuditLogConfig
344	raw := NoMethod(*s)
345	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
346}
347
348// BillingAccount: A billing account in the Google Cloud Console
349// (https://console.cloud.google.com/). You can assign a billing account
350// to one or more projects.
351type BillingAccount struct {
352	// DisplayName: The display name given to the billing account, such as
353	// `My Billing Account`. This name is displayed in the Google Cloud
354	// Console.
355	DisplayName string `json:"displayName,omitempty"`
356
357	// MasterBillingAccount: If this account is a subaccount
358	// (https://cloud.google.com/billing/docs/concepts), then this will be
359	// the resource name of the parent billing account that it is being
360	// resold through. Otherwise this will be empty.
361	MasterBillingAccount string `json:"masterBillingAccount,omitempty"`
362
363	// Name: Output only. The resource name of the billing account. The
364	// resource name has the form `billingAccounts/{billing_account_id}`.
365	// For example, `billingAccounts/012345-567890-ABCDEF` would be the
366	// resource name for billing account `012345-567890-ABCDEF`.
367	Name string `json:"name,omitempty"`
368
369	// Open: Output only. True if the billing account is open, and will
370	// therefore be charged for any usage on associated projects. False if
371	// the billing account is closed, and therefore projects associated with
372	// it will be unable to use paid services.
373	Open bool `json:"open,omitempty"`
374
375	// ServerResponse contains the HTTP response code and headers from the
376	// server.
377	googleapi.ServerResponse `json:"-"`
378
379	// ForceSendFields is a list of field names (e.g. "DisplayName") to
380	// unconditionally include in API requests. By default, fields with
381	// empty values are omitted from API requests. However, any non-pointer,
382	// non-interface field appearing in ForceSendFields will be sent to the
383	// server regardless of whether the field is empty or not. This may be
384	// used to include empty fields in Patch requests.
385	ForceSendFields []string `json:"-"`
386
387	// NullFields is a list of field names (e.g. "DisplayName") to include
388	// in API requests with the JSON null value. By default, fields with
389	// empty values are omitted from API requests. However, any field with
390	// an empty value appearing in NullFields will be sent to the server as
391	// null. It is an error if a field in this list has a non-empty value.
392	// This may be used to include null fields in Patch requests.
393	NullFields []string `json:"-"`
394}
395
396func (s *BillingAccount) MarshalJSON() ([]byte, error) {
397	type NoMethod BillingAccount
398	raw := NoMethod(*s)
399	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
400}
401
402// Binding: Associates `members` with a `role`.
403type Binding struct {
404	// Condition: The condition that is associated with this binding. If the
405	// condition evaluates to `true`, then this binding applies to the
406	// current request. If the condition evaluates to `false`, then this
407	// binding does not apply to the current request. However, a different
408	// role binding might grant the same role to one or more of the members
409	// in this binding. To learn which resources support conditions in their
410	// IAM policies, see the IAM documentation
411	// (https://cloud.google.com/iam/help/conditions/resource-policies).
412	Condition *Expr `json:"condition,omitempty"`
413
414	// Members: Specifies the identities requesting access for a Cloud
415	// Platform resource. `members` can have the following values: *
416	// `allUsers`: A special identifier that represents anyone who is on the
417	// internet; with or without a Google account. *
418	// `allAuthenticatedUsers`: A special identifier that represents anyone
419	// who is authenticated with a Google account or a service account. *
420	// `user:{emailid}`: An email address that represents a specific Google
421	// account. For example, `alice@example.com` . *
422	// `serviceAccount:{emailid}`: An email address that represents a
423	// service account. For example,
424	// `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An
425	// email address that represents a Google group. For example,
426	// `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An
427	// email address (plus unique identifier) representing a user that has
428	// been recently deleted. For example,
429	// `alice@example.com?uid=123456789012345678901`. If the user is
430	// recovered, this value reverts to `user:{emailid}` and the recovered
431	// user retains the role in the binding. *
432	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address
433	// (plus unique identifier) representing a service account that has been
434	// recently deleted. For example,
435	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
436	// If the service account is undeleted, this value reverts to
437	// `serviceAccount:{emailid}` and the undeleted service account retains
438	// the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`:
439	// An email address (plus unique identifier) representing a Google group
440	// that has been recently deleted. For example,
441	// `admins@example.com?uid=123456789012345678901`. If the group is
442	// recovered, this value reverts to `group:{emailid}` and the recovered
443	// group retains the role in the binding. * `domain:{domain}`: The G
444	// Suite domain (primary) that represents all the users of that domain.
445	// For example, `google.com` or `example.com`.
446	Members []string `json:"members,omitempty"`
447
448	// Role: Role that is assigned to `members`. For example,
449	// `roles/viewer`, `roles/editor`, or `roles/owner`.
450	Role string `json:"role,omitempty"`
451
452	// ForceSendFields is a list of field names (e.g. "Condition") to
453	// unconditionally include in API requests. By default, fields with
454	// empty values are omitted from API requests. However, any non-pointer,
455	// non-interface field appearing in ForceSendFields will be sent to the
456	// server regardless of whether the field is empty or not. This may be
457	// used to include empty fields in Patch requests.
458	ForceSendFields []string `json:"-"`
459
460	// NullFields is a list of field names (e.g. "Condition") to include in
461	// API requests with the JSON null value. By default, fields with empty
462	// values are omitted from API requests. However, any field with an
463	// empty value appearing in NullFields will be sent to the server as
464	// null. It is an error if a field in this list has a non-empty value.
465	// This may be used to include null fields in Patch requests.
466	NullFields []string `json:"-"`
467}
468
469func (s *Binding) MarshalJSON() ([]byte, error) {
470	type NoMethod Binding
471	raw := NoMethod(*s)
472	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
473}
474
475// Category: Represents the category hierarchy of a SKU.
476type Category struct {
477	// ResourceFamily: The type of product the SKU refers to. Example:
478	// "Compute", "Storage", "Network", "ApplicationServices" etc.
479	ResourceFamily string `json:"resourceFamily,omitempty"`
480
481	// ResourceGroup: A group classification for related SKUs. Example:
482	// "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc.
483	ResourceGroup string `json:"resourceGroup,omitempty"`
484
485	// ServiceDisplayName: The display name of the service this SKU belongs
486	// to.
487	ServiceDisplayName string `json:"serviceDisplayName,omitempty"`
488
489	// UsageType: Represents how the SKU is consumed. Example: "OnDemand",
490	// "Preemptible", "Commit1Mo", "Commit1Yr" etc.
491	UsageType string `json:"usageType,omitempty"`
492
493	// ForceSendFields is a list of field names (e.g. "ResourceFamily") to
494	// unconditionally include in API requests. By default, fields with
495	// empty values are omitted from API requests. However, any non-pointer,
496	// non-interface field appearing in ForceSendFields will be sent to the
497	// server regardless of whether the field is empty or not. This may be
498	// used to include empty fields in Patch requests.
499	ForceSendFields []string `json:"-"`
500
501	// NullFields is a list of field names (e.g. "ResourceFamily") to
502	// include in API requests with the JSON null value. By default, fields
503	// with empty values are omitted from API requests. However, any field
504	// with an empty value appearing in NullFields will be sent to the
505	// server as null. It is an error if a field in this list has a
506	// non-empty value. This may be used to include null fields in Patch
507	// requests.
508	NullFields []string `json:"-"`
509}
510
511func (s *Category) MarshalJSON() ([]byte, error) {
512	type NoMethod Category
513	raw := NoMethod(*s)
514	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
515}
516
517// Expr: Represents a textual expression in the Common Expression
518// Language (CEL) syntax. CEL is a C-like expression language. The
519// syntax and semantics of CEL are documented at
520// https://github.com/google/cel-spec. Example (Comparison): title:
521// "Summary size limit" description: "Determines if a summary is less
522// than 100 chars" expression: "document.summary.size() < 100" Example
523// (Equality): title: "Requestor is owner" description: "Determines if
524// requestor is the document owner" expression: "document.owner ==
525// request.auth.claims.email" Example (Logic): title: "Public documents"
526// description: "Determine whether the document should be publicly
527// visible" expression: "document.type != 'private' && document.type !=
528// 'internal'" Example (Data Manipulation): title: "Notification string"
529// description: "Create a notification string with a timestamp."
530// expression: "'New message received at ' +
531// string(document.create_time)" The exact variables and functions that
532// may be referenced within an expression are determined by the service
533// that evaluates it. See the service documentation for additional
534// information.
535type Expr struct {
536	// Description: Optional. Description of the expression. This is a
537	// longer text which describes the expression, e.g. when hovered over it
538	// in a UI.
539	Description string `json:"description,omitempty"`
540
541	// Expression: Textual representation of an expression in Common
542	// Expression Language syntax.
543	Expression string `json:"expression,omitempty"`
544
545	// Location: Optional. String indicating the location of the expression
546	// for error reporting, e.g. a file name and a position in the file.
547	Location string `json:"location,omitempty"`
548
549	// Title: Optional. Title for the expression, i.e. a short string
550	// describing its purpose. This can be used e.g. in UIs which allow to
551	// enter the expression.
552	Title string `json:"title,omitempty"`
553
554	// ForceSendFields is a list of field names (e.g. "Description") to
555	// unconditionally include in API requests. By default, fields with
556	// empty values are omitted from API requests. However, any non-pointer,
557	// non-interface field appearing in ForceSendFields will be sent to the
558	// server regardless of whether the field is empty or not. This may be
559	// used to include empty fields in Patch requests.
560	ForceSendFields []string `json:"-"`
561
562	// NullFields is a list of field names (e.g. "Description") to include
563	// in API requests with the JSON null value. By default, fields with
564	// empty values are omitted from API requests. However, any field with
565	// an empty value appearing in NullFields will be sent to the server as
566	// null. It is an error if a field in this list has a non-empty value.
567	// This may be used to include null fields in Patch requests.
568	NullFields []string `json:"-"`
569}
570
571func (s *Expr) MarshalJSON() ([]byte, error) {
572	type NoMethod Expr
573	raw := NoMethod(*s)
574	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
575}
576
577// GeoTaxonomy: Encapsulates the geographic taxonomy data for a sku.
578type GeoTaxonomy struct {
579	// Regions: The list of regions associated with a sku. Empty for Global
580	// skus, which are associated with all Google Cloud regions.
581	Regions []string `json:"regions,omitempty"`
582
583	// Type: The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
584	//
585	// Possible values:
586	//   "TYPE_UNSPECIFIED" - The type is not specified.
587	//   "GLOBAL" - The sku is global in nature, e.g. a license sku. Global
588	// skus are available in all regions, and so have an empty region list.
589	//   "REGIONAL" - The sku is available in a specific region, e.g.
590	// "us-west2".
591	//   "MULTI_REGIONAL" - The sku is associated with multiple regions,
592	// e.g. "us-west2" and "us-east1".
593	Type string `json:"type,omitempty"`
594
595	// ForceSendFields is a list of field names (e.g. "Regions") to
596	// unconditionally include in API requests. By default, fields with
597	// empty values are omitted from API requests. However, any non-pointer,
598	// non-interface field appearing in ForceSendFields will be sent to the
599	// server regardless of whether the field is empty or not. This may be
600	// used to include empty fields in Patch requests.
601	ForceSendFields []string `json:"-"`
602
603	// NullFields is a list of field names (e.g. "Regions") to include in
604	// API requests with the JSON null value. By default, fields with empty
605	// values are omitted from API requests. However, any field with an
606	// empty value appearing in NullFields will be sent to the server as
607	// null. It is an error if a field in this list has a non-empty value.
608	// This may be used to include null fields in Patch requests.
609	NullFields []string `json:"-"`
610}
611
612func (s *GeoTaxonomy) MarshalJSON() ([]byte, error) {
613	type NoMethod GeoTaxonomy
614	raw := NoMethod(*s)
615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
616}
617
618// ListBillingAccountsResponse: Response message for
619// `ListBillingAccounts`.
620type ListBillingAccountsResponse struct {
621	// BillingAccounts: A list of billing accounts.
622	BillingAccounts []*BillingAccount `json:"billingAccounts,omitempty"`
623
624	// NextPageToken: A token to retrieve the next page of results. To
625	// retrieve the next page, call `ListBillingAccounts` again with the
626	// `page_token` field set to this value. This field is empty if there
627	// are no more results to retrieve.
628	NextPageToken string `json:"nextPageToken,omitempty"`
629
630	// ServerResponse contains the HTTP response code and headers from the
631	// server.
632	googleapi.ServerResponse `json:"-"`
633
634	// ForceSendFields is a list of field names (e.g. "BillingAccounts") to
635	// unconditionally include in API requests. By default, fields with
636	// empty values are omitted from API requests. However, any non-pointer,
637	// non-interface field appearing in ForceSendFields will be sent to the
638	// server regardless of whether the field is empty or not. This may be
639	// used to include empty fields in Patch requests.
640	ForceSendFields []string `json:"-"`
641
642	// NullFields is a list of field names (e.g. "BillingAccounts") to
643	// include in API requests with the JSON null value. By default, fields
644	// with empty values are omitted from API requests. However, any field
645	// with an empty value appearing in NullFields will be sent to the
646	// server as null. It is an error if a field in this list has a
647	// non-empty value. This may be used to include null fields in Patch
648	// requests.
649	NullFields []string `json:"-"`
650}
651
652func (s *ListBillingAccountsResponse) MarshalJSON() ([]byte, error) {
653	type NoMethod ListBillingAccountsResponse
654	raw := NoMethod(*s)
655	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
656}
657
658// ListProjectBillingInfoResponse: Request message for
659// `ListProjectBillingInfoResponse`.
660type ListProjectBillingInfoResponse struct {
661	// NextPageToken: A token to retrieve the next page of results. To
662	// retrieve the next page, call `ListProjectBillingInfo` again with the
663	// `page_token` field set to this value. This field is empty if there
664	// are no more results to retrieve.
665	NextPageToken string `json:"nextPageToken,omitempty"`
666
667	// ProjectBillingInfo: A list of `ProjectBillingInfo` resources
668	// representing the projects associated with the billing account.
669	ProjectBillingInfo []*ProjectBillingInfo `json:"projectBillingInfo,omitempty"`
670
671	// ServerResponse contains the HTTP response code and headers from the
672	// server.
673	googleapi.ServerResponse `json:"-"`
674
675	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
676	// unconditionally include in API requests. By default, fields with
677	// empty values are omitted from API requests. However, any non-pointer,
678	// non-interface field appearing in ForceSendFields will be sent to the
679	// server regardless of whether the field is empty or not. This may be
680	// used to include empty fields in Patch requests.
681	ForceSendFields []string `json:"-"`
682
683	// NullFields is a list of field names (e.g. "NextPageToken") to include
684	// in API requests with the JSON null value. By default, fields with
685	// empty values are omitted from API requests. However, any field with
686	// an empty value appearing in NullFields will be sent to the server as
687	// null. It is an error if a field in this list has a non-empty value.
688	// This may be used to include null fields in Patch requests.
689	NullFields []string `json:"-"`
690}
691
692func (s *ListProjectBillingInfoResponse) MarshalJSON() ([]byte, error) {
693	type NoMethod ListProjectBillingInfoResponse
694	raw := NoMethod(*s)
695	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
696}
697
698// ListServicesResponse: Response message for `ListServices`.
699type ListServicesResponse struct {
700	// NextPageToken: A token to retrieve the next page of results. To
701	// retrieve the next page, call `ListServices` again with the
702	// `page_token` field set to this value. This field is empty if there
703	// are no more results to retrieve.
704	NextPageToken string `json:"nextPageToken,omitempty"`
705
706	// Services: A list of services.
707	Services []*Service `json:"services,omitempty"`
708
709	// ServerResponse contains the HTTP response code and headers from the
710	// server.
711	googleapi.ServerResponse `json:"-"`
712
713	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
714	// unconditionally include in API requests. By default, fields with
715	// empty values are omitted from API requests. However, any non-pointer,
716	// non-interface field appearing in ForceSendFields will be sent to the
717	// server regardless of whether the field is empty or not. This may be
718	// used to include empty fields in Patch requests.
719	ForceSendFields []string `json:"-"`
720
721	// NullFields is a list of field names (e.g. "NextPageToken") to include
722	// in API requests with the JSON null value. By default, fields with
723	// empty values are omitted from API requests. However, any field with
724	// an empty value appearing in NullFields will be sent to the server as
725	// null. It is an error if a field in this list has a non-empty value.
726	// This may be used to include null fields in Patch requests.
727	NullFields []string `json:"-"`
728}
729
730func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
731	type NoMethod ListServicesResponse
732	raw := NoMethod(*s)
733	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
734}
735
736// ListSkusResponse: Response message for `ListSkus`.
737type ListSkusResponse struct {
738	// NextPageToken: A token to retrieve the next page of results. To
739	// retrieve the next page, call `ListSkus` again with the `page_token`
740	// field set to this value. This field is empty if there are no more
741	// results to retrieve.
742	NextPageToken string `json:"nextPageToken,omitempty"`
743
744	// Skus: The list of public SKUs of the given service.
745	Skus []*Sku `json:"skus,omitempty"`
746
747	// ServerResponse contains the HTTP response code and headers from the
748	// server.
749	googleapi.ServerResponse `json:"-"`
750
751	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
752	// unconditionally include in API requests. By default, fields with
753	// empty values are omitted from API requests. However, any non-pointer,
754	// non-interface field appearing in ForceSendFields will be sent to the
755	// server regardless of whether the field is empty or not. This may be
756	// used to include empty fields in Patch requests.
757	ForceSendFields []string `json:"-"`
758
759	// NullFields is a list of field names (e.g. "NextPageToken") to include
760	// in API requests with the JSON null value. By default, fields with
761	// empty values are omitted from API requests. However, any field with
762	// an empty value appearing in NullFields will be sent to the server as
763	// null. It is an error if a field in this list has a non-empty value.
764	// This may be used to include null fields in Patch requests.
765	NullFields []string `json:"-"`
766}
767
768func (s *ListSkusResponse) MarshalJSON() ([]byte, error) {
769	type NoMethod ListSkusResponse
770	raw := NoMethod(*s)
771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
772}
773
774// Money: Represents an amount of money with its currency type.
775type Money struct {
776	// CurrencyCode: The three-letter currency code defined in ISO 4217.
777	CurrencyCode string `json:"currencyCode,omitempty"`
778
779	// Nanos: Number of nano (10^-9) units of the amount. The value must be
780	// between -999,999,999 and +999,999,999 inclusive. If `units` is
781	// positive, `nanos` must be positive or zero. If `units` is zero,
782	// `nanos` can be positive, zero, or negative. If `units` is negative,
783	// `nanos` must be negative or zero. For example $-1.75 is represented
784	// as `units`=-1 and `nanos`=-750,000,000.
785	Nanos int64 `json:"nanos,omitempty"`
786
787	// Units: The whole units of the amount. For example if `currencyCode`
788	// is "USD", then 1 unit is one US dollar.
789	Units int64 `json:"units,omitempty,string"`
790
791	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
792	// unconditionally include in API requests. By default, fields with
793	// empty values are omitted from API requests. However, any non-pointer,
794	// non-interface field appearing in ForceSendFields will be sent to the
795	// server regardless of whether the field is empty or not. This may be
796	// used to include empty fields in Patch requests.
797	ForceSendFields []string `json:"-"`
798
799	// NullFields is a list of field names (e.g. "CurrencyCode") to include
800	// in API requests with the JSON null value. By default, fields with
801	// empty values are omitted from API requests. However, any field with
802	// an empty value appearing in NullFields will be sent to the server as
803	// null. It is an error if a field in this list has a non-empty value.
804	// This may be used to include null fields in Patch requests.
805	NullFields []string `json:"-"`
806}
807
808func (s *Money) MarshalJSON() ([]byte, error) {
809	type NoMethod Money
810	raw := NoMethod(*s)
811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
812}
813
814// Policy: An Identity and Access Management (IAM) policy, which
815// specifies access controls for Google Cloud resources. A `Policy` is a
816// collection of `bindings`. A `binding` binds one or more `members` to
817// a single `role`. Members can be user accounts, service accounts,
818// Google groups, and domains (such as G Suite). A `role` is a named
819// list of permissions; each `role` can be an IAM predefined role or a
820// user-created custom role. For some types of Google Cloud resources, a
821// `binding` can also specify a `condition`, which is a logical
822// expression that allows access to a resource only if the expression
823// evaluates to `true`. A condition can add constraints based on
824// attributes of the request, the resource, or both. To learn which
825// resources support conditions in their IAM policies, see the IAM
826// documentation
827// (https://cloud.google.com/iam/help/conditions/resource-policies).
828// **JSON example:** { "bindings": [ { "role":
829// "roles/resourcemanager.organizationAdmin", "members": [
830// "user:mike@example.com", "group:admins@example.com",
831// "domain:google.com",
832// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, {
833// "role": "roles/resourcemanager.organizationViewer", "members": [
834// "user:eve@example.com" ], "condition": { "title": "expirable access",
835// "description": "Does not grant access after Sep 2020", "expression":
836// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ],
837// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: -
838// members: - user:mike@example.com - group:admins@example.com -
839// domain:google.com -
840// serviceAccount:my-project-id@appspot.gserviceaccount.com role:
841// roles/resourcemanager.organizationAdmin - members: -
842// user:eve@example.com role: roles/resourcemanager.organizationViewer
843// condition: title: expirable access description: Does not grant access
844// after Sep 2020 expression: request.time <
845// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version:
846// 3 For a description of IAM and its features, see the IAM
847// documentation (https://cloud.google.com/iam/docs/).
848type Policy struct {
849	// AuditConfigs: Specifies cloud audit logging configuration for this
850	// policy.
851	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
852
853	// Bindings: Associates a list of `members` to a `role`. Optionally, may
854	// specify a `condition` that determines how and when the `bindings` are
855	// applied. Each of the `bindings` must contain at least one member.
856	Bindings []*Binding `json:"bindings,omitempty"`
857
858	// Etag: `etag` is used for optimistic concurrency control as a way to
859	// help prevent simultaneous updates of a policy from overwriting each
860	// other. It is strongly suggested that systems make use of the `etag`
861	// in the read-modify-write cycle to perform policy updates in order to
862	// avoid race conditions: An `etag` is returned in the response to
863	// `getIamPolicy`, and systems are expected to put that etag in the
864	// request to `setIamPolicy` to ensure that their change will be applied
865	// to the same version of the policy. **Important:** If you use IAM
866	// Conditions, you must include the `etag` field whenever you call
867	// `setIamPolicy`. If you omit this field, then IAM allows you to
868	// overwrite a version `3` policy with a version `1` policy, and all of
869	// the conditions in the version `3` policy are lost.
870	Etag string `json:"etag,omitempty"`
871
872	// Version: Specifies the format of the policy. Valid values are `0`,
873	// `1`, and `3`. Requests that specify an invalid value are rejected.
874	// Any operation that affects conditional role bindings must specify
875	// version `3`. This requirement applies to the following operations: *
876	// Getting a policy that includes a conditional role binding * Adding a
877	// conditional role binding to a policy * Changing a conditional role
878	// binding in a policy * Removing any role binding, with or without a
879	// condition, from a policy that includes conditions **Important:** If
880	// you use IAM Conditions, you must include the `etag` field whenever
881	// you call `setIamPolicy`. If you omit this field, then IAM allows you
882	// to overwrite a version `3` policy with a version `1` policy, and all
883	// of the conditions in the version `3` policy are lost. If a policy
884	// does not include any conditions, operations on that policy may
885	// specify any valid version or leave the field unset. To learn which
886	// resources support conditions in their IAM policies, see the IAM
887	// documentation
888	// (https://cloud.google.com/iam/help/conditions/resource-policies).
889	Version int64 `json:"version,omitempty"`
890
891	// ServerResponse contains the HTTP response code and headers from the
892	// server.
893	googleapi.ServerResponse `json:"-"`
894
895	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
896	// unconditionally include in API requests. By default, fields with
897	// empty values are omitted from API requests. However, any non-pointer,
898	// non-interface field appearing in ForceSendFields will be sent to the
899	// server regardless of whether the field is empty or not. This may be
900	// used to include empty fields in Patch requests.
901	ForceSendFields []string `json:"-"`
902
903	// NullFields is a list of field names (e.g. "AuditConfigs") to include
904	// in API requests with the JSON null value. By default, fields with
905	// empty values are omitted from API requests. However, any field with
906	// an empty value appearing in NullFields will be sent to the server as
907	// null. It is an error if a field in this list has a non-empty value.
908	// This may be used to include null fields in Patch requests.
909	NullFields []string `json:"-"`
910}
911
912func (s *Policy) MarshalJSON() ([]byte, error) {
913	type NoMethod Policy
914	raw := NoMethod(*s)
915	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
916}
917
918// PricingExpression: Expresses a mathematical pricing formula. For
919// Example:- `usage_unit: GBy` `tiered_rates:` `[start_usage_amount: 20,
920// unit_price: $10]` `[start_usage_amount: 100, unit_price: $5]` The
921// above expresses a pricing formula where the first 20GB is free, the
922// next 80GB is priced at $10 per GB followed by $5 per GB for
923// additional usage.
924type PricingExpression struct {
925	// BaseUnit: The base unit for the SKU which is the unit used in usage
926	// exports. Example: "By"
927	BaseUnit string `json:"baseUnit,omitempty"`
928
929	// BaseUnitConversionFactor: Conversion factor for converting from price
930	// per usage_unit to price per base_unit, and start_usage_amount to
931	// start_usage_amount in base_unit. unit_price /
932	// base_unit_conversion_factor = price per base_unit. start_usage_amount
933	// * base_unit_conversion_factor = start_usage_amount in base_unit.
934	BaseUnitConversionFactor float64 `json:"baseUnitConversionFactor,omitempty"`
935
936	// BaseUnitDescription: The base unit in human readable form. Example:
937	// "byte".
938	BaseUnitDescription string `json:"baseUnitDescription,omitempty"`
939
940	// DisplayQuantity: The recommended quantity of units for displaying
941	// pricing info. When displaying pricing info it is recommended to
942	// display: (unit_price * display_quantity) per display_quantity
943	// usage_unit. This field does not affect the pricing formula and is for
944	// display purposes only. Example: If the unit_price is "0.0001 USD",
945	// the usage_unit is "GB" and the display_quantity is "1000" then the
946	// recommended way of displaying the pricing info is "0.10 USD per 1000
947	// GB"
948	DisplayQuantity float64 `json:"displayQuantity,omitempty"`
949
950	// TieredRates: The list of tiered rates for this pricing. The total
951	// cost is computed by applying each of the tiered rates on usage. This
952	// repeated list is sorted by ascending order of start_usage_amount.
953	TieredRates []*TierRate `json:"tieredRates,omitempty"`
954
955	// UsageUnit: The short hand for unit of usage this pricing is specified
956	// in. Example: usage_unit of "GiBy" means that usage is specified in
957	// "Gibi Byte".
958	UsageUnit string `json:"usageUnit,omitempty"`
959
960	// UsageUnitDescription: The unit of usage in human readable form.
961	// Example: "gibi byte".
962	UsageUnitDescription string `json:"usageUnitDescription,omitempty"`
963
964	// ForceSendFields is a list of field names (e.g. "BaseUnit") to
965	// unconditionally include in API requests. By default, fields with
966	// empty values are omitted from API requests. However, any non-pointer,
967	// non-interface field appearing in ForceSendFields will be sent to the
968	// server regardless of whether the field is empty or not. This may be
969	// used to include empty fields in Patch requests.
970	ForceSendFields []string `json:"-"`
971
972	// NullFields is a list of field names (e.g. "BaseUnit") to include in
973	// API requests with the JSON null value. By default, fields with empty
974	// values are omitted from API requests. However, any field with an
975	// empty value appearing in NullFields will be sent to the server as
976	// null. It is an error if a field in this list has a non-empty value.
977	// This may be used to include null fields in Patch requests.
978	NullFields []string `json:"-"`
979}
980
981func (s *PricingExpression) MarshalJSON() ([]byte, error) {
982	type NoMethod PricingExpression
983	raw := NoMethod(*s)
984	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
985}
986
987func (s *PricingExpression) UnmarshalJSON(data []byte) error {
988	type NoMethod PricingExpression
989	var s1 struct {
990		BaseUnitConversionFactor gensupport.JSONFloat64 `json:"baseUnitConversionFactor"`
991		DisplayQuantity          gensupport.JSONFloat64 `json:"displayQuantity"`
992		*NoMethod
993	}
994	s1.NoMethod = (*NoMethod)(s)
995	if err := json.Unmarshal(data, &s1); err != nil {
996		return err
997	}
998	s.BaseUnitConversionFactor = float64(s1.BaseUnitConversionFactor)
999	s.DisplayQuantity = float64(s1.DisplayQuantity)
1000	return nil
1001}
1002
1003// PricingInfo: Represents the pricing information for a SKU at a single
1004// point of time.
1005type PricingInfo struct {
1006	// AggregationInfo: Aggregation Info. This can be left unspecified if
1007	// the pricing expression doesn't require aggregation.
1008	AggregationInfo *AggregationInfo `json:"aggregationInfo,omitempty"`
1009
1010	// CurrencyConversionRate: Conversion rate used for currency conversion,
1011	// from USD to the currency specified in the request. This includes any
1012	// surcharge collected for billing in non USD currency. If a currency is
1013	// not specified in the request this defaults to 1.0. Example: USD *
1014	// currency_conversion_rate = JPY
1015	CurrencyConversionRate float64 `json:"currencyConversionRate,omitempty"`
1016
1017	// EffectiveTime: The timestamp from which this pricing was effective
1018	// within the requested time range. This is guaranteed to be greater
1019	// than or equal to the start_time field in the request and less than
1020	// the end_time field in the request. If a time range was not specified
1021	// in the request this field will be equivalent to a time within the
1022	// last 12 hours, indicating the latest pricing info.
1023	EffectiveTime string `json:"effectiveTime,omitempty"`
1024
1025	// PricingExpression: Expresses the pricing formula. See
1026	// `PricingExpression` for an example.
1027	PricingExpression *PricingExpression `json:"pricingExpression,omitempty"`
1028
1029	// Summary: An optional human readable summary of the pricing
1030	// information, has a maximum length of 256 characters.
1031	Summary string `json:"summary,omitempty"`
1032
1033	// ForceSendFields is a list of field names (e.g. "AggregationInfo") to
1034	// unconditionally include in API requests. By default, fields with
1035	// empty values are omitted from API requests. However, any non-pointer,
1036	// non-interface field appearing in ForceSendFields will be sent to the
1037	// server regardless of whether the field is empty or not. This may be
1038	// used to include empty fields in Patch requests.
1039	ForceSendFields []string `json:"-"`
1040
1041	// NullFields is a list of field names (e.g. "AggregationInfo") to
1042	// include in API requests with the JSON null value. By default, fields
1043	// with empty values are omitted from API requests. However, any field
1044	// with an empty value appearing in NullFields will be sent to the
1045	// server as null. It is an error if a field in this list has a
1046	// non-empty value. This may be used to include null fields in Patch
1047	// requests.
1048	NullFields []string `json:"-"`
1049}
1050
1051func (s *PricingInfo) MarshalJSON() ([]byte, error) {
1052	type NoMethod PricingInfo
1053	raw := NoMethod(*s)
1054	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1055}
1056
1057func (s *PricingInfo) UnmarshalJSON(data []byte) error {
1058	type NoMethod PricingInfo
1059	var s1 struct {
1060		CurrencyConversionRate gensupport.JSONFloat64 `json:"currencyConversionRate"`
1061		*NoMethod
1062	}
1063	s1.NoMethod = (*NoMethod)(s)
1064	if err := json.Unmarshal(data, &s1); err != nil {
1065		return err
1066	}
1067	s.CurrencyConversionRate = float64(s1.CurrencyConversionRate)
1068	return nil
1069}
1070
1071// ProjectBillingInfo: Encapsulation of billing information for a Google
1072// Cloud Console project. A project has at most one associated billing
1073// account at a time (but a billing account can be assigned to multiple
1074// projects).
1075type ProjectBillingInfo struct {
1076	// BillingAccountName: The resource name of the billing account
1077	// associated with the project, if any. For example,
1078	// `billingAccounts/012345-567890-ABCDEF`.
1079	BillingAccountName string `json:"billingAccountName,omitempty"`
1080
1081	// BillingEnabled: True if the project is associated with an open
1082	// billing account, to which usage on the project is charged. False if
1083	// the project is associated with a closed billing account, or no
1084	// billing account at all, and therefore cannot use paid services. This
1085	// field is read-only.
1086	BillingEnabled bool `json:"billingEnabled,omitempty"`
1087
1088	// Name: The resource name for the `ProjectBillingInfo`; has the form
1089	// `projects/{project_id}/billingInfo`. For example, the resource name
1090	// for the billing information for project `tokyo-rain-123` would be
1091	// `projects/tokyo-rain-123/billingInfo`. This field is read-only.
1092	Name string `json:"name,omitempty"`
1093
1094	// ProjectId: The ID of the project that this `ProjectBillingInfo`
1095	// represents, such as `tokyo-rain-123`. This is a convenience field so
1096	// that you don't need to parse the `name` field to obtain a project ID.
1097	// This field is read-only.
1098	ProjectId string `json:"projectId,omitempty"`
1099
1100	// ServerResponse contains the HTTP response code and headers from the
1101	// server.
1102	googleapi.ServerResponse `json:"-"`
1103
1104	// ForceSendFields is a list of field names (e.g. "BillingAccountName")
1105	// to unconditionally include in API requests. By default, fields with
1106	// empty values are omitted from API requests. However, any non-pointer,
1107	// non-interface field appearing in ForceSendFields will be sent to the
1108	// server regardless of whether the field is empty or not. This may be
1109	// used to include empty fields in Patch requests.
1110	ForceSendFields []string `json:"-"`
1111
1112	// NullFields is a list of field names (e.g. "BillingAccountName") to
1113	// include in API requests with the JSON null value. By default, fields
1114	// with empty values are omitted from API requests. However, any field
1115	// with an empty value appearing in NullFields will be sent to the
1116	// server as null. It is an error if a field in this list has a
1117	// non-empty value. This may be used to include null fields in Patch
1118	// requests.
1119	NullFields []string `json:"-"`
1120}
1121
1122func (s *ProjectBillingInfo) MarshalJSON() ([]byte, error) {
1123	type NoMethod ProjectBillingInfo
1124	raw := NoMethod(*s)
1125	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1126}
1127
1128// Service: Encapsulates a single service in Google Cloud Platform.
1129type Service struct {
1130	// BusinessEntityName: The business under which the service is offered.
1131	// Ex. "businessEntities/GCP", "businessEntities/Maps"
1132	BusinessEntityName string `json:"businessEntityName,omitempty"`
1133
1134	// DisplayName: A human readable display name for this service.
1135	DisplayName string `json:"displayName,omitempty"`
1136
1137	// Name: The resource name for the service. Example:
1138	// "services/DA34-426B-A397"
1139	Name string `json:"name,omitempty"`
1140
1141	// ServiceId: The identifier for the service. Example: "DA34-426B-A397"
1142	ServiceId string `json:"serviceId,omitempty"`
1143
1144	// ForceSendFields is a list of field names (e.g. "BusinessEntityName")
1145	// to unconditionally include in API requests. By default, fields with
1146	// empty values are omitted from API requests. However, any non-pointer,
1147	// non-interface field appearing in ForceSendFields will be sent to the
1148	// server regardless of whether the field is empty or not. This may be
1149	// used to include empty fields in Patch requests.
1150	ForceSendFields []string `json:"-"`
1151
1152	// NullFields is a list of field names (e.g. "BusinessEntityName") to
1153	// include in API requests with the JSON null value. By default, fields
1154	// with empty values are omitted from API requests. However, any field
1155	// with an empty value appearing in NullFields will be sent to the
1156	// server as null. It is an error if a field in this list has a
1157	// non-empty value. This may be used to include null fields in Patch
1158	// requests.
1159	NullFields []string `json:"-"`
1160}
1161
1162func (s *Service) MarshalJSON() ([]byte, error) {
1163	type NoMethod Service
1164	raw := NoMethod(*s)
1165	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1166}
1167
1168// SetIamPolicyRequest: Request message for `SetIamPolicy` method.
1169type SetIamPolicyRequest struct {
1170	// Policy: REQUIRED: The complete policy to be applied to the
1171	// `resource`. The size of the policy is limited to a few 10s of KB. An
1172	// empty policy is a valid policy but certain Cloud Platform services
1173	// (such as Projects) might reject them.
1174	Policy *Policy `json:"policy,omitempty"`
1175
1176	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the
1177	// policy to modify. Only the fields in the mask will be modified. If no
1178	// mask is provided, the following default mask is used: `paths:
1179	// "bindings, etag"
1180	UpdateMask string `json:"updateMask,omitempty"`
1181
1182	// ForceSendFields is a list of field names (e.g. "Policy") to
1183	// unconditionally include in API requests. By default, fields with
1184	// empty values are omitted from API requests. However, any non-pointer,
1185	// non-interface field appearing in ForceSendFields will be sent to the
1186	// server regardless of whether the field is empty or not. This may be
1187	// used to include empty fields in Patch requests.
1188	ForceSendFields []string `json:"-"`
1189
1190	// NullFields is a list of field names (e.g. "Policy") to include in API
1191	// requests with the JSON null value. By default, fields with empty
1192	// values are omitted from API requests. However, any field with an
1193	// empty value appearing in NullFields will be sent to the server as
1194	// null. It is an error if a field in this list has a non-empty value.
1195	// This may be used to include null fields in Patch requests.
1196	NullFields []string `json:"-"`
1197}
1198
1199func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1200	type NoMethod SetIamPolicyRequest
1201	raw := NoMethod(*s)
1202	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1203}
1204
1205// Sku: Encapsulates a single SKU in Google Cloud Platform
1206type Sku struct {
1207	// Category: The category hierarchy of this SKU, purely for
1208	// organizational purpose.
1209	Category *Category `json:"category,omitempty"`
1210
1211	// Description: A human readable description of the SKU, has a maximum
1212	// length of 256 characters.
1213	Description string `json:"description,omitempty"`
1214
1215	// GeoTaxonomy: The geographic taxonomy for this sku.
1216	GeoTaxonomy *GeoTaxonomy `json:"geoTaxonomy,omitempty"`
1217
1218	// Name: The resource name for the SKU. Example:
1219	// "services/DA34-426B-A397/skus/AA95-CD31-42FE"
1220	Name string `json:"name,omitempty"`
1221
1222	// PricingInfo: A timeline of pricing info for this SKU in chronological
1223	// order.
1224	PricingInfo []*PricingInfo `json:"pricingInfo,omitempty"`
1225
1226	// ServiceProviderName: Identifies the service provider. This is
1227	// 'Google' for first party services in Google Cloud Platform.
1228	ServiceProviderName string `json:"serviceProviderName,omitempty"`
1229
1230	// ServiceRegions: List of service regions this SKU is offered at.
1231	// Example: "asia-east1" Service regions can be found at
1232	// https://cloud.google.com/about/locations/
1233	ServiceRegions []string `json:"serviceRegions,omitempty"`
1234
1235	// SkuId: The identifier for the SKU. Example: "AA95-CD31-42FE"
1236	SkuId string `json:"skuId,omitempty"`
1237
1238	// ForceSendFields is a list of field names (e.g. "Category") to
1239	// unconditionally include in API requests. By default, fields with
1240	// empty values are omitted from API requests. However, any non-pointer,
1241	// non-interface field appearing in ForceSendFields will be sent to the
1242	// server regardless of whether the field is empty or not. This may be
1243	// used to include empty fields in Patch requests.
1244	ForceSendFields []string `json:"-"`
1245
1246	// NullFields is a list of field names (e.g. "Category") to include in
1247	// API requests with the JSON null value. By default, fields with empty
1248	// values are omitted from API requests. However, any field with an
1249	// empty value appearing in NullFields will be sent to the server as
1250	// null. It is an error if a field in this list has a non-empty value.
1251	// This may be used to include null fields in Patch requests.
1252	NullFields []string `json:"-"`
1253}
1254
1255func (s *Sku) MarshalJSON() ([]byte, error) {
1256	type NoMethod Sku
1257	raw := NoMethod(*s)
1258	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1259}
1260
1261// TestIamPermissionsRequest: Request message for `TestIamPermissions`
1262// method.
1263type TestIamPermissionsRequest struct {
1264	// Permissions: The set of permissions to check for the `resource`.
1265	// Permissions with wildcards (such as '*' or 'storage.*') are not
1266	// allowed. For more information see IAM Overview
1267	// (https://cloud.google.com/iam/docs/overview#permissions).
1268	Permissions []string `json:"permissions,omitempty"`
1269
1270	// ForceSendFields is a list of field names (e.g. "Permissions") to
1271	// unconditionally include in API requests. By default, fields with
1272	// empty values are omitted from API requests. However, any non-pointer,
1273	// non-interface field appearing in ForceSendFields will be sent to the
1274	// server regardless of whether the field is empty or not. This may be
1275	// used to include empty fields in Patch requests.
1276	ForceSendFields []string `json:"-"`
1277
1278	// NullFields is a list of field names (e.g. "Permissions") to include
1279	// in API requests with the JSON null value. By default, fields with
1280	// empty values are omitted from API requests. However, any field with
1281	// an empty value appearing in NullFields will be sent to the server as
1282	// null. It is an error if a field in this list has a non-empty value.
1283	// This may be used to include null fields in Patch requests.
1284	NullFields []string `json:"-"`
1285}
1286
1287func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
1288	type NoMethod TestIamPermissionsRequest
1289	raw := NoMethod(*s)
1290	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1291}
1292
1293// TestIamPermissionsResponse: Response message for `TestIamPermissions`
1294// method.
1295type TestIamPermissionsResponse struct {
1296	// Permissions: A subset of `TestPermissionsRequest.permissions` that
1297	// the caller is allowed.
1298	Permissions []string `json:"permissions,omitempty"`
1299
1300	// ServerResponse contains the HTTP response code and headers from the
1301	// server.
1302	googleapi.ServerResponse `json:"-"`
1303
1304	// ForceSendFields is a list of field names (e.g. "Permissions") to
1305	// unconditionally include in API requests. By default, fields with
1306	// empty values are omitted from API requests. However, any non-pointer,
1307	// non-interface field appearing in ForceSendFields will be sent to the
1308	// server regardless of whether the field is empty or not. This may be
1309	// used to include empty fields in Patch requests.
1310	ForceSendFields []string `json:"-"`
1311
1312	// NullFields is a list of field names (e.g. "Permissions") to include
1313	// in API requests with the JSON null value. By default, fields with
1314	// empty values are omitted from API requests. However, any field with
1315	// an empty value appearing in NullFields will be sent to the server as
1316	// null. It is an error if a field in this list has a non-empty value.
1317	// This may be used to include null fields in Patch requests.
1318	NullFields []string `json:"-"`
1319}
1320
1321func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
1322	type NoMethod TestIamPermissionsResponse
1323	raw := NoMethod(*s)
1324	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1325}
1326
1327// TierRate: The price rate indicating starting usage and its
1328// corresponding price.
1329type TierRate struct {
1330	// StartUsageAmount: Usage is priced at this rate only after this
1331	// amount. Example: start_usage_amount of 10 indicates that the usage
1332	// will be priced at the unit_price after the first 10 usage_units.
1333	StartUsageAmount float64 `json:"startUsageAmount,omitempty"`
1334
1335	// UnitPrice: The price per unit of usage. Example: unit_price of amount
1336	// $10 indicates that each unit will cost $10.
1337	UnitPrice *Money `json:"unitPrice,omitempty"`
1338
1339	// ForceSendFields is a list of field names (e.g. "StartUsageAmount") to
1340	// unconditionally include in API requests. By default, fields with
1341	// empty values are omitted from API requests. However, any non-pointer,
1342	// non-interface field appearing in ForceSendFields will be sent to the
1343	// server regardless of whether the field is empty or not. This may be
1344	// used to include empty fields in Patch requests.
1345	ForceSendFields []string `json:"-"`
1346
1347	// NullFields is a list of field names (e.g. "StartUsageAmount") to
1348	// include in API requests with the JSON null value. By default, fields
1349	// with empty values are omitted from API requests. However, any field
1350	// with an empty value appearing in NullFields will be sent to the
1351	// server as null. It is an error if a field in this list has a
1352	// non-empty value. This may be used to include null fields in Patch
1353	// requests.
1354	NullFields []string `json:"-"`
1355}
1356
1357func (s *TierRate) MarshalJSON() ([]byte, error) {
1358	type NoMethod TierRate
1359	raw := NoMethod(*s)
1360	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1361}
1362
1363func (s *TierRate) UnmarshalJSON(data []byte) error {
1364	type NoMethod TierRate
1365	var s1 struct {
1366		StartUsageAmount gensupport.JSONFloat64 `json:"startUsageAmount"`
1367		*NoMethod
1368	}
1369	s1.NoMethod = (*NoMethod)(s)
1370	if err := json.Unmarshal(data, &s1); err != nil {
1371		return err
1372	}
1373	s.StartUsageAmount = float64(s1.StartUsageAmount)
1374	return nil
1375}
1376
1377// method id "cloudbilling.billingAccounts.create":
1378
1379type BillingAccountsCreateCall struct {
1380	s              *APIService
1381	billingaccount *BillingAccount
1382	urlParams_     gensupport.URLParams
1383	ctx_           context.Context
1384	header_        http.Header
1385}
1386
1387// Create: This method creates billing subaccounts
1388// (https://cloud.google.com/billing/docs/concepts#subaccounts). Google
1389// Cloud resellers should use the Channel Services APIs,
1390// accounts.customers.create
1391// (https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create)
1392// and accounts.customers.entitlements.create
1393// (https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create).
1394// When creating a subaccount, the current authenticated user must have
1395// the `billing.accounts.update` IAM permission on the parent account,
1396// which is typically given to billing account administrators
1397// (https://cloud.google.com/billing/docs/how-to/billing-access). This
1398// method will return an error if the parent account has not been
1399// provisioned as a reseller account.
1400func (r *BillingAccountsService) Create(billingaccount *BillingAccount) *BillingAccountsCreateCall {
1401	c := &BillingAccountsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1402	c.billingaccount = billingaccount
1403	return c
1404}
1405
1406// Fields allows partial responses to be retrieved. See
1407// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1408// for more information.
1409func (c *BillingAccountsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsCreateCall {
1410	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1411	return c
1412}
1413
1414// Context sets the context to be used in this call's Do method. Any
1415// pending HTTP request will be aborted if the provided context is
1416// canceled.
1417func (c *BillingAccountsCreateCall) Context(ctx context.Context) *BillingAccountsCreateCall {
1418	c.ctx_ = ctx
1419	return c
1420}
1421
1422// Header returns an http.Header that can be modified by the caller to
1423// add HTTP headers to the request.
1424func (c *BillingAccountsCreateCall) Header() http.Header {
1425	if c.header_ == nil {
1426		c.header_ = make(http.Header)
1427	}
1428	return c.header_
1429}
1430
1431func (c *BillingAccountsCreateCall) doRequest(alt string) (*http.Response, error) {
1432	reqHeaders := make(http.Header)
1433	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
1434	for k, v := range c.header_ {
1435		reqHeaders[k] = v
1436	}
1437	reqHeaders.Set("User-Agent", c.s.userAgent())
1438	var body io.Reader = nil
1439	body, err := googleapi.WithoutDataWrapper.JSONReader(c.billingaccount)
1440	if err != nil {
1441		return nil, err
1442	}
1443	reqHeaders.Set("Content-Type", "application/json")
1444	c.urlParams_.Set("alt", alt)
1445	c.urlParams_.Set("prettyPrint", "false")
1446	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/billingAccounts")
1447	urls += "?" + c.urlParams_.Encode()
1448	req, err := http.NewRequest("POST", urls, body)
1449	if err != nil {
1450		return nil, err
1451	}
1452	req.Header = reqHeaders
1453	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1454}
1455
1456// Do executes the "cloudbilling.billingAccounts.create" call.
1457// Exactly one of *BillingAccount or error will be non-nil. Any non-2xx
1458// status code is an error. Response headers are in either
1459// *BillingAccount.ServerResponse.Header or (if a response was returned
1460// at all) in error.(*googleapi.Error).Header. Use
1461// googleapi.IsNotModified to check whether the returned error was
1462// because http.StatusNotModified was returned.
1463func (c *BillingAccountsCreateCall) Do(opts ...googleapi.CallOption) (*BillingAccount, error) {
1464	gensupport.SetOptions(c.urlParams_, opts...)
1465	res, err := c.doRequest("json")
1466	if res != nil && res.StatusCode == http.StatusNotModified {
1467		if res.Body != nil {
1468			res.Body.Close()
1469		}
1470		return nil, &googleapi.Error{
1471			Code:   res.StatusCode,
1472			Header: res.Header,
1473		}
1474	}
1475	if err != nil {
1476		return nil, err
1477	}
1478	defer googleapi.CloseBody(res)
1479	if err := googleapi.CheckResponse(res); err != nil {
1480		return nil, err
1481	}
1482	ret := &BillingAccount{
1483		ServerResponse: googleapi.ServerResponse{
1484			Header:         res.Header,
1485			HTTPStatusCode: res.StatusCode,
1486		},
1487	}
1488	target := &ret
1489	if err := gensupport.DecodeResponse(target, res); err != nil {
1490		return nil, err
1491	}
1492	return ret, nil
1493	// {
1494	//   "description": "This method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloud resellers should use the Channel Services APIs, [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) and [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). When creating a subaccount, the current authenticated user must have the `billing.accounts.update` IAM permission on the parent account, which is typically given to billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will return an error if the parent account has not been provisioned as a reseller account.",
1495	//   "flatPath": "v1/billingAccounts",
1496	//   "httpMethod": "POST",
1497	//   "id": "cloudbilling.billingAccounts.create",
1498	//   "parameterOrder": [],
1499	//   "parameters": {},
1500	//   "path": "v1/billingAccounts",
1501	//   "request": {
1502	//     "$ref": "BillingAccount"
1503	//   },
1504	//   "response": {
1505	//     "$ref": "BillingAccount"
1506	//   },
1507	//   "scopes": [
1508	//     "https://www.googleapis.com/auth/cloud-billing",
1509	//     "https://www.googleapis.com/auth/cloud-platform"
1510	//   ]
1511	// }
1512
1513}
1514
1515// method id "cloudbilling.billingAccounts.get":
1516
1517type BillingAccountsGetCall struct {
1518	s            *APIService
1519	name         string
1520	urlParams_   gensupport.URLParams
1521	ifNoneMatch_ string
1522	ctx_         context.Context
1523	header_      http.Header
1524}
1525
1526// Get: Gets information about a billing account. The current
1527// authenticated user must be a viewer of the billing account
1528// (https://cloud.google.com/billing/docs/how-to/billing-access).
1529func (r *BillingAccountsService) Get(name string) *BillingAccountsGetCall {
1530	c := &BillingAccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1531	c.name = name
1532	return c
1533}
1534
1535// Fields allows partial responses to be retrieved. See
1536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1537// for more information.
1538func (c *BillingAccountsGetCall) Fields(s ...googleapi.Field) *BillingAccountsGetCall {
1539	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1540	return c
1541}
1542
1543// IfNoneMatch sets the optional parameter which makes the operation
1544// fail if the object's ETag matches the given value. This is useful for
1545// getting updates only after the object has changed since the last
1546// request. Use googleapi.IsNotModified to check whether the response
1547// error from Do is the result of In-None-Match.
1548func (c *BillingAccountsGetCall) IfNoneMatch(entityTag string) *BillingAccountsGetCall {
1549	c.ifNoneMatch_ = entityTag
1550	return c
1551}
1552
1553// Context sets the context to be used in this call's Do method. Any
1554// pending HTTP request will be aborted if the provided context is
1555// canceled.
1556func (c *BillingAccountsGetCall) Context(ctx context.Context) *BillingAccountsGetCall {
1557	c.ctx_ = ctx
1558	return c
1559}
1560
1561// Header returns an http.Header that can be modified by the caller to
1562// add HTTP headers to the request.
1563func (c *BillingAccountsGetCall) Header() http.Header {
1564	if c.header_ == nil {
1565		c.header_ = make(http.Header)
1566	}
1567	return c.header_
1568}
1569
1570func (c *BillingAccountsGetCall) doRequest(alt string) (*http.Response, error) {
1571	reqHeaders := make(http.Header)
1572	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
1573	for k, v := range c.header_ {
1574		reqHeaders[k] = v
1575	}
1576	reqHeaders.Set("User-Agent", c.s.userAgent())
1577	if c.ifNoneMatch_ != "" {
1578		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1579	}
1580	var body io.Reader = nil
1581	c.urlParams_.Set("alt", alt)
1582	c.urlParams_.Set("prettyPrint", "false")
1583	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1584	urls += "?" + c.urlParams_.Encode()
1585	req, err := http.NewRequest("GET", urls, body)
1586	if err != nil {
1587		return nil, err
1588	}
1589	req.Header = reqHeaders
1590	googleapi.Expand(req.URL, map[string]string{
1591		"name": c.name,
1592	})
1593	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1594}
1595
1596// Do executes the "cloudbilling.billingAccounts.get" call.
1597// Exactly one of *BillingAccount or error will be non-nil. Any non-2xx
1598// status code is an error. Response headers are in either
1599// *BillingAccount.ServerResponse.Header or (if a response was returned
1600// at all) in error.(*googleapi.Error).Header. Use
1601// googleapi.IsNotModified to check whether the returned error was
1602// because http.StatusNotModified was returned.
1603func (c *BillingAccountsGetCall) Do(opts ...googleapi.CallOption) (*BillingAccount, error) {
1604	gensupport.SetOptions(c.urlParams_, opts...)
1605	res, err := c.doRequest("json")
1606	if res != nil && res.StatusCode == http.StatusNotModified {
1607		if res.Body != nil {
1608			res.Body.Close()
1609		}
1610		return nil, &googleapi.Error{
1611			Code:   res.StatusCode,
1612			Header: res.Header,
1613		}
1614	}
1615	if err != nil {
1616		return nil, err
1617	}
1618	defer googleapi.CloseBody(res)
1619	if err := googleapi.CheckResponse(res); err != nil {
1620		return nil, err
1621	}
1622	ret := &BillingAccount{
1623		ServerResponse: googleapi.ServerResponse{
1624			Header:         res.Header,
1625			HTTPStatusCode: res.StatusCode,
1626		},
1627	}
1628	target := &ret
1629	if err := gensupport.DecodeResponse(target, res); err != nil {
1630		return nil, err
1631	}
1632	return ret, nil
1633	// {
1634	//   "description": "Gets information about a billing account. The current authenticated user must be a [viewer of the billing account](https://cloud.google.com/billing/docs/how-to/billing-access).",
1635	//   "flatPath": "v1/billingAccounts/{billingAccountsId}",
1636	//   "httpMethod": "GET",
1637	//   "id": "cloudbilling.billingAccounts.get",
1638	//   "parameterOrder": [
1639	//     "name"
1640	//   ],
1641	//   "parameters": {
1642	//     "name": {
1643	//       "description": "Required. The resource name of the billing account to retrieve. For example, `billingAccounts/012345-567890-ABCDEF`.",
1644	//       "location": "path",
1645	//       "pattern": "^billingAccounts/[^/]+$",
1646	//       "required": true,
1647	//       "type": "string"
1648	//     }
1649	//   },
1650	//   "path": "v1/{+name}",
1651	//   "response": {
1652	//     "$ref": "BillingAccount"
1653	//   },
1654	//   "scopes": [
1655	//     "https://www.googleapis.com/auth/cloud-billing",
1656	//     "https://www.googleapis.com/auth/cloud-billing.readonly",
1657	//     "https://www.googleapis.com/auth/cloud-platform"
1658	//   ]
1659	// }
1660
1661}
1662
1663// method id "cloudbilling.billingAccounts.getIamPolicy":
1664
1665type BillingAccountsGetIamPolicyCall struct {
1666	s            *APIService
1667	resource     string
1668	urlParams_   gensupport.URLParams
1669	ifNoneMatch_ string
1670	ctx_         context.Context
1671	header_      http.Header
1672}
1673
1674// GetIamPolicy: Gets the access control policy for a billing account.
1675// The caller must have the `billing.accounts.getIamPolicy` permission
1676// on the account, which is often given to billing account viewers
1677// (https://cloud.google.com/billing/docs/how-to/billing-access).
1678func (r *BillingAccountsService) GetIamPolicy(resource string) *BillingAccountsGetIamPolicyCall {
1679	c := &BillingAccountsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1680	c.resource = resource
1681	return c
1682}
1683
1684// OptionsRequestedPolicyVersion sets the optional parameter
1685// "options.requestedPolicyVersion": The policy format version to be
1686// returned. Valid values are 0, 1, and 3. Requests specifying an
1687// invalid value will be rejected. Requests for policies with any
1688// conditional bindings must specify version 3. Policies without any
1689// conditional bindings may specify any valid value or leave the field
1690// unset. To learn which resources support conditions in their IAM
1691// policies, see the IAM documentation
1692// (https://cloud.google.com/iam/help/conditions/resource-policies).
1693func (c *BillingAccountsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BillingAccountsGetIamPolicyCall {
1694	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
1695	return c
1696}
1697
1698// Fields allows partial responses to be retrieved. See
1699// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1700// for more information.
1701func (c *BillingAccountsGetIamPolicyCall) Fields(s ...googleapi.Field) *BillingAccountsGetIamPolicyCall {
1702	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1703	return c
1704}
1705
1706// IfNoneMatch sets the optional parameter which makes the operation
1707// fail if the object's ETag matches the given value. This is useful for
1708// getting updates only after the object has changed since the last
1709// request. Use googleapi.IsNotModified to check whether the response
1710// error from Do is the result of In-None-Match.
1711func (c *BillingAccountsGetIamPolicyCall) IfNoneMatch(entityTag string) *BillingAccountsGetIamPolicyCall {
1712	c.ifNoneMatch_ = entityTag
1713	return c
1714}
1715
1716// Context sets the context to be used in this call's Do method. Any
1717// pending HTTP request will be aborted if the provided context is
1718// canceled.
1719func (c *BillingAccountsGetIamPolicyCall) Context(ctx context.Context) *BillingAccountsGetIamPolicyCall {
1720	c.ctx_ = ctx
1721	return c
1722}
1723
1724// Header returns an http.Header that can be modified by the caller to
1725// add HTTP headers to the request.
1726func (c *BillingAccountsGetIamPolicyCall) Header() http.Header {
1727	if c.header_ == nil {
1728		c.header_ = make(http.Header)
1729	}
1730	return c.header_
1731}
1732
1733func (c *BillingAccountsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
1734	reqHeaders := make(http.Header)
1735	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
1736	for k, v := range c.header_ {
1737		reqHeaders[k] = v
1738	}
1739	reqHeaders.Set("User-Agent", c.s.userAgent())
1740	if c.ifNoneMatch_ != "" {
1741		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1742	}
1743	var body io.Reader = nil
1744	c.urlParams_.Set("alt", alt)
1745	c.urlParams_.Set("prettyPrint", "false")
1746	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
1747	urls += "?" + c.urlParams_.Encode()
1748	req, err := http.NewRequest("GET", urls, body)
1749	if err != nil {
1750		return nil, err
1751	}
1752	req.Header = reqHeaders
1753	googleapi.Expand(req.URL, map[string]string{
1754		"resource": c.resource,
1755	})
1756	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1757}
1758
1759// Do executes the "cloudbilling.billingAccounts.getIamPolicy" call.
1760// Exactly one of *Policy or error will be non-nil. Any non-2xx status
1761// code is an error. Response headers are in either
1762// *Policy.ServerResponse.Header or (if a response was returned at all)
1763// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1764// check whether the returned error was because http.StatusNotModified
1765// was returned.
1766func (c *BillingAccountsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
1767	gensupport.SetOptions(c.urlParams_, opts...)
1768	res, err := c.doRequest("json")
1769	if res != nil && res.StatusCode == http.StatusNotModified {
1770		if res.Body != nil {
1771			res.Body.Close()
1772		}
1773		return nil, &googleapi.Error{
1774			Code:   res.StatusCode,
1775			Header: res.Header,
1776		}
1777	}
1778	if err != nil {
1779		return nil, err
1780	}
1781	defer googleapi.CloseBody(res)
1782	if err := googleapi.CheckResponse(res); err != nil {
1783		return nil, err
1784	}
1785	ret := &Policy{
1786		ServerResponse: googleapi.ServerResponse{
1787			Header:         res.Header,
1788			HTTPStatusCode: res.StatusCode,
1789		},
1790	}
1791	target := &ret
1792	if err := gensupport.DecodeResponse(target, res); err != nil {
1793		return nil, err
1794	}
1795	return ret, nil
1796	// {
1797	//   "description": "Gets the access control policy for a billing account. The caller must have the `billing.accounts.getIamPolicy` permission on the account, which is often given to billing account [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).",
1798	//   "flatPath": "v1/billingAccounts/{billingAccountsId}:getIamPolicy",
1799	//   "httpMethod": "GET",
1800	//   "id": "cloudbilling.billingAccounts.getIamPolicy",
1801	//   "parameterOrder": [
1802	//     "resource"
1803	//   ],
1804	//   "parameters": {
1805	//     "options.requestedPolicyVersion": {
1806	//       "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).",
1807	//       "format": "int32",
1808	//       "location": "query",
1809	//       "type": "integer"
1810	//     },
1811	//     "resource": {
1812	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
1813	//       "location": "path",
1814	//       "pattern": "^billingAccounts/[^/]+$",
1815	//       "required": true,
1816	//       "type": "string"
1817	//     }
1818	//   },
1819	//   "path": "v1/{+resource}:getIamPolicy",
1820	//   "response": {
1821	//     "$ref": "Policy"
1822	//   },
1823	//   "scopes": [
1824	//     "https://www.googleapis.com/auth/cloud-billing",
1825	//     "https://www.googleapis.com/auth/cloud-billing.readonly",
1826	//     "https://www.googleapis.com/auth/cloud-platform"
1827	//   ]
1828	// }
1829
1830}
1831
1832// method id "cloudbilling.billingAccounts.list":
1833
1834type BillingAccountsListCall struct {
1835	s            *APIService
1836	urlParams_   gensupport.URLParams
1837	ifNoneMatch_ string
1838	ctx_         context.Context
1839	header_      http.Header
1840}
1841
1842// List: Lists the billing accounts that the current authenticated user
1843// has permission to view
1844// (https://cloud.google.com/billing/docs/how-to/billing-access).
1845func (r *BillingAccountsService) List() *BillingAccountsListCall {
1846	c := &BillingAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1847	return c
1848}
1849
1850// Filter sets the optional parameter "filter": Options for how to
1851// filter the returned billing accounts. Currently this only supports
1852// filtering for subaccounts
1853// (https://cloud.google.com/billing/docs/concepts) under a single
1854// provided reseller billing account. (e.g.
1855// "master_billing_account=billingAccounts/012345-678901-ABCDEF").
1856// Boolean algebra and other fields are not currently supported.
1857func (c *BillingAccountsListCall) Filter(filter string) *BillingAccountsListCall {
1858	c.urlParams_.Set("filter", filter)
1859	return c
1860}
1861
1862// PageSize sets the optional parameter "pageSize": Requested page size.
1863// The maximum page size is 100; this is also the default.
1864func (c *BillingAccountsListCall) PageSize(pageSize int64) *BillingAccountsListCall {
1865	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1866	return c
1867}
1868
1869// PageToken sets the optional parameter "pageToken": A token
1870// identifying a page of results to return. This should be a
1871// `next_page_token` value returned from a previous
1872// `ListBillingAccounts` call. If unspecified, the first page of results
1873// is returned.
1874func (c *BillingAccountsListCall) PageToken(pageToken string) *BillingAccountsListCall {
1875	c.urlParams_.Set("pageToken", pageToken)
1876	return c
1877}
1878
1879// Fields allows partial responses to be retrieved. See
1880// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1881// for more information.
1882func (c *BillingAccountsListCall) Fields(s ...googleapi.Field) *BillingAccountsListCall {
1883	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1884	return c
1885}
1886
1887// IfNoneMatch sets the optional parameter which makes the operation
1888// fail if the object's ETag matches the given value. This is useful for
1889// getting updates only after the object has changed since the last
1890// request. Use googleapi.IsNotModified to check whether the response
1891// error from Do is the result of In-None-Match.
1892func (c *BillingAccountsListCall) IfNoneMatch(entityTag string) *BillingAccountsListCall {
1893	c.ifNoneMatch_ = entityTag
1894	return c
1895}
1896
1897// Context sets the context to be used in this call's Do method. Any
1898// pending HTTP request will be aborted if the provided context is
1899// canceled.
1900func (c *BillingAccountsListCall) Context(ctx context.Context) *BillingAccountsListCall {
1901	c.ctx_ = ctx
1902	return c
1903}
1904
1905// Header returns an http.Header that can be modified by the caller to
1906// add HTTP headers to the request.
1907func (c *BillingAccountsListCall) Header() http.Header {
1908	if c.header_ == nil {
1909		c.header_ = make(http.Header)
1910	}
1911	return c.header_
1912}
1913
1914func (c *BillingAccountsListCall) doRequest(alt string) (*http.Response, error) {
1915	reqHeaders := make(http.Header)
1916	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
1917	for k, v := range c.header_ {
1918		reqHeaders[k] = v
1919	}
1920	reqHeaders.Set("User-Agent", c.s.userAgent())
1921	if c.ifNoneMatch_ != "" {
1922		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1923	}
1924	var body io.Reader = nil
1925	c.urlParams_.Set("alt", alt)
1926	c.urlParams_.Set("prettyPrint", "false")
1927	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/billingAccounts")
1928	urls += "?" + c.urlParams_.Encode()
1929	req, err := http.NewRequest("GET", urls, body)
1930	if err != nil {
1931		return nil, err
1932	}
1933	req.Header = reqHeaders
1934	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1935}
1936
1937// Do executes the "cloudbilling.billingAccounts.list" call.
1938// Exactly one of *ListBillingAccountsResponse or error will be non-nil.
1939// Any non-2xx status code is an error. Response headers are in either
1940// *ListBillingAccountsResponse.ServerResponse.Header or (if a response
1941// was returned at all) in error.(*googleapi.Error).Header. Use
1942// googleapi.IsNotModified to check whether the returned error was
1943// because http.StatusNotModified was returned.
1944func (c *BillingAccountsListCall) Do(opts ...googleapi.CallOption) (*ListBillingAccountsResponse, error) {
1945	gensupport.SetOptions(c.urlParams_, opts...)
1946	res, err := c.doRequest("json")
1947	if res != nil && res.StatusCode == http.StatusNotModified {
1948		if res.Body != nil {
1949			res.Body.Close()
1950		}
1951		return nil, &googleapi.Error{
1952			Code:   res.StatusCode,
1953			Header: res.Header,
1954		}
1955	}
1956	if err != nil {
1957		return nil, err
1958	}
1959	defer googleapi.CloseBody(res)
1960	if err := googleapi.CheckResponse(res); err != nil {
1961		return nil, err
1962	}
1963	ret := &ListBillingAccountsResponse{
1964		ServerResponse: googleapi.ServerResponse{
1965			Header:         res.Header,
1966			HTTPStatusCode: res.StatusCode,
1967		},
1968	}
1969	target := &ret
1970	if err := gensupport.DecodeResponse(target, res); err != nil {
1971		return nil, err
1972	}
1973	return ret, nil
1974	// {
1975	//   "description": "Lists the billing accounts that the current authenticated user has permission to [view](https://cloud.google.com/billing/docs/how-to/billing-access).",
1976	//   "flatPath": "v1/billingAccounts",
1977	//   "httpMethod": "GET",
1978	//   "id": "cloudbilling.billingAccounts.list",
1979	//   "parameterOrder": [],
1980	//   "parameters": {
1981	//     "filter": {
1982	//       "description": "Options for how to filter the returned billing accounts. Currently this only supports filtering for [subaccounts](https://cloud.google.com/billing/docs/concepts) under a single provided reseller billing account. (e.g. \"master_billing_account=billingAccounts/012345-678901-ABCDEF\"). Boolean algebra and other fields are not currently supported.",
1983	//       "location": "query",
1984	//       "type": "string"
1985	//     },
1986	//     "pageSize": {
1987	//       "description": "Requested page size. The maximum page size is 100; this is also the default.",
1988	//       "format": "int32",
1989	//       "location": "query",
1990	//       "type": "integer"
1991	//     },
1992	//     "pageToken": {
1993	//       "description": "A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListBillingAccounts` call. If unspecified, the first page of results is returned.",
1994	//       "location": "query",
1995	//       "type": "string"
1996	//     }
1997	//   },
1998	//   "path": "v1/billingAccounts",
1999	//   "response": {
2000	//     "$ref": "ListBillingAccountsResponse"
2001	//   },
2002	//   "scopes": [
2003	//     "https://www.googleapis.com/auth/cloud-billing",
2004	//     "https://www.googleapis.com/auth/cloud-billing.readonly",
2005	//     "https://www.googleapis.com/auth/cloud-platform"
2006	//   ]
2007	// }
2008
2009}
2010
2011// Pages invokes f for each page of results.
2012// A non-nil error returned from f will halt the iteration.
2013// The provided context supersedes any context provided to the Context method.
2014func (c *BillingAccountsListCall) Pages(ctx context.Context, f func(*ListBillingAccountsResponse) error) error {
2015	c.ctx_ = ctx
2016	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2017	for {
2018		x, err := c.Do()
2019		if err != nil {
2020			return err
2021		}
2022		if err := f(x); err != nil {
2023			return err
2024		}
2025		if x.NextPageToken == "" {
2026			return nil
2027		}
2028		c.PageToken(x.NextPageToken)
2029	}
2030}
2031
2032// method id "cloudbilling.billingAccounts.patch":
2033
2034type BillingAccountsPatchCall struct {
2035	s              *APIService
2036	name           string
2037	billingaccount *BillingAccount
2038	urlParams_     gensupport.URLParams
2039	ctx_           context.Context
2040	header_        http.Header
2041}
2042
2043// Patch: Updates a billing account's fields. Currently the only field
2044// that can be edited is `display_name`. The current authenticated user
2045// must have the `billing.accounts.update` IAM permission, which is
2046// typically given to the administrator
2047// (https://cloud.google.com/billing/docs/how-to/billing-access) of the
2048// billing account.
2049func (r *BillingAccountsService) Patch(name string, billingaccount *BillingAccount) *BillingAccountsPatchCall {
2050	c := &BillingAccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2051	c.name = name
2052	c.billingaccount = billingaccount
2053	return c
2054}
2055
2056// UpdateMask sets the optional parameter "updateMask": The update mask
2057// applied to the resource. Only "display_name" is currently supported.
2058func (c *BillingAccountsPatchCall) UpdateMask(updateMask string) *BillingAccountsPatchCall {
2059	c.urlParams_.Set("updateMask", updateMask)
2060	return c
2061}
2062
2063// Fields allows partial responses to be retrieved. See
2064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2065// for more information.
2066func (c *BillingAccountsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsPatchCall {
2067	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2068	return c
2069}
2070
2071// Context sets the context to be used in this call's Do method. Any
2072// pending HTTP request will be aborted if the provided context is
2073// canceled.
2074func (c *BillingAccountsPatchCall) Context(ctx context.Context) *BillingAccountsPatchCall {
2075	c.ctx_ = ctx
2076	return c
2077}
2078
2079// Header returns an http.Header that can be modified by the caller to
2080// add HTTP headers to the request.
2081func (c *BillingAccountsPatchCall) Header() http.Header {
2082	if c.header_ == nil {
2083		c.header_ = make(http.Header)
2084	}
2085	return c.header_
2086}
2087
2088func (c *BillingAccountsPatchCall) doRequest(alt string) (*http.Response, error) {
2089	reqHeaders := make(http.Header)
2090	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2091	for k, v := range c.header_ {
2092		reqHeaders[k] = v
2093	}
2094	reqHeaders.Set("User-Agent", c.s.userAgent())
2095	var body io.Reader = nil
2096	body, err := googleapi.WithoutDataWrapper.JSONReader(c.billingaccount)
2097	if err != nil {
2098		return nil, err
2099	}
2100	reqHeaders.Set("Content-Type", "application/json")
2101	c.urlParams_.Set("alt", alt)
2102	c.urlParams_.Set("prettyPrint", "false")
2103	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2104	urls += "?" + c.urlParams_.Encode()
2105	req, err := http.NewRequest("PATCH", urls, body)
2106	if err != nil {
2107		return nil, err
2108	}
2109	req.Header = reqHeaders
2110	googleapi.Expand(req.URL, map[string]string{
2111		"name": c.name,
2112	})
2113	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2114}
2115
2116// Do executes the "cloudbilling.billingAccounts.patch" call.
2117// Exactly one of *BillingAccount or error will be non-nil. Any non-2xx
2118// status code is an error. Response headers are in either
2119// *BillingAccount.ServerResponse.Header or (if a response was returned
2120// at all) in error.(*googleapi.Error).Header. Use
2121// googleapi.IsNotModified to check whether the returned error was
2122// because http.StatusNotModified was returned.
2123func (c *BillingAccountsPatchCall) Do(opts ...googleapi.CallOption) (*BillingAccount, error) {
2124	gensupport.SetOptions(c.urlParams_, opts...)
2125	res, err := c.doRequest("json")
2126	if res != nil && res.StatusCode == http.StatusNotModified {
2127		if res.Body != nil {
2128			res.Body.Close()
2129		}
2130		return nil, &googleapi.Error{
2131			Code:   res.StatusCode,
2132			Header: res.Header,
2133		}
2134	}
2135	if err != nil {
2136		return nil, err
2137	}
2138	defer googleapi.CloseBody(res)
2139	if err := googleapi.CheckResponse(res); err != nil {
2140		return nil, err
2141	}
2142	ret := &BillingAccount{
2143		ServerResponse: googleapi.ServerResponse{
2144			Header:         res.Header,
2145			HTTPStatusCode: res.StatusCode,
2146		},
2147	}
2148	target := &ret
2149	if err := gensupport.DecodeResponse(target, res); err != nil {
2150		return nil, err
2151	}
2152	return ret, nil
2153	// {
2154	//   "description": "Updates a billing account's fields. Currently the only field that can be edited is `display_name`. The current authenticated user must have the `billing.accounts.update` IAM permission, which is typically given to the [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) of the billing account.",
2155	//   "flatPath": "v1/billingAccounts/{billingAccountsId}",
2156	//   "httpMethod": "PATCH",
2157	//   "id": "cloudbilling.billingAccounts.patch",
2158	//   "parameterOrder": [
2159	//     "name"
2160	//   ],
2161	//   "parameters": {
2162	//     "name": {
2163	//       "description": "Required. The name of the billing account resource to be updated.",
2164	//       "location": "path",
2165	//       "pattern": "^billingAccounts/[^/]+$",
2166	//       "required": true,
2167	//       "type": "string"
2168	//     },
2169	//     "updateMask": {
2170	//       "description": "The update mask applied to the resource. Only \"display_name\" is currently supported.",
2171	//       "format": "google-fieldmask",
2172	//       "location": "query",
2173	//       "type": "string"
2174	//     }
2175	//   },
2176	//   "path": "v1/{+name}",
2177	//   "request": {
2178	//     "$ref": "BillingAccount"
2179	//   },
2180	//   "response": {
2181	//     "$ref": "BillingAccount"
2182	//   },
2183	//   "scopes": [
2184	//     "https://www.googleapis.com/auth/cloud-billing",
2185	//     "https://www.googleapis.com/auth/cloud-platform"
2186	//   ]
2187	// }
2188
2189}
2190
2191// method id "cloudbilling.billingAccounts.setIamPolicy":
2192
2193type BillingAccountsSetIamPolicyCall struct {
2194	s                   *APIService
2195	resource            string
2196	setiampolicyrequest *SetIamPolicyRequest
2197	urlParams_          gensupport.URLParams
2198	ctx_                context.Context
2199	header_             http.Header
2200}
2201
2202// SetIamPolicy: Sets the access control policy for a billing account.
2203// Replaces any existing policy. The caller must have the
2204// `billing.accounts.setIamPolicy` permission on the account, which is
2205// often given to billing account administrators
2206// (https://cloud.google.com/billing/docs/how-to/billing-access).
2207func (r *BillingAccountsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *BillingAccountsSetIamPolicyCall {
2208	c := &BillingAccountsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2209	c.resource = resource
2210	c.setiampolicyrequest = setiampolicyrequest
2211	return c
2212}
2213
2214// Fields allows partial responses to be retrieved. See
2215// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2216// for more information.
2217func (c *BillingAccountsSetIamPolicyCall) Fields(s ...googleapi.Field) *BillingAccountsSetIamPolicyCall {
2218	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2219	return c
2220}
2221
2222// Context sets the context to be used in this call's Do method. Any
2223// pending HTTP request will be aborted if the provided context is
2224// canceled.
2225func (c *BillingAccountsSetIamPolicyCall) Context(ctx context.Context) *BillingAccountsSetIamPolicyCall {
2226	c.ctx_ = ctx
2227	return c
2228}
2229
2230// Header returns an http.Header that can be modified by the caller to
2231// add HTTP headers to the request.
2232func (c *BillingAccountsSetIamPolicyCall) Header() http.Header {
2233	if c.header_ == nil {
2234		c.header_ = make(http.Header)
2235	}
2236	return c.header_
2237}
2238
2239func (c *BillingAccountsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
2240	reqHeaders := make(http.Header)
2241	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2242	for k, v := range c.header_ {
2243		reqHeaders[k] = v
2244	}
2245	reqHeaders.Set("User-Agent", c.s.userAgent())
2246	var body io.Reader = nil
2247	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
2248	if err != nil {
2249		return nil, err
2250	}
2251	reqHeaders.Set("Content-Type", "application/json")
2252	c.urlParams_.Set("alt", alt)
2253	c.urlParams_.Set("prettyPrint", "false")
2254	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
2255	urls += "?" + c.urlParams_.Encode()
2256	req, err := http.NewRequest("POST", urls, body)
2257	if err != nil {
2258		return nil, err
2259	}
2260	req.Header = reqHeaders
2261	googleapi.Expand(req.URL, map[string]string{
2262		"resource": c.resource,
2263	})
2264	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2265}
2266
2267// Do executes the "cloudbilling.billingAccounts.setIamPolicy" call.
2268// Exactly one of *Policy or error will be non-nil. Any non-2xx status
2269// code is an error. Response headers are in either
2270// *Policy.ServerResponse.Header or (if a response was returned at all)
2271// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2272// check whether the returned error was because http.StatusNotModified
2273// was returned.
2274func (c *BillingAccountsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
2275	gensupport.SetOptions(c.urlParams_, opts...)
2276	res, err := c.doRequest("json")
2277	if res != nil && res.StatusCode == http.StatusNotModified {
2278		if res.Body != nil {
2279			res.Body.Close()
2280		}
2281		return nil, &googleapi.Error{
2282			Code:   res.StatusCode,
2283			Header: res.Header,
2284		}
2285	}
2286	if err != nil {
2287		return nil, err
2288	}
2289	defer googleapi.CloseBody(res)
2290	if err := googleapi.CheckResponse(res); err != nil {
2291		return nil, err
2292	}
2293	ret := &Policy{
2294		ServerResponse: googleapi.ServerResponse{
2295			Header:         res.Header,
2296			HTTPStatusCode: res.StatusCode,
2297		},
2298	}
2299	target := &ret
2300	if err := gensupport.DecodeResponse(target, res); err != nil {
2301		return nil, err
2302	}
2303	return ret, nil
2304	// {
2305	//   "description": "Sets the access control policy for a billing account. Replaces any existing policy. The caller must have the `billing.accounts.setIamPolicy` permission on the account, which is often given to billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).",
2306	//   "flatPath": "v1/billingAccounts/{billingAccountsId}:setIamPolicy",
2307	//   "httpMethod": "POST",
2308	//   "id": "cloudbilling.billingAccounts.setIamPolicy",
2309	//   "parameterOrder": [
2310	//     "resource"
2311	//   ],
2312	//   "parameters": {
2313	//     "resource": {
2314	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
2315	//       "location": "path",
2316	//       "pattern": "^billingAccounts/[^/]+$",
2317	//       "required": true,
2318	//       "type": "string"
2319	//     }
2320	//   },
2321	//   "path": "v1/{+resource}:setIamPolicy",
2322	//   "request": {
2323	//     "$ref": "SetIamPolicyRequest"
2324	//   },
2325	//   "response": {
2326	//     "$ref": "Policy"
2327	//   },
2328	//   "scopes": [
2329	//     "https://www.googleapis.com/auth/cloud-billing",
2330	//     "https://www.googleapis.com/auth/cloud-platform"
2331	//   ]
2332	// }
2333
2334}
2335
2336// method id "cloudbilling.billingAccounts.testIamPermissions":
2337
2338type BillingAccountsTestIamPermissionsCall struct {
2339	s                         *APIService
2340	resource                  string
2341	testiampermissionsrequest *TestIamPermissionsRequest
2342	urlParams_                gensupport.URLParams
2343	ctx_                      context.Context
2344	header_                   http.Header
2345}
2346
2347// TestIamPermissions: Tests the access control policy for a billing
2348// account. This method takes the resource and a set of permissions as
2349// input and returns the subset of the input permissions that the caller
2350// is allowed for that resource.
2351func (r *BillingAccountsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *BillingAccountsTestIamPermissionsCall {
2352	c := &BillingAccountsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2353	c.resource = resource
2354	c.testiampermissionsrequest = testiampermissionsrequest
2355	return c
2356}
2357
2358// Fields allows partial responses to be retrieved. See
2359// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2360// for more information.
2361func (c *BillingAccountsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BillingAccountsTestIamPermissionsCall {
2362	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2363	return c
2364}
2365
2366// Context sets the context to be used in this call's Do method. Any
2367// pending HTTP request will be aborted if the provided context is
2368// canceled.
2369func (c *BillingAccountsTestIamPermissionsCall) Context(ctx context.Context) *BillingAccountsTestIamPermissionsCall {
2370	c.ctx_ = ctx
2371	return c
2372}
2373
2374// Header returns an http.Header that can be modified by the caller to
2375// add HTTP headers to the request.
2376func (c *BillingAccountsTestIamPermissionsCall) Header() http.Header {
2377	if c.header_ == nil {
2378		c.header_ = make(http.Header)
2379	}
2380	return c.header_
2381}
2382
2383func (c *BillingAccountsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
2384	reqHeaders := make(http.Header)
2385	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2386	for k, v := range c.header_ {
2387		reqHeaders[k] = v
2388	}
2389	reqHeaders.Set("User-Agent", c.s.userAgent())
2390	var body io.Reader = nil
2391	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
2392	if err != nil {
2393		return nil, err
2394	}
2395	reqHeaders.Set("Content-Type", "application/json")
2396	c.urlParams_.Set("alt", alt)
2397	c.urlParams_.Set("prettyPrint", "false")
2398	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
2399	urls += "?" + c.urlParams_.Encode()
2400	req, err := http.NewRequest("POST", urls, body)
2401	if err != nil {
2402		return nil, err
2403	}
2404	req.Header = reqHeaders
2405	googleapi.Expand(req.URL, map[string]string{
2406		"resource": c.resource,
2407	})
2408	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2409}
2410
2411// Do executes the "cloudbilling.billingAccounts.testIamPermissions" call.
2412// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
2413// Any non-2xx status code is an error. Response headers are in either
2414// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
2415// was returned at all) in error.(*googleapi.Error).Header. Use
2416// googleapi.IsNotModified to check whether the returned error was
2417// because http.StatusNotModified was returned.
2418func (c *BillingAccountsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
2419	gensupport.SetOptions(c.urlParams_, opts...)
2420	res, err := c.doRequest("json")
2421	if res != nil && res.StatusCode == http.StatusNotModified {
2422		if res.Body != nil {
2423			res.Body.Close()
2424		}
2425		return nil, &googleapi.Error{
2426			Code:   res.StatusCode,
2427			Header: res.Header,
2428		}
2429	}
2430	if err != nil {
2431		return nil, err
2432	}
2433	defer googleapi.CloseBody(res)
2434	if err := googleapi.CheckResponse(res); err != nil {
2435		return nil, err
2436	}
2437	ret := &TestIamPermissionsResponse{
2438		ServerResponse: googleapi.ServerResponse{
2439			Header:         res.Header,
2440			HTTPStatusCode: res.StatusCode,
2441		},
2442	}
2443	target := &ret
2444	if err := gensupport.DecodeResponse(target, res); err != nil {
2445		return nil, err
2446	}
2447	return ret, nil
2448	// {
2449	//   "description": "Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.",
2450	//   "flatPath": "v1/billingAccounts/{billingAccountsId}:testIamPermissions",
2451	//   "httpMethod": "POST",
2452	//   "id": "cloudbilling.billingAccounts.testIamPermissions",
2453	//   "parameterOrder": [
2454	//     "resource"
2455	//   ],
2456	//   "parameters": {
2457	//     "resource": {
2458	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
2459	//       "location": "path",
2460	//       "pattern": "^billingAccounts/[^/]+$",
2461	//       "required": true,
2462	//       "type": "string"
2463	//     }
2464	//   },
2465	//   "path": "v1/{+resource}:testIamPermissions",
2466	//   "request": {
2467	//     "$ref": "TestIamPermissionsRequest"
2468	//   },
2469	//   "response": {
2470	//     "$ref": "TestIamPermissionsResponse"
2471	//   },
2472	//   "scopes": [
2473	//     "https://www.googleapis.com/auth/cloud-billing",
2474	//     "https://www.googleapis.com/auth/cloud-billing.readonly",
2475	//     "https://www.googleapis.com/auth/cloud-platform"
2476	//   ]
2477	// }
2478
2479}
2480
2481// method id "cloudbilling.billingAccounts.projects.list":
2482
2483type BillingAccountsProjectsListCall struct {
2484	s            *APIService
2485	name         string
2486	urlParams_   gensupport.URLParams
2487	ifNoneMatch_ string
2488	ctx_         context.Context
2489	header_      http.Header
2490}
2491
2492// List: Lists the projects associated with a billing account. The
2493// current authenticated user must have the
2494// `billing.resourceAssociations.list` IAM permission, which is often
2495// given to billing account viewers
2496// (https://cloud.google.com/billing/docs/how-to/billing-access).
2497func (r *BillingAccountsProjectsService) List(name string) *BillingAccountsProjectsListCall {
2498	c := &BillingAccountsProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2499	c.name = name
2500	return c
2501}
2502
2503// PageSize sets the optional parameter "pageSize": Requested page size.
2504// The maximum page size is 100; this is also the default.
2505func (c *BillingAccountsProjectsListCall) PageSize(pageSize int64) *BillingAccountsProjectsListCall {
2506	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2507	return c
2508}
2509
2510// PageToken sets the optional parameter "pageToken": A token
2511// identifying a page of results to be returned. This should be a
2512// `next_page_token` value returned from a previous
2513// `ListProjectBillingInfo` call. If unspecified, the first page of
2514// results is returned.
2515func (c *BillingAccountsProjectsListCall) PageToken(pageToken string) *BillingAccountsProjectsListCall {
2516	c.urlParams_.Set("pageToken", pageToken)
2517	return c
2518}
2519
2520// Fields allows partial responses to be retrieved. See
2521// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2522// for more information.
2523func (c *BillingAccountsProjectsListCall) Fields(s ...googleapi.Field) *BillingAccountsProjectsListCall {
2524	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2525	return c
2526}
2527
2528// IfNoneMatch sets the optional parameter which makes the operation
2529// fail if the object's ETag matches the given value. This is useful for
2530// getting updates only after the object has changed since the last
2531// request. Use googleapi.IsNotModified to check whether the response
2532// error from Do is the result of In-None-Match.
2533func (c *BillingAccountsProjectsListCall) IfNoneMatch(entityTag string) *BillingAccountsProjectsListCall {
2534	c.ifNoneMatch_ = entityTag
2535	return c
2536}
2537
2538// Context sets the context to be used in this call's Do method. Any
2539// pending HTTP request will be aborted if the provided context is
2540// canceled.
2541func (c *BillingAccountsProjectsListCall) Context(ctx context.Context) *BillingAccountsProjectsListCall {
2542	c.ctx_ = ctx
2543	return c
2544}
2545
2546// Header returns an http.Header that can be modified by the caller to
2547// add HTTP headers to the request.
2548func (c *BillingAccountsProjectsListCall) Header() http.Header {
2549	if c.header_ == nil {
2550		c.header_ = make(http.Header)
2551	}
2552	return c.header_
2553}
2554
2555func (c *BillingAccountsProjectsListCall) doRequest(alt string) (*http.Response, error) {
2556	reqHeaders := make(http.Header)
2557	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2558	for k, v := range c.header_ {
2559		reqHeaders[k] = v
2560	}
2561	reqHeaders.Set("User-Agent", c.s.userAgent())
2562	if c.ifNoneMatch_ != "" {
2563		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2564	}
2565	var body io.Reader = nil
2566	c.urlParams_.Set("alt", alt)
2567	c.urlParams_.Set("prettyPrint", "false")
2568	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/projects")
2569	urls += "?" + c.urlParams_.Encode()
2570	req, err := http.NewRequest("GET", urls, body)
2571	if err != nil {
2572		return nil, err
2573	}
2574	req.Header = reqHeaders
2575	googleapi.Expand(req.URL, map[string]string{
2576		"name": c.name,
2577	})
2578	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2579}
2580
2581// Do executes the "cloudbilling.billingAccounts.projects.list" call.
2582// Exactly one of *ListProjectBillingInfoResponse or error will be
2583// non-nil. Any non-2xx status code is an error. Response headers are in
2584// either *ListProjectBillingInfoResponse.ServerResponse.Header or (if a
2585// response was returned at all) in error.(*googleapi.Error).Header. Use
2586// googleapi.IsNotModified to check whether the returned error was
2587// because http.StatusNotModified was returned.
2588func (c *BillingAccountsProjectsListCall) Do(opts ...googleapi.CallOption) (*ListProjectBillingInfoResponse, error) {
2589	gensupport.SetOptions(c.urlParams_, opts...)
2590	res, err := c.doRequest("json")
2591	if res != nil && res.StatusCode == http.StatusNotModified {
2592		if res.Body != nil {
2593			res.Body.Close()
2594		}
2595		return nil, &googleapi.Error{
2596			Code:   res.StatusCode,
2597			Header: res.Header,
2598		}
2599	}
2600	if err != nil {
2601		return nil, err
2602	}
2603	defer googleapi.CloseBody(res)
2604	if err := googleapi.CheckResponse(res); err != nil {
2605		return nil, err
2606	}
2607	ret := &ListProjectBillingInfoResponse{
2608		ServerResponse: googleapi.ServerResponse{
2609			Header:         res.Header,
2610			HTTPStatusCode: res.StatusCode,
2611		},
2612	}
2613	target := &ret
2614	if err := gensupport.DecodeResponse(target, res); err != nil {
2615		return nil, err
2616	}
2617	return ret, nil
2618	// {
2619	//   "description": "Lists the projects associated with a billing account. The current authenticated user must have the `billing.resourceAssociations.list` IAM permission, which is often given to billing account [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).",
2620	//   "flatPath": "v1/billingAccounts/{billingAccountsId}/projects",
2621	//   "httpMethod": "GET",
2622	//   "id": "cloudbilling.billingAccounts.projects.list",
2623	//   "parameterOrder": [
2624	//     "name"
2625	//   ],
2626	//   "parameters": {
2627	//     "name": {
2628	//       "description": "Required. The resource name of the billing account associated with the projects that you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.",
2629	//       "location": "path",
2630	//       "pattern": "^billingAccounts/[^/]+$",
2631	//       "required": true,
2632	//       "type": "string"
2633	//     },
2634	//     "pageSize": {
2635	//       "description": "Requested page size. The maximum page size is 100; this is also the default.",
2636	//       "format": "int32",
2637	//       "location": "query",
2638	//       "type": "integer"
2639	//     },
2640	//     "pageToken": {
2641	//       "description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous `ListProjectBillingInfo` call. If unspecified, the first page of results is returned.",
2642	//       "location": "query",
2643	//       "type": "string"
2644	//     }
2645	//   },
2646	//   "path": "v1/{+name}/projects",
2647	//   "response": {
2648	//     "$ref": "ListProjectBillingInfoResponse"
2649	//   },
2650	//   "scopes": [
2651	//     "https://www.googleapis.com/auth/cloud-billing",
2652	//     "https://www.googleapis.com/auth/cloud-billing.readonly",
2653	//     "https://www.googleapis.com/auth/cloud-platform"
2654	//   ]
2655	// }
2656
2657}
2658
2659// Pages invokes f for each page of results.
2660// A non-nil error returned from f will halt the iteration.
2661// The provided context supersedes any context provided to the Context method.
2662func (c *BillingAccountsProjectsListCall) Pages(ctx context.Context, f func(*ListProjectBillingInfoResponse) error) error {
2663	c.ctx_ = ctx
2664	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2665	for {
2666		x, err := c.Do()
2667		if err != nil {
2668			return err
2669		}
2670		if err := f(x); err != nil {
2671			return err
2672		}
2673		if x.NextPageToken == "" {
2674			return nil
2675		}
2676		c.PageToken(x.NextPageToken)
2677	}
2678}
2679
2680// method id "cloudbilling.projects.getBillingInfo":
2681
2682type ProjectsGetBillingInfoCall struct {
2683	s            *APIService
2684	name         string
2685	urlParams_   gensupport.URLParams
2686	ifNoneMatch_ string
2687	ctx_         context.Context
2688	header_      http.Header
2689}
2690
2691// GetBillingInfo: Gets the billing information for a project. The
2692// current authenticated user must have permission to view the project
2693// (https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ).
2694func (r *ProjectsService) GetBillingInfo(name string) *ProjectsGetBillingInfoCall {
2695	c := &ProjectsGetBillingInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2696	c.name = name
2697	return c
2698}
2699
2700// Fields allows partial responses to be retrieved. See
2701// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2702// for more information.
2703func (c *ProjectsGetBillingInfoCall) Fields(s ...googleapi.Field) *ProjectsGetBillingInfoCall {
2704	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2705	return c
2706}
2707
2708// IfNoneMatch sets the optional parameter which makes the operation
2709// fail if the object's ETag matches the given value. This is useful for
2710// getting updates only after the object has changed since the last
2711// request. Use googleapi.IsNotModified to check whether the response
2712// error from Do is the result of In-None-Match.
2713func (c *ProjectsGetBillingInfoCall) IfNoneMatch(entityTag string) *ProjectsGetBillingInfoCall {
2714	c.ifNoneMatch_ = entityTag
2715	return c
2716}
2717
2718// Context sets the context to be used in this call's Do method. Any
2719// pending HTTP request will be aborted if the provided context is
2720// canceled.
2721func (c *ProjectsGetBillingInfoCall) Context(ctx context.Context) *ProjectsGetBillingInfoCall {
2722	c.ctx_ = ctx
2723	return c
2724}
2725
2726// Header returns an http.Header that can be modified by the caller to
2727// add HTTP headers to the request.
2728func (c *ProjectsGetBillingInfoCall) Header() http.Header {
2729	if c.header_ == nil {
2730		c.header_ = make(http.Header)
2731	}
2732	return c.header_
2733}
2734
2735func (c *ProjectsGetBillingInfoCall) doRequest(alt string) (*http.Response, error) {
2736	reqHeaders := make(http.Header)
2737	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2738	for k, v := range c.header_ {
2739		reqHeaders[k] = v
2740	}
2741	reqHeaders.Set("User-Agent", c.s.userAgent())
2742	if c.ifNoneMatch_ != "" {
2743		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2744	}
2745	var body io.Reader = nil
2746	c.urlParams_.Set("alt", alt)
2747	c.urlParams_.Set("prettyPrint", "false")
2748	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/billingInfo")
2749	urls += "?" + c.urlParams_.Encode()
2750	req, err := http.NewRequest("GET", urls, body)
2751	if err != nil {
2752		return nil, err
2753	}
2754	req.Header = reqHeaders
2755	googleapi.Expand(req.URL, map[string]string{
2756		"name": c.name,
2757	})
2758	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2759}
2760
2761// Do executes the "cloudbilling.projects.getBillingInfo" call.
2762// Exactly one of *ProjectBillingInfo or error will be non-nil. Any
2763// non-2xx status code is an error. Response headers are in either
2764// *ProjectBillingInfo.ServerResponse.Header or (if a response was
2765// returned at all) in error.(*googleapi.Error).Header. Use
2766// googleapi.IsNotModified to check whether the returned error was
2767// because http.StatusNotModified was returned.
2768func (c *ProjectsGetBillingInfoCall) Do(opts ...googleapi.CallOption) (*ProjectBillingInfo, error) {
2769	gensupport.SetOptions(c.urlParams_, opts...)
2770	res, err := c.doRequest("json")
2771	if res != nil && res.StatusCode == http.StatusNotModified {
2772		if res.Body != nil {
2773			res.Body.Close()
2774		}
2775		return nil, &googleapi.Error{
2776			Code:   res.StatusCode,
2777			Header: res.Header,
2778		}
2779	}
2780	if err != nil {
2781		return nil, err
2782	}
2783	defer googleapi.CloseBody(res)
2784	if err := googleapi.CheckResponse(res); err != nil {
2785		return nil, err
2786	}
2787	ret := &ProjectBillingInfo{
2788		ServerResponse: googleapi.ServerResponse{
2789			Header:         res.Header,
2790			HTTPStatusCode: res.StatusCode,
2791		},
2792	}
2793	target := &ret
2794	if err := gensupport.DecodeResponse(target, res); err != nil {
2795		return nil, err
2796	}
2797	return ret, nil
2798	// {
2799	//   "description": "Gets the billing information for a project. The current authenticated user must have [permission to view the project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ).",
2800	//   "flatPath": "v1/projects/{projectsId}/billingInfo",
2801	//   "httpMethod": "GET",
2802	//   "id": "cloudbilling.projects.getBillingInfo",
2803	//   "parameterOrder": [
2804	//     "name"
2805	//   ],
2806	//   "parameters": {
2807	//     "name": {
2808	//       "description": "Required. The resource name of the project for which billing information is retrieved. For example, `projects/tokyo-rain-123`.",
2809	//       "location": "path",
2810	//       "pattern": "^projects/[^/]+$",
2811	//       "required": true,
2812	//       "type": "string"
2813	//     }
2814	//   },
2815	//   "path": "v1/{+name}/billingInfo",
2816	//   "response": {
2817	//     "$ref": "ProjectBillingInfo"
2818	//   },
2819	//   "scopes": [
2820	//     "https://www.googleapis.com/auth/cloud-billing",
2821	//     "https://www.googleapis.com/auth/cloud-billing.readonly",
2822	//     "https://www.googleapis.com/auth/cloud-platform"
2823	//   ]
2824	// }
2825
2826}
2827
2828// method id "cloudbilling.projects.updateBillingInfo":
2829
2830type ProjectsUpdateBillingInfoCall struct {
2831	s                  *APIService
2832	name               string
2833	projectbillinginfo *ProjectBillingInfo
2834	urlParams_         gensupport.URLParams
2835	ctx_               context.Context
2836	header_            http.Header
2837}
2838
2839// UpdateBillingInfo: Sets or updates the billing account associated
2840// with a project. You specify the new billing account by setting the
2841// `billing_account_name` in the `ProjectBillingInfo` resource to the
2842// resource name of a billing account. Associating a project with an
2843// open billing account enables billing on the project and allows
2844// charges for resource usage. If the project already had a billing
2845// account, this method changes the billing account used for resource
2846// usage charges. *Note:* Incurred charges that have not yet been
2847// reported in the transaction history of the Google Cloud Console might
2848// be billed to the new billing account, even if the charge occurred
2849// before the new billing account was assigned to the project. The
2850// current authenticated user must have ownership privileges for both
2851// the project
2852// (https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo )
2853// and the billing account
2854// (https://cloud.google.com/billing/docs/how-to/billing-access). You
2855// can disable billing on the project by setting the
2856// `billing_account_name` field to empty. This action disassociates the
2857// current billing account from the project. Any billable activity of
2858// your in-use services will stop, and your application could stop
2859// functioning as expected. Any unbilled charges to date will be billed
2860// to the previously associated account. The current authenticated user
2861// must be either an owner of the project or an owner of the billing
2862// account for the project. Note that associating a project with a
2863// *closed* billing account will have much the same effect as disabling
2864// billing on the project: any paid resources used by the project will
2865// be shut down. Thus, unless you wish to disable billing, you should
2866// always call this method with the name of an *open* billing account.
2867func (r *ProjectsService) UpdateBillingInfo(name string, projectbillinginfo *ProjectBillingInfo) *ProjectsUpdateBillingInfoCall {
2868	c := &ProjectsUpdateBillingInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2869	c.name = name
2870	c.projectbillinginfo = projectbillinginfo
2871	return c
2872}
2873
2874// Fields allows partial responses to be retrieved. See
2875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2876// for more information.
2877func (c *ProjectsUpdateBillingInfoCall) Fields(s ...googleapi.Field) *ProjectsUpdateBillingInfoCall {
2878	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2879	return c
2880}
2881
2882// Context sets the context to be used in this call's Do method. Any
2883// pending HTTP request will be aborted if the provided context is
2884// canceled.
2885func (c *ProjectsUpdateBillingInfoCall) Context(ctx context.Context) *ProjectsUpdateBillingInfoCall {
2886	c.ctx_ = ctx
2887	return c
2888}
2889
2890// Header returns an http.Header that can be modified by the caller to
2891// add HTTP headers to the request.
2892func (c *ProjectsUpdateBillingInfoCall) Header() http.Header {
2893	if c.header_ == nil {
2894		c.header_ = make(http.Header)
2895	}
2896	return c.header_
2897}
2898
2899func (c *ProjectsUpdateBillingInfoCall) doRequest(alt string) (*http.Response, error) {
2900	reqHeaders := make(http.Header)
2901	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2902	for k, v := range c.header_ {
2903		reqHeaders[k] = v
2904	}
2905	reqHeaders.Set("User-Agent", c.s.userAgent())
2906	var body io.Reader = nil
2907	body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectbillinginfo)
2908	if err != nil {
2909		return nil, err
2910	}
2911	reqHeaders.Set("Content-Type", "application/json")
2912	c.urlParams_.Set("alt", alt)
2913	c.urlParams_.Set("prettyPrint", "false")
2914	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/billingInfo")
2915	urls += "?" + c.urlParams_.Encode()
2916	req, err := http.NewRequest("PUT", urls, body)
2917	if err != nil {
2918		return nil, err
2919	}
2920	req.Header = reqHeaders
2921	googleapi.Expand(req.URL, map[string]string{
2922		"name": c.name,
2923	})
2924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2925}
2926
2927// Do executes the "cloudbilling.projects.updateBillingInfo" call.
2928// Exactly one of *ProjectBillingInfo or error will be non-nil. Any
2929// non-2xx status code is an error. Response headers are in either
2930// *ProjectBillingInfo.ServerResponse.Header or (if a response was
2931// returned at all) in error.(*googleapi.Error).Header. Use
2932// googleapi.IsNotModified to check whether the returned error was
2933// because http.StatusNotModified was returned.
2934func (c *ProjectsUpdateBillingInfoCall) Do(opts ...googleapi.CallOption) (*ProjectBillingInfo, error) {
2935	gensupport.SetOptions(c.urlParams_, opts...)
2936	res, err := c.doRequest("json")
2937	if res != nil && res.StatusCode == http.StatusNotModified {
2938		if res.Body != nil {
2939			res.Body.Close()
2940		}
2941		return nil, &googleapi.Error{
2942			Code:   res.StatusCode,
2943			Header: res.Header,
2944		}
2945	}
2946	if err != nil {
2947		return nil, err
2948	}
2949	defer googleapi.CloseBody(res)
2950	if err := googleapi.CheckResponse(res); err != nil {
2951		return nil, err
2952	}
2953	ret := &ProjectBillingInfo{
2954		ServerResponse: googleapi.ServerResponse{
2955			Header:         res.Header,
2956			HTTPStatusCode: res.StatusCode,
2957		},
2958	}
2959	target := &ret
2960	if err := gensupport.DecodeResponse(target, res); err != nil {
2961		return nil, err
2962	}
2963	return ret, nil
2964	// {
2965	//   "description": "Sets or updates the billing account associated with a project. You specify the new billing account by setting the `billing_account_name` in the `ProjectBillingInfo` resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges. *Note:* Incurred charges that have not yet been reported in the transaction history of the Google Cloud Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project. The current authenticated user must have ownership privileges for both the [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing account](https://cloud.google.com/billing/docs/how-to/billing-access). You can disable billing on the project by setting the `billing_account_name` field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project. Note that associating a project with a *closed* billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an *open* billing account.",
2966	//   "flatPath": "v1/projects/{projectsId}/billingInfo",
2967	//   "httpMethod": "PUT",
2968	//   "id": "cloudbilling.projects.updateBillingInfo",
2969	//   "parameterOrder": [
2970	//     "name"
2971	//   ],
2972	//   "parameters": {
2973	//     "name": {
2974	//       "description": "Required. The resource name of the project associated with the billing information that you want to update. For example, `projects/tokyo-rain-123`.",
2975	//       "location": "path",
2976	//       "pattern": "^projects/[^/]+$",
2977	//       "required": true,
2978	//       "type": "string"
2979	//     }
2980	//   },
2981	//   "path": "v1/{+name}/billingInfo",
2982	//   "request": {
2983	//     "$ref": "ProjectBillingInfo"
2984	//   },
2985	//   "response": {
2986	//     "$ref": "ProjectBillingInfo"
2987	//   },
2988	//   "scopes": [
2989	//     "https://www.googleapis.com/auth/cloud-billing",
2990	//     "https://www.googleapis.com/auth/cloud-platform"
2991	//   ]
2992	// }
2993
2994}
2995
2996// method id "cloudbilling.services.list":
2997
2998type ServicesListCall struct {
2999	s            *APIService
3000	urlParams_   gensupport.URLParams
3001	ifNoneMatch_ string
3002	ctx_         context.Context
3003	header_      http.Header
3004}
3005
3006// List: Lists all public cloud services.
3007func (r *ServicesService) List() *ServicesListCall {
3008	c := &ServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3009	return c
3010}
3011
3012// PageSize sets the optional parameter "pageSize": Requested page size.
3013// Defaults to 5000.
3014func (c *ServicesListCall) PageSize(pageSize int64) *ServicesListCall {
3015	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3016	return c
3017}
3018
3019// PageToken sets the optional parameter "pageToken": A token
3020// identifying a page of results to return. This should be a
3021// `next_page_token` value returned from a previous `ListServices` call.
3022// If unspecified, the first page of results is returned.
3023func (c *ServicesListCall) PageToken(pageToken string) *ServicesListCall {
3024	c.urlParams_.Set("pageToken", pageToken)
3025	return c
3026}
3027
3028// Fields allows partial responses to be retrieved. See
3029// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3030// for more information.
3031func (c *ServicesListCall) Fields(s ...googleapi.Field) *ServicesListCall {
3032	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3033	return c
3034}
3035
3036// IfNoneMatch sets the optional parameter which makes the operation
3037// fail if the object's ETag matches the given value. This is useful for
3038// getting updates only after the object has changed since the last
3039// request. Use googleapi.IsNotModified to check whether the response
3040// error from Do is the result of In-None-Match.
3041func (c *ServicesListCall) IfNoneMatch(entityTag string) *ServicesListCall {
3042	c.ifNoneMatch_ = entityTag
3043	return c
3044}
3045
3046// Context sets the context to be used in this call's Do method. Any
3047// pending HTTP request will be aborted if the provided context is
3048// canceled.
3049func (c *ServicesListCall) Context(ctx context.Context) *ServicesListCall {
3050	c.ctx_ = ctx
3051	return c
3052}
3053
3054// Header returns an http.Header that can be modified by the caller to
3055// add HTTP headers to the request.
3056func (c *ServicesListCall) Header() http.Header {
3057	if c.header_ == nil {
3058		c.header_ = make(http.Header)
3059	}
3060	return c.header_
3061}
3062
3063func (c *ServicesListCall) doRequest(alt string) (*http.Response, error) {
3064	reqHeaders := make(http.Header)
3065	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3066	for k, v := range c.header_ {
3067		reqHeaders[k] = v
3068	}
3069	reqHeaders.Set("User-Agent", c.s.userAgent())
3070	if c.ifNoneMatch_ != "" {
3071		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3072	}
3073	var body io.Reader = nil
3074	c.urlParams_.Set("alt", alt)
3075	c.urlParams_.Set("prettyPrint", "false")
3076	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services")
3077	urls += "?" + c.urlParams_.Encode()
3078	req, err := http.NewRequest("GET", urls, body)
3079	if err != nil {
3080		return nil, err
3081	}
3082	req.Header = reqHeaders
3083	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3084}
3085
3086// Do executes the "cloudbilling.services.list" call.
3087// Exactly one of *ListServicesResponse or error will be non-nil. Any
3088// non-2xx status code is an error. Response headers are in either
3089// *ListServicesResponse.ServerResponse.Header or (if a response was
3090// returned at all) in error.(*googleapi.Error).Header. Use
3091// googleapi.IsNotModified to check whether the returned error was
3092// because http.StatusNotModified was returned.
3093func (c *ServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
3094	gensupport.SetOptions(c.urlParams_, opts...)
3095	res, err := c.doRequest("json")
3096	if res != nil && res.StatusCode == http.StatusNotModified {
3097		if res.Body != nil {
3098			res.Body.Close()
3099		}
3100		return nil, &googleapi.Error{
3101			Code:   res.StatusCode,
3102			Header: res.Header,
3103		}
3104	}
3105	if err != nil {
3106		return nil, err
3107	}
3108	defer googleapi.CloseBody(res)
3109	if err := googleapi.CheckResponse(res); err != nil {
3110		return nil, err
3111	}
3112	ret := &ListServicesResponse{
3113		ServerResponse: googleapi.ServerResponse{
3114			Header:         res.Header,
3115			HTTPStatusCode: res.StatusCode,
3116		},
3117	}
3118	target := &ret
3119	if err := gensupport.DecodeResponse(target, res); err != nil {
3120		return nil, err
3121	}
3122	return ret, nil
3123	// {
3124	//   "description": "Lists all public cloud services.",
3125	//   "flatPath": "v1/services",
3126	//   "httpMethod": "GET",
3127	//   "id": "cloudbilling.services.list",
3128	//   "parameterOrder": [],
3129	//   "parameters": {
3130	//     "pageSize": {
3131	//       "description": "Requested page size. Defaults to 5000.",
3132	//       "format": "int32",
3133	//       "location": "query",
3134	//       "type": "integer"
3135	//     },
3136	//     "pageToken": {
3137	//       "description": "A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListServices` call. If unspecified, the first page of results is returned.",
3138	//       "location": "query",
3139	//       "type": "string"
3140	//     }
3141	//   },
3142	//   "path": "v1/services",
3143	//   "response": {
3144	//     "$ref": "ListServicesResponse"
3145	//   },
3146	//   "scopes": [
3147	//     "https://www.googleapis.com/auth/cloud-billing",
3148	//     "https://www.googleapis.com/auth/cloud-billing.readonly",
3149	//     "https://www.googleapis.com/auth/cloud-platform"
3150	//   ]
3151	// }
3152
3153}
3154
3155// Pages invokes f for each page of results.
3156// A non-nil error returned from f will halt the iteration.
3157// The provided context supersedes any context provided to the Context method.
3158func (c *ServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
3159	c.ctx_ = ctx
3160	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3161	for {
3162		x, err := c.Do()
3163		if err != nil {
3164			return err
3165		}
3166		if err := f(x); err != nil {
3167			return err
3168		}
3169		if x.NextPageToken == "" {
3170			return nil
3171		}
3172		c.PageToken(x.NextPageToken)
3173	}
3174}
3175
3176// method id "cloudbilling.services.skus.list":
3177
3178type ServicesSkusListCall struct {
3179	s            *APIService
3180	parent       string
3181	urlParams_   gensupport.URLParams
3182	ifNoneMatch_ string
3183	ctx_         context.Context
3184	header_      http.Header
3185}
3186
3187// List: Lists all publicly available SKUs for a given cloud service.
3188func (r *ServicesSkusService) List(parent string) *ServicesSkusListCall {
3189	c := &ServicesSkusListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3190	c.parent = parent
3191	return c
3192}
3193
3194// CurrencyCode sets the optional parameter "currencyCode": The ISO 4217
3195// currency code for the pricing info in the response proto. Will use
3196// the conversion rate as of start_time.  If not specified USD will be
3197// used.
3198func (c *ServicesSkusListCall) CurrencyCode(currencyCode string) *ServicesSkusListCall {
3199	c.urlParams_.Set("currencyCode", currencyCode)
3200	return c
3201}
3202
3203// EndTime sets the optional parameter "endTime": Optional exclusive end
3204// time of the time range for which the pricing versions will be
3205// returned. Timestamps in the future are not allowed. The time range
3206// has to be within a single calendar month in America/Los_Angeles
3207// timezone. Time range as a whole is optional. If not specified, the
3208// latest pricing will be returned (up to 12 hours old at most).
3209func (c *ServicesSkusListCall) EndTime(endTime string) *ServicesSkusListCall {
3210	c.urlParams_.Set("endTime", endTime)
3211	return c
3212}
3213
3214// PageSize sets the optional parameter "pageSize": Requested page size.
3215// Defaults to 5000.
3216func (c *ServicesSkusListCall) PageSize(pageSize int64) *ServicesSkusListCall {
3217	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3218	return c
3219}
3220
3221// PageToken sets the optional parameter "pageToken": A token
3222// identifying a page of results to return. This should be a
3223// `next_page_token` value returned from a previous `ListSkus` call. If
3224// unspecified, the first page of results is returned.
3225func (c *ServicesSkusListCall) PageToken(pageToken string) *ServicesSkusListCall {
3226	c.urlParams_.Set("pageToken", pageToken)
3227	return c
3228}
3229
3230// StartTime sets the optional parameter "startTime": Optional inclusive
3231// start time of the time range for which the pricing versions will be
3232// returned. Timestamps in the future are not allowed. The time range
3233// has to be within a single calendar month in America/Los_Angeles
3234// timezone. Time range as a whole is optional. If not specified, the
3235// latest pricing will be returned (up to 12 hours old at most).
3236func (c *ServicesSkusListCall) StartTime(startTime string) *ServicesSkusListCall {
3237	c.urlParams_.Set("startTime", startTime)
3238	return c
3239}
3240
3241// Fields allows partial responses to be retrieved. See
3242// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3243// for more information.
3244func (c *ServicesSkusListCall) Fields(s ...googleapi.Field) *ServicesSkusListCall {
3245	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3246	return c
3247}
3248
3249// IfNoneMatch sets the optional parameter which makes the operation
3250// fail if the object's ETag matches the given value. This is useful for
3251// getting updates only after the object has changed since the last
3252// request. Use googleapi.IsNotModified to check whether the response
3253// error from Do is the result of In-None-Match.
3254func (c *ServicesSkusListCall) IfNoneMatch(entityTag string) *ServicesSkusListCall {
3255	c.ifNoneMatch_ = entityTag
3256	return c
3257}
3258
3259// Context sets the context to be used in this call's Do method. Any
3260// pending HTTP request will be aborted if the provided context is
3261// canceled.
3262func (c *ServicesSkusListCall) Context(ctx context.Context) *ServicesSkusListCall {
3263	c.ctx_ = ctx
3264	return c
3265}
3266
3267// Header returns an http.Header that can be modified by the caller to
3268// add HTTP headers to the request.
3269func (c *ServicesSkusListCall) Header() http.Header {
3270	if c.header_ == nil {
3271		c.header_ = make(http.Header)
3272	}
3273	return c.header_
3274}
3275
3276func (c *ServicesSkusListCall) doRequest(alt string) (*http.Response, error) {
3277	reqHeaders := make(http.Header)
3278	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3279	for k, v := range c.header_ {
3280		reqHeaders[k] = v
3281	}
3282	reqHeaders.Set("User-Agent", c.s.userAgent())
3283	if c.ifNoneMatch_ != "" {
3284		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3285	}
3286	var body io.Reader = nil
3287	c.urlParams_.Set("alt", alt)
3288	c.urlParams_.Set("prettyPrint", "false")
3289	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/skus")
3290	urls += "?" + c.urlParams_.Encode()
3291	req, err := http.NewRequest("GET", urls, body)
3292	if err != nil {
3293		return nil, err
3294	}
3295	req.Header = reqHeaders
3296	googleapi.Expand(req.URL, map[string]string{
3297		"parent": c.parent,
3298	})
3299	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3300}
3301
3302// Do executes the "cloudbilling.services.skus.list" call.
3303// Exactly one of *ListSkusResponse or error will be non-nil. Any
3304// non-2xx status code is an error. Response headers are in either
3305// *ListSkusResponse.ServerResponse.Header or (if a response was
3306// returned at all) in error.(*googleapi.Error).Header. Use
3307// googleapi.IsNotModified to check whether the returned error was
3308// because http.StatusNotModified was returned.
3309func (c *ServicesSkusListCall) Do(opts ...googleapi.CallOption) (*ListSkusResponse, error) {
3310	gensupport.SetOptions(c.urlParams_, opts...)
3311	res, err := c.doRequest("json")
3312	if res != nil && res.StatusCode == http.StatusNotModified {
3313		if res.Body != nil {
3314			res.Body.Close()
3315		}
3316		return nil, &googleapi.Error{
3317			Code:   res.StatusCode,
3318			Header: res.Header,
3319		}
3320	}
3321	if err != nil {
3322		return nil, err
3323	}
3324	defer googleapi.CloseBody(res)
3325	if err := googleapi.CheckResponse(res); err != nil {
3326		return nil, err
3327	}
3328	ret := &ListSkusResponse{
3329		ServerResponse: googleapi.ServerResponse{
3330			Header:         res.Header,
3331			HTTPStatusCode: res.StatusCode,
3332		},
3333	}
3334	target := &ret
3335	if err := gensupport.DecodeResponse(target, res); err != nil {
3336		return nil, err
3337	}
3338	return ret, nil
3339	// {
3340	//   "description": "Lists all publicly available SKUs for a given cloud service.",
3341	//   "flatPath": "v1/services/{servicesId}/skus",
3342	//   "httpMethod": "GET",
3343	//   "id": "cloudbilling.services.skus.list",
3344	//   "parameterOrder": [
3345	//     "parent"
3346	//   ],
3347	//   "parameters": {
3348	//     "currencyCode": {
3349	//       "description": "The ISO 4217 currency code for the pricing info in the response proto. Will use the conversion rate as of start_time. Optional. If not specified USD will be used.",
3350	//       "location": "query",
3351	//       "type": "string"
3352	//     },
3353	//     "endTime": {
3354	//       "description": "Optional exclusive end time of the time range for which the pricing versions will be returned. Timestamps in the future are not allowed. The time range has to be within a single calendar month in America/Los_Angeles timezone. Time range as a whole is optional. If not specified, the latest pricing will be returned (up to 12 hours old at most).",
3355	//       "format": "google-datetime",
3356	//       "location": "query",
3357	//       "type": "string"
3358	//     },
3359	//     "pageSize": {
3360	//       "description": "Requested page size. Defaults to 5000.",
3361	//       "format": "int32",
3362	//       "location": "query",
3363	//       "type": "integer"
3364	//     },
3365	//     "pageToken": {
3366	//       "description": "A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListSkus` call. If unspecified, the first page of results is returned.",
3367	//       "location": "query",
3368	//       "type": "string"
3369	//     },
3370	//     "parent": {
3371	//       "description": "Required. The name of the service. Example: \"services/DA34-426B-A397\"",
3372	//       "location": "path",
3373	//       "pattern": "^services/[^/]+$",
3374	//       "required": true,
3375	//       "type": "string"
3376	//     },
3377	//     "startTime": {
3378	//       "description": "Optional inclusive start time of the time range for which the pricing versions will be returned. Timestamps in the future are not allowed. The time range has to be within a single calendar month in America/Los_Angeles timezone. Time range as a whole is optional. If not specified, the latest pricing will be returned (up to 12 hours old at most).",
3379	//       "format": "google-datetime",
3380	//       "location": "query",
3381	//       "type": "string"
3382	//     }
3383	//   },
3384	//   "path": "v1/{+parent}/skus",
3385	//   "response": {
3386	//     "$ref": "ListSkusResponse"
3387	//   },
3388	//   "scopes": [
3389	//     "https://www.googleapis.com/auth/cloud-billing",
3390	//     "https://www.googleapis.com/auth/cloud-billing.readonly",
3391	//     "https://www.googleapis.com/auth/cloud-platform"
3392	//   ]
3393	// }
3394
3395}
3396
3397// Pages invokes f for each page of results.
3398// A non-nil error returned from f will halt the iteration.
3399// The provided context supersedes any context provided to the Context method.
3400func (c *ServicesSkusListCall) Pages(ctx context.Context, f func(*ListSkusResponse) error) error {
3401	c.ctx_ = ctx
3402	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3403	for {
3404		x, err := c.Do()
3405		if err != nil {
3406			return err
3407		}
3408		if err := f(x); err != nil {
3409			return err
3410		}
3411		if x.NextPageToken == "" {
3412			return nil
3413		}
3414		c.PageToken(x.NextPageToken)
3415	}
3416}
3417