...

Source file src/google.golang.org/api/logging/v2/logging-gen.go

Documentation: google.golang.org/api/logging/v2

     1  // Copyright 2024 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 logging provides access to the Cloud Logging API.
     8  //
     9  // This package is DEPRECATED. Use package cloud.google.com/go/logging instead.
    10  //
    11  // For product documentation, see: https://cloud.google.com/logging/docs/
    12  //
    13  // # Library status
    14  //
    15  // These client libraries are officially supported by Google. However, this
    16  // library is considered complete and is in maintenance mode. This means
    17  // that we will address critical bugs and security issues but will not add
    18  // any new features.
    19  //
    20  // When possible, we recommend using our newer
    21  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    22  // that are still actively being worked and iterated on.
    23  //
    24  // # Creating a client
    25  //
    26  // Usage example:
    27  //
    28  //	import "google.golang.org/api/logging/v2"
    29  //	...
    30  //	ctx := context.Background()
    31  //	loggingService, err := logging.NewService(ctx)
    32  //
    33  // In this example, Google Application Default Credentials are used for
    34  // authentication. For information on how to create and obtain Application
    35  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    36  //
    37  // # Other authentication options
    38  //
    39  // By default, all available scopes (see "Constants") are used to authenticate.
    40  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    41  //
    42  //	loggingService, err := logging.NewService(ctx, option.WithScopes(logging.LoggingWriteScope))
    43  //
    44  // To use an API key for authentication (note: some APIs do not support API
    45  // keys), use [google.golang.org/api/option.WithAPIKey]:
    46  //
    47  //	loggingService, err := logging.NewService(ctx, option.WithAPIKey("AIza..."))
    48  //
    49  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    50  // flow, use [google.golang.org/api/option.WithTokenSource]:
    51  //
    52  //	config := &oauth2.Config{...}
    53  //	// ...
    54  //	token, err := config.Exchange(ctx, ...)
    55  //	loggingService, err := logging.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    56  //
    57  // See [google.golang.org/api/option.ClientOption] for details on options.
    58  package logging // import "google.golang.org/api/logging/v2"
    59  
    60  import (
    61  	"bytes"
    62  	"context"
    63  	"encoding/json"
    64  	"errors"
    65  	"fmt"
    66  	"io"
    67  	"net/http"
    68  	"net/url"
    69  	"strconv"
    70  	"strings"
    71  
    72  	googleapi "google.golang.org/api/googleapi"
    73  	internal "google.golang.org/api/internal"
    74  	gensupport "google.golang.org/api/internal/gensupport"
    75  	option "google.golang.org/api/option"
    76  	internaloption "google.golang.org/api/option/internaloption"
    77  	htransport "google.golang.org/api/transport/http"
    78  )
    79  
    80  // Always reference these packages, just in case the auto-generated code
    81  // below doesn't.
    82  var _ = bytes.NewBuffer
    83  var _ = strconv.Itoa
    84  var _ = fmt.Sprintf
    85  var _ = json.NewDecoder
    86  var _ = io.Copy
    87  var _ = url.Parse
    88  var _ = gensupport.MarshalJSON
    89  var _ = googleapi.Version
    90  var _ = errors.New
    91  var _ = strings.Replace
    92  var _ = context.Canceled
    93  var _ = internaloption.WithDefaultEndpoint
    94  var _ = internal.Version
    95  
    96  const apiId = "logging:v2"
    97  const apiName = "logging"
    98  const apiVersion = "v2"
    99  const basePath = "https://logging.googleapis.com/"
   100  const basePathTemplate = "https://logging.UNIVERSE_DOMAIN/"
   101  const mtlsBasePath = "https://logging.mtls.googleapis.com/"
   102  
   103  // OAuth2 scopes used by this API.
   104  const (
   105  	// See, edit, configure, and delete your Google Cloud data and see the email
   106  	// address for your Google Account.
   107  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   108  
   109  	// View your data across Google Cloud services and see the email address of
   110  	// your Google Account
   111  	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
   112  
   113  	// Administrate log data for your projects
   114  	LoggingAdminScope = "https://www.googleapis.com/auth/logging.admin"
   115  
   116  	// View log data for your projects
   117  	LoggingReadScope = "https://www.googleapis.com/auth/logging.read"
   118  
   119  	// Submit log data for your projects
   120  	LoggingWriteScope = "https://www.googleapis.com/auth/logging.write"
   121  )
   122  
   123  // NewService creates a new Service.
   124  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   125  	scopesOption := internaloption.WithDefaultScopes(
   126  		"https://www.googleapis.com/auth/cloud-platform",
   127  		"https://www.googleapis.com/auth/cloud-platform.read-only",
   128  		"https://www.googleapis.com/auth/logging.admin",
   129  		"https://www.googleapis.com/auth/logging.read",
   130  		"https://www.googleapis.com/auth/logging.write",
   131  	)
   132  	// NOTE: prepend, so we don't override user-specified scopes.
   133  	opts = append([]option.ClientOption{scopesOption}, opts...)
   134  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   135  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   136  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   137  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   138  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   139  	if err != nil {
   140  		return nil, err
   141  	}
   142  	s, err := New(client)
   143  	if err != nil {
   144  		return nil, err
   145  	}
   146  	if endpoint != "" {
   147  		s.BasePath = endpoint
   148  	}
   149  	return s, nil
   150  }
   151  
   152  // New creates a new Service. It uses the provided http.Client for requests.
   153  //
   154  // Deprecated: please use NewService instead.
   155  // To provide a custom HTTP client, use option.WithHTTPClient.
   156  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   157  func New(client *http.Client) (*Service, error) {
   158  	if client == nil {
   159  		return nil, errors.New("client is nil")
   160  	}
   161  	s := &Service{client: client, BasePath: basePath}
   162  	s.BillingAccounts = NewBillingAccountsService(s)
   163  	s.Entries = NewEntriesService(s)
   164  	s.Exclusions = NewExclusionsService(s)
   165  	s.Folders = NewFoldersService(s)
   166  	s.Locations = NewLocationsService(s)
   167  	s.Logs = NewLogsService(s)
   168  	s.MonitoredResourceDescriptors = NewMonitoredResourceDescriptorsService(s)
   169  	s.Organizations = NewOrganizationsService(s)
   170  	s.Projects = NewProjectsService(s)
   171  	s.Sinks = NewSinksService(s)
   172  	s.V2 = NewV2Service(s)
   173  	return s, nil
   174  }
   175  
   176  type Service struct {
   177  	client    *http.Client
   178  	BasePath  string // API endpoint base URL
   179  	UserAgent string // optional additional User-Agent fragment
   180  
   181  	BillingAccounts *BillingAccountsService
   182  
   183  	Entries *EntriesService
   184  
   185  	Exclusions *ExclusionsService
   186  
   187  	Folders *FoldersService
   188  
   189  	Locations *LocationsService
   190  
   191  	Logs *LogsService
   192  
   193  	MonitoredResourceDescriptors *MonitoredResourceDescriptorsService
   194  
   195  	Organizations *OrganizationsService
   196  
   197  	Projects *ProjectsService
   198  
   199  	Sinks *SinksService
   200  
   201  	V2 *V2Service
   202  }
   203  
   204  func (s *Service) userAgent() string {
   205  	if s.UserAgent == "" {
   206  		return googleapi.UserAgent
   207  	}
   208  	return googleapi.UserAgent + " " + s.UserAgent
   209  }
   210  
   211  func NewBillingAccountsService(s *Service) *BillingAccountsService {
   212  	rs := &BillingAccountsService{s: s}
   213  	rs.Exclusions = NewBillingAccountsExclusionsService(s)
   214  	rs.Locations = NewBillingAccountsLocationsService(s)
   215  	rs.Logs = NewBillingAccountsLogsService(s)
   216  	rs.Sinks = NewBillingAccountsSinksService(s)
   217  	return rs
   218  }
   219  
   220  type BillingAccountsService struct {
   221  	s *Service
   222  
   223  	Exclusions *BillingAccountsExclusionsService
   224  
   225  	Locations *BillingAccountsLocationsService
   226  
   227  	Logs *BillingAccountsLogsService
   228  
   229  	Sinks *BillingAccountsSinksService
   230  }
   231  
   232  func NewBillingAccountsExclusionsService(s *Service) *BillingAccountsExclusionsService {
   233  	rs := &BillingAccountsExclusionsService{s: s}
   234  	return rs
   235  }
   236  
   237  type BillingAccountsExclusionsService struct {
   238  	s *Service
   239  }
   240  
   241  func NewBillingAccountsLocationsService(s *Service) *BillingAccountsLocationsService {
   242  	rs := &BillingAccountsLocationsService{s: s}
   243  	rs.Buckets = NewBillingAccountsLocationsBucketsService(s)
   244  	rs.Operations = NewBillingAccountsLocationsOperationsService(s)
   245  	rs.RecentQueries = NewBillingAccountsLocationsRecentQueriesService(s)
   246  	rs.SavedQueries = NewBillingAccountsLocationsSavedQueriesService(s)
   247  	return rs
   248  }
   249  
   250  type BillingAccountsLocationsService struct {
   251  	s *Service
   252  
   253  	Buckets *BillingAccountsLocationsBucketsService
   254  
   255  	Operations *BillingAccountsLocationsOperationsService
   256  
   257  	RecentQueries *BillingAccountsLocationsRecentQueriesService
   258  
   259  	SavedQueries *BillingAccountsLocationsSavedQueriesService
   260  }
   261  
   262  func NewBillingAccountsLocationsBucketsService(s *Service) *BillingAccountsLocationsBucketsService {
   263  	rs := &BillingAccountsLocationsBucketsService{s: s}
   264  	rs.Links = NewBillingAccountsLocationsBucketsLinksService(s)
   265  	rs.Views = NewBillingAccountsLocationsBucketsViewsService(s)
   266  	return rs
   267  }
   268  
   269  type BillingAccountsLocationsBucketsService struct {
   270  	s *Service
   271  
   272  	Links *BillingAccountsLocationsBucketsLinksService
   273  
   274  	Views *BillingAccountsLocationsBucketsViewsService
   275  }
   276  
   277  func NewBillingAccountsLocationsBucketsLinksService(s *Service) *BillingAccountsLocationsBucketsLinksService {
   278  	rs := &BillingAccountsLocationsBucketsLinksService{s: s}
   279  	return rs
   280  }
   281  
   282  type BillingAccountsLocationsBucketsLinksService struct {
   283  	s *Service
   284  }
   285  
   286  func NewBillingAccountsLocationsBucketsViewsService(s *Service) *BillingAccountsLocationsBucketsViewsService {
   287  	rs := &BillingAccountsLocationsBucketsViewsService{s: s}
   288  	rs.Logs = NewBillingAccountsLocationsBucketsViewsLogsService(s)
   289  	return rs
   290  }
   291  
   292  type BillingAccountsLocationsBucketsViewsService struct {
   293  	s *Service
   294  
   295  	Logs *BillingAccountsLocationsBucketsViewsLogsService
   296  }
   297  
   298  func NewBillingAccountsLocationsBucketsViewsLogsService(s *Service) *BillingAccountsLocationsBucketsViewsLogsService {
   299  	rs := &BillingAccountsLocationsBucketsViewsLogsService{s: s}
   300  	return rs
   301  }
   302  
   303  type BillingAccountsLocationsBucketsViewsLogsService struct {
   304  	s *Service
   305  }
   306  
   307  func NewBillingAccountsLocationsOperationsService(s *Service) *BillingAccountsLocationsOperationsService {
   308  	rs := &BillingAccountsLocationsOperationsService{s: s}
   309  	return rs
   310  }
   311  
   312  type BillingAccountsLocationsOperationsService struct {
   313  	s *Service
   314  }
   315  
   316  func NewBillingAccountsLocationsRecentQueriesService(s *Service) *BillingAccountsLocationsRecentQueriesService {
   317  	rs := &BillingAccountsLocationsRecentQueriesService{s: s}
   318  	return rs
   319  }
   320  
   321  type BillingAccountsLocationsRecentQueriesService struct {
   322  	s *Service
   323  }
   324  
   325  func NewBillingAccountsLocationsSavedQueriesService(s *Service) *BillingAccountsLocationsSavedQueriesService {
   326  	rs := &BillingAccountsLocationsSavedQueriesService{s: s}
   327  	return rs
   328  }
   329  
   330  type BillingAccountsLocationsSavedQueriesService struct {
   331  	s *Service
   332  }
   333  
   334  func NewBillingAccountsLogsService(s *Service) *BillingAccountsLogsService {
   335  	rs := &BillingAccountsLogsService{s: s}
   336  	return rs
   337  }
   338  
   339  type BillingAccountsLogsService struct {
   340  	s *Service
   341  }
   342  
   343  func NewBillingAccountsSinksService(s *Service) *BillingAccountsSinksService {
   344  	rs := &BillingAccountsSinksService{s: s}
   345  	return rs
   346  }
   347  
   348  type BillingAccountsSinksService struct {
   349  	s *Service
   350  }
   351  
   352  func NewEntriesService(s *Service) *EntriesService {
   353  	rs := &EntriesService{s: s}
   354  	return rs
   355  }
   356  
   357  type EntriesService struct {
   358  	s *Service
   359  }
   360  
   361  func NewExclusionsService(s *Service) *ExclusionsService {
   362  	rs := &ExclusionsService{s: s}
   363  	return rs
   364  }
   365  
   366  type ExclusionsService struct {
   367  	s *Service
   368  }
   369  
   370  func NewFoldersService(s *Service) *FoldersService {
   371  	rs := &FoldersService{s: s}
   372  	rs.Exclusions = NewFoldersExclusionsService(s)
   373  	rs.Locations = NewFoldersLocationsService(s)
   374  	rs.Logs = NewFoldersLogsService(s)
   375  	rs.Sinks = NewFoldersSinksService(s)
   376  	return rs
   377  }
   378  
   379  type FoldersService struct {
   380  	s *Service
   381  
   382  	Exclusions *FoldersExclusionsService
   383  
   384  	Locations *FoldersLocationsService
   385  
   386  	Logs *FoldersLogsService
   387  
   388  	Sinks *FoldersSinksService
   389  }
   390  
   391  func NewFoldersExclusionsService(s *Service) *FoldersExclusionsService {
   392  	rs := &FoldersExclusionsService{s: s}
   393  	return rs
   394  }
   395  
   396  type FoldersExclusionsService struct {
   397  	s *Service
   398  }
   399  
   400  func NewFoldersLocationsService(s *Service) *FoldersLocationsService {
   401  	rs := &FoldersLocationsService{s: s}
   402  	rs.Buckets = NewFoldersLocationsBucketsService(s)
   403  	rs.Operations = NewFoldersLocationsOperationsService(s)
   404  	rs.RecentQueries = NewFoldersLocationsRecentQueriesService(s)
   405  	rs.SavedQueries = NewFoldersLocationsSavedQueriesService(s)
   406  	return rs
   407  }
   408  
   409  type FoldersLocationsService struct {
   410  	s *Service
   411  
   412  	Buckets *FoldersLocationsBucketsService
   413  
   414  	Operations *FoldersLocationsOperationsService
   415  
   416  	RecentQueries *FoldersLocationsRecentQueriesService
   417  
   418  	SavedQueries *FoldersLocationsSavedQueriesService
   419  }
   420  
   421  func NewFoldersLocationsBucketsService(s *Service) *FoldersLocationsBucketsService {
   422  	rs := &FoldersLocationsBucketsService{s: s}
   423  	rs.Links = NewFoldersLocationsBucketsLinksService(s)
   424  	rs.Views = NewFoldersLocationsBucketsViewsService(s)
   425  	return rs
   426  }
   427  
   428  type FoldersLocationsBucketsService struct {
   429  	s *Service
   430  
   431  	Links *FoldersLocationsBucketsLinksService
   432  
   433  	Views *FoldersLocationsBucketsViewsService
   434  }
   435  
   436  func NewFoldersLocationsBucketsLinksService(s *Service) *FoldersLocationsBucketsLinksService {
   437  	rs := &FoldersLocationsBucketsLinksService{s: s}
   438  	return rs
   439  }
   440  
   441  type FoldersLocationsBucketsLinksService struct {
   442  	s *Service
   443  }
   444  
   445  func NewFoldersLocationsBucketsViewsService(s *Service) *FoldersLocationsBucketsViewsService {
   446  	rs := &FoldersLocationsBucketsViewsService{s: s}
   447  	rs.Logs = NewFoldersLocationsBucketsViewsLogsService(s)
   448  	return rs
   449  }
   450  
   451  type FoldersLocationsBucketsViewsService struct {
   452  	s *Service
   453  
   454  	Logs *FoldersLocationsBucketsViewsLogsService
   455  }
   456  
   457  func NewFoldersLocationsBucketsViewsLogsService(s *Service) *FoldersLocationsBucketsViewsLogsService {
   458  	rs := &FoldersLocationsBucketsViewsLogsService{s: s}
   459  	return rs
   460  }
   461  
   462  type FoldersLocationsBucketsViewsLogsService struct {
   463  	s *Service
   464  }
   465  
   466  func NewFoldersLocationsOperationsService(s *Service) *FoldersLocationsOperationsService {
   467  	rs := &FoldersLocationsOperationsService{s: s}
   468  	return rs
   469  }
   470  
   471  type FoldersLocationsOperationsService struct {
   472  	s *Service
   473  }
   474  
   475  func NewFoldersLocationsRecentQueriesService(s *Service) *FoldersLocationsRecentQueriesService {
   476  	rs := &FoldersLocationsRecentQueriesService{s: s}
   477  	return rs
   478  }
   479  
   480  type FoldersLocationsRecentQueriesService struct {
   481  	s *Service
   482  }
   483  
   484  func NewFoldersLocationsSavedQueriesService(s *Service) *FoldersLocationsSavedQueriesService {
   485  	rs := &FoldersLocationsSavedQueriesService{s: s}
   486  	return rs
   487  }
   488  
   489  type FoldersLocationsSavedQueriesService struct {
   490  	s *Service
   491  }
   492  
   493  func NewFoldersLogsService(s *Service) *FoldersLogsService {
   494  	rs := &FoldersLogsService{s: s}
   495  	return rs
   496  }
   497  
   498  type FoldersLogsService struct {
   499  	s *Service
   500  }
   501  
   502  func NewFoldersSinksService(s *Service) *FoldersSinksService {
   503  	rs := &FoldersSinksService{s: s}
   504  	return rs
   505  }
   506  
   507  type FoldersSinksService struct {
   508  	s *Service
   509  }
   510  
   511  func NewLocationsService(s *Service) *LocationsService {
   512  	rs := &LocationsService{s: s}
   513  	rs.Buckets = NewLocationsBucketsService(s)
   514  	rs.Operations = NewLocationsOperationsService(s)
   515  	return rs
   516  }
   517  
   518  type LocationsService struct {
   519  	s *Service
   520  
   521  	Buckets *LocationsBucketsService
   522  
   523  	Operations *LocationsOperationsService
   524  }
   525  
   526  func NewLocationsBucketsService(s *Service) *LocationsBucketsService {
   527  	rs := &LocationsBucketsService{s: s}
   528  	rs.Links = NewLocationsBucketsLinksService(s)
   529  	rs.Views = NewLocationsBucketsViewsService(s)
   530  	return rs
   531  }
   532  
   533  type LocationsBucketsService struct {
   534  	s *Service
   535  
   536  	Links *LocationsBucketsLinksService
   537  
   538  	Views *LocationsBucketsViewsService
   539  }
   540  
   541  func NewLocationsBucketsLinksService(s *Service) *LocationsBucketsLinksService {
   542  	rs := &LocationsBucketsLinksService{s: s}
   543  	return rs
   544  }
   545  
   546  type LocationsBucketsLinksService struct {
   547  	s *Service
   548  }
   549  
   550  func NewLocationsBucketsViewsService(s *Service) *LocationsBucketsViewsService {
   551  	rs := &LocationsBucketsViewsService{s: s}
   552  	return rs
   553  }
   554  
   555  type LocationsBucketsViewsService struct {
   556  	s *Service
   557  }
   558  
   559  func NewLocationsOperationsService(s *Service) *LocationsOperationsService {
   560  	rs := &LocationsOperationsService{s: s}
   561  	return rs
   562  }
   563  
   564  type LocationsOperationsService struct {
   565  	s *Service
   566  }
   567  
   568  func NewLogsService(s *Service) *LogsService {
   569  	rs := &LogsService{s: s}
   570  	return rs
   571  }
   572  
   573  type LogsService struct {
   574  	s *Service
   575  }
   576  
   577  func NewMonitoredResourceDescriptorsService(s *Service) *MonitoredResourceDescriptorsService {
   578  	rs := &MonitoredResourceDescriptorsService{s: s}
   579  	return rs
   580  }
   581  
   582  type MonitoredResourceDescriptorsService struct {
   583  	s *Service
   584  }
   585  
   586  func NewOrganizationsService(s *Service) *OrganizationsService {
   587  	rs := &OrganizationsService{s: s}
   588  	rs.Exclusions = NewOrganizationsExclusionsService(s)
   589  	rs.Locations = NewOrganizationsLocationsService(s)
   590  	rs.Logs = NewOrganizationsLogsService(s)
   591  	rs.Sinks = NewOrganizationsSinksService(s)
   592  	return rs
   593  }
   594  
   595  type OrganizationsService struct {
   596  	s *Service
   597  
   598  	Exclusions *OrganizationsExclusionsService
   599  
   600  	Locations *OrganizationsLocationsService
   601  
   602  	Logs *OrganizationsLogsService
   603  
   604  	Sinks *OrganizationsSinksService
   605  }
   606  
   607  func NewOrganizationsExclusionsService(s *Service) *OrganizationsExclusionsService {
   608  	rs := &OrganizationsExclusionsService{s: s}
   609  	return rs
   610  }
   611  
   612  type OrganizationsExclusionsService struct {
   613  	s *Service
   614  }
   615  
   616  func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService {
   617  	rs := &OrganizationsLocationsService{s: s}
   618  	rs.Buckets = NewOrganizationsLocationsBucketsService(s)
   619  	rs.Operations = NewOrganizationsLocationsOperationsService(s)
   620  	rs.RecentQueries = NewOrganizationsLocationsRecentQueriesService(s)
   621  	rs.SavedQueries = NewOrganizationsLocationsSavedQueriesService(s)
   622  	return rs
   623  }
   624  
   625  type OrganizationsLocationsService struct {
   626  	s *Service
   627  
   628  	Buckets *OrganizationsLocationsBucketsService
   629  
   630  	Operations *OrganizationsLocationsOperationsService
   631  
   632  	RecentQueries *OrganizationsLocationsRecentQueriesService
   633  
   634  	SavedQueries *OrganizationsLocationsSavedQueriesService
   635  }
   636  
   637  func NewOrganizationsLocationsBucketsService(s *Service) *OrganizationsLocationsBucketsService {
   638  	rs := &OrganizationsLocationsBucketsService{s: s}
   639  	rs.Links = NewOrganizationsLocationsBucketsLinksService(s)
   640  	rs.Views = NewOrganizationsLocationsBucketsViewsService(s)
   641  	return rs
   642  }
   643  
   644  type OrganizationsLocationsBucketsService struct {
   645  	s *Service
   646  
   647  	Links *OrganizationsLocationsBucketsLinksService
   648  
   649  	Views *OrganizationsLocationsBucketsViewsService
   650  }
   651  
   652  func NewOrganizationsLocationsBucketsLinksService(s *Service) *OrganizationsLocationsBucketsLinksService {
   653  	rs := &OrganizationsLocationsBucketsLinksService{s: s}
   654  	return rs
   655  }
   656  
   657  type OrganizationsLocationsBucketsLinksService struct {
   658  	s *Service
   659  }
   660  
   661  func NewOrganizationsLocationsBucketsViewsService(s *Service) *OrganizationsLocationsBucketsViewsService {
   662  	rs := &OrganizationsLocationsBucketsViewsService{s: s}
   663  	rs.Logs = NewOrganizationsLocationsBucketsViewsLogsService(s)
   664  	return rs
   665  }
   666  
   667  type OrganizationsLocationsBucketsViewsService struct {
   668  	s *Service
   669  
   670  	Logs *OrganizationsLocationsBucketsViewsLogsService
   671  }
   672  
   673  func NewOrganizationsLocationsBucketsViewsLogsService(s *Service) *OrganizationsLocationsBucketsViewsLogsService {
   674  	rs := &OrganizationsLocationsBucketsViewsLogsService{s: s}
   675  	return rs
   676  }
   677  
   678  type OrganizationsLocationsBucketsViewsLogsService struct {
   679  	s *Service
   680  }
   681  
   682  func NewOrganizationsLocationsOperationsService(s *Service) *OrganizationsLocationsOperationsService {
   683  	rs := &OrganizationsLocationsOperationsService{s: s}
   684  	return rs
   685  }
   686  
   687  type OrganizationsLocationsOperationsService struct {
   688  	s *Service
   689  }
   690  
   691  func NewOrganizationsLocationsRecentQueriesService(s *Service) *OrganizationsLocationsRecentQueriesService {
   692  	rs := &OrganizationsLocationsRecentQueriesService{s: s}
   693  	return rs
   694  }
   695  
   696  type OrganizationsLocationsRecentQueriesService struct {
   697  	s *Service
   698  }
   699  
   700  func NewOrganizationsLocationsSavedQueriesService(s *Service) *OrganizationsLocationsSavedQueriesService {
   701  	rs := &OrganizationsLocationsSavedQueriesService{s: s}
   702  	return rs
   703  }
   704  
   705  type OrganizationsLocationsSavedQueriesService struct {
   706  	s *Service
   707  }
   708  
   709  func NewOrganizationsLogsService(s *Service) *OrganizationsLogsService {
   710  	rs := &OrganizationsLogsService{s: s}
   711  	return rs
   712  }
   713  
   714  type OrganizationsLogsService struct {
   715  	s *Service
   716  }
   717  
   718  func NewOrganizationsSinksService(s *Service) *OrganizationsSinksService {
   719  	rs := &OrganizationsSinksService{s: s}
   720  	return rs
   721  }
   722  
   723  type OrganizationsSinksService struct {
   724  	s *Service
   725  }
   726  
   727  func NewProjectsService(s *Service) *ProjectsService {
   728  	rs := &ProjectsService{s: s}
   729  	rs.Exclusions = NewProjectsExclusionsService(s)
   730  	rs.Locations = NewProjectsLocationsService(s)
   731  	rs.Logs = NewProjectsLogsService(s)
   732  	rs.Metrics = NewProjectsMetricsService(s)
   733  	rs.Sinks = NewProjectsSinksService(s)
   734  	return rs
   735  }
   736  
   737  type ProjectsService struct {
   738  	s *Service
   739  
   740  	Exclusions *ProjectsExclusionsService
   741  
   742  	Locations *ProjectsLocationsService
   743  
   744  	Logs *ProjectsLogsService
   745  
   746  	Metrics *ProjectsMetricsService
   747  
   748  	Sinks *ProjectsSinksService
   749  }
   750  
   751  func NewProjectsExclusionsService(s *Service) *ProjectsExclusionsService {
   752  	rs := &ProjectsExclusionsService{s: s}
   753  	return rs
   754  }
   755  
   756  type ProjectsExclusionsService struct {
   757  	s *Service
   758  }
   759  
   760  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   761  	rs := &ProjectsLocationsService{s: s}
   762  	rs.Buckets = NewProjectsLocationsBucketsService(s)
   763  	rs.Operations = NewProjectsLocationsOperationsService(s)
   764  	rs.RecentQueries = NewProjectsLocationsRecentQueriesService(s)
   765  	rs.SavedQueries = NewProjectsLocationsSavedQueriesService(s)
   766  	return rs
   767  }
   768  
   769  type ProjectsLocationsService struct {
   770  	s *Service
   771  
   772  	Buckets *ProjectsLocationsBucketsService
   773  
   774  	Operations *ProjectsLocationsOperationsService
   775  
   776  	RecentQueries *ProjectsLocationsRecentQueriesService
   777  
   778  	SavedQueries *ProjectsLocationsSavedQueriesService
   779  }
   780  
   781  func NewProjectsLocationsBucketsService(s *Service) *ProjectsLocationsBucketsService {
   782  	rs := &ProjectsLocationsBucketsService{s: s}
   783  	rs.Links = NewProjectsLocationsBucketsLinksService(s)
   784  	rs.Views = NewProjectsLocationsBucketsViewsService(s)
   785  	return rs
   786  }
   787  
   788  type ProjectsLocationsBucketsService struct {
   789  	s *Service
   790  
   791  	Links *ProjectsLocationsBucketsLinksService
   792  
   793  	Views *ProjectsLocationsBucketsViewsService
   794  }
   795  
   796  func NewProjectsLocationsBucketsLinksService(s *Service) *ProjectsLocationsBucketsLinksService {
   797  	rs := &ProjectsLocationsBucketsLinksService{s: s}
   798  	return rs
   799  }
   800  
   801  type ProjectsLocationsBucketsLinksService struct {
   802  	s *Service
   803  }
   804  
   805  func NewProjectsLocationsBucketsViewsService(s *Service) *ProjectsLocationsBucketsViewsService {
   806  	rs := &ProjectsLocationsBucketsViewsService{s: s}
   807  	rs.Logs = NewProjectsLocationsBucketsViewsLogsService(s)
   808  	return rs
   809  }
   810  
   811  type ProjectsLocationsBucketsViewsService struct {
   812  	s *Service
   813  
   814  	Logs *ProjectsLocationsBucketsViewsLogsService
   815  }
   816  
   817  func NewProjectsLocationsBucketsViewsLogsService(s *Service) *ProjectsLocationsBucketsViewsLogsService {
   818  	rs := &ProjectsLocationsBucketsViewsLogsService{s: s}
   819  	return rs
   820  }
   821  
   822  type ProjectsLocationsBucketsViewsLogsService struct {
   823  	s *Service
   824  }
   825  
   826  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   827  	rs := &ProjectsLocationsOperationsService{s: s}
   828  	return rs
   829  }
   830  
   831  type ProjectsLocationsOperationsService struct {
   832  	s *Service
   833  }
   834  
   835  func NewProjectsLocationsRecentQueriesService(s *Service) *ProjectsLocationsRecentQueriesService {
   836  	rs := &ProjectsLocationsRecentQueriesService{s: s}
   837  	return rs
   838  }
   839  
   840  type ProjectsLocationsRecentQueriesService struct {
   841  	s *Service
   842  }
   843  
   844  func NewProjectsLocationsSavedQueriesService(s *Service) *ProjectsLocationsSavedQueriesService {
   845  	rs := &ProjectsLocationsSavedQueriesService{s: s}
   846  	return rs
   847  }
   848  
   849  type ProjectsLocationsSavedQueriesService struct {
   850  	s *Service
   851  }
   852  
   853  func NewProjectsLogsService(s *Service) *ProjectsLogsService {
   854  	rs := &ProjectsLogsService{s: s}
   855  	return rs
   856  }
   857  
   858  type ProjectsLogsService struct {
   859  	s *Service
   860  }
   861  
   862  func NewProjectsMetricsService(s *Service) *ProjectsMetricsService {
   863  	rs := &ProjectsMetricsService{s: s}
   864  	return rs
   865  }
   866  
   867  type ProjectsMetricsService struct {
   868  	s *Service
   869  }
   870  
   871  func NewProjectsSinksService(s *Service) *ProjectsSinksService {
   872  	rs := &ProjectsSinksService{s: s}
   873  	return rs
   874  }
   875  
   876  type ProjectsSinksService struct {
   877  	s *Service
   878  }
   879  
   880  func NewSinksService(s *Service) *SinksService {
   881  	rs := &SinksService{s: s}
   882  	return rs
   883  }
   884  
   885  type SinksService struct {
   886  	s *Service
   887  }
   888  
   889  func NewV2Service(s *Service) *V2Service {
   890  	rs := &V2Service{s: s}
   891  	return rs
   892  }
   893  
   894  type V2Service struct {
   895  	s *Service
   896  }
   897  
   898  // AuditConfig: Specifies the audit configuration for a service. The
   899  // configuration determines which permission types are logged, and what
   900  // identities, if any, are exempted from logging. An AuditConfig must have one
   901  // or more AuditLogConfigs.If there are AuditConfigs for both allServices and a
   902  // specific service, the union of the two AuditConfigs is used for that
   903  // service: the log_types specified in each AuditConfig are enabled, and the
   904  // exempted_members in each AuditLogConfig are exempted.Example Policy with
   905  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   906  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   907  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   908  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   909  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   910  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   911  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   912  // logging. It also exempts jose@example.com from DATA_READ logging, and
   913  // aliya@example.com from DATA_WRITE logging.
   914  type AuditConfig struct {
   915  	// AuditLogConfigs: The configuration for logging of each type of permission.
   916  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   917  	// Service: Specifies a service that will be enabled for audit logging. For
   918  	// example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a
   919  	// special value that covers all services.
   920  	Service string `json:"service,omitempty"`
   921  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   922  	// unconditionally include in API requests. By default, fields with empty or
   923  	// default values are omitted from API requests. See
   924  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   925  	// details.
   926  	ForceSendFields []string `json:"-"`
   927  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   928  	// API requests with the JSON null value. By default, fields with empty values
   929  	// are omitted from API requests. See
   930  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   931  	NullFields []string `json:"-"`
   932  }
   933  
   934  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   935  	type NoMethod AuditConfig
   936  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   937  }
   938  
   939  // AuditLogConfig: Provides the configuration for logging a type of
   940  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   941  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   942  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   943  // exempting jose@example.com from DATA_READ logging.
   944  type AuditLogConfig struct {
   945  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   946  	// type of permission. Follows the same format of Binding.members.
   947  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   948  	// LogType: The log type that this config enables.
   949  	//
   950  	// Possible values:
   951  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   952  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   953  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   954  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   955  	LogType string `json:"logType,omitempty"`
   956  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   957  	// unconditionally include in API requests. By default, fields with empty or
   958  	// default values are omitted from API requests. See
   959  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   960  	// details.
   961  	ForceSendFields []string `json:"-"`
   962  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   963  	// API requests with the JSON null value. By default, fields with empty values
   964  	// are omitted from API requests. See
   965  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   966  	NullFields []string `json:"-"`
   967  }
   968  
   969  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   970  	type NoMethod AuditLogConfig
   971  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   972  }
   973  
   974  // BigQueryDataset: Describes a BigQuery dataset that was created by a link.
   975  type BigQueryDataset struct {
   976  	// DatasetId: Output only. The full resource name of the BigQuery dataset. The
   977  	// DATASET_ID will match the ID of the link, so the link must match the naming
   978  	// restrictions of BigQuery datasets (alphanumeric characters and underscores
   979  	// only).The dataset will have a resource path of
   980  	// "bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID"
   981  	DatasetId string `json:"datasetId,omitempty"`
   982  	// ForceSendFields is a list of field names (e.g. "DatasetId") to
   983  	// unconditionally include in API requests. By default, fields with empty or
   984  	// default values are omitted from API requests. See
   985  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   986  	// details.
   987  	ForceSendFields []string `json:"-"`
   988  	// NullFields is a list of field names (e.g. "DatasetId") to include in API
   989  	// requests with the JSON null value. By default, fields with empty values are
   990  	// omitted from API requests. See
   991  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   992  	NullFields []string `json:"-"`
   993  }
   994  
   995  func (s *BigQueryDataset) MarshalJSON() ([]byte, error) {
   996  	type NoMethod BigQueryDataset
   997  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   998  }
   999  
  1000  // BigQueryOptions: Options that change functionality of a sink exporting data
  1001  // to BigQuery.
  1002  type BigQueryOptions struct {
  1003  	// UsePartitionedTables: Optional. Whether to use BigQuery's partition tables
  1004  	// (https://cloud.google.com/bigquery/docs/partitioned-tables). By default,
  1005  	// Cloud Logging creates dated tables based on the log entries' timestamps,
  1006  	// e.g. syslog_20170523. With partitioned tables the date suffix is no longer
  1007  	// present and special query syntax
  1008  	// (https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to
  1009  	// be used instead. In both cases, tables are sharded based on UTC timezone.
  1010  	UsePartitionedTables bool `json:"usePartitionedTables,omitempty"`
  1011  	// UsesTimestampColumnPartitioning: Output only. True if new timestamp column
  1012  	// based partitioning is in use, false if legacy ingress-time partitioning is
  1013  	// in use.All new sinks will have this field set true and will use timestamp
  1014  	// column based partitioning. If use_partitioned_tables is false, this value
  1015  	// has no meaning and will be false. Legacy sinks using partitioned tables will
  1016  	// have this field set to false.
  1017  	UsesTimestampColumnPartitioning bool `json:"usesTimestampColumnPartitioning,omitempty"`
  1018  	// ForceSendFields is a list of field names (e.g. "UsePartitionedTables") to
  1019  	// unconditionally include in API requests. By default, fields with empty or
  1020  	// default values are omitted from API requests. See
  1021  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1022  	// details.
  1023  	ForceSendFields []string `json:"-"`
  1024  	// NullFields is a list of field names (e.g. "UsePartitionedTables") to include
  1025  	// in API requests with the JSON null value. By default, fields with empty
  1026  	// values are omitted from API requests. See
  1027  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1028  	NullFields []string `json:"-"`
  1029  }
  1030  
  1031  func (s *BigQueryOptions) MarshalJSON() ([]byte, error) {
  1032  	type NoMethod BigQueryOptions
  1033  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1034  }
  1035  
  1036  // Binding: Associates members, or principals, with a role.
  1037  type Binding struct {
  1038  	// Condition: The condition that is associated with this binding.If the
  1039  	// condition evaluates to true, then this binding applies to the current
  1040  	// request.If the condition evaluates to false, then this binding does not
  1041  	// apply to the current request. However, a different role binding might grant
  1042  	// the same role to one or more of the principals in this binding.To learn
  1043  	// which resources support conditions in their IAM policies, see the IAM
  1044  	// documentation
  1045  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1046  	Condition *Expr `json:"condition,omitempty"`
  1047  	// Members: Specifies the principals requesting access for a Google Cloud
  1048  	// resource. members can have the following values: allUsers: A special
  1049  	// identifier that represents anyone who is on the internet; with or without a
  1050  	// Google account. allAuthenticatedUsers: A special identifier that represents
  1051  	// anyone who is authenticated with a Google account or a service account. Does
  1052  	// not include identities that come from external identity providers (IdPs)
  1053  	// through identity federation. user:{emailid}: An email address that
  1054  	// represents a specific Google account. For example, alice@example.com .
  1055  	// serviceAccount:{emailid}: An email address that represents a Google service
  1056  	// account. For example, my-other-app@appspot.gserviceaccount.com.
  1057  	// serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]: An
  1058  	// identifier for a Kubernetes service account
  1059  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
  1060  	// For example, my-project.svc.id.goog[my-namespace/my-kubernetes-sa].
  1061  	// group:{emailid}: An email address that represents a Google group. For
  1062  	// example, admins@example.com. domain:{domain}: The G Suite domain (primary)
  1063  	// that represents all the users of that domain. For example, google.com or
  1064  	// example.com.
  1065  	// principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subj
  1066  	// ect/{subject_attribute_value}: A single identity in a workforce identity
  1067  	// pool.
  1068  	// principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/g
  1069  	// roup/{group_id}: All workforce identities in a group.
  1070  	// principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/a
  1071  	// ttribute.{attribute_name}/{attribute_value}: All workforce identities with a
  1072  	// specific attribute value.
  1073  	// principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*
  1074  	// : All identities in a workforce identity pool.
  1075  	// principal://iam.googleapis.com/projects/{project_number}/locations/global/wor
  1076  	// kloadIdentityPools/{pool_id}/subject/{subject_attribute_value}: A single
  1077  	// identity in a workload identity pool.
  1078  	// principalSet://iam.googleapis.com/projects/{project_number}/locations/global/
  1079  	// workloadIdentityPools/{pool_id}/group/{group_id}: A workload identity pool
  1080  	// group.
  1081  	// principalSet://iam.googleapis.com/projects/{project_number}/locations/global/
  1082  	// workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}:
  1083  	//  All identities in a workload identity pool with a certain attribute.
  1084  	// principalSet://iam.googleapis.com/projects/{project_number}/locations/global/
  1085  	// workloadIdentityPools/{pool_id}/*: All identities in a workload identity
  1086  	// pool. deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique
  1087  	// identifier) representing a user that has been recently deleted. For example,
  1088  	// alice@example.com?uid=123456789012345678901. If the user is recovered, this
  1089  	// value reverts to user:{emailid} and the recovered user retains the role in
  1090  	// the binding. deleted:serviceAccount:{emailid}?uid={uniqueid}: An email
  1091  	// address (plus unique identifier) representing a service account that has
  1092  	// been recently deleted. For example,
  1093  	// my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the
  1094  	// service account is undeleted, this value reverts to serviceAccount:{emailid}
  1095  	// and the undeleted service account retains the role in the binding.
  1096  	// deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique
  1097  	// identifier) representing a Google group that has been recently deleted. For
  1098  	// example, admins@example.com?uid=123456789012345678901. If the group is
  1099  	// recovered, this value reverts to group:{emailid} and the recovered group
  1100  	// retains the role in the binding.
  1101  	// deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_
  1102  	// id}/subject/{subject_attribute_value}: Deleted single identity in a
  1103  	// workforce identity pool. For example,
  1104  	// deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-poo
  1105  	// l-id/subject/my-subject-attribute-value.
  1106  	Members []string `json:"members,omitempty"`
  1107  	// Role: Role that is assigned to the list of members, or principals. For
  1108  	// example, roles/viewer, roles/editor, or roles/owner.For an overview of the
  1109  	// IAM roles and permissions, see the IAM documentation
  1110  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
  1111  	// available pre-defined roles, see here
  1112  	// (https://cloud.google.com/iam/docs/understanding-roles).
  1113  	Role string `json:"role,omitempty"`
  1114  	// ForceSendFields is a list of field names (e.g. "Condition") to
  1115  	// unconditionally include in API requests. By default, fields with empty or
  1116  	// default values are omitted from API requests. See
  1117  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1118  	// details.
  1119  	ForceSendFields []string `json:"-"`
  1120  	// NullFields is a list of field names (e.g. "Condition") to include in API
  1121  	// requests with the JSON null value. By default, fields with empty values are
  1122  	// omitted from API requests. See
  1123  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1124  	NullFields []string `json:"-"`
  1125  }
  1126  
  1127  func (s *Binding) MarshalJSON() ([]byte, error) {
  1128  	type NoMethod Binding
  1129  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1130  }
  1131  
  1132  // BucketMetadata: Metadata for LongRunningUpdateBucket Operations.
  1133  type BucketMetadata struct {
  1134  	// CreateBucketRequest: LongRunningCreateBucket RPC request.
  1135  	CreateBucketRequest *CreateBucketRequest `json:"createBucketRequest,omitempty"`
  1136  	// EndTime: The end time of an operation.
  1137  	EndTime string `json:"endTime,omitempty"`
  1138  	// StartTime: The create time of an operation.
  1139  	StartTime string `json:"startTime,omitempty"`
  1140  	// State: Output only. State of an operation.
  1141  	//
  1142  	// Possible values:
  1143  	//   "OPERATION_STATE_UNSPECIFIED" - Should not be used.
  1144  	//   "OPERATION_STATE_SCHEDULED" - The operation is scheduled.
  1145  	//   "OPERATION_STATE_WAITING_FOR_PERMISSIONS" - Waiting for necessary
  1146  	// permissions.
  1147  	//   "OPERATION_STATE_RUNNING" - The operation is running.
  1148  	//   "OPERATION_STATE_SUCCEEDED" - The operation was completed successfully.
  1149  	//   "OPERATION_STATE_FAILED" - The operation failed.
  1150  	//   "OPERATION_STATE_CANCELLED" - The operation was cancelled by the user.
  1151  	//   "OPERATION_STATE_PENDING" - The operation is waiting for quota.
  1152  	State string `json:"state,omitempty"`
  1153  	// UpdateBucketRequest: LongRunningUpdateBucket RPC request.
  1154  	UpdateBucketRequest *UpdateBucketRequest `json:"updateBucketRequest,omitempty"`
  1155  	// ForceSendFields is a list of field names (e.g. "CreateBucketRequest") to
  1156  	// unconditionally include in API requests. By default, fields with empty or
  1157  	// default values are omitted from API requests. See
  1158  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1159  	// details.
  1160  	ForceSendFields []string `json:"-"`
  1161  	// NullFields is a list of field names (e.g. "CreateBucketRequest") to include
  1162  	// in API requests with the JSON null value. By default, fields with empty
  1163  	// values are omitted from API requests. See
  1164  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1165  	NullFields []string `json:"-"`
  1166  }
  1167  
  1168  func (s *BucketMetadata) MarshalJSON() ([]byte, error) {
  1169  	type NoMethod BucketMetadata
  1170  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1171  }
  1172  
  1173  // BucketOptions: BucketOptions describes the bucket boundaries used to create
  1174  // a histogram for the distribution. The buckets can be in a linear sequence,
  1175  // an exponential sequence, or each bucket can be specified explicitly.
  1176  // BucketOptions does not include the number of values in each bucket.A bucket
  1177  // has an inclusive lower bound and exclusive upper bound for the values that
  1178  // are counted for that bucket. The upper bound of a bucket must be strictly
  1179  // greater than the lower bound. The sequence of N buckets for a distribution
  1180  // consists of an underflow bucket (number 0), zero or more finite buckets
  1181  // (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets
  1182  // are contiguous: the lower bound of bucket i (i > 0) is the same as the upper
  1183  // bound of bucket i - 1. The buckets span the whole range of finite values:
  1184  // lower bound of the underflow bucket is -infinity and the upper bound of the
  1185  // overflow bucket is +infinity. The finite buckets are so-called because both
  1186  // bounds are finite.
  1187  type BucketOptions struct {
  1188  	// ExplicitBuckets: The explicit buckets.
  1189  	ExplicitBuckets *Explicit `json:"explicitBuckets,omitempty"`
  1190  	// ExponentialBuckets: The exponential buckets.
  1191  	ExponentialBuckets *Exponential `json:"exponentialBuckets,omitempty"`
  1192  	// LinearBuckets: The linear bucket.
  1193  	LinearBuckets *Linear `json:"linearBuckets,omitempty"`
  1194  	// ForceSendFields is a list of field names (e.g. "ExplicitBuckets") to
  1195  	// unconditionally include in API requests. By default, fields with empty or
  1196  	// default values are omitted from API requests. See
  1197  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1198  	// details.
  1199  	ForceSendFields []string `json:"-"`
  1200  	// NullFields is a list of field names (e.g. "ExplicitBuckets") to include in
  1201  	// API requests with the JSON null value. By default, fields with empty values
  1202  	// are omitted from API requests. See
  1203  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1204  	NullFields []string `json:"-"`
  1205  }
  1206  
  1207  func (s *BucketOptions) MarshalJSON() ([]byte, error) {
  1208  	type NoMethod BucketOptions
  1209  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1210  }
  1211  
  1212  // CancelOperationRequest: The request message for Operations.CancelOperation.
  1213  type CancelOperationRequest struct {
  1214  }
  1215  
  1216  // CmekSettings: Describes the customer-managed encryption key (CMEK) settings
  1217  // associated with a project, folder, organization, billing account, or
  1218  // flexible resource.Note: CMEK for the Log Router can currently only be
  1219  // configured for Google Cloud organizations. Once configured, it applies to
  1220  // all projects and folders in the Google Cloud organization.See Enabling CMEK
  1221  // for Log Router
  1222  // (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
  1223  // information.
  1224  type CmekSettings struct {
  1225  	// KmsKeyName: Optional. The resource name for the configured Cloud KMS key.KMS
  1226  	// key name format:
  1227  	// "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KE
  1228  	// Y]" For
  1229  	// example:"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKey
  1230  	// s/my-key"To enable CMEK for the Log Router, set this field to a valid
  1231  	// kms_key_name for which the associated service account has the needed
  1232  	// cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.The Cloud
  1233  	// KMS key used by the Log Router can be updated by changing the kms_key_name
  1234  	// to a new valid key name or disabled by setting the key name to an empty
  1235  	// string. Encryption operations that are in progress will be completed with
  1236  	// the key that was in use when they started. Decryption operations will be
  1237  	// completed using the key that was used at the time of encryption unless
  1238  	// access to that key has been revoked.To disable CMEK for the Log Router, set
  1239  	// this field to an empty string.See Enabling CMEK for Log Router
  1240  	// (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
  1241  	// information.
  1242  	KmsKeyName string `json:"kmsKeyName,omitempty"`
  1243  	// KmsKeyVersionName: Output only. The CryptoKeyVersion resource name for the
  1244  	// configured Cloud KMS key.KMS key name format:
  1245  	// "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KE
  1246  	// Y]/cryptoKeyVersions/[VERSION]" For
  1247  	// example:"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKey
  1248  	// s/my-key/cryptoKeyVersions/1"This is a read-only field used to convey the
  1249  	// specific configured CryptoKeyVersion of kms_key that has been configured. It
  1250  	// will be populated in cases where the CMEK settings are bound to a single key
  1251  	// version.If this field is populated, the kms_key is tied to a specific
  1252  	// CryptoKeyVersion.
  1253  	KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"`
  1254  	// Name: Output only. The resource name of the CMEK settings.
  1255  	Name string `json:"name,omitempty"`
  1256  	// ServiceAccountId: Output only. The service account that will be used by the
  1257  	// Log Router to access your Cloud KMS key.Before enabling CMEK for Log Router,
  1258  	// you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the
  1259  	// service account that the Log Router will use to access your Cloud KMS key.
  1260  	// Use GetCmekSettings to obtain the service account ID.See Enabling CMEK for
  1261  	// Log Router
  1262  	// (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
  1263  	// information.
  1264  	ServiceAccountId string `json:"serviceAccountId,omitempty"`
  1265  
  1266  	// ServerResponse contains the HTTP response code and headers from the server.
  1267  	googleapi.ServerResponse `json:"-"`
  1268  	// ForceSendFields is a list of field names (e.g. "KmsKeyName") to
  1269  	// unconditionally include in API requests. By default, fields with empty or
  1270  	// default values are omitted from API requests. See
  1271  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1272  	// details.
  1273  	ForceSendFields []string `json:"-"`
  1274  	// NullFields is a list of field names (e.g. "KmsKeyName") to include in API
  1275  	// requests with the JSON null value. By default, fields with empty values are
  1276  	// omitted from API requests. See
  1277  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1278  	NullFields []string `json:"-"`
  1279  }
  1280  
  1281  func (s *CmekSettings) MarshalJSON() ([]byte, error) {
  1282  	type NoMethod CmekSettings
  1283  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1284  }
  1285  
  1286  // CopyLogEntriesMetadata: Metadata for CopyLogEntries long running operations.
  1287  type CopyLogEntriesMetadata struct {
  1288  	// CancellationRequested: Identifies whether the user has requested
  1289  	// cancellation of the operation.
  1290  	CancellationRequested bool `json:"cancellationRequested,omitempty"`
  1291  	// Destination: Destination to which to copy log entries.For example, a Cloud
  1292  	// Storage bucket:"storage.googleapis.com/my-cloud-storage-bucket"
  1293  	Destination string `json:"destination,omitempty"`
  1294  	// EndTime: The end time of an operation.
  1295  	EndTime string `json:"endTime,omitempty"`
  1296  	// Progress: Estimated progress of the operation (0 - 100%).
  1297  	Progress int64 `json:"progress,omitempty"`
  1298  	// Request: CopyLogEntries RPC request. This field is deprecated and not used.
  1299  	Request *CopyLogEntriesRequest `json:"request,omitempty"`
  1300  	// Source: Source from which to copy log entries.For example, a log
  1301  	// bucket:"projects/my-project/locations/global/buckets/my-source-bucket"
  1302  	Source string `json:"source,omitempty"`
  1303  	// StartTime: The create time of an operation.
  1304  	StartTime string `json:"startTime,omitempty"`
  1305  	// State: Output only. State of an operation.
  1306  	//
  1307  	// Possible values:
  1308  	//   "OPERATION_STATE_UNSPECIFIED" - Should not be used.
  1309  	//   "OPERATION_STATE_SCHEDULED" - The operation is scheduled.
  1310  	//   "OPERATION_STATE_WAITING_FOR_PERMISSIONS" - Waiting for necessary
  1311  	// permissions.
  1312  	//   "OPERATION_STATE_RUNNING" - The operation is running.
  1313  	//   "OPERATION_STATE_SUCCEEDED" - The operation was completed successfully.
  1314  	//   "OPERATION_STATE_FAILED" - The operation failed.
  1315  	//   "OPERATION_STATE_CANCELLED" - The operation was cancelled by the user.
  1316  	//   "OPERATION_STATE_PENDING" - The operation is waiting for quota.
  1317  	State string `json:"state,omitempty"`
  1318  	// Verb: Name of the verb executed by the operation.For example,"copy"
  1319  	Verb string `json:"verb,omitempty"`
  1320  	// WriterIdentity: The IAM identity of a service account that must be granted
  1321  	// access to the destination.If the service account is not granted permission
  1322  	// to the destination within an hour, the operation will be cancelled.For
  1323  	// example: "serviceAccount:foo@bar.com"
  1324  	WriterIdentity string `json:"writerIdentity,omitempty"`
  1325  	// ForceSendFields is a list of field names (e.g. "CancellationRequested") to
  1326  	// unconditionally include in API requests. By default, fields with empty or
  1327  	// default values are omitted from API requests. See
  1328  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1329  	// details.
  1330  	ForceSendFields []string `json:"-"`
  1331  	// NullFields is a list of field names (e.g. "CancellationRequested") to
  1332  	// include in API requests with the JSON null value. By default, fields with
  1333  	// empty values are omitted from API requests. See
  1334  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1335  	NullFields []string `json:"-"`
  1336  }
  1337  
  1338  func (s *CopyLogEntriesMetadata) MarshalJSON() ([]byte, error) {
  1339  	type NoMethod CopyLogEntriesMetadata
  1340  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1341  }
  1342  
  1343  // CopyLogEntriesRequest: The parameters to CopyLogEntries.
  1344  type CopyLogEntriesRequest struct {
  1345  	// Destination: Required. Destination to which to copy log entries.
  1346  	Destination string `json:"destination,omitempty"`
  1347  	// Filter: Optional. A filter specifying which log entries to copy. The filter
  1348  	// must be no more than 20k characters. An empty filter matches all log
  1349  	// entries.
  1350  	Filter string `json:"filter,omitempty"`
  1351  	// Name: Required. Log bucket from which to copy log entries.For
  1352  	// example:"projects/my-project/locations/global/buckets/my-source-bucket"
  1353  	Name string `json:"name,omitempty"`
  1354  	// ForceSendFields is a list of field names (e.g. "Destination") to
  1355  	// unconditionally include in API requests. By default, fields with empty or
  1356  	// default values are omitted from API requests. See
  1357  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1358  	// details.
  1359  	ForceSendFields []string `json:"-"`
  1360  	// NullFields is a list of field names (e.g. "Destination") to include in API
  1361  	// requests with the JSON null value. By default, fields with empty values are
  1362  	// omitted from API requests. See
  1363  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1364  	NullFields []string `json:"-"`
  1365  }
  1366  
  1367  func (s *CopyLogEntriesRequest) MarshalJSON() ([]byte, error) {
  1368  	type NoMethod CopyLogEntriesRequest
  1369  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1370  }
  1371  
  1372  // CopyLogEntriesResponse: Response type for CopyLogEntries long running
  1373  // operations.
  1374  type CopyLogEntriesResponse struct {
  1375  	// LogEntriesCopiedCount: Number of log entries copied.
  1376  	LogEntriesCopiedCount int64 `json:"logEntriesCopiedCount,omitempty,string"`
  1377  	// ForceSendFields is a list of field names (e.g. "LogEntriesCopiedCount") to
  1378  	// unconditionally include in API requests. By default, fields with empty or
  1379  	// default values are omitted from API requests. See
  1380  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1381  	// details.
  1382  	ForceSendFields []string `json:"-"`
  1383  	// NullFields is a list of field names (e.g. "LogEntriesCopiedCount") to
  1384  	// include in API requests with the JSON null value. By default, fields with
  1385  	// empty values are omitted from API requests. See
  1386  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1387  	NullFields []string `json:"-"`
  1388  }
  1389  
  1390  func (s *CopyLogEntriesResponse) MarshalJSON() ([]byte, error) {
  1391  	type NoMethod CopyLogEntriesResponse
  1392  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1393  }
  1394  
  1395  // CreateBucketRequest: The parameters to CreateBucket.
  1396  type CreateBucketRequest struct {
  1397  	// Bucket: Required. The new bucket. The region specified in the new bucket
  1398  	// must be compliant with any Location Restriction Org Policy. The name field
  1399  	// in the bucket is ignored.
  1400  	Bucket *LogBucket `json:"bucket,omitempty"`
  1401  	// BucketId: Required. A client-assigned identifier such as "my-bucket".
  1402  	// Identifiers are limited to 100 characters and can include only letters,
  1403  	// digits, underscores, hyphens, and periods. Bucket identifiers must start
  1404  	// with an alphanumeric character.
  1405  	BucketId string `json:"bucketId,omitempty"`
  1406  	// Parent: Required. The resource in which to create the log bucket:
  1407  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
  1408  	// example:"projects/my-project/locations/global"
  1409  	Parent string `json:"parent,omitempty"`
  1410  	// ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally
  1411  	// include in API requests. By default, fields with empty or default values are
  1412  	// omitted from API requests. See
  1413  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1414  	// details.
  1415  	ForceSendFields []string `json:"-"`
  1416  	// NullFields is a list of field names (e.g. "Bucket") to include in API
  1417  	// requests with the JSON null value. By default, fields with empty values are
  1418  	// omitted from API requests. See
  1419  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1420  	NullFields []string `json:"-"`
  1421  }
  1422  
  1423  func (s *CreateBucketRequest) MarshalJSON() ([]byte, error) {
  1424  	type NoMethod CreateBucketRequest
  1425  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1426  }
  1427  
  1428  // CreateLinkRequest: The parameters to CreateLink.
  1429  type CreateLinkRequest struct {
  1430  	// Link: Required. The new link.
  1431  	Link *Link `json:"link,omitempty"`
  1432  	// LinkId: Required. The ID to use for the link. The link_id can have up to 100
  1433  	// characters. A valid link_id must only have alphanumeric characters and
  1434  	// underscores within it.
  1435  	LinkId string `json:"linkId,omitempty"`
  1436  	// Parent: Required. The full resource name of the bucket to create a link for.
  1437  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1438  	// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1439  	//
  1440  	// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET
  1441  	// _ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1442  	Parent string `json:"parent,omitempty"`
  1443  	// ForceSendFields is a list of field names (e.g. "Link") to unconditionally
  1444  	// include in API requests. By default, fields with empty or default values are
  1445  	// omitted from API requests. See
  1446  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1447  	// details.
  1448  	ForceSendFields []string `json:"-"`
  1449  	// NullFields is a list of field names (e.g. "Link") to include in API requests
  1450  	// with the JSON null value. By default, fields with empty values are omitted
  1451  	// from API requests. See
  1452  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1453  	NullFields []string `json:"-"`
  1454  }
  1455  
  1456  func (s *CreateLinkRequest) MarshalJSON() ([]byte, error) {
  1457  	type NoMethod CreateLinkRequest
  1458  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1459  }
  1460  
  1461  // DefaultSinkConfig: Describes the custom _Default sink configuration that is
  1462  // used to override the built-in _Default sink configuration in newly created
  1463  // resource containers, such as projects or folders.
  1464  type DefaultSinkConfig struct {
  1465  	// Exclusions: Optional. Specifies the set of exclusions to be added to the
  1466  	// _Default sink in newly created resource containers.
  1467  	Exclusions []*LogExclusion `json:"exclusions,omitempty"`
  1468  	// Filter: Optional. An advanced logs filter
  1469  	// (https://cloud.google.com/logging/docs/view/advanced-queries). The only
  1470  	// exported log entries are those that are in the resource owning the sink and
  1471  	// that match the filter.For
  1472  	// example:logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERRORTo
  1473  	// match all logs, don't add exclusions and use the following line as the value
  1474  	// of filter:logName:*Cannot be empty or unset when the value of mode is
  1475  	// OVERWRITE.
  1476  	Filter string `json:"filter,omitempty"`
  1477  	// Mode: Required. Determines the behavior to apply to the built-in _Default
  1478  	// sink inclusion filter.Exclusions are always appended, as built-in _Default
  1479  	// sinks have no exclusions.
  1480  	//
  1481  	// Possible values:
  1482  	//   "FILTER_WRITE_MODE_UNSPECIFIED" - The filter's write mode is unspecified.
  1483  	// This mode must not be used.
  1484  	//   "APPEND" - The contents of filter will be appended to the built-in
  1485  	// _Default sink filter. Using the append mode with an empty filter will keep
  1486  	// the sink inclusion filter unchanged.
  1487  	//   "OVERWRITE" - The contents of filter will overwrite the built-in _Default
  1488  	// sink filter.
  1489  	Mode string `json:"mode,omitempty"`
  1490  	// ForceSendFields is a list of field names (e.g. "Exclusions") to
  1491  	// unconditionally include in API requests. By default, fields with empty or
  1492  	// default values are omitted from API requests. See
  1493  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1494  	// details.
  1495  	ForceSendFields []string `json:"-"`
  1496  	// NullFields is a list of field names (e.g. "Exclusions") to include in API
  1497  	// requests with the JSON null value. By default, fields with empty values are
  1498  	// omitted from API requests. See
  1499  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1500  	NullFields []string `json:"-"`
  1501  }
  1502  
  1503  func (s *DefaultSinkConfig) MarshalJSON() ([]byte, error) {
  1504  	type NoMethod DefaultSinkConfig
  1505  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1506  }
  1507  
  1508  // DeleteLinkRequest: The parameters to DeleteLink.
  1509  type DeleteLinkRequest struct {
  1510  	// Name: Required. The full resource name of the link to delete.
  1511  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
  1512  	// K_ID]"
  1513  	// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/
  1514  	// links/[LINK_ID]"
  1515  	// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET
  1516  	// _ID]/links/[LINK_ID]"
  1517  	// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_
  1518  	// ID]"
  1519  	Name string `json:"name,omitempty"`
  1520  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1521  	// include in API requests. By default, fields with empty or default values are
  1522  	// omitted from API requests. See
  1523  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1524  	// details.
  1525  	ForceSendFields []string `json:"-"`
  1526  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1527  	// with the JSON null value. By default, fields with empty values are omitted
  1528  	// from API requests. See
  1529  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1530  	NullFields []string `json:"-"`
  1531  }
  1532  
  1533  func (s *DeleteLinkRequest) MarshalJSON() ([]byte, error) {
  1534  	type NoMethod DeleteLinkRequest
  1535  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1536  }
  1537  
  1538  // Empty: A generic empty message that you can re-use to avoid defining
  1539  // duplicated empty messages in your APIs. A typical example is to use it as
  1540  // the request or the response type of an API method. For instance: service Foo
  1541  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1542  type Empty struct {
  1543  	// ServerResponse contains the HTTP response code and headers from the server.
  1544  	googleapi.ServerResponse `json:"-"`
  1545  }
  1546  
  1547  // Explicit: Specifies a set of buckets with arbitrary widths.There are
  1548  // size(bounds) + 1 (= N) buckets. Bucket i has the following boundaries:Upper
  1549  // bound (0 <= i < N-1): boundsi Lower bound (1 <= i < N); boundsi - 1The
  1550  // bounds field must contain at least one element. If bounds has only one
  1551  // element, then there are no finite buckets, and that single element is the
  1552  // common boundary of the overflow and underflow buckets.
  1553  type Explicit struct {
  1554  	// Bounds: The values must be monotonically increasing.
  1555  	Bounds []float64 `json:"bounds,omitempty"`
  1556  	// ForceSendFields is a list of field names (e.g. "Bounds") to unconditionally
  1557  	// include in API requests. By default, fields with empty or default values are
  1558  	// omitted from API requests. See
  1559  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1560  	// details.
  1561  	ForceSendFields []string `json:"-"`
  1562  	// NullFields is a list of field names (e.g. "Bounds") to include in API
  1563  	// requests with the JSON null value. By default, fields with empty values are
  1564  	// omitted from API requests. See
  1565  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1566  	NullFields []string `json:"-"`
  1567  }
  1568  
  1569  func (s *Explicit) MarshalJSON() ([]byte, error) {
  1570  	type NoMethod Explicit
  1571  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1572  }
  1573  
  1574  func (s *Explicit) UnmarshalJSON(data []byte) error {
  1575  	type NoMethod Explicit
  1576  	var s1 struct {
  1577  		Bounds []gensupport.JSONFloat64 `json:"bounds"`
  1578  		*NoMethod
  1579  	}
  1580  	s1.NoMethod = (*NoMethod)(s)
  1581  	if err := json.Unmarshal(data, &s1); err != nil {
  1582  		return err
  1583  	}
  1584  	s.Bounds = make([]float64, len(s1.Bounds))
  1585  	for i := range s1.Bounds {
  1586  		s.Bounds[i] = float64(s1.Bounds[i])
  1587  	}
  1588  	return nil
  1589  }
  1590  
  1591  // Exponential: Specifies an exponential sequence of buckets that have a width
  1592  // that is proportional to the value of the lower bound. Each bucket represents
  1593  // a constant relative uncertainty on a specific value in the bucket.There are
  1594  // num_finite_buckets + 2 (= N) buckets. Bucket i has the following
  1595  // boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).Lower
  1596  // bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).
  1597  type Exponential struct {
  1598  	// GrowthFactor: Must be greater than 1.
  1599  	GrowthFactor float64 `json:"growthFactor,omitempty"`
  1600  	// NumFiniteBuckets: Must be greater than 0.
  1601  	NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
  1602  	// Scale: Must be greater than 0.
  1603  	Scale float64 `json:"scale,omitempty"`
  1604  	// ForceSendFields is a list of field names (e.g. "GrowthFactor") to
  1605  	// unconditionally include in API requests. By default, fields with empty or
  1606  	// default values are omitted from API requests. See
  1607  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1608  	// details.
  1609  	ForceSendFields []string `json:"-"`
  1610  	// NullFields is a list of field names (e.g. "GrowthFactor") to include in API
  1611  	// requests with the JSON null value. By default, fields with empty values are
  1612  	// omitted from API requests. See
  1613  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1614  	NullFields []string `json:"-"`
  1615  }
  1616  
  1617  func (s *Exponential) MarshalJSON() ([]byte, error) {
  1618  	type NoMethod Exponential
  1619  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1620  }
  1621  
  1622  func (s *Exponential) UnmarshalJSON(data []byte) error {
  1623  	type NoMethod Exponential
  1624  	var s1 struct {
  1625  		GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"`
  1626  		Scale        gensupport.JSONFloat64 `json:"scale"`
  1627  		*NoMethod
  1628  	}
  1629  	s1.NoMethod = (*NoMethod)(s)
  1630  	if err := json.Unmarshal(data, &s1); err != nil {
  1631  		return err
  1632  	}
  1633  	s.GrowthFactor = float64(s1.GrowthFactor)
  1634  	s.Scale = float64(s1.Scale)
  1635  	return nil
  1636  }
  1637  
  1638  // Expr: Represents a textual expression in the Common Expression Language
  1639  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
  1640  // of CEL are documented at https://github.com/google/cel-spec.Example
  1641  // (Comparison): title: "Summary size limit" description: "Determines if a
  1642  // summary is less than 100 chars" expression: "document.summary.size() < 100"
  1643  // Example (Equality): title: "Requestor is owner" description: "Determines if
  1644  // requestor is the document owner" expression: "document.owner ==
  1645  // request.auth.claims.email" Example (Logic): title: "Public documents"
  1646  // description: "Determine whether the document should be publicly visible"
  1647  // expression: "document.type != 'private' && document.type != 'internal'"
  1648  // Example (Data Manipulation): title: "Notification string" description:
  1649  // "Create a notification string with a timestamp." expression: "'New message
  1650  // received at ' + string(document.create_time)" The exact variables and
  1651  // functions that may be referenced within an expression are determined by the
  1652  // service that evaluates it. See the service documentation for additional
  1653  // information.
  1654  type Expr struct {
  1655  	// Description: Optional. Description of the expression. This is a longer text
  1656  	// which describes the expression, e.g. when hovered over it in a UI.
  1657  	Description string `json:"description,omitempty"`
  1658  	// Expression: Textual representation of an expression in Common Expression
  1659  	// Language syntax.
  1660  	Expression string `json:"expression,omitempty"`
  1661  	// Location: Optional. String indicating the location of the expression for
  1662  	// error reporting, e.g. a file name and a position in the file.
  1663  	Location string `json:"location,omitempty"`
  1664  	// Title: Optional. Title for the expression, i.e. a short string describing
  1665  	// its purpose. This can be used e.g. in UIs which allow to enter the
  1666  	// expression.
  1667  	Title string `json:"title,omitempty"`
  1668  	// ForceSendFields is a list of field names (e.g. "Description") to
  1669  	// unconditionally include in API requests. By default, fields with empty or
  1670  	// default values are omitted from API requests. See
  1671  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1672  	// details.
  1673  	ForceSendFields []string `json:"-"`
  1674  	// NullFields is a list of field names (e.g. "Description") to include in API
  1675  	// requests with the JSON null value. By default, fields with empty values are
  1676  	// omitted from API requests. See
  1677  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1678  	NullFields []string `json:"-"`
  1679  }
  1680  
  1681  func (s *Expr) MarshalJSON() ([]byte, error) {
  1682  	type NoMethod Expr
  1683  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1684  }
  1685  
  1686  // GetIamPolicyRequest: Request message for GetIamPolicy method.
  1687  type GetIamPolicyRequest struct {
  1688  	// Options: OPTIONAL: A GetPolicyOptions object for specifying options to
  1689  	// GetIamPolicy.
  1690  	Options *GetPolicyOptions `json:"options,omitempty"`
  1691  	// ForceSendFields is a list of field names (e.g. "Options") to unconditionally
  1692  	// include in API requests. By default, fields with empty or default values are
  1693  	// omitted from API requests. See
  1694  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1695  	// details.
  1696  	ForceSendFields []string `json:"-"`
  1697  	// NullFields is a list of field names (e.g. "Options") to include in API
  1698  	// requests with the JSON null value. By default, fields with empty values are
  1699  	// omitted from API requests. See
  1700  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1701  	NullFields []string `json:"-"`
  1702  }
  1703  
  1704  func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1705  	type NoMethod GetIamPolicyRequest
  1706  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1707  }
  1708  
  1709  // GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
  1710  type GetPolicyOptions struct {
  1711  	// RequestedPolicyVersion: Optional. The maximum policy version that will be
  1712  	// used to format the policy.Valid values are 0, 1, and 3. Requests specifying
  1713  	// an invalid value will be rejected.Requests for policies with any conditional
  1714  	// role bindings must specify version 3. Policies with no conditional role
  1715  	// bindings may specify any valid value or leave the field unset.The policy in
  1716  	// the response might use the policy version that you specified, or it might
  1717  	// use a lower policy version. For example, if you specify version 3, but the
  1718  	// policy has no conditional role bindings, the response uses version 1.To
  1719  	// learn which resources support conditions in their IAM policies, see the IAM
  1720  	// documentation
  1721  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1722  	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
  1723  	// ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to
  1724  	// unconditionally include in API requests. By default, fields with empty or
  1725  	// default values are omitted from API requests. See
  1726  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1727  	// details.
  1728  	ForceSendFields []string `json:"-"`
  1729  	// NullFields is a list of field names (e.g. "RequestedPolicyVersion") to
  1730  	// include in API requests with the JSON null value. By default, fields with
  1731  	// empty values are omitted from API requests. See
  1732  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1733  	NullFields []string `json:"-"`
  1734  }
  1735  
  1736  func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
  1737  	type NoMethod GetPolicyOptions
  1738  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1739  }
  1740  
  1741  // HttpRequest: A common proto for logging HTTP requests. Only contains
  1742  // semantics defined by the HTTP specification. Product-specific logging
  1743  // information MUST be defined in a separate message.
  1744  type HttpRequest struct {
  1745  	// CacheFillBytes: The number of HTTP response bytes inserted into cache. Set
  1746  	// only when a cache fill was attempted.
  1747  	CacheFillBytes int64 `json:"cacheFillBytes,omitempty,string"`
  1748  	// CacheHit: Whether or not an entity was served from cache (with or without
  1749  	// validation).
  1750  	CacheHit bool `json:"cacheHit,omitempty"`
  1751  	// CacheLookup: Whether or not a cache lookup was attempted.
  1752  	CacheLookup bool `json:"cacheLookup,omitempty"`
  1753  	// CacheValidatedWithOriginServer: Whether or not the response was validated
  1754  	// with the origin server before being served from cache. This field is only
  1755  	// meaningful if cache_hit is True.
  1756  	CacheValidatedWithOriginServer bool `json:"cacheValidatedWithOriginServer,omitempty"`
  1757  	// Latency: The request processing latency on the server, from the time the
  1758  	// request was received until the response was sent.
  1759  	Latency string `json:"latency,omitempty"`
  1760  	// Protocol: Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2",
  1761  	// "websocket"
  1762  	Protocol string `json:"protocol,omitempty"`
  1763  	// Referer: The referer URL of the request, as defined in HTTP/1.1 Header Field
  1764  	// Definitions (https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
  1765  	Referer string `json:"referer,omitempty"`
  1766  	// RemoteIp: The IP address (IPv4 or IPv6) of the client that issued the HTTP
  1767  	// request. This field can include port information. Examples: "192.168.1.1",
  1768  	// "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329".
  1769  	RemoteIp string `json:"remoteIp,omitempty"`
  1770  	// RequestMethod: The request method. Examples: "GET", "HEAD", "PUT", "POST".
  1771  	RequestMethod string `json:"requestMethod,omitempty"`
  1772  	// RequestSize: The size of the HTTP request message in bytes, including the
  1773  	// request headers and the request body.
  1774  	RequestSize int64 `json:"requestSize,omitempty,string"`
  1775  	// RequestUrl: The scheme (http, https), the host name, the path and the query
  1776  	// portion of the URL that was requested. Example:
  1777  	// "http://example.com/some/info?color=red".
  1778  	RequestUrl string `json:"requestUrl,omitempty"`
  1779  	// ResponseSize: The size of the HTTP response message sent back to the client,
  1780  	// in bytes, including the response headers and the response body.
  1781  	ResponseSize int64 `json:"responseSize,omitempty,string"`
  1782  	// ServerIp: The IP address (IPv4 or IPv6) of the origin server that the
  1783  	// request was sent to. This field can include port information. Examples:
  1784  	// "192.168.1.1", "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329".
  1785  	ServerIp string `json:"serverIp,omitempty"`
  1786  	// Status: The response code indicating the status of response. Examples: 200,
  1787  	// 404.
  1788  	Status int64 `json:"status,omitempty"`
  1789  	// UserAgent: The user agent sent by the client. Example: "Mozilla/4.0
  1790  	// (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".
  1791  	UserAgent string `json:"userAgent,omitempty"`
  1792  	// ForceSendFields is a list of field names (e.g. "CacheFillBytes") to
  1793  	// unconditionally include in API requests. By default, fields with empty or
  1794  	// default values are omitted from API requests. See
  1795  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1796  	// details.
  1797  	ForceSendFields []string `json:"-"`
  1798  	// NullFields is a list of field names (e.g. "CacheFillBytes") to include in
  1799  	// API requests with the JSON null value. By default, fields with empty values
  1800  	// are omitted from API requests. See
  1801  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1802  	NullFields []string `json:"-"`
  1803  }
  1804  
  1805  func (s *HttpRequest) MarshalJSON() ([]byte, error) {
  1806  	type NoMethod HttpRequest
  1807  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1808  }
  1809  
  1810  // IndexConfig: Configuration for an indexed field.
  1811  type IndexConfig struct {
  1812  	// CreateTime: Output only. The timestamp when the index was last modified.This
  1813  	// is used to return the timestamp, and will be ignored if supplied during
  1814  	// update.
  1815  	CreateTime string `json:"createTime,omitempty"`
  1816  	// FieldPath: Required. The LogEntry field path to index.Note that some paths
  1817  	// are automatically indexed, and other paths are not eligible for indexing.
  1818  	// See indexing documentation(
  1819  	// https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields)
  1820  	// for details.For example: jsonPayload.request.status
  1821  	FieldPath string `json:"fieldPath,omitempty"`
  1822  	// Type: Required. The type of data in this index.
  1823  	//
  1824  	// Possible values:
  1825  	//   "INDEX_TYPE_UNSPECIFIED" - The index's type is unspecified.
  1826  	//   "INDEX_TYPE_STRING" - The index is a string-type index.
  1827  	//   "INDEX_TYPE_INTEGER" - The index is a integer-type index.
  1828  	Type string `json:"type,omitempty"`
  1829  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1830  	// unconditionally include in API requests. By default, fields with empty or
  1831  	// default values are omitted from API requests. See
  1832  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1833  	// details.
  1834  	ForceSendFields []string `json:"-"`
  1835  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1836  	// requests with the JSON null value. By default, fields with empty values are
  1837  	// omitted from API requests. See
  1838  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1839  	NullFields []string `json:"-"`
  1840  }
  1841  
  1842  func (s *IndexConfig) MarshalJSON() ([]byte, error) {
  1843  	type NoMethod IndexConfig
  1844  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1845  }
  1846  
  1847  // LabelDescriptor: A description of a label.
  1848  type LabelDescriptor struct {
  1849  	// Description: A human-readable description for the label.
  1850  	Description string `json:"description,omitempty"`
  1851  	// Key: The label key.
  1852  	Key string `json:"key,omitempty"`
  1853  	// ValueType: The type of data that can be assigned to the label.
  1854  	//
  1855  	// Possible values:
  1856  	//   "STRING" - A variable-length string. This is the default.
  1857  	//   "BOOL" - Boolean; true or false.
  1858  	//   "INT64" - A 64-bit signed integer.
  1859  	ValueType string `json:"valueType,omitempty"`
  1860  	// ForceSendFields is a list of field names (e.g. "Description") to
  1861  	// unconditionally include in API requests. By default, fields with empty or
  1862  	// default values are omitted from API requests. See
  1863  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1864  	// details.
  1865  	ForceSendFields []string `json:"-"`
  1866  	// NullFields is a list of field names (e.g. "Description") to include in API
  1867  	// requests with the JSON null value. By default, fields with empty values are
  1868  	// omitted from API requests. See
  1869  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1870  	NullFields []string `json:"-"`
  1871  }
  1872  
  1873  func (s *LabelDescriptor) MarshalJSON() ([]byte, error) {
  1874  	type NoMethod LabelDescriptor
  1875  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1876  }
  1877  
  1878  // Linear: Specifies a linear sequence of buckets that all have the same width
  1879  // (except overflow and underflow). Each bucket represents a constant absolute
  1880  // uncertainty on the specific value in the bucket.There are num_finite_buckets
  1881  // + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i
  1882  // < N-1): offset + (width * i).Lower bound (1 <= i < N): offset + (width * (i
  1883  // - 1)).
  1884  type Linear struct {
  1885  	// NumFiniteBuckets: Must be greater than 0.
  1886  	NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"`
  1887  	// Offset: Lower bound of the first bucket.
  1888  	Offset float64 `json:"offset,omitempty"`
  1889  	// Width: Must be greater than 0.
  1890  	Width float64 `json:"width,omitempty"`
  1891  	// ForceSendFields is a list of field names (e.g. "NumFiniteBuckets") to
  1892  	// unconditionally include in API requests. By default, fields with empty or
  1893  	// default values are omitted from API requests. See
  1894  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1895  	// details.
  1896  	ForceSendFields []string `json:"-"`
  1897  	// NullFields is a list of field names (e.g. "NumFiniteBuckets") to include in
  1898  	// API requests with the JSON null value. By default, fields with empty values
  1899  	// are omitted from API requests. See
  1900  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1901  	NullFields []string `json:"-"`
  1902  }
  1903  
  1904  func (s *Linear) MarshalJSON() ([]byte, error) {
  1905  	type NoMethod Linear
  1906  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1907  }
  1908  
  1909  func (s *Linear) UnmarshalJSON(data []byte) error {
  1910  	type NoMethod Linear
  1911  	var s1 struct {
  1912  		Offset gensupport.JSONFloat64 `json:"offset"`
  1913  		Width  gensupport.JSONFloat64 `json:"width"`
  1914  		*NoMethod
  1915  	}
  1916  	s1.NoMethod = (*NoMethod)(s)
  1917  	if err := json.Unmarshal(data, &s1); err != nil {
  1918  		return err
  1919  	}
  1920  	s.Offset = float64(s1.Offset)
  1921  	s.Width = float64(s1.Width)
  1922  	return nil
  1923  }
  1924  
  1925  // Link: Describes a link connected to an analytics enabled bucket.
  1926  type Link struct {
  1927  	// BigqueryDataset: Optional. The information of a BigQuery Dataset. When a
  1928  	// link is created, a BigQuery dataset is created along with it, in the same
  1929  	// project as the LogBucket it's linked to. This dataset will also have
  1930  	// BigQuery Views corresponding to the LogViews in the bucket.
  1931  	BigqueryDataset *BigQueryDataset `json:"bigqueryDataset,omitempty"`
  1932  	// CreateTime: Output only. The creation timestamp of the link.
  1933  	CreateTime string `json:"createTime,omitempty"`
  1934  	// Description: Optional. Describes this link.The maximum length of the
  1935  	// description is 8000 characters.
  1936  	Description string `json:"description,omitempty"`
  1937  	// LifecycleState: Output only. The resource lifecycle state.
  1938  	//
  1939  	// Possible values:
  1940  	//   "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified state. This is only
  1941  	// used/useful for distinguishing unset values.
  1942  	//   "ACTIVE" - The normal and active state.
  1943  	//   "DELETE_REQUESTED" - The resource has been marked for deletion by the
  1944  	// user. For some resources (e.g. buckets), this can be reversed by an
  1945  	// un-delete operation.
  1946  	//   "UPDATING" - The resource has been marked for an update by the user. It
  1947  	// will remain in this state until the update is complete.
  1948  	//   "CREATING" - The resource has been marked for creation by the user. It
  1949  	// will remain in this state until the creation is complete.
  1950  	//   "FAILED" - The resource is in an INTERNAL error state.
  1951  	LifecycleState string `json:"lifecycleState,omitempty"`
  1952  	// Name: Output only. The resource name of the link. The name can have up to
  1953  	// 100 characters. A valid link id (at the end of the link name) must only have
  1954  	// alphanumeric characters and underscores within it.
  1955  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
  1956  	// K_ID]"
  1957  	// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/
  1958  	// links/[LINK_ID]"
  1959  	// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET
  1960  	// _ID]/links/[LINK_ID]"
  1961  	// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_
  1962  	// ID]" For
  1963  	// example:`projects/my-project/locations/global/buckets/my-bucket/links/my_link
  1964  	Name string `json:"name,omitempty"`
  1965  
  1966  	// ServerResponse contains the HTTP response code and headers from the server.
  1967  	googleapi.ServerResponse `json:"-"`
  1968  	// ForceSendFields is a list of field names (e.g. "BigqueryDataset") to
  1969  	// unconditionally include in API requests. By default, fields with empty or
  1970  	// default values are omitted from API requests. See
  1971  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1972  	// details.
  1973  	ForceSendFields []string `json:"-"`
  1974  	// NullFields is a list of field names (e.g. "BigqueryDataset") to include in
  1975  	// API requests with the JSON null value. By default, fields with empty values
  1976  	// are omitted from API requests. See
  1977  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1978  	NullFields []string `json:"-"`
  1979  }
  1980  
  1981  func (s *Link) MarshalJSON() ([]byte, error) {
  1982  	type NoMethod Link
  1983  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1984  }
  1985  
  1986  // LinkMetadata: Metadata for long running Link operations.
  1987  type LinkMetadata struct {
  1988  	// CreateLinkRequest: CreateLink RPC request.
  1989  	CreateLinkRequest *CreateLinkRequest `json:"createLinkRequest,omitempty"`
  1990  	// DeleteLinkRequest: DeleteLink RPC request.
  1991  	DeleteLinkRequest *DeleteLinkRequest `json:"deleteLinkRequest,omitempty"`
  1992  	// EndTime: The end time of an operation.
  1993  	EndTime string `json:"endTime,omitempty"`
  1994  	// StartTime: The start time of an operation.
  1995  	StartTime string `json:"startTime,omitempty"`
  1996  	// State: Output only. State of an operation.
  1997  	//
  1998  	// Possible values:
  1999  	//   "OPERATION_STATE_UNSPECIFIED" - Should not be used.
  2000  	//   "OPERATION_STATE_SCHEDULED" - The operation is scheduled.
  2001  	//   "OPERATION_STATE_WAITING_FOR_PERMISSIONS" - Waiting for necessary
  2002  	// permissions.
  2003  	//   "OPERATION_STATE_RUNNING" - The operation is running.
  2004  	//   "OPERATION_STATE_SUCCEEDED" - The operation was completed successfully.
  2005  	//   "OPERATION_STATE_FAILED" - The operation failed.
  2006  	//   "OPERATION_STATE_CANCELLED" - The operation was cancelled by the user.
  2007  	//   "OPERATION_STATE_PENDING" - The operation is waiting for quota.
  2008  	State string `json:"state,omitempty"`
  2009  	// ForceSendFields is a list of field names (e.g. "CreateLinkRequest") to
  2010  	// unconditionally include in API requests. By default, fields with empty or
  2011  	// default values are omitted from API requests. See
  2012  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2013  	// details.
  2014  	ForceSendFields []string `json:"-"`
  2015  	// NullFields is a list of field names (e.g. "CreateLinkRequest") to include in
  2016  	// API requests with the JSON null value. By default, fields with empty values
  2017  	// are omitted from API requests. See
  2018  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2019  	NullFields []string `json:"-"`
  2020  }
  2021  
  2022  func (s *LinkMetadata) MarshalJSON() ([]byte, error) {
  2023  	type NoMethod LinkMetadata
  2024  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2025  }
  2026  
  2027  // ListBucketsResponse: The response from ListBuckets.
  2028  type ListBucketsResponse struct {
  2029  	// Buckets: A list of buckets.
  2030  	Buckets []*LogBucket `json:"buckets,omitempty"`
  2031  	// NextPageToken: If there might be more results than appear in this response,
  2032  	// then nextPageToken is included. To get the next set of results, call the
  2033  	// same method again using the value of nextPageToken as pageToken.
  2034  	NextPageToken string `json:"nextPageToken,omitempty"`
  2035  
  2036  	// ServerResponse contains the HTTP response code and headers from the server.
  2037  	googleapi.ServerResponse `json:"-"`
  2038  	// ForceSendFields is a list of field names (e.g. "Buckets") to unconditionally
  2039  	// include in API requests. By default, fields with empty or default values are
  2040  	// omitted from API requests. See
  2041  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2042  	// details.
  2043  	ForceSendFields []string `json:"-"`
  2044  	// NullFields is a list of field names (e.g. "Buckets") to include in API
  2045  	// requests with the JSON null value. By default, fields with empty values are
  2046  	// omitted from API requests. See
  2047  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2048  	NullFields []string `json:"-"`
  2049  }
  2050  
  2051  func (s *ListBucketsResponse) MarshalJSON() ([]byte, error) {
  2052  	type NoMethod ListBucketsResponse
  2053  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2054  }
  2055  
  2056  // ListExclusionsResponse: Result returned from ListExclusions.
  2057  type ListExclusionsResponse struct {
  2058  	// Exclusions: A list of exclusions.
  2059  	Exclusions []*LogExclusion `json:"exclusions,omitempty"`
  2060  	// NextPageToken: If there might be more results than appear in this response,
  2061  	// then nextPageToken is included. To get the next set of results, call the
  2062  	// same method again using the value of nextPageToken as pageToken.
  2063  	NextPageToken string `json:"nextPageToken,omitempty"`
  2064  
  2065  	// ServerResponse contains the HTTP response code and headers from the server.
  2066  	googleapi.ServerResponse `json:"-"`
  2067  	// ForceSendFields is a list of field names (e.g. "Exclusions") to
  2068  	// unconditionally include in API requests. By default, fields with empty or
  2069  	// default values are omitted from API requests. See
  2070  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2071  	// details.
  2072  	ForceSendFields []string `json:"-"`
  2073  	// NullFields is a list of field names (e.g. "Exclusions") to include in API
  2074  	// requests with the JSON null value. By default, fields with empty values are
  2075  	// omitted from API requests. See
  2076  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2077  	NullFields []string `json:"-"`
  2078  }
  2079  
  2080  func (s *ListExclusionsResponse) MarshalJSON() ([]byte, error) {
  2081  	type NoMethod ListExclusionsResponse
  2082  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2083  }
  2084  
  2085  // ListLinksResponse: The response from ListLinks.
  2086  type ListLinksResponse struct {
  2087  	// Links: A list of links.
  2088  	Links []*Link `json:"links,omitempty"`
  2089  	// NextPageToken: If there might be more results than those appearing in this
  2090  	// response, then nextPageToken is included. To get the next set of results,
  2091  	// call the same method again using the value of nextPageToken as pageToken.
  2092  	NextPageToken string `json:"nextPageToken,omitempty"`
  2093  
  2094  	// ServerResponse contains the HTTP response code and headers from the server.
  2095  	googleapi.ServerResponse `json:"-"`
  2096  	// ForceSendFields is a list of field names (e.g. "Links") to unconditionally
  2097  	// include in API requests. By default, fields with empty or default values are
  2098  	// omitted from API requests. See
  2099  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2100  	// details.
  2101  	ForceSendFields []string `json:"-"`
  2102  	// NullFields is a list of field names (e.g. "Links") to include in API
  2103  	// requests with the JSON null value. By default, fields with empty values are
  2104  	// omitted from API requests. See
  2105  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2106  	NullFields []string `json:"-"`
  2107  }
  2108  
  2109  func (s *ListLinksResponse) MarshalJSON() ([]byte, error) {
  2110  	type NoMethod ListLinksResponse
  2111  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2112  }
  2113  
  2114  // ListLocationsResponse: The response message for Locations.ListLocations.
  2115  type ListLocationsResponse struct {
  2116  	// Locations: A list of locations that matches the specified filter in the
  2117  	// request.
  2118  	Locations []*Location `json:"locations,omitempty"`
  2119  	// NextPageToken: The standard List next-page token.
  2120  	NextPageToken string `json:"nextPageToken,omitempty"`
  2121  
  2122  	// ServerResponse contains the HTTP response code and headers from the server.
  2123  	googleapi.ServerResponse `json:"-"`
  2124  	// ForceSendFields is a list of field names (e.g. "Locations") to
  2125  	// unconditionally include in API requests. By default, fields with empty or
  2126  	// default values are omitted from API requests. See
  2127  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2128  	// details.
  2129  	ForceSendFields []string `json:"-"`
  2130  	// NullFields is a list of field names (e.g. "Locations") to include in API
  2131  	// requests with the JSON null value. By default, fields with empty values are
  2132  	// omitted from API requests. See
  2133  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2134  	NullFields []string `json:"-"`
  2135  }
  2136  
  2137  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  2138  	type NoMethod ListLocationsResponse
  2139  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2140  }
  2141  
  2142  // ListLogEntriesRequest: The parameters to ListLogEntries.
  2143  type ListLogEntriesRequest struct {
  2144  	// Filter: Optional. A filter that chooses which log entries to return. For
  2145  	// more information, see Logging query language
  2146  	// (https://cloud.google.com/logging/docs/view/logging-query-language).Only log
  2147  	// entries that match the filter are returned. An empty filter matches all log
  2148  	// entries in the resources listed in resource_names. Referencing a parent
  2149  	// resource that is not listed in resource_names will cause the filter to
  2150  	// return no results. The maximum length of a filter is 20,000 characters.To
  2151  	// make queries faster, you can make the filter more selective by using
  2152  	// restrictions on indexed fields
  2153  	// (https://cloud.google.com/logging/docs/view/logging-query-language#indexed-fields)
  2154  	// as well as limit the time range of the query by adding range restrictions on
  2155  	// the timestamp field.
  2156  	Filter string `json:"filter,omitempty"`
  2157  	// OrderBy: Optional. How the results should be sorted. Presently, the only
  2158  	// permitted values are "timestamp asc" (default) and "timestamp desc". The
  2159  	// first option returns entries in order of increasing values of
  2160  	// LogEntry.timestamp (oldest first), and the second option returns entries in
  2161  	// order of decreasing timestamps (newest first). Entries with equal timestamps
  2162  	// are returned in order of their insert_id values.We recommend setting the
  2163  	// order_by field to "timestamp desc" when listing recently ingested log
  2164  	// entries. If not set, the default value of "timestamp asc" may take a long
  2165  	// time to fetch matching logs that are only recently ingested.
  2166  	OrderBy string `json:"orderBy,omitempty"`
  2167  	// PageSize: Optional. The maximum number of results to return from this
  2168  	// request. Default is 50. If the value is negative, the request is
  2169  	// rejected.The presence of next_page_token in the response indicates that more
  2170  	// results might be available.
  2171  	PageSize int64 `json:"pageSize,omitempty"`
  2172  	// PageToken: Optional. If present, then retrieve the next batch of results
  2173  	// from the preceding call to this method. page_token must be the value of
  2174  	// next_page_token from the previous response. The values of other method
  2175  	// parameters should be identical to those in the previous call.
  2176  	PageToken string `json:"pageToken,omitempty"`
  2177  	// ProjectIds: Optional. Deprecated. Use resource_names instead. One or more
  2178  	// project identifiers or project numbers from which to retrieve log entries.
  2179  	// Example: "my-project-1A".
  2180  	ProjectIds []string `json:"projectIds,omitempty"`
  2181  	// ResourceNames: Required. Names of one or more parent resources from which to
  2182  	// retrieve log entries: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID]
  2183  	// billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]May alternatively be
  2184  	// one or more views:
  2185  	// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
  2186  	// _ID]
  2187  	// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
  2188  	// iews/[VIEW_ID]
  2189  	// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
  2190  	// ID]/views/[VIEW_ID]
  2191  	// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
  2192  	// D]Projects listed in the project_ids field are added to this list. A maximum
  2193  	// of 100 resources may be specified in a single request.
  2194  	ResourceNames []string `json:"resourceNames,omitempty"`
  2195  	// ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
  2196  	// include in API requests. By default, fields with empty or default values are
  2197  	// omitted from API requests. See
  2198  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2199  	// details.
  2200  	ForceSendFields []string `json:"-"`
  2201  	// NullFields is a list of field names (e.g. "Filter") to include in API
  2202  	// requests with the JSON null value. By default, fields with empty values are
  2203  	// omitted from API requests. See
  2204  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2205  	NullFields []string `json:"-"`
  2206  }
  2207  
  2208  func (s *ListLogEntriesRequest) MarshalJSON() ([]byte, error) {
  2209  	type NoMethod ListLogEntriesRequest
  2210  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2211  }
  2212  
  2213  // ListLogEntriesResponse: Result returned from ListLogEntries.
  2214  type ListLogEntriesResponse struct {
  2215  	// Entries: A list of log entries. If entries is empty, nextPageToken may still
  2216  	// be returned, indicating that more entries may exist. See nextPageToken for
  2217  	// more information.
  2218  	Entries []*LogEntry `json:"entries,omitempty"`
  2219  	// NextPageToken: If there might be more results than those appearing in this
  2220  	// response, then nextPageToken is included. To get the next set of results,
  2221  	// call this method again using the value of nextPageToken as pageToken.If a
  2222  	// value for next_page_token appears and the entries field is empty, it means
  2223  	// that the search found no log entries so far but it did not have time to
  2224  	// search all the possible log entries. Retry the method with this value for
  2225  	// page_token to continue the search. Alternatively, consider speeding up the
  2226  	// search by changing your filter to specify a single log name or resource
  2227  	// type, or to narrow the time range of the search.
  2228  	NextPageToken string `json:"nextPageToken,omitempty"`
  2229  
  2230  	// ServerResponse contains the HTTP response code and headers from the server.
  2231  	googleapi.ServerResponse `json:"-"`
  2232  	// ForceSendFields is a list of field names (e.g. "Entries") to unconditionally
  2233  	// include in API requests. By default, fields with empty or default values are
  2234  	// omitted from API requests. See
  2235  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2236  	// details.
  2237  	ForceSendFields []string `json:"-"`
  2238  	// NullFields is a list of field names (e.g. "Entries") to include in API
  2239  	// requests with the JSON null value. By default, fields with empty values are
  2240  	// omitted from API requests. See
  2241  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2242  	NullFields []string `json:"-"`
  2243  }
  2244  
  2245  func (s *ListLogEntriesResponse) MarshalJSON() ([]byte, error) {
  2246  	type NoMethod ListLogEntriesResponse
  2247  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2248  }
  2249  
  2250  // ListLogMetricsResponse: Result returned from ListLogMetrics.
  2251  type ListLogMetricsResponse struct {
  2252  	// Metrics: A list of logs-based metrics.
  2253  	Metrics []*LogMetric `json:"metrics,omitempty"`
  2254  	// NextPageToken: If there might be more results than appear in this response,
  2255  	// then nextPageToken is included. To get the next set of results, call this
  2256  	// method again using the value of nextPageToken as pageToken.
  2257  	NextPageToken string `json:"nextPageToken,omitempty"`
  2258  
  2259  	// ServerResponse contains the HTTP response code and headers from the server.
  2260  	googleapi.ServerResponse `json:"-"`
  2261  	// ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally
  2262  	// include in API requests. By default, fields with empty or default values are
  2263  	// omitted from API requests. See
  2264  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2265  	// details.
  2266  	ForceSendFields []string `json:"-"`
  2267  	// NullFields is a list of field names (e.g. "Metrics") to include in API
  2268  	// requests with the JSON null value. By default, fields with empty values are
  2269  	// omitted from API requests. See
  2270  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2271  	NullFields []string `json:"-"`
  2272  }
  2273  
  2274  func (s *ListLogMetricsResponse) MarshalJSON() ([]byte, error) {
  2275  	type NoMethod ListLogMetricsResponse
  2276  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2277  }
  2278  
  2279  // ListLogsResponse: Result returned from ListLogs.
  2280  type ListLogsResponse struct {
  2281  	// LogNames: A list of log names. For example,
  2282  	// "projects/my-project/logs/syslog" or
  2283  	// "organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity".
  2284  	LogNames []string `json:"logNames,omitempty"`
  2285  	// NextPageToken: If there might be more results than those appearing in this
  2286  	// response, then nextPageToken is included. To get the next set of results,
  2287  	// call this method again using the value of nextPageToken as pageToken.
  2288  	NextPageToken string `json:"nextPageToken,omitempty"`
  2289  
  2290  	// ServerResponse contains the HTTP response code and headers from the server.
  2291  	googleapi.ServerResponse `json:"-"`
  2292  	// ForceSendFields is a list of field names (e.g. "LogNames") to
  2293  	// unconditionally include in API requests. By default, fields with empty or
  2294  	// default values are omitted from API requests. See
  2295  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2296  	// details.
  2297  	ForceSendFields []string `json:"-"`
  2298  	// NullFields is a list of field names (e.g. "LogNames") to include in API
  2299  	// requests with the JSON null value. By default, fields with empty values are
  2300  	// omitted from API requests. See
  2301  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2302  	NullFields []string `json:"-"`
  2303  }
  2304  
  2305  func (s *ListLogsResponse) MarshalJSON() ([]byte, error) {
  2306  	type NoMethod ListLogsResponse
  2307  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2308  }
  2309  
  2310  // ListMonitoredResourceDescriptorsResponse: Result returned from
  2311  // ListMonitoredResourceDescriptors.
  2312  type ListMonitoredResourceDescriptorsResponse struct {
  2313  	// NextPageToken: If there might be more results than those appearing in this
  2314  	// response, then nextPageToken is included. To get the next set of results,
  2315  	// call this method again using the value of nextPageToken as pageToken.
  2316  	NextPageToken string `json:"nextPageToken,omitempty"`
  2317  	// ResourceDescriptors: A list of resource descriptors.
  2318  	ResourceDescriptors []*MonitoredResourceDescriptor `json:"resourceDescriptors,omitempty"`
  2319  
  2320  	// ServerResponse contains the HTTP response code and headers from the server.
  2321  	googleapi.ServerResponse `json:"-"`
  2322  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2323  	// unconditionally include in API requests. By default, fields with empty or
  2324  	// default values are omitted from API requests. See
  2325  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2326  	// details.
  2327  	ForceSendFields []string `json:"-"`
  2328  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2329  	// requests with the JSON null value. By default, fields with empty values are
  2330  	// omitted from API requests. See
  2331  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2332  	NullFields []string `json:"-"`
  2333  }
  2334  
  2335  func (s *ListMonitoredResourceDescriptorsResponse) MarshalJSON() ([]byte, error) {
  2336  	type NoMethod ListMonitoredResourceDescriptorsResponse
  2337  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2338  }
  2339  
  2340  // ListOperationsResponse: The response message for Operations.ListOperations.
  2341  type ListOperationsResponse struct {
  2342  	// NextPageToken: The standard List next-page token.
  2343  	NextPageToken string `json:"nextPageToken,omitempty"`
  2344  	// Operations: A list of operations that matches the specified filter in the
  2345  	// request.
  2346  	Operations []*Operation `json:"operations,omitempty"`
  2347  
  2348  	// ServerResponse contains the HTTP response code and headers from the server.
  2349  	googleapi.ServerResponse `json:"-"`
  2350  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2351  	// unconditionally include in API requests. By default, fields with empty or
  2352  	// default values are omitted from API requests. See
  2353  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2354  	// details.
  2355  	ForceSendFields []string `json:"-"`
  2356  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2357  	// requests with the JSON null value. By default, fields with empty values are
  2358  	// omitted from API requests. See
  2359  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2360  	NullFields []string `json:"-"`
  2361  }
  2362  
  2363  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  2364  	type NoMethod ListOperationsResponse
  2365  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2366  }
  2367  
  2368  // ListRecentQueriesResponse: The response from ListRecentQueries.
  2369  type ListRecentQueriesResponse struct {
  2370  	// NextPageToken: If there might be more results than appear in this response,
  2371  	// then nextPageToken is included. To get the next set of results, call the
  2372  	// same method again using the value of nextPageToken as pageToken.
  2373  	NextPageToken string `json:"nextPageToken,omitempty"`
  2374  	// RecentQueries: A list of recent queries.
  2375  	RecentQueries []*RecentQuery `json:"recentQueries,omitempty"`
  2376  	// Unreachable: The unreachable resources. Each resource can be either 1) a
  2377  	// saved query if a specific query is unreachable or 2) a location if a
  2378  	// specific location is unreachable.
  2379  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/recentQueries/[QUERY_ID]"
  2380  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
  2381  	// example:"projects/my-project/locations/global/recentQueries/12345678"
  2382  	// "projects/my-project/locations/global"If there are unreachable resources,
  2383  	// the response will first return pages that contain recent queries, and then
  2384  	// return pages that contain the unreachable resources.
  2385  	Unreachable []string `json:"unreachable,omitempty"`
  2386  
  2387  	// ServerResponse contains the HTTP response code and headers from the server.
  2388  	googleapi.ServerResponse `json:"-"`
  2389  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2390  	// unconditionally include in API requests. By default, fields with empty or
  2391  	// default values are omitted from API requests. See
  2392  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2393  	// details.
  2394  	ForceSendFields []string `json:"-"`
  2395  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2396  	// requests with the JSON null value. By default, fields with empty values are
  2397  	// omitted from API requests. See
  2398  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2399  	NullFields []string `json:"-"`
  2400  }
  2401  
  2402  func (s *ListRecentQueriesResponse) MarshalJSON() ([]byte, error) {
  2403  	type NoMethod ListRecentQueriesResponse
  2404  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2405  }
  2406  
  2407  // ListSavedQueriesResponse: The response from ListSavedQueries.
  2408  type ListSavedQueriesResponse struct {
  2409  	// NextPageToken: If there might be more results than appear in this response,
  2410  	// then nextPageToken is included. To get the next set of results, call the
  2411  	// same method again using the value of nextPageToken as pageToken.
  2412  	NextPageToken string `json:"nextPageToken,omitempty"`
  2413  	// SavedQueries: A list of saved queries.
  2414  	SavedQueries []*SavedQuery `json:"savedQueries,omitempty"`
  2415  	// Unreachable: The unreachable resources. It can be either 1) a saved query if
  2416  	// a specific query is unreachable or 2) a location if a specific location is
  2417  	// unreachabe.
  2418  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]"
  2419  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example:
  2420  	// "projects/my-project/locations/global/savedQueries/12345678"
  2421  	// "projects/my-project/locations/global" If there are unreachable resources,
  2422  	// the response will first return pages that contain saved queries, and then
  2423  	// return pages that contain the unreachable resources.
  2424  	Unreachable []string `json:"unreachable,omitempty"`
  2425  
  2426  	// ServerResponse contains the HTTP response code and headers from the server.
  2427  	googleapi.ServerResponse `json:"-"`
  2428  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2429  	// unconditionally include in API requests. By default, fields with empty or
  2430  	// default values are omitted from API requests. See
  2431  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2432  	// details.
  2433  	ForceSendFields []string `json:"-"`
  2434  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2435  	// requests with the JSON null value. By default, fields with empty values are
  2436  	// omitted from API requests. See
  2437  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2438  	NullFields []string `json:"-"`
  2439  }
  2440  
  2441  func (s *ListSavedQueriesResponse) MarshalJSON() ([]byte, error) {
  2442  	type NoMethod ListSavedQueriesResponse
  2443  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2444  }
  2445  
  2446  // ListSinksResponse: Result returned from ListSinks.
  2447  type ListSinksResponse struct {
  2448  	// NextPageToken: If there might be more results than appear in this response,
  2449  	// then nextPageToken is included. To get the next set of results, call the
  2450  	// same method again using the value of nextPageToken as pageToken.
  2451  	NextPageToken string `json:"nextPageToken,omitempty"`
  2452  	// Sinks: A list of sinks.
  2453  	Sinks []*LogSink `json:"sinks,omitempty"`
  2454  
  2455  	// ServerResponse contains the HTTP response code and headers from the server.
  2456  	googleapi.ServerResponse `json:"-"`
  2457  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2458  	// unconditionally include in API requests. By default, fields with empty or
  2459  	// default values are omitted from API requests. See
  2460  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2461  	// details.
  2462  	ForceSendFields []string `json:"-"`
  2463  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2464  	// requests with the JSON null value. By default, fields with empty values are
  2465  	// omitted from API requests. See
  2466  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2467  	NullFields []string `json:"-"`
  2468  }
  2469  
  2470  func (s *ListSinksResponse) MarshalJSON() ([]byte, error) {
  2471  	type NoMethod ListSinksResponse
  2472  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2473  }
  2474  
  2475  // ListViewsResponse: The response from ListViews.
  2476  type ListViewsResponse struct {
  2477  	// NextPageToken: If there might be more results than appear in this response,
  2478  	// then nextPageToken is included. To get the next set of results, call the
  2479  	// same method again using the value of nextPageToken as pageToken.
  2480  	NextPageToken string `json:"nextPageToken,omitempty"`
  2481  	// Views: A list of views.
  2482  	Views []*LogView `json:"views,omitempty"`
  2483  
  2484  	// ServerResponse contains the HTTP response code and headers from the server.
  2485  	googleapi.ServerResponse `json:"-"`
  2486  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2487  	// unconditionally include in API requests. By default, fields with empty or
  2488  	// default values are omitted from API requests. See
  2489  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2490  	// details.
  2491  	ForceSendFields []string `json:"-"`
  2492  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2493  	// requests with the JSON null value. By default, fields with empty values are
  2494  	// omitted from API requests. See
  2495  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2496  	NullFields []string `json:"-"`
  2497  }
  2498  
  2499  func (s *ListViewsResponse) MarshalJSON() ([]byte, error) {
  2500  	type NoMethod ListViewsResponse
  2501  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2502  }
  2503  
  2504  // Location: A resource that represents a Google Cloud location.
  2505  type Location struct {
  2506  	// DisplayName: The friendly name for this location, typically a nearby city
  2507  	// name. For example, "Tokyo".
  2508  	DisplayName string `json:"displayName,omitempty"`
  2509  	// Labels: Cross-service attributes for the location. For example
  2510  	// {"cloud.googleapis.com/region": "us-east1"}
  2511  	Labels map[string]string `json:"labels,omitempty"`
  2512  	// LocationId: The canonical id for this location. For example: "us-east1".
  2513  	LocationId string `json:"locationId,omitempty"`
  2514  	// Metadata: Service-specific metadata. For example the available capacity at
  2515  	// the given location.
  2516  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2517  	// Name: Resource name for the location, which may vary between
  2518  	// implementations. For example: "projects/example-project/locations/us-east1"
  2519  	Name string `json:"name,omitempty"`
  2520  
  2521  	// ServerResponse contains the HTTP response code and headers from the server.
  2522  	googleapi.ServerResponse `json:"-"`
  2523  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  2524  	// unconditionally include in API requests. By default, fields with empty or
  2525  	// default values are omitted from API requests. See
  2526  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2527  	// details.
  2528  	ForceSendFields []string `json:"-"`
  2529  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  2530  	// requests with the JSON null value. By default, fields with empty values are
  2531  	// omitted from API requests. See
  2532  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2533  	NullFields []string `json:"-"`
  2534  }
  2535  
  2536  func (s *Location) MarshalJSON() ([]byte, error) {
  2537  	type NoMethod Location
  2538  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2539  }
  2540  
  2541  // LocationMetadata: Cloud Logging specific location metadata.
  2542  type LocationMetadata struct {
  2543  	// LogAnalyticsEnabled: Indicates whether or not Log Analytics features are
  2544  	// supported in the given location.
  2545  	LogAnalyticsEnabled bool `json:"logAnalyticsEnabled,omitempty"`
  2546  	// ForceSendFields is a list of field names (e.g. "LogAnalyticsEnabled") to
  2547  	// unconditionally include in API requests. By default, fields with empty or
  2548  	// default values are omitted from API requests. See
  2549  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2550  	// details.
  2551  	ForceSendFields []string `json:"-"`
  2552  	// NullFields is a list of field names (e.g. "LogAnalyticsEnabled") to include
  2553  	// in API requests with the JSON null value. By default, fields with empty
  2554  	// values are omitted from API requests. See
  2555  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2556  	NullFields []string `json:"-"`
  2557  }
  2558  
  2559  func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
  2560  	type NoMethod LocationMetadata
  2561  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2562  }
  2563  
  2564  // LogBucket: Describes a repository in which log entries are stored.
  2565  type LogBucket struct {
  2566  	// AnalyticsEnabled: Whether log analytics is enabled for this bucket.Once
  2567  	// enabled, log analytics features cannot be disabled.
  2568  	AnalyticsEnabled bool `json:"analyticsEnabled,omitempty"`
  2569  	// CmekSettings: Optional. The CMEK settings of the log bucket. If present, new
  2570  	// log entries written to this log bucket are encrypted using the CMEK key
  2571  	// provided in this configuration. If a log bucket has CMEK settings, the CMEK
  2572  	// settings cannot be disabled later by updating the log bucket. Changing the
  2573  	// KMS key is allowed.
  2574  	CmekSettings *CmekSettings `json:"cmekSettings,omitempty"`
  2575  	// CreateTime: Output only. The creation timestamp of the bucket. This is not
  2576  	// set for any of the default buckets.
  2577  	CreateTime string `json:"createTime,omitempty"`
  2578  	// Description: Optional. Describes this bucket.
  2579  	Description string `json:"description,omitempty"`
  2580  	// IndexConfigs: Optional. A list of indexed fields and related configuration
  2581  	// data.
  2582  	IndexConfigs []*IndexConfig `json:"indexConfigs,omitempty"`
  2583  	// LifecycleState: Output only. The bucket lifecycle state.
  2584  	//
  2585  	// Possible values:
  2586  	//   "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified state. This is only
  2587  	// used/useful for distinguishing unset values.
  2588  	//   "ACTIVE" - The normal and active state.
  2589  	//   "DELETE_REQUESTED" - The resource has been marked for deletion by the
  2590  	// user. For some resources (e.g. buckets), this can be reversed by an
  2591  	// un-delete operation.
  2592  	//   "UPDATING" - The resource has been marked for an update by the user. It
  2593  	// will remain in this state until the update is complete.
  2594  	//   "CREATING" - The resource has been marked for creation by the user. It
  2595  	// will remain in this state until the creation is complete.
  2596  	//   "FAILED" - The resource is in an INTERNAL error state.
  2597  	LifecycleState string `json:"lifecycleState,omitempty"`
  2598  	// Locked: Optional. Whether the bucket is locked.The retention period on a
  2599  	// locked bucket cannot be changed. Locked buckets may only be deleted if they
  2600  	// are empty.
  2601  	Locked bool `json:"locked,omitempty"`
  2602  	// Name: Output only. The resource name of the bucket.For
  2603  	// example:projects/my-project/locations/global/buckets/my-bucketFor a list of
  2604  	// supported locations, see Supported Regions
  2605  	// (https://cloud.google.com/logging/docs/region-support)For the location of
  2606  	// global it is unspecified where log entries are actually stored.After a
  2607  	// bucket has been created, the location cannot be changed.
  2608  	Name string `json:"name,omitempty"`
  2609  	// RestrictedFields: Optional. Log entry field paths that are denied access in
  2610  	// this bucket.The following fields and their children are eligible:
  2611  	// textPayload, jsonPayload, protoPayload, httpRequest, labels,
  2612  	// sourceLocation.Restricting a repeated field will restrict all values. Adding
  2613  	// a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz)
  2614  	RestrictedFields []string `json:"restrictedFields,omitempty"`
  2615  	// RetentionDays: Optional. Logs will be retained by default for this amount of
  2616  	// time, after which they will automatically be deleted. The minimum retention
  2617  	// period is 1 day. If this value is set to zero at bucket creation time, the
  2618  	// default time of 30 days will be used.
  2619  	RetentionDays int64 `json:"retentionDays,omitempty"`
  2620  	// UpdateTime: Output only. The last update timestamp of the bucket.
  2621  	UpdateTime string `json:"updateTime,omitempty"`
  2622  
  2623  	// ServerResponse contains the HTTP response code and headers from the server.
  2624  	googleapi.ServerResponse `json:"-"`
  2625  	// ForceSendFields is a list of field names (e.g. "AnalyticsEnabled") to
  2626  	// unconditionally include in API requests. By default, fields with empty or
  2627  	// default values are omitted from API requests. See
  2628  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2629  	// details.
  2630  	ForceSendFields []string `json:"-"`
  2631  	// NullFields is a list of field names (e.g. "AnalyticsEnabled") to include in
  2632  	// API requests with the JSON null value. By default, fields with empty values
  2633  	// are omitted from API requests. See
  2634  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2635  	NullFields []string `json:"-"`
  2636  }
  2637  
  2638  func (s *LogBucket) MarshalJSON() ([]byte, error) {
  2639  	type NoMethod LogBucket
  2640  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2641  }
  2642  
  2643  // LogEntry: An individual entry in a log.
  2644  type LogEntry struct {
  2645  	// ErrorGroups: Output only. The Error Reporting
  2646  	// (https://cloud.google.com/error-reporting) error groups associated with this
  2647  	// LogEntry. Error Reporting sets the values for this field during error group
  2648  	// creation.For more information, see View error details(
  2649  	// https://cloud.google.com/error-reporting/docs/viewing-errors#view_error_details)This
  2650  	// field isn't available during log routing
  2651  	// (https://cloud.google.com/logging/docs/routing/overview)
  2652  	ErrorGroups []*LogErrorGroup `json:"errorGroups,omitempty"`
  2653  	// HttpRequest: Optional. Information about the HTTP request associated with
  2654  	// this log entry, if applicable.
  2655  	HttpRequest *HttpRequest `json:"httpRequest,omitempty"`
  2656  	// InsertId: Optional. A unique identifier for the log entry. If you provide a
  2657  	// value, then Logging considers other log entries in the same project, with
  2658  	// the same timestamp, and with the same insert_id to be duplicates which are
  2659  	// removed in a single query result. However, there are no guarantees of
  2660  	// de-duplication in the export of logs.If the insert_id is omitted when
  2661  	// writing a log entry, the Logging API assigns its own unique identifier in
  2662  	// this field.In queries, the insert_id is also used to order log entries that
  2663  	// have the same log_name and timestamp values.
  2664  	InsertId string `json:"insertId,omitempty"`
  2665  	// JsonPayload: The log entry payload, represented as a structure that is
  2666  	// expressed as a JSON object.
  2667  	JsonPayload googleapi.RawMessage `json:"jsonPayload,omitempty"`
  2668  	// Labels: Optional. A map of key, value pairs that provides additional
  2669  	// information about the log entry. The labels can be user-defined or
  2670  	// system-defined.User-defined labels are arbitrary key, value pairs that you
  2671  	// can use to classify logs.System-defined labels are defined by GCP services
  2672  	// for platform logs. They have two components - a service namespace component
  2673  	// and the attribute name. For example:
  2674  	// compute.googleapis.com/resource_name.Cloud Logging truncates label keys that
  2675  	// exceed 512 B and label values that exceed 64 KB upon their associated log
  2676  	// entry being written. The truncation is indicated by an ellipsis at the end
  2677  	// of the character string.
  2678  	Labels map[string]string `json:"labels,omitempty"`
  2679  	// LogName: Required. The resource name of the log to which this log entry
  2680  	// belongs: "projects/[PROJECT_ID]/logs/[LOG_ID]"
  2681  	// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
  2682  	// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
  2683  	// "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may be used in place of
  2684  	// PROJECT_ID. The project number is translated to its corresponding PROJECT_ID
  2685  	// internally and the log_name field will contain PROJECT_ID in queries and
  2686  	// exports.[LOG_ID] must be URL-encoded within log_name. Example:
  2687  	// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity
  2688  	// ".[LOG_ID] must be less than 512 characters long and can only include the
  2689  	// following characters: upper and lower case alphanumeric characters,
  2690  	// forward-slash, underscore, hyphen, and period.For backward compatibility, if
  2691  	// log_name begins with a forward-slash, such as /projects/..., then the log
  2692  	// entry is processed as usual, but the forward-slash is removed. Listing the
  2693  	// log entry will not show the leading slash and filtering for a log name with
  2694  	// a leading slash will never return any results.
  2695  	LogName string `json:"logName,omitempty"`
  2696  	// Metadata: Output only. Deprecated. This field is not used by Logging. Any
  2697  	// value written to it is cleared.
  2698  	Metadata *MonitoredResourceMetadata `json:"metadata,omitempty"`
  2699  	// Operation: Optional. Information about an operation associated with the log
  2700  	// entry, if applicable.
  2701  	Operation *LogEntryOperation `json:"operation,omitempty"`
  2702  	// ProtoPayload: The log entry payload, represented as a protocol buffer. Some
  2703  	// Google Cloud Platform services use this field for their log entry
  2704  	// payloads.The following protocol buffer types are supported; user-defined
  2705  	// types are not supported:"type.googleapis.com/google.cloud.audit.AuditLog"
  2706  	// "type.googleapis.com/google.appengine.logging.v1.RequestLog"
  2707  	ProtoPayload googleapi.RawMessage `json:"protoPayload,omitempty"`
  2708  	// ReceiveTimestamp: Output only. The time the log entry was received by
  2709  	// Logging.
  2710  	ReceiveTimestamp string `json:"receiveTimestamp,omitempty"`
  2711  	// Resource: Required. The monitored resource that produced this log
  2712  	// entry.Example: a log entry that reports a database error would be associated
  2713  	// with the monitored resource designating the particular database that
  2714  	// reported the error.
  2715  	Resource *MonitoredResource `json:"resource,omitempty"`
  2716  	// Severity: Optional. The severity of the log entry. The default value is
  2717  	// LogSeverity.DEFAULT.
  2718  	//
  2719  	// Possible values:
  2720  	//   "DEFAULT" - (0) The log entry has no assigned severity level.
  2721  	//   "DEBUG" - (100) Debug or trace information.
  2722  	//   "INFO" - (200) Routine information, such as ongoing status or performance.
  2723  	//   "NOTICE" - (300) Normal but significant events, such as start up, shut
  2724  	// down, or a configuration change.
  2725  	//   "WARNING" - (400) Warning events might cause problems.
  2726  	//   "ERROR" - (500) Error events are likely to cause problems.
  2727  	//   "CRITICAL" - (600) Critical events cause more severe problems or outages.
  2728  	//   "ALERT" - (700) A person must take an action immediately.
  2729  	//   "EMERGENCY" - (800) One or more systems are unusable.
  2730  	Severity string `json:"severity,omitempty"`
  2731  	// SourceLocation: Optional. Source code location information associated with
  2732  	// the log entry, if any.
  2733  	SourceLocation *LogEntrySourceLocation `json:"sourceLocation,omitempty"`
  2734  	// SpanId: Optional. The ID of the Cloud Trace (https://cloud.google.com/trace)
  2735  	// span associated with the current operation in which the log is being
  2736  	// written. For example, if a span has the REST resource name of
  2737  	// "projects/some-project/traces/some-trace/spans/some-span-id", then the
  2738  	// span_id field is "some-span-id".A Span
  2739  	// (https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span)
  2740  	// represents a single operation within a trace. Whereas a trace may involve
  2741  	// multiple different microservices running on multiple different machines, a
  2742  	// span generally corresponds to a single logical operation being performed in
  2743  	// a single instance of a microservice on one specific machine. Spans are the
  2744  	// nodes within the tree that is a trace.Applications that are instrumented for
  2745  	// tracing (https://cloud.google.com/trace/docs/setup) will generally assign a
  2746  	// new, unique span ID on each incoming request. It is also common to create
  2747  	// and record additional spans corresponding to internal processing elements as
  2748  	// well as issuing requests to dependencies.The span ID is expected to be a
  2749  	// 16-character, hexadecimal encoding of an 8-byte array and should not be
  2750  	// zero. It should be unique within the trace and should, ideally, be generated
  2751  	// in a manner that is uniformly random.Example values: 000000000000004a
  2752  	// 7a2190356c3fc94b 0000f00300090021 d39223e101960076
  2753  	SpanId string `json:"spanId,omitempty"`
  2754  	// Split: Optional. Information indicating this LogEntry is part of a sequence
  2755  	// of multiple log entries split from a single LogEntry.
  2756  	Split *LogSplit `json:"split,omitempty"`
  2757  	// TextPayload: The log entry payload, represented as a Unicode string (UTF-8).
  2758  	TextPayload string `json:"textPayload,omitempty"`
  2759  	// Timestamp: Optional. The time the event described by the log entry occurred.
  2760  	// This time is used to compute the log entry's age and to enforce the logs
  2761  	// retention period. If this field is omitted in a new log entry, then Logging
  2762  	// assigns it the current time. Timestamps have nanosecond accuracy, but
  2763  	// trailing zeros in the fractional seconds might be omitted when the timestamp
  2764  	// is displayed.Incoming log entries must have timestamps that don't exceed the
  2765  	// logs retention period
  2766  	// (https://cloud.google.com/logging/quotas#logs_retention_periods) in the
  2767  	// past, and that don't exceed 24 hours in the future. Log entries outside
  2768  	// those time boundaries are rejected by Logging.
  2769  	Timestamp string `json:"timestamp,omitempty"`
  2770  	// Trace: Optional. The REST resource name of the trace being written to Cloud
  2771  	// Trace (https://cloud.google.com/trace) in association with this log entry.
  2772  	// For example, if your trace data is stored in the Cloud project
  2773  	// "my-trace-project" and if the service that is creating the log entry
  2774  	// receives a trace header that includes the trace ID "12345", then the service
  2775  	// should use "projects/my-trace-project/traces/12345".The trace field provides
  2776  	// the link between logs and traces. By using this field, you can navigate from
  2777  	// a log entry to a trace.
  2778  	Trace string `json:"trace,omitempty"`
  2779  	// TraceSampled: Optional. The sampling decision of the span associated with
  2780  	// the log entry at the time the log entry was created. This field corresponds
  2781  	// to the sampled flag in the W3C trace-context specification
  2782  	// (https://www.w3.org/TR/trace-context/#sampled-flag). A non-sampled trace
  2783  	// value is still useful as a request correlation identifier. The default is
  2784  	// False.
  2785  	TraceSampled bool `json:"traceSampled,omitempty"`
  2786  	// ForceSendFields is a list of field names (e.g. "ErrorGroups") to
  2787  	// unconditionally include in API requests. By default, fields with empty or
  2788  	// default values are omitted from API requests. See
  2789  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2790  	// details.
  2791  	ForceSendFields []string `json:"-"`
  2792  	// NullFields is a list of field names (e.g. "ErrorGroups") to include in API
  2793  	// requests with the JSON null value. By default, fields with empty values are
  2794  	// omitted from API requests. See
  2795  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2796  	NullFields []string `json:"-"`
  2797  }
  2798  
  2799  func (s *LogEntry) MarshalJSON() ([]byte, error) {
  2800  	type NoMethod LogEntry
  2801  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2802  }
  2803  
  2804  // LogEntryOperation: Additional information about a potentially long-running
  2805  // operation with which a log entry is associated.
  2806  type LogEntryOperation struct {
  2807  	// First: Optional. Set this to True if this is the first log entry in the
  2808  	// operation.
  2809  	First bool `json:"first,omitempty"`
  2810  	// Id: Optional. An arbitrary operation identifier. Log entries with the same
  2811  	// identifier are assumed to be part of the same operation.
  2812  	Id string `json:"id,omitempty"`
  2813  	// Last: Optional. Set this to True if this is the last log entry in the
  2814  	// operation.
  2815  	Last bool `json:"last,omitempty"`
  2816  	// Producer: Optional. An arbitrary producer identifier. The combination of id
  2817  	// and producer must be globally unique. Examples for producer:
  2818  	// "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication".
  2819  	Producer string `json:"producer,omitempty"`
  2820  	// ForceSendFields is a list of field names (e.g. "First") to unconditionally
  2821  	// include in API requests. By default, fields with empty or default values are
  2822  	// omitted from API requests. See
  2823  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2824  	// details.
  2825  	ForceSendFields []string `json:"-"`
  2826  	// NullFields is a list of field names (e.g. "First") to include in API
  2827  	// requests with the JSON null value. By default, fields with empty values are
  2828  	// omitted from API requests. See
  2829  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2830  	NullFields []string `json:"-"`
  2831  }
  2832  
  2833  func (s *LogEntryOperation) MarshalJSON() ([]byte, error) {
  2834  	type NoMethod LogEntryOperation
  2835  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2836  }
  2837  
  2838  // LogEntrySourceLocation: Additional information about the source code
  2839  // location that produced the log entry.
  2840  type LogEntrySourceLocation struct {
  2841  	// File: Optional. Source file name. Depending on the runtime environment, this
  2842  	// might be a simple name or a fully-qualified name.
  2843  	File string `json:"file,omitempty"`
  2844  	// Function: Optional. Human-readable name of the function or method being
  2845  	// invoked, with optional context such as the class or package name. This
  2846  	// information may be used in contexts such as the logs viewer, where a file
  2847  	// and line number are less meaningful. The format can vary by language. For
  2848  	// example: qual.if.ied.Class.method (Java), dir/package.func (Go), function
  2849  	// (Python).
  2850  	Function string `json:"function,omitempty"`
  2851  	// Line: Optional. Line within the source file. 1-based; 0 indicates no line
  2852  	// number available.
  2853  	Line int64 `json:"line,omitempty,string"`
  2854  	// ForceSendFields is a list of field names (e.g. "File") to unconditionally
  2855  	// include in API requests. By default, fields with empty or default values are
  2856  	// omitted from API requests. See
  2857  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2858  	// details.
  2859  	ForceSendFields []string `json:"-"`
  2860  	// NullFields is a list of field names (e.g. "File") to include in API requests
  2861  	// with the JSON null value. By default, fields with empty values are omitted
  2862  	// from API requests. See
  2863  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2864  	NullFields []string `json:"-"`
  2865  }
  2866  
  2867  func (s *LogEntrySourceLocation) MarshalJSON() ([]byte, error) {
  2868  	type NoMethod LogEntrySourceLocation
  2869  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2870  }
  2871  
  2872  // LogErrorGroup: Contains metadata that associates the LogEntry to Error
  2873  // Reporting error groups.
  2874  type LogErrorGroup struct {
  2875  	// Id: The id is a unique identifier for a particular error group; it is the
  2876  	// last part of the error group resource name:
  2877  	// /project/[PROJECT_ID]/errors/[ERROR_GROUP_ID]. Example: COShysOX0r_51QE. The
  2878  	// id is derived from key parts of the error-log content and is treated as
  2879  	// Service Data. For information about how Service Data is handled, see Google
  2880  	// Cloud Privacy Notice (https://cloud.google.com/terms/cloud-privacy-notice).
  2881  	Id string `json:"id,omitempty"`
  2882  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  2883  	// include in API requests. By default, fields with empty or default values are
  2884  	// omitted from API requests. See
  2885  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2886  	// details.
  2887  	ForceSendFields []string `json:"-"`
  2888  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  2889  	// with the JSON null value. By default, fields with empty values are omitted
  2890  	// from API requests. See
  2891  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2892  	NullFields []string `json:"-"`
  2893  }
  2894  
  2895  func (s *LogErrorGroup) MarshalJSON() ([]byte, error) {
  2896  	type NoMethod LogErrorGroup
  2897  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2898  }
  2899  
  2900  // LogExclusion: Specifies a set of log entries that are filtered out by a
  2901  // sink. If your Google Cloud resource receives a large volume of log entries,
  2902  // you can use exclusions to reduce your chargeable logs. Note that exclusions
  2903  // on organization-level and folder-level sinks don't apply to child resources.
  2904  // Note also that you cannot modify the _Required sink or exclude logs from it.
  2905  type LogExclusion struct {
  2906  	// CreateTime: Output only. The creation timestamp of the exclusion.This field
  2907  	// may not be present for older exclusions.
  2908  	CreateTime string `json:"createTime,omitempty"`
  2909  	// Description: Optional. A description of this exclusion.
  2910  	Description string `json:"description,omitempty"`
  2911  	// Disabled: Optional. If set to True, then this exclusion is disabled and it
  2912  	// does not exclude any log entries. You can update an exclusion to change the
  2913  	// value of this field.
  2914  	Disabled bool `json:"disabled,omitempty"`
  2915  	// Filter: Required. An advanced logs filter
  2916  	// (https://cloud.google.com/logging/docs/view/advanced-queries) that matches
  2917  	// the log entries to be excluded. By using the sample function
  2918  	// (https://cloud.google.com/logging/docs/view/advanced-queries#sample), you
  2919  	// can exclude less than 100% of the matching log entries.For example, the
  2920  	// following query matches 99% of low-severity log entries from Google Cloud
  2921  	// Storage buckets:resource.type=gcs_bucket severity<ERROR sample(insertId,
  2922  	// 0.99)
  2923  	Filter string `json:"filter,omitempty"`
  2924  	// Name: Output only. A client-assigned identifier, such as
  2925  	// "load-balancer-exclusion". Identifiers are limited to 100 characters and can
  2926  	// include only letters, digits, underscores, hyphens, and periods. First
  2927  	// character has to be alphanumeric.
  2928  	Name string `json:"name,omitempty"`
  2929  	// UpdateTime: Output only. The last update timestamp of the exclusion.This
  2930  	// field may not be present for older exclusions.
  2931  	UpdateTime string `json:"updateTime,omitempty"`
  2932  
  2933  	// ServerResponse contains the HTTP response code and headers from the server.
  2934  	googleapi.ServerResponse `json:"-"`
  2935  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2936  	// unconditionally include in API requests. By default, fields with empty or
  2937  	// default values are omitted from API requests. See
  2938  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2939  	// details.
  2940  	ForceSendFields []string `json:"-"`
  2941  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2942  	// requests with the JSON null value. By default, fields with empty values are
  2943  	// omitted from API requests. See
  2944  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2945  	NullFields []string `json:"-"`
  2946  }
  2947  
  2948  func (s *LogExclusion) MarshalJSON() ([]byte, error) {
  2949  	type NoMethod LogExclusion
  2950  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2951  }
  2952  
  2953  // LogLine: Application log line emitted while processing a request.
  2954  type LogLine struct {
  2955  	// LogMessage: App-provided log message.
  2956  	LogMessage string `json:"logMessage,omitempty"`
  2957  	// Severity: Severity of this log entry.
  2958  	//
  2959  	// Possible values:
  2960  	//   "DEFAULT" - (0) The log entry has no assigned severity level.
  2961  	//   "DEBUG" - (100) Debug or trace information.
  2962  	//   "INFO" - (200) Routine information, such as ongoing status or performance.
  2963  	//   "NOTICE" - (300) Normal but significant events, such as start up, shut
  2964  	// down, or a configuration change.
  2965  	//   "WARNING" - (400) Warning events might cause problems.
  2966  	//   "ERROR" - (500) Error events are likely to cause problems.
  2967  	//   "CRITICAL" - (600) Critical events cause more severe problems or outages.
  2968  	//   "ALERT" - (700) A person must take an action immediately.
  2969  	//   "EMERGENCY" - (800) One or more systems are unusable.
  2970  	Severity string `json:"severity,omitempty"`
  2971  	// SourceLocation: Where in the source code this log message was written.
  2972  	SourceLocation *SourceLocation `json:"sourceLocation,omitempty"`
  2973  	// Time: Approximate time when this log entry was made.
  2974  	Time string `json:"time,omitempty"`
  2975  	// ForceSendFields is a list of field names (e.g. "LogMessage") to
  2976  	// unconditionally include in API requests. By default, fields with empty or
  2977  	// default values are omitted from API requests. See
  2978  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2979  	// details.
  2980  	ForceSendFields []string `json:"-"`
  2981  	// NullFields is a list of field names (e.g. "LogMessage") to include in API
  2982  	// requests with the JSON null value. By default, fields with empty values are
  2983  	// omitted from API requests. See
  2984  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2985  	NullFields []string `json:"-"`
  2986  }
  2987  
  2988  func (s *LogLine) MarshalJSON() ([]byte, error) {
  2989  	type NoMethod LogLine
  2990  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2991  }
  2992  
  2993  // LogMetric: Describes a logs-based metric. The value of the metric is the
  2994  // number of log entries that match a logs filter in a given time
  2995  // interval.Logs-based metrics can also be used to extract values from logs and
  2996  // create a distribution of the values. The distribution records the statistics
  2997  // of the extracted values along with an optional histogram of the values as
  2998  // specified by the bucket options.
  2999  type LogMetric struct {
  3000  	// BucketName: Optional. The resource name of the Log Bucket that owns the Log
  3001  	// Metric. Only Log Buckets in projects are supported. The bucket has to be in
  3002  	// the same project as the metric.For
  3003  	// example:projects/my-project/locations/global/buckets/my-bucketIf empty, then
  3004  	// the Log Metric is considered a non-Bucket Log Metric.
  3005  	BucketName string `json:"bucketName,omitempty"`
  3006  	// BucketOptions: Optional. The bucket_options are required when the logs-based
  3007  	// metric is using a DISTRIBUTION value type and it describes the bucket
  3008  	// boundaries used to create a histogram of the extracted values.
  3009  	BucketOptions *BucketOptions `json:"bucketOptions,omitempty"`
  3010  	// CreateTime: Output only. The creation timestamp of the metric.This field may
  3011  	// not be present for older metrics.
  3012  	CreateTime string `json:"createTime,omitempty"`
  3013  	// Description: Optional. A description of this metric, which is used in
  3014  	// documentation. The maximum length of the description is 8000 characters.
  3015  	Description string `json:"description,omitempty"`
  3016  	// Disabled: Optional. If set to True, then this metric is disabled and it does
  3017  	// not generate any points.
  3018  	Disabled bool `json:"disabled,omitempty"`
  3019  	// Filter: Required. An advanced logs filter
  3020  	// (https://cloud.google.com/logging/docs/view/advanced_filters) which is used
  3021  	// to match log entries. Example: "resource.type=gae_app AND severity>=ERROR"
  3022  	// The maximum length of the filter is 20000 characters.
  3023  	Filter string `json:"filter,omitempty"`
  3024  	// LabelExtractors: Optional. A map from a label key string to an extractor
  3025  	// expression which is used to extract data from a log entry field and assign
  3026  	// as the label value. Each label key specified in the LabelDescriptor must
  3027  	// have an associated extractor expression in this map. The syntax of the
  3028  	// extractor expression is the same as for the value_extractor field.The
  3029  	// extracted value is converted to the type defined in the label descriptor. If
  3030  	// either the extraction or the type conversion fails, the label will have a
  3031  	// default value. The default value for a string label is an empty string, for
  3032  	// an integer label its 0, and for a boolean label its false.Note that there
  3033  	// are upper bounds on the maximum number of labels and the number of active
  3034  	// time series that are allowed in a project.
  3035  	LabelExtractors map[string]string `json:"labelExtractors,omitempty"`
  3036  	// MetricDescriptor: Optional. The metric descriptor associated with the
  3037  	// logs-based metric. If unspecified, it uses a default metric descriptor with
  3038  	// a DELTA metric kind, INT64 value type, with no labels and a unit of "1".
  3039  	// Such a metric counts the number of log entries matching the filter
  3040  	// expression.The name, type, and description fields in the metric_descriptor
  3041  	// are output only, and is constructed using the name and description field in
  3042  	// the LogMetric.To create a logs-based metric that records a distribution of
  3043  	// log values, a DELTA metric kind with a DISTRIBUTION value type must be used
  3044  	// along with a value_extractor expression in the LogMetric.Each label in the
  3045  	// metric descriptor must have a matching label name as the key and an
  3046  	// extractor expression as the value in the label_extractors map.The
  3047  	// metric_kind and value_type fields in the metric_descriptor cannot be updated
  3048  	// once initially configured. New labels can be added in the metric_descriptor,
  3049  	// but existing labels cannot be modified except for their description.
  3050  	MetricDescriptor *MetricDescriptor `json:"metricDescriptor,omitempty"`
  3051  	// Name: Required. The client-assigned metric identifier. Examples:
  3052  	// "error_count", "nginx/requests".Metric identifiers are limited to 100
  3053  	// characters and can include only the following characters: A-Z, a-z, 0-9, and
  3054  	// the special characters _-.,+!*',()%/. The forward-slash character (/)
  3055  	// denotes a hierarchy of name pieces, and it cannot be the first character of
  3056  	// the name.This field is the [METRIC_ID] part of a metric resource name in the
  3057  	// format "projects/PROJECT_ID/metrics/METRIC_ID". Example: If the resource
  3058  	// name of a metric is "projects/my-project/metrics/nginx%2Frequests", this
  3059  	// field's value is "nginx/requests".
  3060  	Name string `json:"name,omitempty"`
  3061  	// ResourceName: Output only. The resource name of the metric:
  3062  	// "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
  3063  	ResourceName string `json:"resourceName,omitempty"`
  3064  	// UpdateTime: Output only. The last update timestamp of the metric.This field
  3065  	// may not be present for older metrics.
  3066  	UpdateTime string `json:"updateTime,omitempty"`
  3067  	// ValueExtractor: Optional. A value_extractor is required when using a
  3068  	// distribution logs-based metric to extract the values to record from a log
  3069  	// entry. Two functions are supported for value extraction: EXTRACT(field) or
  3070  	// REGEXP_EXTRACT(field, regex). The arguments are: field: The name of the log
  3071  	// entry field from which the value is to be extracted. regex: A regular
  3072  	// expression using the Google RE2 syntax
  3073  	// (https://github.com/google/re2/wiki/Syntax) with a single capture group to
  3074  	// extract data from the specified log entry field. The value of the field is
  3075  	// converted to a string before applying the regex. It is an error to specify a
  3076  	// regex that does not include exactly one capture group.The result of the
  3077  	// extraction must be convertible to a double type, as the distribution always
  3078  	// records double values. If either the extraction or the conversion to double
  3079  	// fails, then those values are not recorded in the distribution.Example:
  3080  	// REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")
  3081  	ValueExtractor string `json:"valueExtractor,omitempty"`
  3082  	// Version: Deprecated. The API version that created or updated this metric.
  3083  	// The v2 format is used by default and cannot be changed.
  3084  	//
  3085  	// Possible values:
  3086  	//   "V2" - Logging API v2.
  3087  	//   "V1" - Logging API v1.
  3088  	Version string `json:"version,omitempty"`
  3089  
  3090  	// ServerResponse contains the HTTP response code and headers from the server.
  3091  	googleapi.ServerResponse `json:"-"`
  3092  	// ForceSendFields is a list of field names (e.g. "BucketName") to
  3093  	// unconditionally include in API requests. By default, fields with empty or
  3094  	// default values are omitted from API requests. See
  3095  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3096  	// details.
  3097  	ForceSendFields []string `json:"-"`
  3098  	// NullFields is a list of field names (e.g. "BucketName") to include in API
  3099  	// requests with the JSON null value. By default, fields with empty values are
  3100  	// omitted from API requests. See
  3101  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3102  	NullFields []string `json:"-"`
  3103  }
  3104  
  3105  func (s *LogMetric) MarshalJSON() ([]byte, error) {
  3106  	type NoMethod LogMetric
  3107  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3108  }
  3109  
  3110  // LogSink: Describes a sink used to export log entries to one of the following
  3111  // destinations: a Cloud Logging log bucket, a Cloud Storage bucket, a BigQuery
  3112  // dataset, a Pub/Sub topic, a Cloud project.A logs filter controls which log
  3113  // entries are exported. The sink must be created within a project,
  3114  // organization, billing account, or folder.
  3115  type LogSink struct {
  3116  	// BigqueryOptions: Optional. Options that affect sinks exporting data to
  3117  	// BigQuery.
  3118  	BigqueryOptions *BigQueryOptions `json:"bigqueryOptions,omitempty"`
  3119  	// CreateTime: Output only. The creation timestamp of the sink.This field may
  3120  	// not be present for older sinks.
  3121  	CreateTime string `json:"createTime,omitempty"`
  3122  	// Description: Optional. A description of this sink.The maximum length of the
  3123  	// description is 8000 characters.
  3124  	Description string `json:"description,omitempty"`
  3125  	// Destination: Required. The export destination:
  3126  	// "storage.googleapis.com/[GCS_BUCKET]"
  3127  	// "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
  3128  	// "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
  3129  	// "logging.googleapis.com/projects/[PROJECT_ID]"
  3130  	// "logging.googleapis.com/projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets
  3131  	// /[BUCKET_ID]" The sink's writer_identity, set when the sink is created, must
  3132  	// have permission to write to the destination or else the log entries are not
  3133  	// exported. For more information, see Exporting Logs with Sinks
  3134  	// (https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
  3135  	Destination string `json:"destination,omitempty"`
  3136  	// Disabled: Optional. If set to true, then this sink is disabled and it does
  3137  	// not export any log entries.
  3138  	Disabled bool `json:"disabled,omitempty"`
  3139  	// Exclusions: Optional. Log entries that match any of these exclusion filters
  3140  	// will not be exported.If a log entry is matched by both filter and one of
  3141  	// exclusion_filters it will not be exported.
  3142  	Exclusions []*LogExclusion `json:"exclusions,omitempty"`
  3143  	// Filter: Optional. An advanced logs filter
  3144  	// (https://cloud.google.com/logging/docs/view/advanced-queries). The only
  3145  	// exported log entries are those that are in the resource owning the sink and
  3146  	// that match the filter.For
  3147  	// example:logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
  3148  	Filter string `json:"filter,omitempty"`
  3149  	// IncludeChildren: Optional. This field applies only to sinks owned by
  3150  	// organizations and folders. If the field is false, the default, only the logs
  3151  	// owned by the sink's parent resource are available for export. If the field
  3152  	// is true, then log entries from all the projects, folders, and billing
  3153  	// accounts contained in the sink's parent resource are also available for
  3154  	// export. Whether a particular log entry from the children is exported depends
  3155  	// on the sink's filter expression.For example, if this field is true, then the
  3156  	// filter resource.type=gce_instance would export all Compute Engine VM
  3157  	// instance log entries from all projects in the sink's parent.To only export
  3158  	// entries from certain child projects, filter on the project part of the log
  3159  	// name:logName:("projects/test-project1/" OR "projects/test-project2/") AND
  3160  	// resource.type=gce_instance
  3161  	IncludeChildren bool `json:"includeChildren,omitempty"`
  3162  	// InterceptChildren: Optional. This field applies only to sinks owned by
  3163  	// organizations and folders.When the value of 'intercept_children' is true,
  3164  	// the following restrictions apply: The sink must have the include_children
  3165  	// flag set to true. The sink destination must be a Cloud project.Also, the
  3166  	// following behaviors apply: Any logs matched by the sink won't be included by
  3167  	// non-_Required sinks owned by child resources. The sink appears in the
  3168  	// results of a ListSinks call from a child resource if the value of the filter
  3169  	// field in its request is either 'in_scope("ALL")' or 'in_scope("ANCESTOR")'.
  3170  	InterceptChildren bool `json:"interceptChildren,omitempty"`
  3171  	// Name: Output only. The client-assigned sink identifier, unique within the
  3172  	// project.For example: "my-syslog-errors-to-pubsub".Sink identifiers are
  3173  	// limited to 100 characters and can include only the following characters:
  3174  	// upper and lower-case alphanumeric characters, underscores, hyphens,
  3175  	// periods.First character has to be alphanumeric.
  3176  	Name string `json:"name,omitempty"`
  3177  	// OutputVersionFormat: Deprecated. This field is unused.
  3178  	//
  3179  	// Possible values:
  3180  	//   "VERSION_FORMAT_UNSPECIFIED" - An unspecified format version that will
  3181  	// default to V2.
  3182  	//   "V2" - LogEntry version 2 format.
  3183  	//   "V1" - LogEntry version 1 format.
  3184  	OutputVersionFormat string `json:"outputVersionFormat,omitempty"`
  3185  	// ResourceName: Output only. The resource name of the sink.
  3186  	// "projects/[PROJECT_ID]/sinks/[SINK_NAME]
  3187  	// "organizations/[ORGANIZATION_ID]/sinks/[SINK_NAME]
  3188  	// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_NAME]
  3189  	// "folders/[FOLDER_ID]/sinks/[SINK_NAME] For example:
  3190  	// projects/my_project/sinks/SINK_NAME
  3191  	ResourceName string `json:"resourceName,omitempty"`
  3192  	// UpdateTime: Output only. The last update timestamp of the sink.This field
  3193  	// may not be present for older sinks.
  3194  	UpdateTime string `json:"updateTime,omitempty"`
  3195  	// WriterIdentity: Output only. An IAM identity—a service account or
  3196  	// group—under which Cloud Logging writes the exported log entries to the
  3197  	// sink's destination. This field is either set by specifying
  3198  	// custom_writer_identity or set automatically by sinks.create and sinks.update
  3199  	// based on the value of unique_writer_identity in those methods.Until you
  3200  	// grant this identity write-access to the destination, log entry exports from
  3201  	// this sink will fail. For more information, see Granting Access for a
  3202  	// Resource
  3203  	// (https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
  3204  	// Consult the destination service's documentation to determine the appropriate
  3205  	// IAM roles to assign to the identity.Sinks that have a destination that is a
  3206  	// log bucket in the same project as the sink cannot have a writer_identity and
  3207  	// no additional permissions are required.
  3208  	WriterIdentity string `json:"writerIdentity,omitempty"`
  3209  
  3210  	// ServerResponse contains the HTTP response code and headers from the server.
  3211  	googleapi.ServerResponse `json:"-"`
  3212  	// ForceSendFields is a list of field names (e.g. "BigqueryOptions") to
  3213  	// unconditionally include in API requests. By default, fields with empty or
  3214  	// default values are omitted from API requests. See
  3215  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3216  	// details.
  3217  	ForceSendFields []string `json:"-"`
  3218  	// NullFields is a list of field names (e.g. "BigqueryOptions") to include in
  3219  	// API requests with the JSON null value. By default, fields with empty values
  3220  	// are omitted from API requests. See
  3221  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3222  	NullFields []string `json:"-"`
  3223  }
  3224  
  3225  func (s *LogSink) MarshalJSON() ([]byte, error) {
  3226  	type NoMethod LogSink
  3227  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3228  }
  3229  
  3230  // LogSplit: Additional information used to correlate multiple log entries.
  3231  // Used when a single LogEntry would exceed the Google Cloud Logging size limit
  3232  // and is split across multiple log entries.
  3233  type LogSplit struct {
  3234  	// Index: The index of this LogEntry in the sequence of split log entries. Log
  3235  	// entries are given |index| values 0, 1, ..., n-1 for a sequence of n log
  3236  	// entries.
  3237  	Index int64 `json:"index,omitempty"`
  3238  	// TotalSplits: The total number of log entries that the original LogEntry was
  3239  	// split into.
  3240  	TotalSplits int64 `json:"totalSplits,omitempty"`
  3241  	// Uid: A globally unique identifier for all log entries in a sequence of split
  3242  	// log entries. All log entries with the same |LogSplit.uid| are assumed to be
  3243  	// part of the same sequence of split log entries.
  3244  	Uid string `json:"uid,omitempty"`
  3245  	// ForceSendFields is a list of field names (e.g. "Index") to unconditionally
  3246  	// include in API requests. By default, fields with empty or default values are
  3247  	// omitted from API requests. See
  3248  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3249  	// details.
  3250  	ForceSendFields []string `json:"-"`
  3251  	// NullFields is a list of field names (e.g. "Index") to include in API
  3252  	// requests with the JSON null value. By default, fields with empty values are
  3253  	// omitted from API requests. See
  3254  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3255  	NullFields []string `json:"-"`
  3256  }
  3257  
  3258  func (s *LogSplit) MarshalJSON() ([]byte, error) {
  3259  	type NoMethod LogSplit
  3260  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3261  }
  3262  
  3263  // LogView: Describes a view over log entries in a bucket.
  3264  type LogView struct {
  3265  	// CreateTime: Output only. The creation timestamp of the view.
  3266  	CreateTime string `json:"createTime,omitempty"`
  3267  	// Description: Optional. Describes this view.
  3268  	Description string `json:"description,omitempty"`
  3269  	// Filter: Optional. Filter that restricts which log entries in a bucket are
  3270  	// visible in this view.Filters must be logical conjunctions that use the AND
  3271  	// operator, and they can use any of the following qualifiers: SOURCE(), which
  3272  	// specifies a project, folder, organization, or billing account of origin.
  3273  	// resource.type, which specifies the resource type. LOG_ID(), which identifies
  3274  	// the log.They can also use the negations of these qualifiers with the NOT
  3275  	// operator.For example:SOURCE("projects/myproject") AND resource.type =
  3276  	// "gce_instance" AND NOT LOG_ID("stdout")
  3277  	Filter string `json:"filter,omitempty"`
  3278  	// Name: Output only. The resource name of the view.For
  3279  	// example:projects/my-project/locations/global/buckets/my-bucket/views/my-view
  3280  	Name string `json:"name,omitempty"`
  3281  	// UpdateTime: Output only. The last update timestamp of the view.
  3282  	UpdateTime string `json:"updateTime,omitempty"`
  3283  
  3284  	// ServerResponse contains the HTTP response code and headers from the server.
  3285  	googleapi.ServerResponse `json:"-"`
  3286  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3287  	// unconditionally include in API requests. By default, fields with empty or
  3288  	// default values are omitted from API requests. See
  3289  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3290  	// details.
  3291  	ForceSendFields []string `json:"-"`
  3292  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3293  	// requests with the JSON null value. By default, fields with empty values are
  3294  	// omitted from API requests. See
  3295  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3296  	NullFields []string `json:"-"`
  3297  }
  3298  
  3299  func (s *LogView) MarshalJSON() ([]byte, error) {
  3300  	type NoMethod LogView
  3301  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3302  }
  3303  
  3304  // LoggingQuery: Describes a Cloud Logging query that can be run in Logs
  3305  // Explorer UI or via the logging API.In addition to the query itself,
  3306  // additional information may be stored to capture the display configuration
  3307  // and other UI state used in association with analysis of query results.
  3308  type LoggingQuery struct {
  3309  	// Filter: Required. An advanced query using the Logging Query Language
  3310  	// (https://cloud.google.com/logging/docs/view/logging-query-language). The
  3311  	// maximum length of the filter is 20000 characters.
  3312  	Filter string `json:"filter,omitempty"`
  3313  	// SummaryFieldEnd: Characters will be counted from the end of the string.
  3314  	SummaryFieldEnd int64 `json:"summaryFieldEnd,omitempty"`
  3315  	// SummaryFieldStart: Characters will be counted from the start of the string.
  3316  	SummaryFieldStart int64 `json:"summaryFieldStart,omitempty"`
  3317  	// SummaryFields: Optional. The set of summary fields to display for this saved
  3318  	// query.
  3319  	SummaryFields []*SummaryField `json:"summaryFields,omitempty"`
  3320  	// ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
  3321  	// include in API requests. By default, fields with empty or default values are
  3322  	// omitted from API requests. See
  3323  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3324  	// details.
  3325  	ForceSendFields []string `json:"-"`
  3326  	// NullFields is a list of field names (e.g. "Filter") to include in API
  3327  	// requests with the JSON null value. By default, fields with empty values are
  3328  	// omitted from API requests. See
  3329  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3330  	NullFields []string `json:"-"`
  3331  }
  3332  
  3333  func (s *LoggingQuery) MarshalJSON() ([]byte, error) {
  3334  	type NoMethod LoggingQuery
  3335  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3336  }
  3337  
  3338  // MetricDescriptor: Defines a metric type and its schema. Once a metric
  3339  // descriptor is created, deleting or altering it stops data collection and
  3340  // makes the metric type's existing data unusable.
  3341  type MetricDescriptor struct {
  3342  	// Description: A detailed description of the metric, which can be used in
  3343  	// documentation.
  3344  	Description string `json:"description,omitempty"`
  3345  	// DisplayName: A concise name for the metric, which can be displayed in user
  3346  	// interfaces. Use sentence case without an ending period, for example "Request
  3347  	// count". This field is optional but it is recommended to be set for any
  3348  	// metrics associated with user-visible concepts, such as Quota.
  3349  	DisplayName string `json:"displayName,omitempty"`
  3350  	// Labels: The set of labels that can be used to describe a specific instance
  3351  	// of this metric type. For example, the
  3352  	// appengine.googleapis.com/http/server/response_latencies metric type has a
  3353  	// label for the HTTP response code, response_code, so you can look at
  3354  	// latencies for successful responses or just for responses that failed.
  3355  	Labels []*LabelDescriptor `json:"labels,omitempty"`
  3356  	// LaunchStage: Optional. The launch stage of the metric definition.
  3357  	//
  3358  	// Possible values:
  3359  	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
  3360  	//   "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
  3361  	// it.
  3362  	//   "PRELAUNCH" - Prelaunch features are hidden from users and are only
  3363  	// visible internally.
  3364  	//   "EARLY_ACCESS" - Early Access features are limited to a closed group of
  3365  	// testers. To use these features, you must sign up in advance and sign a
  3366  	// Trusted Tester agreement (which includes confidentiality provisions). These
  3367  	// features may be unstable, changed in backward-incompatible ways, and are not
  3368  	// guaranteed to be released.
  3369  	//   "ALPHA" - Alpha is a limited availability test for releases before they
  3370  	// are cleared for widespread use. By Alpha, all significant design issues are
  3371  	// resolved and we are in the process of verifying functionality. Alpha
  3372  	// customers need to apply for access, agree to applicable terms, and have
  3373  	// their projects allowlisted. Alpha releases don't have to be feature
  3374  	// complete, no SLAs are provided, and there are no technical support
  3375  	// obligations, but they will be far enough along that customers can actually
  3376  	// use them in test environments or for limited-use tests -- just like they
  3377  	// would in normal production cases.
  3378  	//   "BETA" - Beta is the point at which we are ready to open a release for any
  3379  	// customer to use. There are no SLA or technical support obligations in a Beta
  3380  	// release. Products will be complete from a feature perspective, but may have
  3381  	// some open outstanding issues. Beta releases are suitable for limited
  3382  	// production use cases.
  3383  	//   "GA" - GA features are open to all developers and are considered stable
  3384  	// and fully qualified for production use.
  3385  	//   "DEPRECATED" - Deprecated features are scheduled to be shut down and
  3386  	// removed. For more information, see the "Deprecation Policy" section of our
  3387  	// Terms of Service (https://cloud.google.com/terms/) and the Google Cloud
  3388  	// Platform Subject to the Deprecation Policy
  3389  	// (https://cloud.google.com/terms/deprecation) documentation.
  3390  	LaunchStage string `json:"launchStage,omitempty"`
  3391  	// Metadata: Optional. Metadata which can be used to guide usage of the metric.
  3392  	Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"`
  3393  	// MetricKind: Whether the metric records instantaneous values, changes to a
  3394  	// value, etc. Some combinations of metric_kind and value_type might not be
  3395  	// supported.
  3396  	//
  3397  	// Possible values:
  3398  	//   "METRIC_KIND_UNSPECIFIED" - Do not use this default value.
  3399  	//   "GAUGE" - An instantaneous measurement of a value.
  3400  	//   "DELTA" - The change in a value during a time interval.
  3401  	//   "CUMULATIVE" - A value accumulated over a time interval. Cumulative
  3402  	// measurements in a time series should have the same start time and increasing
  3403  	// end times, until an event resets the cumulative value to zero and sets a new
  3404  	// start time for the following points.
  3405  	MetricKind string `json:"metricKind,omitempty"`
  3406  	// MonitoredResourceTypes: Read-only. If present, then a time series, which is
  3407  	// identified partially by a metric type and a MonitoredResourceDescriptor,
  3408  	// that is associated with this metric type can only be associated with one of
  3409  	// the monitored resource types listed here.
  3410  	MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"`
  3411  	// Name: The resource name of the metric descriptor.
  3412  	Name string `json:"name,omitempty"`
  3413  	// Type: The metric type, including its DNS name prefix. The type is not
  3414  	// URL-encoded. All user-defined metric types have the DNS name
  3415  	// custom.googleapis.com or external.googleapis.com. Metric types should use a
  3416  	// natural hierarchical grouping. For example:
  3417  	// "custom.googleapis.com/invoice/paid/amount"
  3418  	// "external.googleapis.com/prometheus/up"
  3419  	// "appengine.googleapis.com/http/server/response_latencies"
  3420  	Type string `json:"type,omitempty"`
  3421  	// Unit: The units in which the metric value is reported. It is only applicable
  3422  	// if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the
  3423  	// representation of the stored metric values.Different systems might scale the
  3424  	// values to be more easily displayed (so a value of 0.02kBy might be displayed
  3425  	// as 20By, and a value of 3523kBy might be displayed as 3.5MBy). However, if
  3426  	// the unit is kBy, then the value of the metric is always in thousands of
  3427  	// bytes, no matter how it might be displayed.If you want a custom metric to
  3428  	// record the exact number of CPU-seconds used by a job, you can create an
  3429  	// INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently 1s{CPU} or
  3430  	// just s). If the job uses 12,005 CPU-seconds, then the value is written as
  3431  	// 12005.Alternatively, if you want a custom metric to record data in a more
  3432  	// granular way, you can create a DOUBLE CUMULATIVE metric whose unit is
  3433  	// ks{CPU}, and then write the value 12.005 (which is 12005/1000), or use
  3434  	// Kis{CPU} and write 11.723 (which is 12005/1024).The supported units are a
  3435  	// subset of The Unified Code for Units of Measure
  3436  	// (https://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT) bit bit
  3437  	// By byte s second min minute h hour d day 1 dimensionlessPrefixes (PREFIX) k
  3438  	// kilo (10^3) M mega (10^6) G giga (10^9) T tera (10^12) P peta (10^15) E exa
  3439  	// (10^18) Z zetta (10^21) Y yotta (10^24) m milli (10^-3) u micro (10^-6) n
  3440  	// nano (10^-9) p pico (10^-12) f femto (10^-15) a atto (10^-18) z zepto
  3441  	// (10^-21) y yocto (10^-24) Ki kibi (2^10) Mi mebi (2^20) Gi gibi (2^30) Ti
  3442  	// tebi (2^40) Pi pebi (2^50)GrammarThe grammar also includes these connectors:
  3443  	// / division or ratio (as an infix operator). For examples, kBy/{email} or
  3444  	// MiBy/10ms (although you should almost never have /s in a metric unit; rates
  3445  	// should always be computed at query time from the underlying cumulative or
  3446  	// delta value). . multiplication or composition (as an infix operator). For
  3447  	// examples, GBy.d or k{watt}.h.The grammar for a unit is as follows:
  3448  	// Expression = Component { "." Component } { "/" Component } ; Component = ( [
  3449  	// PREFIX ] UNIT | "%" ) [ Annotation ] | Annotation | "1" ; Annotation = "{"
  3450  	// NAME "}" ; Notes: Annotation is just a comment if it follows a UNIT. If the
  3451  	// annotation is used alone, then the unit is equivalent to 1. For examples,
  3452  	// {request}/s == 1/s, By{transmitted}/s == By/s. NAME is a sequence of
  3453  	// non-blank printable ASCII characters not containing { or }. 1 represents a
  3454  	// unitary dimensionless unit
  3455  	// (https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in 1/s.
  3456  	// It is typically used when none of the basic units are appropriate. For
  3457  	// example, "new users per day" can be represented as 1/d or {new-users}/d (and
  3458  	// a metric value 5 would mean "5 new users). Alternatively, "thousands of page
  3459  	// views per day" would be represented as 1000/d or k1/d or k{page_views}/d
  3460  	// (and a metric value of 5.3 would mean "5300 page views per day"). %
  3461  	// represents dimensionless value of 1/100, and annotates values giving a
  3462  	// percentage (so the metric values are typically in the range of 0..100, and a
  3463  	// metric value 3 means "3 percent"). 10^2.% indicates a metric contains a
  3464  	// ratio, typically in the range 0..1, that will be multiplied by 100 and
  3465  	// displayed as a percentage (so a metric value 0.03 means "3 percent").
  3466  	Unit string `json:"unit,omitempty"`
  3467  	// ValueType: Whether the measurement is an integer, a floating-point number,
  3468  	// etc. Some combinations of metric_kind and value_type might not be supported.
  3469  	//
  3470  	// Possible values:
  3471  	//   "VALUE_TYPE_UNSPECIFIED" - Do not use this default value.
  3472  	//   "BOOL" - The value is a boolean. This value type can be used only if the
  3473  	// metric kind is GAUGE.
  3474  	//   "INT64" - The value is a signed 64-bit integer.
  3475  	//   "DOUBLE" - The value is a double precision floating point number.
  3476  	//   "STRING" - The value is a text string. This value type can be used only if
  3477  	// the metric kind is GAUGE.
  3478  	//   "DISTRIBUTION" - The value is a Distribution.
  3479  	//   "MONEY" - The value is money.
  3480  	ValueType string `json:"valueType,omitempty"`
  3481  	// ForceSendFields is a list of field names (e.g. "Description") to
  3482  	// unconditionally include in API requests. By default, fields with empty or
  3483  	// default values are omitted from API requests. See
  3484  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3485  	// details.
  3486  	ForceSendFields []string `json:"-"`
  3487  	// NullFields is a list of field names (e.g. "Description") to include in API
  3488  	// requests with the JSON null value. By default, fields with empty values are
  3489  	// omitted from API requests. See
  3490  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3491  	NullFields []string `json:"-"`
  3492  }
  3493  
  3494  func (s *MetricDescriptor) MarshalJSON() ([]byte, error) {
  3495  	type NoMethod MetricDescriptor
  3496  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3497  }
  3498  
  3499  // MetricDescriptorMetadata: Additional annotations that can be used to guide
  3500  // the usage of a metric.
  3501  type MetricDescriptorMetadata struct {
  3502  	// IngestDelay: The delay of data points caused by ingestion. Data points older
  3503  	// than this age are guaranteed to be ingested and available to be read,
  3504  	// excluding data loss due to errors.
  3505  	IngestDelay string `json:"ingestDelay,omitempty"`
  3506  	// LaunchStage: Deprecated. Must use the MetricDescriptor.launch_stage instead.
  3507  	//
  3508  	// Possible values:
  3509  	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
  3510  	//   "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
  3511  	// it.
  3512  	//   "PRELAUNCH" - Prelaunch features are hidden from users and are only
  3513  	// visible internally.
  3514  	//   "EARLY_ACCESS" - Early Access features are limited to a closed group of
  3515  	// testers. To use these features, you must sign up in advance and sign a
  3516  	// Trusted Tester agreement (which includes confidentiality provisions). These
  3517  	// features may be unstable, changed in backward-incompatible ways, and are not
  3518  	// guaranteed to be released.
  3519  	//   "ALPHA" - Alpha is a limited availability test for releases before they
  3520  	// are cleared for widespread use. By Alpha, all significant design issues are
  3521  	// resolved and we are in the process of verifying functionality. Alpha
  3522  	// customers need to apply for access, agree to applicable terms, and have
  3523  	// their projects allowlisted. Alpha releases don't have to be feature
  3524  	// complete, no SLAs are provided, and there are no technical support
  3525  	// obligations, but they will be far enough along that customers can actually
  3526  	// use them in test environments or for limited-use tests -- just like they
  3527  	// would in normal production cases.
  3528  	//   "BETA" - Beta is the point at which we are ready to open a release for any
  3529  	// customer to use. There are no SLA or technical support obligations in a Beta
  3530  	// release. Products will be complete from a feature perspective, but may have
  3531  	// some open outstanding issues. Beta releases are suitable for limited
  3532  	// production use cases.
  3533  	//   "GA" - GA features are open to all developers and are considered stable
  3534  	// and fully qualified for production use.
  3535  	//   "DEPRECATED" - Deprecated features are scheduled to be shut down and
  3536  	// removed. For more information, see the "Deprecation Policy" section of our
  3537  	// Terms of Service (https://cloud.google.com/terms/) and the Google Cloud
  3538  	// Platform Subject to the Deprecation Policy
  3539  	// (https://cloud.google.com/terms/deprecation) documentation.
  3540  	LaunchStage string `json:"launchStage,omitempty"`
  3541  	// SamplePeriod: The sampling period of metric data points. For metrics which
  3542  	// are written periodically, consecutive data points are stored at this time
  3543  	// interval, excluding data loss due to errors. Metrics with a higher
  3544  	// granularity have a smaller sampling period.
  3545  	SamplePeriod string `json:"samplePeriod,omitempty"`
  3546  	// ForceSendFields is a list of field names (e.g. "IngestDelay") to
  3547  	// unconditionally include in API requests. By default, fields with empty or
  3548  	// default values are omitted from API requests. See
  3549  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3550  	// details.
  3551  	ForceSendFields []string `json:"-"`
  3552  	// NullFields is a list of field names (e.g. "IngestDelay") to include in API
  3553  	// requests with the JSON null value. By default, fields with empty values are
  3554  	// omitted from API requests. See
  3555  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3556  	NullFields []string `json:"-"`
  3557  }
  3558  
  3559  func (s *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) {
  3560  	type NoMethod MetricDescriptorMetadata
  3561  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3562  }
  3563  
  3564  // MonitoredResource: An object representing a resource that can be used for
  3565  // monitoring, logging, billing, or other purposes. Examples include virtual
  3566  // machine instances, databases, and storage devices such as disks. The type
  3567  // field identifies a MonitoredResourceDescriptor object that describes the
  3568  // resource's schema. Information in the labels field identifies the actual
  3569  // resource and its attributes according to the schema. For example, a
  3570  // particular Compute Engine VM instance could be represented by the following
  3571  // object, because the MonitoredResourceDescriptor for "gce_instance" has
  3572  // labels "project_id", "instance_id" and "zone": { "type": "gce_instance",
  3573  // "labels": { "project_id": "my-project", "instance_id": "12345678901234",
  3574  // "zone": "us-central1-a" }}
  3575  type MonitoredResource struct {
  3576  	// Labels: Required. Values for all of the labels listed in the associated
  3577  	// monitored resource descriptor. For example, Compute Engine VM instances use
  3578  	// the labels "project_id", "instance_id", and "zone".
  3579  	Labels map[string]string `json:"labels,omitempty"`
  3580  	// Type: Required. The monitored resource type. This field must match the type
  3581  	// field of a MonitoredResourceDescriptor object. For example, the type of a
  3582  	// Compute Engine VM instance is gce_instance. Some descriptors include the
  3583  	// service name in the type; for example, the type of a Datastream stream is
  3584  	// datastream.googleapis.com/Stream.
  3585  	Type string `json:"type,omitempty"`
  3586  	// ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
  3587  	// include in API requests. By default, fields with empty or default values are
  3588  	// omitted from API requests. See
  3589  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3590  	// details.
  3591  	ForceSendFields []string `json:"-"`
  3592  	// NullFields is a list of field names (e.g. "Labels") to include in API
  3593  	// requests with the JSON null value. By default, fields with empty values are
  3594  	// omitted from API requests. See
  3595  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3596  	NullFields []string `json:"-"`
  3597  }
  3598  
  3599  func (s *MonitoredResource) MarshalJSON() ([]byte, error) {
  3600  	type NoMethod MonitoredResource
  3601  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3602  }
  3603  
  3604  // MonitoredResourceDescriptor: An object that describes the schema of a
  3605  // MonitoredResource object using a type name and a set of labels. For example,
  3606  // the monitored resource descriptor for Google Compute Engine VM instances has
  3607  // a type of "gce_instance" and specifies the use of the labels "instance_id"
  3608  // and "zone" to identify particular VM instances.Different APIs can support
  3609  // different monitored resource types. APIs generally provide a list method
  3610  // that returns the monitored resource descriptors used by the API.
  3611  type MonitoredResourceDescriptor struct {
  3612  	// Description: Optional. A detailed description of the monitored resource type
  3613  	// that might be used in documentation.
  3614  	Description string `json:"description,omitempty"`
  3615  	// DisplayName: Optional. A concise name for the monitored resource type that
  3616  	// might be displayed in user interfaces. It should be a Title Cased Noun
  3617  	// Phrase, without any article or other determiners. For example, "Google Cloud
  3618  	// SQL Database".
  3619  	DisplayName string `json:"displayName,omitempty"`
  3620  	// Labels: Required. A set of labels used to describe instances of this
  3621  	// monitored resource type. For example, an individual Google Cloud SQL
  3622  	// database is identified by values for the labels "database_id" and "zone".
  3623  	Labels []*LabelDescriptor `json:"labels,omitempty"`
  3624  	// LaunchStage: Optional. The launch stage of the monitored resource
  3625  	// definition.
  3626  	//
  3627  	// Possible values:
  3628  	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
  3629  	//   "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
  3630  	// it.
  3631  	//   "PRELAUNCH" - Prelaunch features are hidden from users and are only
  3632  	// visible internally.
  3633  	//   "EARLY_ACCESS" - Early Access features are limited to a closed group of
  3634  	// testers. To use these features, you must sign up in advance and sign a
  3635  	// Trusted Tester agreement (which includes confidentiality provisions). These
  3636  	// features may be unstable, changed in backward-incompatible ways, and are not
  3637  	// guaranteed to be released.
  3638  	//   "ALPHA" - Alpha is a limited availability test for releases before they
  3639  	// are cleared for widespread use. By Alpha, all significant design issues are
  3640  	// resolved and we are in the process of verifying functionality. Alpha
  3641  	// customers need to apply for access, agree to applicable terms, and have
  3642  	// their projects allowlisted. Alpha releases don't have to be feature
  3643  	// complete, no SLAs are provided, and there are no technical support
  3644  	// obligations, but they will be far enough along that customers can actually
  3645  	// use them in test environments or for limited-use tests -- just like they
  3646  	// would in normal production cases.
  3647  	//   "BETA" - Beta is the point at which we are ready to open a release for any
  3648  	// customer to use. There are no SLA or technical support obligations in a Beta
  3649  	// release. Products will be complete from a feature perspective, but may have
  3650  	// some open outstanding issues. Beta releases are suitable for limited
  3651  	// production use cases.
  3652  	//   "GA" - GA features are open to all developers and are considered stable
  3653  	// and fully qualified for production use.
  3654  	//   "DEPRECATED" - Deprecated features are scheduled to be shut down and
  3655  	// removed. For more information, see the "Deprecation Policy" section of our
  3656  	// Terms of Service (https://cloud.google.com/terms/) and the Google Cloud
  3657  	// Platform Subject to the Deprecation Policy
  3658  	// (https://cloud.google.com/terms/deprecation) documentation.
  3659  	LaunchStage string `json:"launchStage,omitempty"`
  3660  	// Name: Optional. The resource name of the monitored resource descriptor:
  3661  	// "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is
  3662  	// the value of the type field in this object and {project_id} is a project ID
  3663  	// that provides API-specific context for accessing the type. APIs that do not
  3664  	// use project information can use the resource name format
  3665  	// "monitoredResourceDescriptors/{type}".
  3666  	Name string `json:"name,omitempty"`
  3667  	// Type: Required. The monitored resource type. For example, the type
  3668  	// "cloudsql_database" represents databases in Google Cloud SQL. For a list of
  3669  	// types, see Monitored resource types
  3670  	// (https://cloud.google.com/monitoring/api/resources) and Logging resource
  3671  	// types (https://cloud.google.com/logging/docs/api/v2/resource-list).
  3672  	Type string `json:"type,omitempty"`
  3673  	// ForceSendFields is a list of field names (e.g. "Description") to
  3674  	// unconditionally include in API requests. By default, fields with empty or
  3675  	// default values are omitted from API requests. See
  3676  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3677  	// details.
  3678  	ForceSendFields []string `json:"-"`
  3679  	// NullFields is a list of field names (e.g. "Description") to include in API
  3680  	// requests with the JSON null value. By default, fields with empty values are
  3681  	// omitted from API requests. See
  3682  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3683  	NullFields []string `json:"-"`
  3684  }
  3685  
  3686  func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
  3687  	type NoMethod MonitoredResourceDescriptor
  3688  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3689  }
  3690  
  3691  // MonitoredResourceMetadata: Auxiliary metadata for a MonitoredResource
  3692  // object. MonitoredResource objects contain the minimum set of information to
  3693  // uniquely identify a monitored resource instance. There is some other useful
  3694  // auxiliary metadata. Monitoring and Logging use an ingestion pipeline to
  3695  // extract metadata for cloud resources of all types, and store the metadata in
  3696  // this message.
  3697  type MonitoredResourceMetadata struct {
  3698  	// SystemLabels: Output only. Values for predefined system metadata labels.
  3699  	// System labels are a kind of metadata extracted by Google, including
  3700  	// "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System
  3701  	// label values can be only strings, Boolean values, or a list of strings. For
  3702  	// example: { "name": "my-test-instance", "security_group": ["a", "b", "c"],
  3703  	// "spot_instance": false }
  3704  	SystemLabels googleapi.RawMessage `json:"systemLabels,omitempty"`
  3705  	// UserLabels: Output only. A map of user-defined metadata labels.
  3706  	UserLabels map[string]string `json:"userLabels,omitempty"`
  3707  	// ForceSendFields is a list of field names (e.g. "SystemLabels") to
  3708  	// unconditionally include in API requests. By default, fields with empty or
  3709  	// default values are omitted from API requests. See
  3710  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3711  	// details.
  3712  	ForceSendFields []string `json:"-"`
  3713  	// NullFields is a list of field names (e.g. "SystemLabels") to include in API
  3714  	// requests with the JSON null value. By default, fields with empty values are
  3715  	// omitted from API requests. See
  3716  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3717  	NullFields []string `json:"-"`
  3718  }
  3719  
  3720  func (s *MonitoredResourceMetadata) MarshalJSON() ([]byte, error) {
  3721  	type NoMethod MonitoredResourceMetadata
  3722  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3723  }
  3724  
  3725  // Operation: This resource represents a long-running operation that is the
  3726  // result of a network API call.
  3727  type Operation struct {
  3728  	// Done: If the value is false, it means the operation is still in progress. If
  3729  	// true, the operation is completed, and either error or response is available.
  3730  	Done bool `json:"done,omitempty"`
  3731  	// Error: The error result of the operation in case of failure or cancellation.
  3732  	Error *Status `json:"error,omitempty"`
  3733  	// Metadata: Service-specific metadata associated with the operation. It
  3734  	// typically contains progress information and common metadata such as create
  3735  	// time. Some services might not provide such metadata. Any method that returns
  3736  	// a long-running operation should document the metadata type, if any.
  3737  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  3738  	// Name: The server-assigned name, which is only unique within the same service
  3739  	// that originally returns it. If you use the default HTTP mapping, the name
  3740  	// should be a resource name ending with operations/{unique_id}.
  3741  	Name string `json:"name,omitempty"`
  3742  	// Response: The normal, successful response of the operation. If the original
  3743  	// method returns no data on success, such as Delete, the response is
  3744  	// google.protobuf.Empty. If the original method is standard Get/Create/Update,
  3745  	// the response should be the resource. For other methods, the response should
  3746  	// have the type XxxResponse, where Xxx is the original method name. For
  3747  	// example, if the original method name is TakeSnapshot(), the inferred
  3748  	// response type is TakeSnapshotResponse.
  3749  	Response googleapi.RawMessage `json:"response,omitempty"`
  3750  
  3751  	// ServerResponse contains the HTTP response code and headers from the server.
  3752  	googleapi.ServerResponse `json:"-"`
  3753  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  3754  	// include in API requests. By default, fields with empty or default values are
  3755  	// omitted from API requests. See
  3756  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3757  	// details.
  3758  	ForceSendFields []string `json:"-"`
  3759  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  3760  	// with the JSON null value. By default, fields with empty values are omitted
  3761  	// from API requests. See
  3762  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3763  	NullFields []string `json:"-"`
  3764  }
  3765  
  3766  func (s *Operation) MarshalJSON() ([]byte, error) {
  3767  	type NoMethod Operation
  3768  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3769  }
  3770  
  3771  // OpsAnalyticsQuery: Describes an analytics query that can be run in the Log
  3772  // Analytics page of Google Cloud console.Preview: This is a preview feature
  3773  // and may be subject to change before final release.
  3774  type OpsAnalyticsQuery struct {
  3775  	// SqlQueryText: Required. A logs analytics SQL query, which generally follows
  3776  	// BigQuery format.This is the SQL query that appears in the Log Analytics UI's
  3777  	// query editor.
  3778  	SqlQueryText string `json:"sqlQueryText,omitempty"`
  3779  	// ForceSendFields is a list of field names (e.g. "SqlQueryText") to
  3780  	// unconditionally include in API requests. By default, fields with empty or
  3781  	// default values are omitted from API requests. See
  3782  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3783  	// details.
  3784  	ForceSendFields []string `json:"-"`
  3785  	// NullFields is a list of field names (e.g. "SqlQueryText") to include in API
  3786  	// requests with the JSON null value. By default, fields with empty values are
  3787  	// omitted from API requests. See
  3788  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3789  	NullFields []string `json:"-"`
  3790  }
  3791  
  3792  func (s *OpsAnalyticsQuery) MarshalJSON() ([]byte, error) {
  3793  	type NoMethod OpsAnalyticsQuery
  3794  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3795  }
  3796  
  3797  // Policy: An Identity and Access Management (IAM) policy, which specifies
  3798  // access controls for Google Cloud resources.A Policy is a collection of
  3799  // bindings. A binding binds one or more members, or principals, to a single
  3800  // role. Principals can be user accounts, service accounts, Google groups, and
  3801  // domains (such as G Suite). A role is a named list of permissions; each role
  3802  // can be an IAM predefined role or a user-created custom role.For some types
  3803  // of Google Cloud resources, a binding can also specify a condition, which is
  3804  // a logical expression that allows access to a resource only if the expression
  3805  // evaluates to true. A condition can add constraints based on attributes of
  3806  // the request, the resource, or both. To learn which resources support
  3807  // conditions in their IAM policies, see the IAM documentation
  3808  // (https://cloud.google.com/iam/help/conditions/resource-policies).JSON
  3809  // example: { "bindings": [ { "role":
  3810  // "roles/resourcemanager.organizationAdmin", "members": [
  3811  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  3812  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  3813  // "roles/resourcemanager.organizationViewer", "members": [
  3814  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  3815  // "description": "Does not grant access after Sep 2020", "expression":
  3816  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  3817  // "BwWWja0YfJA=", "version": 3 } YAML example: bindings: - members: -
  3818  // user:mike@example.com - group:admins@example.com - domain:google.com -
  3819  // serviceAccount:my-project-id@appspot.gserviceaccount.com role:
  3820  // roles/resourcemanager.organizationAdmin - members: - user:eve@example.com
  3821  // role: roles/resourcemanager.organizationViewer condition: title: expirable
  3822  // access description: Does not grant access after Sep 2020 expression:
  3823  // request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA=
  3824  // version: 3 For a description of IAM and its features, see the IAM
  3825  // documentation (https://cloud.google.com/iam/docs/).
  3826  type Policy struct {
  3827  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  3828  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  3829  	// Bindings: Associates a list of members, or principals, with a role.
  3830  	// Optionally, may specify a condition that determines how and when the
  3831  	// bindings are applied. Each of the bindings must contain at least one
  3832  	// principal.The bindings in a Policy can refer to up to 1,500 principals; up
  3833  	// to 250 of these principals can be Google groups. Each occurrence of a
  3834  	// principal counts towards these limits. For example, if the bindings grant 50
  3835  	// different roles to user:alice@example.com, and not to any other principal,
  3836  	// then you can add another 1,450 principals to the bindings in the Policy.
  3837  	Bindings []*Binding `json:"bindings,omitempty"`
  3838  	// Etag: etag is used for optimistic concurrency control as a way to help
  3839  	// prevent simultaneous updates of a policy from overwriting each other. It is
  3840  	// strongly suggested that systems make use of the etag in the
  3841  	// read-modify-write cycle to perform policy updates in order to avoid race
  3842  	// conditions: An etag is returned in the response to getIamPolicy, and systems
  3843  	// are expected to put that etag in the request to setIamPolicy to ensure that
  3844  	// their change will be applied to the same version of the policy.Important: If
  3845  	// you use IAM Conditions, you must include the etag field whenever you call
  3846  	// setIamPolicy. If you omit this field, then IAM allows you to overwrite a
  3847  	// version 3 policy with a version 1 policy, and all of the conditions in the
  3848  	// version 3 policy are lost.
  3849  	Etag string `json:"etag,omitempty"`
  3850  	// Version: Specifies the format of the policy.Valid values are 0, 1, and 3.
  3851  	// Requests that specify an invalid value are rejected.Any operation that
  3852  	// affects conditional role bindings must specify version 3. This requirement
  3853  	// applies to the following operations: Getting a policy that includes a
  3854  	// conditional role binding Adding a conditional role binding to a policy
  3855  	// Changing a conditional role binding in a policy Removing any role binding,
  3856  	// with or without a condition, from a policy that includes
  3857  	// conditionsImportant: If you use IAM Conditions, you must include the etag
  3858  	// field whenever you call setIamPolicy. If you omit this field, then IAM
  3859  	// allows you to overwrite a version 3 policy with a version 1 policy, and all
  3860  	// of the conditions in the version 3 policy are lost.If a policy does not
  3861  	// include any conditions, operations on that policy may specify any valid
  3862  	// version or leave the field unset.To learn which resources support conditions
  3863  	// in their IAM policies, see the IAM documentation
  3864  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  3865  	Version int64 `json:"version,omitempty"`
  3866  
  3867  	// ServerResponse contains the HTTP response code and headers from the server.
  3868  	googleapi.ServerResponse `json:"-"`
  3869  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  3870  	// unconditionally include in API requests. By default, fields with empty or
  3871  	// default values are omitted from API requests. See
  3872  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3873  	// details.
  3874  	ForceSendFields []string `json:"-"`
  3875  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  3876  	// requests with the JSON null value. By default, fields with empty values are
  3877  	// omitted from API requests. See
  3878  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3879  	NullFields []string `json:"-"`
  3880  }
  3881  
  3882  func (s *Policy) MarshalJSON() ([]byte, error) {
  3883  	type NoMethod Policy
  3884  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3885  }
  3886  
  3887  // RecentQuery: Describes a recent query executed on the Logs Explorer or Log
  3888  // Analytics page within the last ~ 30 days.
  3889  type RecentQuery struct {
  3890  	// LastRunTime: Output only. The timestamp when this query was last run.
  3891  	LastRunTime string `json:"lastRunTime,omitempty"`
  3892  	// LoggingQuery: Logging query that can be executed in Logs Explorer or via
  3893  	// Logging API.
  3894  	LoggingQuery *LoggingQuery `json:"loggingQuery,omitempty"`
  3895  	// Name: Output only. Resource name of the recent query.In the format:
  3896  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/recentQueries/[QUERY_ID]" For
  3897  	// a list of supported locations, see Supported Regions
  3898  	// (https://cloud.google.com/logging/docs/region-support)The QUERY_ID is a
  3899  	// system generated alphanumeric ID.
  3900  	Name string `json:"name,omitempty"`
  3901  	// OpsAnalyticsQuery: Analytics query that can be executed in Log Analytics.
  3902  	OpsAnalyticsQuery *OpsAnalyticsQuery `json:"opsAnalyticsQuery,omitempty"`
  3903  	// ForceSendFields is a list of field names (e.g. "LastRunTime") to
  3904  	// unconditionally include in API requests. By default, fields with empty or
  3905  	// default values are omitted from API requests. See
  3906  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3907  	// details.
  3908  	ForceSendFields []string `json:"-"`
  3909  	// NullFields is a list of field names (e.g. "LastRunTime") to include in API
  3910  	// requests with the JSON null value. By default, fields with empty values are
  3911  	// omitted from API requests. See
  3912  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3913  	NullFields []string `json:"-"`
  3914  }
  3915  
  3916  func (s *RecentQuery) MarshalJSON() ([]byte, error) {
  3917  	type NoMethod RecentQuery
  3918  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3919  }
  3920  
  3921  // RequestLog: Complete log information about a single HTTP request to an App
  3922  // Engine application.
  3923  type RequestLog struct {
  3924  	// AppEngineRelease: App Engine release version.
  3925  	AppEngineRelease string `json:"appEngineRelease,omitempty"`
  3926  	// AppId: Application that handled this request.
  3927  	AppId string `json:"appId,omitempty"`
  3928  	// Cost: An indication of the relative cost of serving this request.
  3929  	Cost float64 `json:"cost,omitempty"`
  3930  	// EndTime: Time when the request finished.
  3931  	EndTime string `json:"endTime,omitempty"`
  3932  	// Finished: Whether this request is finished or active.
  3933  	Finished bool `json:"finished,omitempty"`
  3934  	// First: Whether this is the first RequestLog entry for this request. If an
  3935  	// active request has several RequestLog entries written to Stackdriver
  3936  	// Logging, then this field will be set for one of them.
  3937  	First bool `json:"first,omitempty"`
  3938  	// Host: Internet host and port number of the resource being requested.
  3939  	Host string `json:"host,omitempty"`
  3940  	// HttpVersion: HTTP version of request. Example: "HTTP/1.1".
  3941  	HttpVersion string `json:"httpVersion,omitempty"`
  3942  	// InstanceId: An identifier for the instance that handled the request.
  3943  	InstanceId string `json:"instanceId,omitempty"`
  3944  	// InstanceIndex: If the instance processing this request belongs to a manually
  3945  	// scaled module, then this is the 0-based index of the instance. Otherwise,
  3946  	// this value is -1.
  3947  	InstanceIndex int64 `json:"instanceIndex,omitempty"`
  3948  	// Ip: Origin IP address.
  3949  	Ip string `json:"ip,omitempty"`
  3950  	// Latency: Latency of the request.
  3951  	Latency string `json:"latency,omitempty"`
  3952  	// Line: A list of log lines emitted by the application while serving this
  3953  	// request.
  3954  	Line []*LogLine `json:"line,omitempty"`
  3955  	// MegaCycles: Number of CPU megacycles used to process request.
  3956  	MegaCycles int64 `json:"megaCycles,omitempty,string"`
  3957  	// Method: Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE".
  3958  	Method string `json:"method,omitempty"`
  3959  	// ModuleId: Module of the application that handled this request.
  3960  	ModuleId string `json:"moduleId,omitempty"`
  3961  	// Nickname: The logged-in user who made the request.Most likely, this is the
  3962  	// part of the user's email before the @ sign. The field value is the same for
  3963  	// different requests from the same user, but different users can have similar
  3964  	// names. This information is also available to the application via the App
  3965  	// Engine Users API.This field will be populated starting with App Engine
  3966  	// 1.9.21.
  3967  	Nickname string `json:"nickname,omitempty"`
  3968  	// PendingTime: Time this request spent in the pending request queue.
  3969  	PendingTime string `json:"pendingTime,omitempty"`
  3970  	// Referrer: Referrer URL of request.
  3971  	Referrer string `json:"referrer,omitempty"`
  3972  	// RequestId: Globally unique identifier for a request, which is based on the
  3973  	// request start time. Request IDs for requests which started later will
  3974  	// compare greater as strings than those for requests which started earlier.
  3975  	RequestId string `json:"requestId,omitempty"`
  3976  	// Resource: Contains the path and query portion of the URL that was requested.
  3977  	// For example, if the URL was "http://example.com/app?name=val", the resource
  3978  	// would be "/app?name=val". The fragment identifier, which is identified by
  3979  	// the # character, is not included.
  3980  	Resource string `json:"resource,omitempty"`
  3981  	// ResponseSize: Size in bytes sent back to client by request.
  3982  	ResponseSize int64 `json:"responseSize,omitempty,string"`
  3983  	// SourceReference: Source code for the application that handled this request.
  3984  	// There can be more than one source reference per deployed application if
  3985  	// source code is distributed among multiple repositories.
  3986  	SourceReference []*SourceReference `json:"sourceReference,omitempty"`
  3987  	// SpanId: Stackdriver Trace span identifier for this request.
  3988  	SpanId string `json:"spanId,omitempty"`
  3989  	// StartTime: Time when the request started.
  3990  	StartTime string `json:"startTime,omitempty"`
  3991  	// Status: HTTP response status code. Example: 200, 404.
  3992  	Status int64 `json:"status,omitempty"`
  3993  	// TaskName: Task name of the request, in the case of an offline request.
  3994  	TaskName string `json:"taskName,omitempty"`
  3995  	// TaskQueueName: Queue name of the request, in the case of an offline request.
  3996  	TaskQueueName string `json:"taskQueueName,omitempty"`
  3997  	// TraceId: Stackdriver Trace identifier for this request.
  3998  	TraceId string `json:"traceId,omitempty"`
  3999  	// TraceSampled: If true, the value in the 'trace_id' field was sampled for
  4000  	// storage in a trace backend.
  4001  	TraceSampled bool `json:"traceSampled,omitempty"`
  4002  	// UrlMapEntry: File or class that handled the request.
  4003  	UrlMapEntry string `json:"urlMapEntry,omitempty"`
  4004  	// UserAgent: User agent that made the request.
  4005  	UserAgent string `json:"userAgent,omitempty"`
  4006  	// VersionId: Version of the application that handled this request.
  4007  	VersionId string `json:"versionId,omitempty"`
  4008  	// WasLoadingRequest: Whether this was a loading request for the instance.
  4009  	WasLoadingRequest bool `json:"wasLoadingRequest,omitempty"`
  4010  	// ForceSendFields is a list of field names (e.g. "AppEngineRelease") to
  4011  	// unconditionally include in API requests. By default, fields with empty or
  4012  	// default values are omitted from API requests. See
  4013  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4014  	// details.
  4015  	ForceSendFields []string `json:"-"`
  4016  	// NullFields is a list of field names (e.g. "AppEngineRelease") to include in
  4017  	// API requests with the JSON null value. By default, fields with empty values
  4018  	// are omitted from API requests. See
  4019  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4020  	NullFields []string `json:"-"`
  4021  }
  4022  
  4023  func (s *RequestLog) MarshalJSON() ([]byte, error) {
  4024  	type NoMethod RequestLog
  4025  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4026  }
  4027  
  4028  func (s *RequestLog) UnmarshalJSON(data []byte) error {
  4029  	type NoMethod RequestLog
  4030  	var s1 struct {
  4031  		Cost gensupport.JSONFloat64 `json:"cost"`
  4032  		*NoMethod
  4033  	}
  4034  	s1.NoMethod = (*NoMethod)(s)
  4035  	if err := json.Unmarshal(data, &s1); err != nil {
  4036  		return err
  4037  	}
  4038  	s.Cost = float64(s1.Cost)
  4039  	return nil
  4040  }
  4041  
  4042  // SavedQuery: Describes a query that has been saved by a user.
  4043  type SavedQuery struct {
  4044  	// CreateTime: Output only. The timestamp when the saved query was created.
  4045  	CreateTime string `json:"createTime,omitempty"`
  4046  	// Description: Optional. A human readable description of the saved query.
  4047  	Description string `json:"description,omitempty"`
  4048  	// DisplayName: Required. The user specified title for the SavedQuery.
  4049  	DisplayName string `json:"displayName,omitempty"`
  4050  	// LoggingQuery: Logging query that can be executed in Logs Explorer or via
  4051  	// Logging API.
  4052  	LoggingQuery *LoggingQuery `json:"loggingQuery,omitempty"`
  4053  	// Name: Output only. Resource name of the saved query.In the format:
  4054  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For
  4055  	// a list of supported locations, see Supported Regions
  4056  	// (https://cloud.google.com/logging/docs/region-support#bucket-regions)After
  4057  	// the saved query is created, the location cannot be changed.If the user
  4058  	// doesn't provide a QUERY_ID, the system will generate an alphanumeric ID.
  4059  	Name string `json:"name,omitempty"`
  4060  	// OpsAnalyticsQuery: Analytics query that can be executed in Log Analytics.
  4061  	OpsAnalyticsQuery *OpsAnalyticsQuery `json:"opsAnalyticsQuery,omitempty"`
  4062  	// UpdateTime: Output only. The timestamp when the saved query was last
  4063  	// updated.
  4064  	UpdateTime string `json:"updateTime,omitempty"`
  4065  	// Visibility: Required. The visibility status of this query, which determines
  4066  	// its ownership.
  4067  	//
  4068  	// Possible values:
  4069  	//   "VISIBILITY_UNSPECIFIED" - The saved query visibility is unspecified. A
  4070  	// CreateSavedQuery request with an unspecified visibility will be rejected.
  4071  	//   "PRIVATE" - The saved query is only visible to the user that created it.
  4072  	//   "SHARED" - The saved query is visible to anyone in the project.
  4073  	Visibility string `json:"visibility,omitempty"`
  4074  
  4075  	// ServerResponse contains the HTTP response code and headers from the server.
  4076  	googleapi.ServerResponse `json:"-"`
  4077  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  4078  	// unconditionally include in API requests. By default, fields with empty or
  4079  	// default values are omitted from API requests. See
  4080  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4081  	// details.
  4082  	ForceSendFields []string `json:"-"`
  4083  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  4084  	// requests with the JSON null value. By default, fields with empty values are
  4085  	// omitted from API requests. See
  4086  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4087  	NullFields []string `json:"-"`
  4088  }
  4089  
  4090  func (s *SavedQuery) MarshalJSON() ([]byte, error) {
  4091  	type NoMethod SavedQuery
  4092  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4093  }
  4094  
  4095  // SetIamPolicyRequest: Request message for SetIamPolicy method.
  4096  type SetIamPolicyRequest struct {
  4097  	// Policy: REQUIRED: The complete policy to be applied to the resource. The
  4098  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  4099  	// policy but certain Google Cloud services (such as Projects) might reject
  4100  	// them.
  4101  	Policy *Policy `json:"policy,omitempty"`
  4102  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  4103  	// modify. Only the fields in the mask will be modified. If no mask is
  4104  	// provided, the following default mask is used:paths: "bindings, etag"
  4105  	UpdateMask string `json:"updateMask,omitempty"`
  4106  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  4107  	// include in API requests. By default, fields with empty or default values are
  4108  	// omitted from API requests. See
  4109  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4110  	// details.
  4111  	ForceSendFields []string `json:"-"`
  4112  	// NullFields is a list of field names (e.g. "Policy") to include in API
  4113  	// requests with the JSON null value. By default, fields with empty values are
  4114  	// omitted from API requests. See
  4115  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4116  	NullFields []string `json:"-"`
  4117  }
  4118  
  4119  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  4120  	type NoMethod SetIamPolicyRequest
  4121  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4122  }
  4123  
  4124  // Settings: Describes the settings associated with a project, folder,
  4125  // organization, or billing account.
  4126  type Settings struct {
  4127  	// DefaultSinkConfig: Optional. Overrides the built-in configuration for
  4128  	// _Default sink.
  4129  	DefaultSinkConfig *DefaultSinkConfig `json:"defaultSinkConfig,omitempty"`
  4130  	// DisableDefaultSink: Optional. If set to true, the _Default sink in newly
  4131  	// created projects and folders will created in a disabled state. This can be
  4132  	// used to automatically disable log storage if there is already an aggregated
  4133  	// sink configured in the hierarchy. The _Default sink can be re-enabled
  4134  	// manually if needed.
  4135  	DisableDefaultSink bool `json:"disableDefaultSink,omitempty"`
  4136  	// KmsKeyName: Optional. The resource name for the configured Cloud KMS key.KMS
  4137  	// key name format:
  4138  	// "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KE
  4139  	// Y]" For
  4140  	// example:"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKey
  4141  	// s/my-key"To enable CMEK, set this field to a valid kms_key_name for which
  4142  	// the associated service account has the required
  4143  	// roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key.The
  4144  	// Cloud KMS key used by the Log Router can be updated by changing the
  4145  	// kms_key_name to a new valid key name.To disable CMEK for the Log Router, set
  4146  	// this field to an empty string.See Enabling CMEK for Log Router
  4147  	// (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
  4148  	// information.
  4149  	KmsKeyName string `json:"kmsKeyName,omitempty"`
  4150  	// KmsServiceAccountId: Output only. The service account that will be used by
  4151  	// the Log Router to access your Cloud KMS key.Before enabling CMEK, you must
  4152  	// first assign the role roles/cloudkms.cryptoKeyEncrypterDecrypter to the
  4153  	// service account that will be used to access your Cloud KMS key. Use
  4154  	// GetSettings to obtain the service account ID.See Enabling CMEK for Log
  4155  	// Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
  4156  	// for more information.
  4157  	KmsServiceAccountId string `json:"kmsServiceAccountId,omitempty"`
  4158  	// LoggingServiceAccountId: Output only. The service account for the given
  4159  	// resource container, such as project or folder. Log sinks use this service
  4160  	// account as their writer_identity if no custom service account is provided in
  4161  	// the request when calling the create sink method.
  4162  	LoggingServiceAccountId string `json:"loggingServiceAccountId,omitempty"`
  4163  	// Name: Output only. The resource name of the settings.
  4164  	Name string `json:"name,omitempty"`
  4165  	// StorageLocation: Optional. The storage location for the _Default and
  4166  	// _Required log buckets of newly created projects and folders, unless the
  4167  	// storage location is explicitly provided.Example value: europe-west1.Note:
  4168  	// this setting does not affect the location of resources where a location is
  4169  	// explicitly provided when created, such as custom log buckets.
  4170  	StorageLocation string `json:"storageLocation,omitempty"`
  4171  
  4172  	// ServerResponse contains the HTTP response code and headers from the server.
  4173  	googleapi.ServerResponse `json:"-"`
  4174  	// ForceSendFields is a list of field names (e.g. "DefaultSinkConfig") to
  4175  	// unconditionally include in API requests. By default, fields with empty or
  4176  	// default values are omitted from API requests. See
  4177  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4178  	// details.
  4179  	ForceSendFields []string `json:"-"`
  4180  	// NullFields is a list of field names (e.g. "DefaultSinkConfig") to include in
  4181  	// API requests with the JSON null value. By default, fields with empty values
  4182  	// are omitted from API requests. See
  4183  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4184  	NullFields []string `json:"-"`
  4185  }
  4186  
  4187  func (s *Settings) MarshalJSON() ([]byte, error) {
  4188  	type NoMethod Settings
  4189  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4190  }
  4191  
  4192  // SourceLocation: Specifies a location in a source code file.
  4193  type SourceLocation struct {
  4194  	// File: Source file name. Depending on the runtime environment, this might be
  4195  	// a simple name or a fully-qualified name.
  4196  	File string `json:"file,omitempty"`
  4197  	// FunctionName: Human-readable name of the function or method being invoked,
  4198  	// with optional context such as the class or package name. This information is
  4199  	// used in contexts such as the logs viewer, where a file and line number are
  4200  	// less meaningful. The format can vary by language. For example:
  4201  	// qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).
  4202  	FunctionName string `json:"functionName,omitempty"`
  4203  	// Line: Line within the source file.
  4204  	Line int64 `json:"line,omitempty,string"`
  4205  	// ForceSendFields is a list of field names (e.g. "File") to unconditionally
  4206  	// include in API requests. By default, fields with empty or default values are
  4207  	// omitted from API requests. See
  4208  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4209  	// details.
  4210  	ForceSendFields []string `json:"-"`
  4211  	// NullFields is a list of field names (e.g. "File") to include in API requests
  4212  	// with the JSON null value. By default, fields with empty values are omitted
  4213  	// from API requests. See
  4214  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4215  	NullFields []string `json:"-"`
  4216  }
  4217  
  4218  func (s *SourceLocation) MarshalJSON() ([]byte, error) {
  4219  	type NoMethod SourceLocation
  4220  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4221  }
  4222  
  4223  // SourceReference: A reference to a particular snapshot of the source tree
  4224  // used to build and deploy an application.
  4225  type SourceReference struct {
  4226  	// Repository: Optional. A URI string identifying the repository. Example:
  4227  	// "https://github.com/GoogleCloudPlatform/kubernetes.git"
  4228  	Repository string `json:"repository,omitempty"`
  4229  	// RevisionId: The canonical and persistent identifier of the deployed
  4230  	// revision. Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b"
  4231  	RevisionId string `json:"revisionId,omitempty"`
  4232  	// ForceSendFields is a list of field names (e.g. "Repository") to
  4233  	// unconditionally include in API requests. By default, fields with empty or
  4234  	// default values are omitted from API requests. See
  4235  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4236  	// details.
  4237  	ForceSendFields []string `json:"-"`
  4238  	// NullFields is a list of field names (e.g. "Repository") to include in API
  4239  	// requests with the JSON null value. By default, fields with empty values are
  4240  	// omitted from API requests. See
  4241  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4242  	NullFields []string `json:"-"`
  4243  }
  4244  
  4245  func (s *SourceReference) MarshalJSON() ([]byte, error) {
  4246  	type NoMethod SourceReference
  4247  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4248  }
  4249  
  4250  // Status: The Status type defines a logical error model that is suitable for
  4251  // different programming environments, including REST APIs and RPC APIs. It is
  4252  // used by gRPC (https://github.com/grpc). Each Status message contains three
  4253  // pieces of data: error code, error message, and error details.You can find
  4254  // out more about this error model and how to work with it in the API Design
  4255  // Guide (https://cloud.google.com/apis/design/errors).
  4256  type Status struct {
  4257  	// Code: The status code, which should be an enum value of google.rpc.Code.
  4258  	Code int64 `json:"code,omitempty"`
  4259  	// Details: A list of messages that carry the error details. There is a common
  4260  	// set of message types for APIs to use.
  4261  	Details []googleapi.RawMessage `json:"details,omitempty"`
  4262  	// Message: A developer-facing error message, which should be in English. Any
  4263  	// user-facing error message should be localized and sent in the
  4264  	// google.rpc.Status.details field, or localized by the client.
  4265  	Message string `json:"message,omitempty"`
  4266  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  4267  	// include in API requests. By default, fields with empty or default values are
  4268  	// omitted from API requests. See
  4269  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4270  	// details.
  4271  	ForceSendFields []string `json:"-"`
  4272  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  4273  	// with the JSON null value. By default, fields with empty values are omitted
  4274  	// from API requests. See
  4275  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4276  	NullFields []string `json:"-"`
  4277  }
  4278  
  4279  func (s *Status) MarshalJSON() ([]byte, error) {
  4280  	type NoMethod Status
  4281  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4282  }
  4283  
  4284  // SummaryField: A field from the LogEntry that is added to the summary line
  4285  // (https://cloud.google.com/logging/docs/view/logs-explorer-interface#add-summary-fields)
  4286  // for a query in the Logs Explorer.
  4287  type SummaryField struct {
  4288  	// Field: Optional. The field from the LogEntry to include in the summary line,
  4289  	// for example resource.type or jsonPayload.name.
  4290  	Field string `json:"field,omitempty"`
  4291  	// ForceSendFields is a list of field names (e.g. "Field") to unconditionally
  4292  	// include in API requests. By default, fields with empty or default values are
  4293  	// omitted from API requests. See
  4294  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4295  	// details.
  4296  	ForceSendFields []string `json:"-"`
  4297  	// NullFields is a list of field names (e.g. "Field") to include in API
  4298  	// requests with the JSON null value. By default, fields with empty values are
  4299  	// omitted from API requests. See
  4300  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4301  	NullFields []string `json:"-"`
  4302  }
  4303  
  4304  func (s *SummaryField) MarshalJSON() ([]byte, error) {
  4305  	type NoMethod SummaryField
  4306  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4307  }
  4308  
  4309  // SuppressionInfo: Information about entries that were omitted from the
  4310  // session.
  4311  type SuppressionInfo struct {
  4312  	// Reason: The reason that entries were omitted from the session.
  4313  	//
  4314  	// Possible values:
  4315  	//   "REASON_UNSPECIFIED" - Unexpected default.
  4316  	//   "RATE_LIMIT" - Indicates suppression occurred due to relevant entries
  4317  	// being received in excess of rate limits. For quotas and limits, see Logging
  4318  	// API quotas and limits (https://cloud.google.com/logging/quotas#api-limits).
  4319  	//   "NOT_CONSUMED" - Indicates suppression occurred due to the client not
  4320  	// consuming responses quickly enough.
  4321  	Reason string `json:"reason,omitempty"`
  4322  	// SuppressedCount: A lower bound on the count of entries omitted due to
  4323  	// reason.
  4324  	SuppressedCount int64 `json:"suppressedCount,omitempty"`
  4325  	// ForceSendFields is a list of field names (e.g. "Reason") to unconditionally
  4326  	// include in API requests. By default, fields with empty or default values are
  4327  	// omitted from API requests. See
  4328  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4329  	// details.
  4330  	ForceSendFields []string `json:"-"`
  4331  	// NullFields is a list of field names (e.g. "Reason") to include in API
  4332  	// requests with the JSON null value. By default, fields with empty values are
  4333  	// omitted from API requests. See
  4334  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4335  	NullFields []string `json:"-"`
  4336  }
  4337  
  4338  func (s *SuppressionInfo) MarshalJSON() ([]byte, error) {
  4339  	type NoMethod SuppressionInfo
  4340  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4341  }
  4342  
  4343  // TailLogEntriesRequest: The parameters to TailLogEntries.
  4344  type TailLogEntriesRequest struct {
  4345  	// BufferWindow: Optional. The amount of time to buffer log entries at the
  4346  	// server before being returned to prevent out of order results due to late
  4347  	// arriving log entries. Valid values are between 0-60000 milliseconds.
  4348  	// Defaults to 2000 milliseconds.
  4349  	BufferWindow string `json:"bufferWindow,omitempty"`
  4350  	// Filter: Optional. Only log entries that match the filter are returned. An
  4351  	// empty filter matches all log entries in the resources listed in
  4352  	// resource_names. Referencing a parent resource that is not listed in
  4353  	// resource_names will cause the filter to return no results. The maximum
  4354  	// length of a filter is 20,000 characters.
  4355  	Filter string `json:"filter,omitempty"`
  4356  	// ResourceNames: Required. Name of a parent resource from which to retrieve
  4357  	// log entries: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID]
  4358  	// billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]May alternatively be
  4359  	// one or more views:
  4360  	// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
  4361  	// _ID]
  4362  	// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
  4363  	// iews/[VIEW_ID]
  4364  	// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
  4365  	// ID]/views/[VIEW_ID]
  4366  	// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
  4367  	// D]
  4368  	ResourceNames []string `json:"resourceNames,omitempty"`
  4369  	// ForceSendFields is a list of field names (e.g. "BufferWindow") to
  4370  	// unconditionally include in API requests. By default, fields with empty or
  4371  	// default values are omitted from API requests. See
  4372  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4373  	// details.
  4374  	ForceSendFields []string `json:"-"`
  4375  	// NullFields is a list of field names (e.g. "BufferWindow") to include in API
  4376  	// requests with the JSON null value. By default, fields with empty values are
  4377  	// omitted from API requests. See
  4378  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4379  	NullFields []string `json:"-"`
  4380  }
  4381  
  4382  func (s *TailLogEntriesRequest) MarshalJSON() ([]byte, error) {
  4383  	type NoMethod TailLogEntriesRequest
  4384  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4385  }
  4386  
  4387  // TailLogEntriesResponse: Result returned from TailLogEntries.
  4388  type TailLogEntriesResponse struct {
  4389  	// Entries: A list of log entries. Each response in the stream will order
  4390  	// entries with increasing values of LogEntry.timestamp. Ordering is not
  4391  	// guaranteed between separate responses.
  4392  	Entries []*LogEntry `json:"entries,omitempty"`
  4393  	// SuppressionInfo: If entries that otherwise would have been included in the
  4394  	// session were not sent back to the client, counts of relevant entries omitted
  4395  	// from the session with the reason that they were not included. There will be
  4396  	// at most one of each reason per response. The counts represent the number of
  4397  	// suppressed entries since the last streamed response.
  4398  	SuppressionInfo []*SuppressionInfo `json:"suppressionInfo,omitempty"`
  4399  
  4400  	// ServerResponse contains the HTTP response code and headers from the server.
  4401  	googleapi.ServerResponse `json:"-"`
  4402  	// ForceSendFields is a list of field names (e.g. "Entries") to unconditionally
  4403  	// include in API requests. By default, fields with empty or default values are
  4404  	// omitted from API requests. See
  4405  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4406  	// details.
  4407  	ForceSendFields []string `json:"-"`
  4408  	// NullFields is a list of field names (e.g. "Entries") to include in API
  4409  	// requests with the JSON null value. By default, fields with empty values are
  4410  	// omitted from API requests. See
  4411  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4412  	NullFields []string `json:"-"`
  4413  }
  4414  
  4415  func (s *TailLogEntriesResponse) MarshalJSON() ([]byte, error) {
  4416  	type NoMethod TailLogEntriesResponse
  4417  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4418  }
  4419  
  4420  // TestIamPermissionsRequest: Request message for TestIamPermissions method.
  4421  type TestIamPermissionsRequest struct {
  4422  	// Permissions: The set of permissions to check for the resource. Permissions
  4423  	// with wildcards (such as * or storage.*) are not allowed. For more
  4424  	// information see IAM Overview
  4425  	// (https://cloud.google.com/iam/docs/overview#permissions).
  4426  	Permissions []string `json:"permissions,omitempty"`
  4427  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  4428  	// unconditionally include in API requests. By default, fields with empty or
  4429  	// default values are omitted from API requests. See
  4430  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4431  	// details.
  4432  	ForceSendFields []string `json:"-"`
  4433  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  4434  	// requests with the JSON null value. By default, fields with empty values are
  4435  	// omitted from API requests. See
  4436  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4437  	NullFields []string `json:"-"`
  4438  }
  4439  
  4440  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  4441  	type NoMethod TestIamPermissionsRequest
  4442  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4443  }
  4444  
  4445  // TestIamPermissionsResponse: Response message for TestIamPermissions method.
  4446  type TestIamPermissionsResponse struct {
  4447  	// Permissions: A subset of TestPermissionsRequest.permissions that the caller
  4448  	// is allowed.
  4449  	Permissions []string `json:"permissions,omitempty"`
  4450  
  4451  	// ServerResponse contains the HTTP response code and headers from the server.
  4452  	googleapi.ServerResponse `json:"-"`
  4453  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  4454  	// unconditionally include in API requests. By default, fields with empty or
  4455  	// default values are omitted from API requests. See
  4456  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4457  	// details.
  4458  	ForceSendFields []string `json:"-"`
  4459  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  4460  	// requests with the JSON null value. By default, fields with empty values are
  4461  	// omitted from API requests. See
  4462  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4463  	NullFields []string `json:"-"`
  4464  }
  4465  
  4466  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  4467  	type NoMethod TestIamPermissionsResponse
  4468  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4469  }
  4470  
  4471  // UndeleteBucketRequest: The parameters to UndeleteBucket.
  4472  type UndeleteBucketRequest struct {
  4473  }
  4474  
  4475  // UpdateBucketRequest: The parameters to UpdateBucket.
  4476  type UpdateBucketRequest struct {
  4477  	// Bucket: Required. The updated bucket.
  4478  	Bucket *LogBucket `json:"bucket,omitempty"`
  4479  	// Name: Required. The full resource name of the bucket to update.
  4480  	// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  4481  	// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  4482  	//
  4483  	// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET
  4484  	// _ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For
  4485  	// example:"projects/my-project/locations/global/buckets/my-bucket"
  4486  	Name string `json:"name,omitempty"`
  4487  	// UpdateMask: Required. Field mask that specifies the fields in bucket that
  4488  	// need an update. A bucket field will be overwritten if, and only if, it is in
  4489  	// the update mask. name and output only fields cannot be updated.For a
  4490  	// detailed FieldMask definition, see:
  4491  	// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
  4492  	// example: updateMask=retention_days
  4493  	UpdateMask string `json:"updateMask,omitempty"`
  4494  	// ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally
  4495  	// include in API requests. By default, fields with empty or default values are
  4496  	// omitted from API requests. See
  4497  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4498  	// details.
  4499  	ForceSendFields []string `json:"-"`
  4500  	// NullFields is a list of field names (e.g. "Bucket") to include in API
  4501  	// requests with the JSON null value. By default, fields with empty values are
  4502  	// omitted from API requests. See
  4503  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4504  	NullFields []string `json:"-"`
  4505  }
  4506  
  4507  func (s *UpdateBucketRequest) MarshalJSON() ([]byte, error) {
  4508  	type NoMethod UpdateBucketRequest
  4509  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4510  }
  4511  
  4512  // WriteLogEntriesRequest: The parameters to WriteLogEntries.
  4513  type WriteLogEntriesRequest struct {
  4514  	// DryRun: Optional. If true, the request should expect normal response, but
  4515  	// the entries won't be persisted nor exported. Useful for checking whether the
  4516  	// logging API endpoints are working properly before sending valuable data.
  4517  	DryRun bool `json:"dryRun,omitempty"`
  4518  	// Entries: Required. The log entries to send to Logging. The order of log
  4519  	// entries in this list does not matter. Values supplied in this method's
  4520  	// log_name, resource, and labels fields are copied into those log entries in
  4521  	// this list that do not include values for their corresponding fields. For
  4522  	// more information, see the LogEntry type.If the timestamp or insert_id fields
  4523  	// are missing in log entries, then this method supplies the current time or a
  4524  	// unique identifier, respectively. The supplied values are chosen so that,
  4525  	// among the log entries that did not supply their own values, the entries
  4526  	// earlier in the list will sort before the entries later in the list. See the
  4527  	// entries.list method.Log entries with timestamps that are more than the logs
  4528  	// retention period (https://cloud.google.com/logging/quotas) in the past or
  4529  	// more than 24 hours in the future will not be available when calling
  4530  	// entries.list. However, those log entries can still be exported with LogSinks
  4531  	// (https://cloud.google.com/logging/docs/api/tasks/exporting-logs).To improve
  4532  	// throughput and to avoid exceeding the quota limit
  4533  	// (https://cloud.google.com/logging/quotas) for calls to entries.write, you
  4534  	// should try to include several log entries in this list, rather than calling
  4535  	// this method for each individual log entry.
  4536  	Entries []*LogEntry `json:"entries,omitempty"`
  4537  	// Labels: Optional. Default labels that are added to the labels field of all
  4538  	// log entries in entries. If a log entry already has a label with the same key
  4539  	// as a label in this parameter, then the log entry's label is not changed. See
  4540  	// LogEntry.
  4541  	Labels map[string]string `json:"labels,omitempty"`
  4542  	// LogName: Optional. A default log resource name that is assigned to all log
  4543  	// entries in entries that do not specify a value for log_name:
  4544  	// projects/[PROJECT_ID]/logs/[LOG_ID]
  4545  	// organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
  4546  	// billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
  4547  	// folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For example:
  4548  	// "projects/my-project-id/logs/syslog"
  4549  	// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" The permission
  4550  	// logging.logEntries.create is needed on each project, organization, billing
  4551  	// account, or folder that is receiving new log entries, whether the resource
  4552  	// is specified in logName or in an individual log entry.
  4553  	LogName string `json:"logName,omitempty"`
  4554  	// PartialSuccess: Optional. Whether a batch's valid entries should be written
  4555  	// even if some other entry failed due to a permanent error such as
  4556  	// INVALID_ARGUMENT or PERMISSION_DENIED. If any entry failed, then the
  4557  	// response status is the response status of one of the failed entries. The
  4558  	// response will include error details in
  4559  	// WriteLogEntriesPartialErrors.log_entry_errors keyed by the entries'
  4560  	// zero-based index in the entries. Failed requests for which no entries are
  4561  	// written will not include per-entry errors.
  4562  	PartialSuccess bool `json:"partialSuccess,omitempty"`
  4563  	// Resource: Optional. A default monitored resource object that is assigned to
  4564  	// all log entries in entries that do not specify a value for resource.
  4565  	// Example: { "type": "gce_instance", "labels": { "zone": "us-central1-a",
  4566  	// "instance_id": "00000000000000000000" }} See LogEntry.
  4567  	Resource *MonitoredResource `json:"resource,omitempty"`
  4568  	// ForceSendFields is a list of field names (e.g. "DryRun") to unconditionally
  4569  	// include in API requests. By default, fields with empty or default values are
  4570  	// omitted from API requests. See
  4571  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4572  	// details.
  4573  	ForceSendFields []string `json:"-"`
  4574  	// NullFields is a list of field names (e.g. "DryRun") to include in API
  4575  	// requests with the JSON null value. By default, fields with empty values are
  4576  	// omitted from API requests. See
  4577  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4578  	NullFields []string `json:"-"`
  4579  }
  4580  
  4581  func (s *WriteLogEntriesRequest) MarshalJSON() ([]byte, error) {
  4582  	type NoMethod WriteLogEntriesRequest
  4583  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4584  }
  4585  
  4586  // WriteLogEntriesResponse: Result returned from WriteLogEntries.
  4587  type WriteLogEntriesResponse struct {
  4588  	// ServerResponse contains the HTTP response code and headers from the server.
  4589  	googleapi.ServerResponse `json:"-"`
  4590  }
  4591  
  4592  type BillingAccountsGetCmekSettingsCall struct {
  4593  	s            *Service
  4594  	name         string
  4595  	urlParams_   gensupport.URLParams
  4596  	ifNoneMatch_ string
  4597  	ctx_         context.Context
  4598  	header_      http.Header
  4599  }
  4600  
  4601  // GetCmekSettings: Gets the Logging CMEK settings for the given resource.Note:
  4602  // CMEK for the Log Router can be configured for Google Cloud projects,
  4603  // folders, organizations, and billing accounts. Once configured for an
  4604  // organization, it applies to all projects and folders in the Google Cloud
  4605  // organization.See Enabling CMEK for Log Router
  4606  // (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
  4607  // information.
  4608  //
  4609  //   - name: The resource for which to retrieve CMEK settings.
  4610  //     "projects/[PROJECT_ID]/cmekSettings"
  4611  //     "organizations/[ORGANIZATION_ID]/cmekSettings"
  4612  //     "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
  4613  //     "folders/[FOLDER_ID]/cmekSettings" For
  4614  //     example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router
  4615  //     can be configured for Google Cloud projects, folders, organizations, and
  4616  //     billing accounts. Once configured for an organization, it applies to all
  4617  //     projects and folders in the Google Cloud organization.
  4618  func (r *BillingAccountsService) GetCmekSettings(name string) *BillingAccountsGetCmekSettingsCall {
  4619  	c := &BillingAccountsGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4620  	c.name = name
  4621  	return c
  4622  }
  4623  
  4624  // Fields allows partial responses to be retrieved. See
  4625  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4626  // details.
  4627  func (c *BillingAccountsGetCmekSettingsCall) Fields(s ...googleapi.Field) *BillingAccountsGetCmekSettingsCall {
  4628  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4629  	return c
  4630  }
  4631  
  4632  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4633  // object's ETag matches the given value. This is useful for getting updates
  4634  // only after the object has changed since the last request.
  4635  func (c *BillingAccountsGetCmekSettingsCall) IfNoneMatch(entityTag string) *BillingAccountsGetCmekSettingsCall {
  4636  	c.ifNoneMatch_ = entityTag
  4637  	return c
  4638  }
  4639  
  4640  // Context sets the context to be used in this call's Do method.
  4641  func (c *BillingAccountsGetCmekSettingsCall) Context(ctx context.Context) *BillingAccountsGetCmekSettingsCall {
  4642  	c.ctx_ = ctx
  4643  	return c
  4644  }
  4645  
  4646  // Header returns a http.Header that can be modified by the caller to add
  4647  // headers to the request.
  4648  func (c *BillingAccountsGetCmekSettingsCall) Header() http.Header {
  4649  	if c.header_ == nil {
  4650  		c.header_ = make(http.Header)
  4651  	}
  4652  	return c.header_
  4653  }
  4654  
  4655  func (c *BillingAccountsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
  4656  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4657  	if c.ifNoneMatch_ != "" {
  4658  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4659  	}
  4660  	var body io.Reader = nil
  4661  	c.urlParams_.Set("alt", alt)
  4662  	c.urlParams_.Set("prettyPrint", "false")
  4663  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
  4664  	urls += "?" + c.urlParams_.Encode()
  4665  	req, err := http.NewRequest("GET", urls, body)
  4666  	if err != nil {
  4667  		return nil, err
  4668  	}
  4669  	req.Header = reqHeaders
  4670  	googleapi.Expand(req.URL, map[string]string{
  4671  		"name": c.name,
  4672  	})
  4673  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4674  }
  4675  
  4676  // Do executes the "logging.billingAccounts.getCmekSettings" call.
  4677  // Any non-2xx status code is an error. Response headers are in either
  4678  // *CmekSettings.ServerResponse.Header or (if a response was returned at all)
  4679  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4680  // whether the returned error was because http.StatusNotModified was returned.
  4681  func (c *BillingAccountsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
  4682  	gensupport.SetOptions(c.urlParams_, opts...)
  4683  	res, err := c.doRequest("json")
  4684  	if res != nil && res.StatusCode == http.StatusNotModified {
  4685  		if res.Body != nil {
  4686  			res.Body.Close()
  4687  		}
  4688  		return nil, gensupport.WrapError(&googleapi.Error{
  4689  			Code:   res.StatusCode,
  4690  			Header: res.Header,
  4691  		})
  4692  	}
  4693  	if err != nil {
  4694  		return nil, err
  4695  	}
  4696  	defer googleapi.CloseBody(res)
  4697  	if err := googleapi.CheckResponse(res); err != nil {
  4698  		return nil, gensupport.WrapError(err)
  4699  	}
  4700  	ret := &CmekSettings{
  4701  		ServerResponse: googleapi.ServerResponse{
  4702  			Header:         res.Header,
  4703  			HTTPStatusCode: res.StatusCode,
  4704  		},
  4705  	}
  4706  	target := &ret
  4707  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4708  		return nil, err
  4709  	}
  4710  	return ret, nil
  4711  }
  4712  
  4713  type BillingAccountsGetSettingsCall struct {
  4714  	s            *Service
  4715  	name         string
  4716  	urlParams_   gensupport.URLParams
  4717  	ifNoneMatch_ string
  4718  	ctx_         context.Context
  4719  	header_      http.Header
  4720  }
  4721  
  4722  // GetSettings: Gets the settings for the given resource.Note: Settings can be
  4723  // retrieved for Google Cloud projects, folders, organizations, and billing
  4724  // accounts.See View default resource settings for Logging
  4725  // (https://cloud.google.com/logging/docs/default-settings#view-org-settings)
  4726  // for more information.
  4727  //
  4728  //   - name: The resource for which to retrieve settings.
  4729  //     "projects/[PROJECT_ID]/settings"
  4730  //     "organizations/[ORGANIZATION_ID]/settings"
  4731  //     "billingAccounts/[BILLING_ACCOUNT_ID]/settings"
  4732  //     "folders/[FOLDER_ID]/settings" For
  4733  //     example:"organizations/12345/settings"Note: Settings can be retrieved for
  4734  //     Google Cloud projects, folders, organizations, and billing accounts.
  4735  func (r *BillingAccountsService) GetSettings(name string) *BillingAccountsGetSettingsCall {
  4736  	c := &BillingAccountsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4737  	c.name = name
  4738  	return c
  4739  }
  4740  
  4741  // Fields allows partial responses to be retrieved. See
  4742  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4743  // details.
  4744  func (c *BillingAccountsGetSettingsCall) Fields(s ...googleapi.Field) *BillingAccountsGetSettingsCall {
  4745  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4746  	return c
  4747  }
  4748  
  4749  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4750  // object's ETag matches the given value. This is useful for getting updates
  4751  // only after the object has changed since the last request.
  4752  func (c *BillingAccountsGetSettingsCall) IfNoneMatch(entityTag string) *BillingAccountsGetSettingsCall {
  4753  	c.ifNoneMatch_ = entityTag
  4754  	return c
  4755  }
  4756  
  4757  // Context sets the context to be used in this call's Do method.
  4758  func (c *BillingAccountsGetSettingsCall) Context(ctx context.Context) *BillingAccountsGetSettingsCall {
  4759  	c.ctx_ = ctx
  4760  	return c
  4761  }
  4762  
  4763  // Header returns a http.Header that can be modified by the caller to add
  4764  // headers to the request.
  4765  func (c *BillingAccountsGetSettingsCall) Header() http.Header {
  4766  	if c.header_ == nil {
  4767  		c.header_ = make(http.Header)
  4768  	}
  4769  	return c.header_
  4770  }
  4771  
  4772  func (c *BillingAccountsGetSettingsCall) doRequest(alt string) (*http.Response, error) {
  4773  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4774  	if c.ifNoneMatch_ != "" {
  4775  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4776  	}
  4777  	var body io.Reader = nil
  4778  	c.urlParams_.Set("alt", alt)
  4779  	c.urlParams_.Set("prettyPrint", "false")
  4780  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
  4781  	urls += "?" + c.urlParams_.Encode()
  4782  	req, err := http.NewRequest("GET", urls, body)
  4783  	if err != nil {
  4784  		return nil, err
  4785  	}
  4786  	req.Header = reqHeaders
  4787  	googleapi.Expand(req.URL, map[string]string{
  4788  		"name": c.name,
  4789  	})
  4790  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4791  }
  4792  
  4793  // Do executes the "logging.billingAccounts.getSettings" call.
  4794  // Any non-2xx status code is an error. Response headers are in either
  4795  // *Settings.ServerResponse.Header or (if a response was returned at all) in
  4796  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4797  // whether the returned error was because http.StatusNotModified was returned.
  4798  func (c *BillingAccountsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
  4799  	gensupport.SetOptions(c.urlParams_, opts...)
  4800  	res, err := c.doRequest("json")
  4801  	if res != nil && res.StatusCode == http.StatusNotModified {
  4802  		if res.Body != nil {
  4803  			res.Body.Close()
  4804  		}
  4805  		return nil, gensupport.WrapError(&googleapi.Error{
  4806  			Code:   res.StatusCode,
  4807  			Header: res.Header,
  4808  		})
  4809  	}
  4810  	if err != nil {
  4811  		return nil, err
  4812  	}
  4813  	defer googleapi.CloseBody(res)
  4814  	if err := googleapi.CheckResponse(res); err != nil {
  4815  		return nil, gensupport.WrapError(err)
  4816  	}
  4817  	ret := &Settings{
  4818  		ServerResponse: googleapi.ServerResponse{
  4819  			Header:         res.Header,
  4820  			HTTPStatusCode: res.StatusCode,
  4821  		},
  4822  	}
  4823  	target := &ret
  4824  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4825  		return nil, err
  4826  	}
  4827  	return ret, nil
  4828  }
  4829  
  4830  type BillingAccountsExclusionsCreateCall struct {
  4831  	s            *Service
  4832  	parent       string
  4833  	logexclusion *LogExclusion
  4834  	urlParams_   gensupport.URLParams
  4835  	ctx_         context.Context
  4836  	header_      http.Header
  4837  }
  4838  
  4839  // Create: Creates a new exclusion in the _Default sink in a specified parent
  4840  // resource. Only log entries belonging to that resource can be excluded. You
  4841  // can have up to 10 exclusions in a resource.
  4842  //
  4843  //   - parent: The parent resource in which to create the exclusion:
  4844  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
  4845  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
  4846  //     examples:"projects/my-logging-project" "organizations/123456789".
  4847  func (r *BillingAccountsExclusionsService) Create(parent string, logexclusion *LogExclusion) *BillingAccountsExclusionsCreateCall {
  4848  	c := &BillingAccountsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4849  	c.parent = parent
  4850  	c.logexclusion = logexclusion
  4851  	return c
  4852  }
  4853  
  4854  // Fields allows partial responses to be retrieved. See
  4855  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4856  // details.
  4857  func (c *BillingAccountsExclusionsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsCreateCall {
  4858  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4859  	return c
  4860  }
  4861  
  4862  // Context sets the context to be used in this call's Do method.
  4863  func (c *BillingAccountsExclusionsCreateCall) Context(ctx context.Context) *BillingAccountsExclusionsCreateCall {
  4864  	c.ctx_ = ctx
  4865  	return c
  4866  }
  4867  
  4868  // Header returns a http.Header that can be modified by the caller to add
  4869  // headers to the request.
  4870  func (c *BillingAccountsExclusionsCreateCall) Header() http.Header {
  4871  	if c.header_ == nil {
  4872  		c.header_ = make(http.Header)
  4873  	}
  4874  	return c.header_
  4875  }
  4876  
  4877  func (c *BillingAccountsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
  4878  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4879  	var body io.Reader = nil
  4880  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
  4881  	if err != nil {
  4882  		return nil, err
  4883  	}
  4884  	c.urlParams_.Set("alt", alt)
  4885  	c.urlParams_.Set("prettyPrint", "false")
  4886  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
  4887  	urls += "?" + c.urlParams_.Encode()
  4888  	req, err := http.NewRequest("POST", urls, body)
  4889  	if err != nil {
  4890  		return nil, err
  4891  	}
  4892  	req.Header = reqHeaders
  4893  	googleapi.Expand(req.URL, map[string]string{
  4894  		"parent": c.parent,
  4895  	})
  4896  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4897  }
  4898  
  4899  // Do executes the "logging.billingAccounts.exclusions.create" call.
  4900  // Any non-2xx status code is an error. Response headers are in either
  4901  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
  4902  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4903  // whether the returned error was because http.StatusNotModified was returned.
  4904  func (c *BillingAccountsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
  4905  	gensupport.SetOptions(c.urlParams_, opts...)
  4906  	res, err := c.doRequest("json")
  4907  	if res != nil && res.StatusCode == http.StatusNotModified {
  4908  		if res.Body != nil {
  4909  			res.Body.Close()
  4910  		}
  4911  		return nil, gensupport.WrapError(&googleapi.Error{
  4912  			Code:   res.StatusCode,
  4913  			Header: res.Header,
  4914  		})
  4915  	}
  4916  	if err != nil {
  4917  		return nil, err
  4918  	}
  4919  	defer googleapi.CloseBody(res)
  4920  	if err := googleapi.CheckResponse(res); err != nil {
  4921  		return nil, gensupport.WrapError(err)
  4922  	}
  4923  	ret := &LogExclusion{
  4924  		ServerResponse: googleapi.ServerResponse{
  4925  			Header:         res.Header,
  4926  			HTTPStatusCode: res.StatusCode,
  4927  		},
  4928  	}
  4929  	target := &ret
  4930  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4931  		return nil, err
  4932  	}
  4933  	return ret, nil
  4934  }
  4935  
  4936  type BillingAccountsExclusionsDeleteCall struct {
  4937  	s          *Service
  4938  	name       string
  4939  	urlParams_ gensupport.URLParams
  4940  	ctx_       context.Context
  4941  	header_    http.Header
  4942  }
  4943  
  4944  // Delete: Deletes an exclusion in the _Default sink.
  4945  //
  4946  //   - name: The resource name of an existing exclusion to delete:
  4947  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
  4948  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
  4949  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
  4950  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
  4951  //     example:"projects/my-project/exclusions/my-exclusion".
  4952  func (r *BillingAccountsExclusionsService) Delete(name string) *BillingAccountsExclusionsDeleteCall {
  4953  	c := &BillingAccountsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4954  	c.name = name
  4955  	return c
  4956  }
  4957  
  4958  // Fields allows partial responses to be retrieved. See
  4959  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4960  // details.
  4961  func (c *BillingAccountsExclusionsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsDeleteCall {
  4962  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4963  	return c
  4964  }
  4965  
  4966  // Context sets the context to be used in this call's Do method.
  4967  func (c *BillingAccountsExclusionsDeleteCall) Context(ctx context.Context) *BillingAccountsExclusionsDeleteCall {
  4968  	c.ctx_ = ctx
  4969  	return c
  4970  }
  4971  
  4972  // Header returns a http.Header that can be modified by the caller to add
  4973  // headers to the request.
  4974  func (c *BillingAccountsExclusionsDeleteCall) Header() http.Header {
  4975  	if c.header_ == nil {
  4976  		c.header_ = make(http.Header)
  4977  	}
  4978  	return c.header_
  4979  }
  4980  
  4981  func (c *BillingAccountsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4982  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4983  	var body io.Reader = nil
  4984  	c.urlParams_.Set("alt", alt)
  4985  	c.urlParams_.Set("prettyPrint", "false")
  4986  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  4987  	urls += "?" + c.urlParams_.Encode()
  4988  	req, err := http.NewRequest("DELETE", urls, body)
  4989  	if err != nil {
  4990  		return nil, err
  4991  	}
  4992  	req.Header = reqHeaders
  4993  	googleapi.Expand(req.URL, map[string]string{
  4994  		"name": c.name,
  4995  	})
  4996  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4997  }
  4998  
  4999  // Do executes the "logging.billingAccounts.exclusions.delete" call.
  5000  // Any non-2xx status code is an error. Response headers are in either
  5001  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5002  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5003  // whether the returned error was because http.StatusNotModified was returned.
  5004  func (c *BillingAccountsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5005  	gensupport.SetOptions(c.urlParams_, opts...)
  5006  	res, err := c.doRequest("json")
  5007  	if res != nil && res.StatusCode == http.StatusNotModified {
  5008  		if res.Body != nil {
  5009  			res.Body.Close()
  5010  		}
  5011  		return nil, gensupport.WrapError(&googleapi.Error{
  5012  			Code:   res.StatusCode,
  5013  			Header: res.Header,
  5014  		})
  5015  	}
  5016  	if err != nil {
  5017  		return nil, err
  5018  	}
  5019  	defer googleapi.CloseBody(res)
  5020  	if err := googleapi.CheckResponse(res); err != nil {
  5021  		return nil, gensupport.WrapError(err)
  5022  	}
  5023  	ret := &Empty{
  5024  		ServerResponse: googleapi.ServerResponse{
  5025  			Header:         res.Header,
  5026  			HTTPStatusCode: res.StatusCode,
  5027  		},
  5028  	}
  5029  	target := &ret
  5030  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5031  		return nil, err
  5032  	}
  5033  	return ret, nil
  5034  }
  5035  
  5036  type BillingAccountsExclusionsGetCall struct {
  5037  	s            *Service
  5038  	name         string
  5039  	urlParams_   gensupport.URLParams
  5040  	ifNoneMatch_ string
  5041  	ctx_         context.Context
  5042  	header_      http.Header
  5043  }
  5044  
  5045  // Get: Gets the description of an exclusion in the _Default sink.
  5046  //
  5047  //   - name: The resource name of an existing exclusion:
  5048  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
  5049  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
  5050  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
  5051  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
  5052  //     example:"projects/my-project/exclusions/my-exclusion".
  5053  func (r *BillingAccountsExclusionsService) Get(name string) *BillingAccountsExclusionsGetCall {
  5054  	c := &BillingAccountsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5055  	c.name = name
  5056  	return c
  5057  }
  5058  
  5059  // Fields allows partial responses to be retrieved. See
  5060  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5061  // details.
  5062  func (c *BillingAccountsExclusionsGetCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsGetCall {
  5063  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5064  	return c
  5065  }
  5066  
  5067  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5068  // object's ETag matches the given value. This is useful for getting updates
  5069  // only after the object has changed since the last request.
  5070  func (c *BillingAccountsExclusionsGetCall) IfNoneMatch(entityTag string) *BillingAccountsExclusionsGetCall {
  5071  	c.ifNoneMatch_ = entityTag
  5072  	return c
  5073  }
  5074  
  5075  // Context sets the context to be used in this call's Do method.
  5076  func (c *BillingAccountsExclusionsGetCall) Context(ctx context.Context) *BillingAccountsExclusionsGetCall {
  5077  	c.ctx_ = ctx
  5078  	return c
  5079  }
  5080  
  5081  // Header returns a http.Header that can be modified by the caller to add
  5082  // headers to the request.
  5083  func (c *BillingAccountsExclusionsGetCall) Header() http.Header {
  5084  	if c.header_ == nil {
  5085  		c.header_ = make(http.Header)
  5086  	}
  5087  	return c.header_
  5088  }
  5089  
  5090  func (c *BillingAccountsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
  5091  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5092  	if c.ifNoneMatch_ != "" {
  5093  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5094  	}
  5095  	var body io.Reader = nil
  5096  	c.urlParams_.Set("alt", alt)
  5097  	c.urlParams_.Set("prettyPrint", "false")
  5098  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5099  	urls += "?" + c.urlParams_.Encode()
  5100  	req, err := http.NewRequest("GET", urls, body)
  5101  	if err != nil {
  5102  		return nil, err
  5103  	}
  5104  	req.Header = reqHeaders
  5105  	googleapi.Expand(req.URL, map[string]string{
  5106  		"name": c.name,
  5107  	})
  5108  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5109  }
  5110  
  5111  // Do executes the "logging.billingAccounts.exclusions.get" call.
  5112  // Any non-2xx status code is an error. Response headers are in either
  5113  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
  5114  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5115  // whether the returned error was because http.StatusNotModified was returned.
  5116  func (c *BillingAccountsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
  5117  	gensupport.SetOptions(c.urlParams_, opts...)
  5118  	res, err := c.doRequest("json")
  5119  	if res != nil && res.StatusCode == http.StatusNotModified {
  5120  		if res.Body != nil {
  5121  			res.Body.Close()
  5122  		}
  5123  		return nil, gensupport.WrapError(&googleapi.Error{
  5124  			Code:   res.StatusCode,
  5125  			Header: res.Header,
  5126  		})
  5127  	}
  5128  	if err != nil {
  5129  		return nil, err
  5130  	}
  5131  	defer googleapi.CloseBody(res)
  5132  	if err := googleapi.CheckResponse(res); err != nil {
  5133  		return nil, gensupport.WrapError(err)
  5134  	}
  5135  	ret := &LogExclusion{
  5136  		ServerResponse: googleapi.ServerResponse{
  5137  			Header:         res.Header,
  5138  			HTTPStatusCode: res.StatusCode,
  5139  		},
  5140  	}
  5141  	target := &ret
  5142  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5143  		return nil, err
  5144  	}
  5145  	return ret, nil
  5146  }
  5147  
  5148  type BillingAccountsExclusionsListCall struct {
  5149  	s            *Service
  5150  	parent       string
  5151  	urlParams_   gensupport.URLParams
  5152  	ifNoneMatch_ string
  5153  	ctx_         context.Context
  5154  	header_      http.Header
  5155  }
  5156  
  5157  // List: Lists all the exclusions on the _Default sink in a parent resource.
  5158  //
  5159  //   - parent: The parent resource whose exclusions are to be listed.
  5160  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
  5161  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
  5162  func (r *BillingAccountsExclusionsService) List(parent string) *BillingAccountsExclusionsListCall {
  5163  	c := &BillingAccountsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5164  	c.parent = parent
  5165  	return c
  5166  }
  5167  
  5168  // PageSize sets the optional parameter "pageSize": The maximum number of
  5169  // results to return from this request. Non-positive values are ignored. The
  5170  // presence of nextPageToken in the response indicates that more results might
  5171  // be available.
  5172  func (c *BillingAccountsExclusionsListCall) PageSize(pageSize int64) *BillingAccountsExclusionsListCall {
  5173  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5174  	return c
  5175  }
  5176  
  5177  // PageToken sets the optional parameter "pageToken": If present, then retrieve
  5178  // the next batch of results from the preceding call to this method. pageToken
  5179  // must be the value of nextPageToken from the previous response. The values of
  5180  // other method parameters should be identical to those in the previous call.
  5181  func (c *BillingAccountsExclusionsListCall) PageToken(pageToken string) *BillingAccountsExclusionsListCall {
  5182  	c.urlParams_.Set("pageToken", pageToken)
  5183  	return c
  5184  }
  5185  
  5186  // Fields allows partial responses to be retrieved. See
  5187  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5188  // details.
  5189  func (c *BillingAccountsExclusionsListCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsListCall {
  5190  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5191  	return c
  5192  }
  5193  
  5194  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5195  // object's ETag matches the given value. This is useful for getting updates
  5196  // only after the object has changed since the last request.
  5197  func (c *BillingAccountsExclusionsListCall) IfNoneMatch(entityTag string) *BillingAccountsExclusionsListCall {
  5198  	c.ifNoneMatch_ = entityTag
  5199  	return c
  5200  }
  5201  
  5202  // Context sets the context to be used in this call's Do method.
  5203  func (c *BillingAccountsExclusionsListCall) Context(ctx context.Context) *BillingAccountsExclusionsListCall {
  5204  	c.ctx_ = ctx
  5205  	return c
  5206  }
  5207  
  5208  // Header returns a http.Header that can be modified by the caller to add
  5209  // headers to the request.
  5210  func (c *BillingAccountsExclusionsListCall) Header() http.Header {
  5211  	if c.header_ == nil {
  5212  		c.header_ = make(http.Header)
  5213  	}
  5214  	return c.header_
  5215  }
  5216  
  5217  func (c *BillingAccountsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
  5218  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5219  	if c.ifNoneMatch_ != "" {
  5220  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5221  	}
  5222  	var body io.Reader = nil
  5223  	c.urlParams_.Set("alt", alt)
  5224  	c.urlParams_.Set("prettyPrint", "false")
  5225  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
  5226  	urls += "?" + c.urlParams_.Encode()
  5227  	req, err := http.NewRequest("GET", urls, body)
  5228  	if err != nil {
  5229  		return nil, err
  5230  	}
  5231  	req.Header = reqHeaders
  5232  	googleapi.Expand(req.URL, map[string]string{
  5233  		"parent": c.parent,
  5234  	})
  5235  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5236  }
  5237  
  5238  // Do executes the "logging.billingAccounts.exclusions.list" call.
  5239  // Any non-2xx status code is an error. Response headers are in either
  5240  // *ListExclusionsResponse.ServerResponse.Header or (if a response was returned
  5241  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5242  // check whether the returned error was because http.StatusNotModified was
  5243  // returned.
  5244  func (c *BillingAccountsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
  5245  	gensupport.SetOptions(c.urlParams_, opts...)
  5246  	res, err := c.doRequest("json")
  5247  	if res != nil && res.StatusCode == http.StatusNotModified {
  5248  		if res.Body != nil {
  5249  			res.Body.Close()
  5250  		}
  5251  		return nil, gensupport.WrapError(&googleapi.Error{
  5252  			Code:   res.StatusCode,
  5253  			Header: res.Header,
  5254  		})
  5255  	}
  5256  	if err != nil {
  5257  		return nil, err
  5258  	}
  5259  	defer googleapi.CloseBody(res)
  5260  	if err := googleapi.CheckResponse(res); err != nil {
  5261  		return nil, gensupport.WrapError(err)
  5262  	}
  5263  	ret := &ListExclusionsResponse{
  5264  		ServerResponse: googleapi.ServerResponse{
  5265  			Header:         res.Header,
  5266  			HTTPStatusCode: res.StatusCode,
  5267  		},
  5268  	}
  5269  	target := &ret
  5270  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5271  		return nil, err
  5272  	}
  5273  	return ret, nil
  5274  }
  5275  
  5276  // Pages invokes f for each page of results.
  5277  // A non-nil error returned from f will halt the iteration.
  5278  // The provided context supersedes any context provided to the Context method.
  5279  func (c *BillingAccountsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
  5280  	c.ctx_ = ctx
  5281  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5282  	for {
  5283  		x, err := c.Do()
  5284  		if err != nil {
  5285  			return err
  5286  		}
  5287  		if err := f(x); err != nil {
  5288  			return err
  5289  		}
  5290  		if x.NextPageToken == "" {
  5291  			return nil
  5292  		}
  5293  		c.PageToken(x.NextPageToken)
  5294  	}
  5295  }
  5296  
  5297  type BillingAccountsExclusionsPatchCall struct {
  5298  	s            *Service
  5299  	name         string
  5300  	logexclusion *LogExclusion
  5301  	urlParams_   gensupport.URLParams
  5302  	ctx_         context.Context
  5303  	header_      http.Header
  5304  }
  5305  
  5306  // Patch: Changes one or more properties of an existing exclusion in the
  5307  // _Default sink.
  5308  //
  5309  //   - name: The resource name of the exclusion to update:
  5310  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
  5311  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
  5312  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
  5313  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
  5314  //     example:"projects/my-project/exclusions/my-exclusion".
  5315  func (r *BillingAccountsExclusionsService) Patch(name string, logexclusion *LogExclusion) *BillingAccountsExclusionsPatchCall {
  5316  	c := &BillingAccountsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5317  	c.name = name
  5318  	c.logexclusion = logexclusion
  5319  	return c
  5320  }
  5321  
  5322  // UpdateMask sets the optional parameter "updateMask": Required. A non-empty
  5323  // list of fields to change in the existing exclusion. New values for the
  5324  // fields are taken from the corresponding fields in the LogExclusion included
  5325  // in this request. Fields not mentioned in update_mask are not changed and are
  5326  // ignored in the request.For example, to change the filter and description of
  5327  // an exclusion, specify an update_mask of "filter,description".
  5328  func (c *BillingAccountsExclusionsPatchCall) UpdateMask(updateMask string) *BillingAccountsExclusionsPatchCall {
  5329  	c.urlParams_.Set("updateMask", updateMask)
  5330  	return c
  5331  }
  5332  
  5333  // Fields allows partial responses to be retrieved. See
  5334  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5335  // details.
  5336  func (c *BillingAccountsExclusionsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsExclusionsPatchCall {
  5337  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5338  	return c
  5339  }
  5340  
  5341  // Context sets the context to be used in this call's Do method.
  5342  func (c *BillingAccountsExclusionsPatchCall) Context(ctx context.Context) *BillingAccountsExclusionsPatchCall {
  5343  	c.ctx_ = ctx
  5344  	return c
  5345  }
  5346  
  5347  // Header returns a http.Header that can be modified by the caller to add
  5348  // headers to the request.
  5349  func (c *BillingAccountsExclusionsPatchCall) Header() http.Header {
  5350  	if c.header_ == nil {
  5351  		c.header_ = make(http.Header)
  5352  	}
  5353  	return c.header_
  5354  }
  5355  
  5356  func (c *BillingAccountsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
  5357  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5358  	var body io.Reader = nil
  5359  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
  5360  	if err != nil {
  5361  		return nil, err
  5362  	}
  5363  	c.urlParams_.Set("alt", alt)
  5364  	c.urlParams_.Set("prettyPrint", "false")
  5365  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5366  	urls += "?" + c.urlParams_.Encode()
  5367  	req, err := http.NewRequest("PATCH", urls, body)
  5368  	if err != nil {
  5369  		return nil, err
  5370  	}
  5371  	req.Header = reqHeaders
  5372  	googleapi.Expand(req.URL, map[string]string{
  5373  		"name": c.name,
  5374  	})
  5375  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5376  }
  5377  
  5378  // Do executes the "logging.billingAccounts.exclusions.patch" call.
  5379  // Any non-2xx status code is an error. Response headers are in either
  5380  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
  5381  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5382  // whether the returned error was because http.StatusNotModified was returned.
  5383  func (c *BillingAccountsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
  5384  	gensupport.SetOptions(c.urlParams_, opts...)
  5385  	res, err := c.doRequest("json")
  5386  	if res != nil && res.StatusCode == http.StatusNotModified {
  5387  		if res.Body != nil {
  5388  			res.Body.Close()
  5389  		}
  5390  		return nil, gensupport.WrapError(&googleapi.Error{
  5391  			Code:   res.StatusCode,
  5392  			Header: res.Header,
  5393  		})
  5394  	}
  5395  	if err != nil {
  5396  		return nil, err
  5397  	}
  5398  	defer googleapi.CloseBody(res)
  5399  	if err := googleapi.CheckResponse(res); err != nil {
  5400  		return nil, gensupport.WrapError(err)
  5401  	}
  5402  	ret := &LogExclusion{
  5403  		ServerResponse: googleapi.ServerResponse{
  5404  			Header:         res.Header,
  5405  			HTTPStatusCode: res.StatusCode,
  5406  		},
  5407  	}
  5408  	target := &ret
  5409  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5410  		return nil, err
  5411  	}
  5412  	return ret, nil
  5413  }
  5414  
  5415  type BillingAccountsLocationsGetCall struct {
  5416  	s            *Service
  5417  	name         string
  5418  	urlParams_   gensupport.URLParams
  5419  	ifNoneMatch_ string
  5420  	ctx_         context.Context
  5421  	header_      http.Header
  5422  }
  5423  
  5424  // Get: Gets information about a location.
  5425  //
  5426  // - name: Resource name for the location.
  5427  func (r *BillingAccountsLocationsService) Get(name string) *BillingAccountsLocationsGetCall {
  5428  	c := &BillingAccountsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5429  	c.name = name
  5430  	return c
  5431  }
  5432  
  5433  // Fields allows partial responses to be retrieved. See
  5434  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5435  // details.
  5436  func (c *BillingAccountsLocationsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsGetCall {
  5437  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5438  	return c
  5439  }
  5440  
  5441  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5442  // object's ETag matches the given value. This is useful for getting updates
  5443  // only after the object has changed since the last request.
  5444  func (c *BillingAccountsLocationsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsGetCall {
  5445  	c.ifNoneMatch_ = entityTag
  5446  	return c
  5447  }
  5448  
  5449  // Context sets the context to be used in this call's Do method.
  5450  func (c *BillingAccountsLocationsGetCall) Context(ctx context.Context) *BillingAccountsLocationsGetCall {
  5451  	c.ctx_ = ctx
  5452  	return c
  5453  }
  5454  
  5455  // Header returns a http.Header that can be modified by the caller to add
  5456  // headers to the request.
  5457  func (c *BillingAccountsLocationsGetCall) Header() http.Header {
  5458  	if c.header_ == nil {
  5459  		c.header_ = make(http.Header)
  5460  	}
  5461  	return c.header_
  5462  }
  5463  
  5464  func (c *BillingAccountsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  5465  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5466  	if c.ifNoneMatch_ != "" {
  5467  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5468  	}
  5469  	var body io.Reader = nil
  5470  	c.urlParams_.Set("alt", alt)
  5471  	c.urlParams_.Set("prettyPrint", "false")
  5472  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5473  	urls += "?" + c.urlParams_.Encode()
  5474  	req, err := http.NewRequest("GET", urls, body)
  5475  	if err != nil {
  5476  		return nil, err
  5477  	}
  5478  	req.Header = reqHeaders
  5479  	googleapi.Expand(req.URL, map[string]string{
  5480  		"name": c.name,
  5481  	})
  5482  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5483  }
  5484  
  5485  // Do executes the "logging.billingAccounts.locations.get" call.
  5486  // Any non-2xx status code is an error. Response headers are in either
  5487  // *Location.ServerResponse.Header or (if a response was returned at all) in
  5488  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5489  // whether the returned error was because http.StatusNotModified was returned.
  5490  func (c *BillingAccountsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  5491  	gensupport.SetOptions(c.urlParams_, opts...)
  5492  	res, err := c.doRequest("json")
  5493  	if res != nil && res.StatusCode == http.StatusNotModified {
  5494  		if res.Body != nil {
  5495  			res.Body.Close()
  5496  		}
  5497  		return nil, gensupport.WrapError(&googleapi.Error{
  5498  			Code:   res.StatusCode,
  5499  			Header: res.Header,
  5500  		})
  5501  	}
  5502  	if err != nil {
  5503  		return nil, err
  5504  	}
  5505  	defer googleapi.CloseBody(res)
  5506  	if err := googleapi.CheckResponse(res); err != nil {
  5507  		return nil, gensupport.WrapError(err)
  5508  	}
  5509  	ret := &Location{
  5510  		ServerResponse: googleapi.ServerResponse{
  5511  			Header:         res.Header,
  5512  			HTTPStatusCode: res.StatusCode,
  5513  		},
  5514  	}
  5515  	target := &ret
  5516  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5517  		return nil, err
  5518  	}
  5519  	return ret, nil
  5520  }
  5521  
  5522  type BillingAccountsLocationsListCall struct {
  5523  	s            *Service
  5524  	name         string
  5525  	urlParams_   gensupport.URLParams
  5526  	ifNoneMatch_ string
  5527  	ctx_         context.Context
  5528  	header_      http.Header
  5529  }
  5530  
  5531  // List: Lists information about the supported locations for this service.
  5532  //
  5533  // - name: The resource that owns the locations collection, if applicable.
  5534  func (r *BillingAccountsLocationsService) List(name string) *BillingAccountsLocationsListCall {
  5535  	c := &BillingAccountsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5536  	c.name = name
  5537  	return c
  5538  }
  5539  
  5540  // Filter sets the optional parameter "filter": A filter to narrow down results
  5541  // to a preferred subset. The filtering language accepts strings like
  5542  // "displayName=tokyo", and is documented in more detail in AIP-160
  5543  // (https://google.aip.dev/160).
  5544  func (c *BillingAccountsLocationsListCall) Filter(filter string) *BillingAccountsLocationsListCall {
  5545  	c.urlParams_.Set("filter", filter)
  5546  	return c
  5547  }
  5548  
  5549  // PageSize sets the optional parameter "pageSize": The maximum number of
  5550  // results to return. If not set, the service selects a default.
  5551  func (c *BillingAccountsLocationsListCall) PageSize(pageSize int64) *BillingAccountsLocationsListCall {
  5552  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5553  	return c
  5554  }
  5555  
  5556  // PageToken sets the optional parameter "pageToken": A page token received
  5557  // from the next_page_token field in the response. Send that page token to
  5558  // receive the subsequent page.
  5559  func (c *BillingAccountsLocationsListCall) PageToken(pageToken string) *BillingAccountsLocationsListCall {
  5560  	c.urlParams_.Set("pageToken", pageToken)
  5561  	return c
  5562  }
  5563  
  5564  // Fields allows partial responses to be retrieved. See
  5565  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5566  // details.
  5567  func (c *BillingAccountsLocationsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsListCall {
  5568  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5569  	return c
  5570  }
  5571  
  5572  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5573  // object's ETag matches the given value. This is useful for getting updates
  5574  // only after the object has changed since the last request.
  5575  func (c *BillingAccountsLocationsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsListCall {
  5576  	c.ifNoneMatch_ = entityTag
  5577  	return c
  5578  }
  5579  
  5580  // Context sets the context to be used in this call's Do method.
  5581  func (c *BillingAccountsLocationsListCall) Context(ctx context.Context) *BillingAccountsLocationsListCall {
  5582  	c.ctx_ = ctx
  5583  	return c
  5584  }
  5585  
  5586  // Header returns a http.Header that can be modified by the caller to add
  5587  // headers to the request.
  5588  func (c *BillingAccountsLocationsListCall) Header() http.Header {
  5589  	if c.header_ == nil {
  5590  		c.header_ = make(http.Header)
  5591  	}
  5592  	return c.header_
  5593  }
  5594  
  5595  func (c *BillingAccountsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  5596  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5597  	if c.ifNoneMatch_ != "" {
  5598  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5599  	}
  5600  	var body io.Reader = nil
  5601  	c.urlParams_.Set("alt", alt)
  5602  	c.urlParams_.Set("prettyPrint", "false")
  5603  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
  5604  	urls += "?" + c.urlParams_.Encode()
  5605  	req, err := http.NewRequest("GET", urls, body)
  5606  	if err != nil {
  5607  		return nil, err
  5608  	}
  5609  	req.Header = reqHeaders
  5610  	googleapi.Expand(req.URL, map[string]string{
  5611  		"name": c.name,
  5612  	})
  5613  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5614  }
  5615  
  5616  // Do executes the "logging.billingAccounts.locations.list" call.
  5617  // Any non-2xx status code is an error. Response headers are in either
  5618  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  5619  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5620  // check whether the returned error was because http.StatusNotModified was
  5621  // returned.
  5622  func (c *BillingAccountsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  5623  	gensupport.SetOptions(c.urlParams_, opts...)
  5624  	res, err := c.doRequest("json")
  5625  	if res != nil && res.StatusCode == http.StatusNotModified {
  5626  		if res.Body != nil {
  5627  			res.Body.Close()
  5628  		}
  5629  		return nil, gensupport.WrapError(&googleapi.Error{
  5630  			Code:   res.StatusCode,
  5631  			Header: res.Header,
  5632  		})
  5633  	}
  5634  	if err != nil {
  5635  		return nil, err
  5636  	}
  5637  	defer googleapi.CloseBody(res)
  5638  	if err := googleapi.CheckResponse(res); err != nil {
  5639  		return nil, gensupport.WrapError(err)
  5640  	}
  5641  	ret := &ListLocationsResponse{
  5642  		ServerResponse: googleapi.ServerResponse{
  5643  			Header:         res.Header,
  5644  			HTTPStatusCode: res.StatusCode,
  5645  		},
  5646  	}
  5647  	target := &ret
  5648  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5649  		return nil, err
  5650  	}
  5651  	return ret, nil
  5652  }
  5653  
  5654  // Pages invokes f for each page of results.
  5655  // A non-nil error returned from f will halt the iteration.
  5656  // The provided context supersedes any context provided to the Context method.
  5657  func (c *BillingAccountsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  5658  	c.ctx_ = ctx
  5659  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5660  	for {
  5661  		x, err := c.Do()
  5662  		if err != nil {
  5663  			return err
  5664  		}
  5665  		if err := f(x); err != nil {
  5666  			return err
  5667  		}
  5668  		if x.NextPageToken == "" {
  5669  			return nil
  5670  		}
  5671  		c.PageToken(x.NextPageToken)
  5672  	}
  5673  }
  5674  
  5675  type BillingAccountsLocationsBucketsCreateCall struct {
  5676  	s          *Service
  5677  	parent     string
  5678  	logbucket  *LogBucket
  5679  	urlParams_ gensupport.URLParams
  5680  	ctx_       context.Context
  5681  	header_    http.Header
  5682  }
  5683  
  5684  // Create: Creates a log bucket that can be used to store log entries. After a
  5685  // bucket has been created, the bucket's location cannot be changed.
  5686  //
  5687  //   - parent: The resource in which to create the log bucket:
  5688  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
  5689  //     example:"projects/my-project/locations/global".
  5690  func (r *BillingAccountsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *BillingAccountsLocationsBucketsCreateCall {
  5691  	c := &BillingAccountsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5692  	c.parent = parent
  5693  	c.logbucket = logbucket
  5694  	return c
  5695  }
  5696  
  5697  // BucketId sets the optional parameter "bucketId": Required. A client-assigned
  5698  // identifier such as "my-bucket". Identifiers are limited to 100 characters
  5699  // and can include only letters, digits, underscores, hyphens, and periods.
  5700  // Bucket identifiers must start with an alphanumeric character.
  5701  func (c *BillingAccountsLocationsBucketsCreateCall) BucketId(bucketId string) *BillingAccountsLocationsBucketsCreateCall {
  5702  	c.urlParams_.Set("bucketId", bucketId)
  5703  	return c
  5704  }
  5705  
  5706  // Fields allows partial responses to be retrieved. See
  5707  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5708  // details.
  5709  func (c *BillingAccountsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsCreateCall {
  5710  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5711  	return c
  5712  }
  5713  
  5714  // Context sets the context to be used in this call's Do method.
  5715  func (c *BillingAccountsLocationsBucketsCreateCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsCreateCall {
  5716  	c.ctx_ = ctx
  5717  	return c
  5718  }
  5719  
  5720  // Header returns a http.Header that can be modified by the caller to add
  5721  // headers to the request.
  5722  func (c *BillingAccountsLocationsBucketsCreateCall) Header() http.Header {
  5723  	if c.header_ == nil {
  5724  		c.header_ = make(http.Header)
  5725  	}
  5726  	return c.header_
  5727  }
  5728  
  5729  func (c *BillingAccountsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
  5730  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5731  	var body io.Reader = nil
  5732  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
  5733  	if err != nil {
  5734  		return nil, err
  5735  	}
  5736  	c.urlParams_.Set("alt", alt)
  5737  	c.urlParams_.Set("prettyPrint", "false")
  5738  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
  5739  	urls += "?" + c.urlParams_.Encode()
  5740  	req, err := http.NewRequest("POST", urls, body)
  5741  	if err != nil {
  5742  		return nil, err
  5743  	}
  5744  	req.Header = reqHeaders
  5745  	googleapi.Expand(req.URL, map[string]string{
  5746  		"parent": c.parent,
  5747  	})
  5748  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5749  }
  5750  
  5751  // Do executes the "logging.billingAccounts.locations.buckets.create" call.
  5752  // Any non-2xx status code is an error. Response headers are in either
  5753  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
  5754  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5755  // whether the returned error was because http.StatusNotModified was returned.
  5756  func (c *BillingAccountsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
  5757  	gensupport.SetOptions(c.urlParams_, opts...)
  5758  	res, err := c.doRequest("json")
  5759  	if res != nil && res.StatusCode == http.StatusNotModified {
  5760  		if res.Body != nil {
  5761  			res.Body.Close()
  5762  		}
  5763  		return nil, gensupport.WrapError(&googleapi.Error{
  5764  			Code:   res.StatusCode,
  5765  			Header: res.Header,
  5766  		})
  5767  	}
  5768  	if err != nil {
  5769  		return nil, err
  5770  	}
  5771  	defer googleapi.CloseBody(res)
  5772  	if err := googleapi.CheckResponse(res); err != nil {
  5773  		return nil, gensupport.WrapError(err)
  5774  	}
  5775  	ret := &LogBucket{
  5776  		ServerResponse: googleapi.ServerResponse{
  5777  			Header:         res.Header,
  5778  			HTTPStatusCode: res.StatusCode,
  5779  		},
  5780  	}
  5781  	target := &ret
  5782  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5783  		return nil, err
  5784  	}
  5785  	return ret, nil
  5786  }
  5787  
  5788  type BillingAccountsLocationsBucketsCreateAsyncCall struct {
  5789  	s          *Service
  5790  	parent     string
  5791  	logbucket  *LogBucket
  5792  	urlParams_ gensupport.URLParams
  5793  	ctx_       context.Context
  5794  	header_    http.Header
  5795  }
  5796  
  5797  // CreateAsync: Creates a log bucket asynchronously that can be used to store
  5798  // log entries.After a bucket has been created, the bucket's location cannot be
  5799  // changed.
  5800  //
  5801  //   - parent: The resource in which to create the log bucket:
  5802  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
  5803  //     example:"projects/my-project/locations/global".
  5804  func (r *BillingAccountsLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *BillingAccountsLocationsBucketsCreateAsyncCall {
  5805  	c := &BillingAccountsLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5806  	c.parent = parent
  5807  	c.logbucket = logbucket
  5808  	return c
  5809  }
  5810  
  5811  // BucketId sets the optional parameter "bucketId": Required. A client-assigned
  5812  // identifier such as "my-bucket". Identifiers are limited to 100 characters
  5813  // and can include only letters, digits, underscores, hyphens, and periods.
  5814  // Bucket identifiers must start with an alphanumeric character.
  5815  func (c *BillingAccountsLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *BillingAccountsLocationsBucketsCreateAsyncCall {
  5816  	c.urlParams_.Set("bucketId", bucketId)
  5817  	return c
  5818  }
  5819  
  5820  // Fields allows partial responses to be retrieved. See
  5821  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5822  // details.
  5823  func (c *BillingAccountsLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsCreateAsyncCall {
  5824  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5825  	return c
  5826  }
  5827  
  5828  // Context sets the context to be used in this call's Do method.
  5829  func (c *BillingAccountsLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsCreateAsyncCall {
  5830  	c.ctx_ = ctx
  5831  	return c
  5832  }
  5833  
  5834  // Header returns a http.Header that can be modified by the caller to add
  5835  // headers to the request.
  5836  func (c *BillingAccountsLocationsBucketsCreateAsyncCall) Header() http.Header {
  5837  	if c.header_ == nil {
  5838  		c.header_ = make(http.Header)
  5839  	}
  5840  	return c.header_
  5841  }
  5842  
  5843  func (c *BillingAccountsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) {
  5844  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5845  	var body io.Reader = nil
  5846  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
  5847  	if err != nil {
  5848  		return nil, err
  5849  	}
  5850  	c.urlParams_.Set("alt", alt)
  5851  	c.urlParams_.Set("prettyPrint", "false")
  5852  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync")
  5853  	urls += "?" + c.urlParams_.Encode()
  5854  	req, err := http.NewRequest("POST", urls, body)
  5855  	if err != nil {
  5856  		return nil, err
  5857  	}
  5858  	req.Header = reqHeaders
  5859  	googleapi.Expand(req.URL, map[string]string{
  5860  		"parent": c.parent,
  5861  	})
  5862  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5863  }
  5864  
  5865  // Do executes the "logging.billingAccounts.locations.buckets.createAsync" call.
  5866  // Any non-2xx status code is an error. Response headers are in either
  5867  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5868  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5869  // whether the returned error was because http.StatusNotModified was returned.
  5870  func (c *BillingAccountsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5871  	gensupport.SetOptions(c.urlParams_, opts...)
  5872  	res, err := c.doRequest("json")
  5873  	if res != nil && res.StatusCode == http.StatusNotModified {
  5874  		if res.Body != nil {
  5875  			res.Body.Close()
  5876  		}
  5877  		return nil, gensupport.WrapError(&googleapi.Error{
  5878  			Code:   res.StatusCode,
  5879  			Header: res.Header,
  5880  		})
  5881  	}
  5882  	if err != nil {
  5883  		return nil, err
  5884  	}
  5885  	defer googleapi.CloseBody(res)
  5886  	if err := googleapi.CheckResponse(res); err != nil {
  5887  		return nil, gensupport.WrapError(err)
  5888  	}
  5889  	ret := &Operation{
  5890  		ServerResponse: googleapi.ServerResponse{
  5891  			Header:         res.Header,
  5892  			HTTPStatusCode: res.StatusCode,
  5893  		},
  5894  	}
  5895  	target := &ret
  5896  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5897  		return nil, err
  5898  	}
  5899  	return ret, nil
  5900  }
  5901  
  5902  type BillingAccountsLocationsBucketsDeleteCall struct {
  5903  	s          *Service
  5904  	name       string
  5905  	urlParams_ gensupport.URLParams
  5906  	ctx_       context.Context
  5907  	header_    http.Header
  5908  }
  5909  
  5910  // Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the
  5911  // DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log
  5912  // entries in the bucket will be permanently deleted.
  5913  //
  5914  //   - name: The full resource name of the bucket to delete.
  5915  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  5916  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
  5917  //     ]"
  5918  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
  5919  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  5920  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
  5921  func (r *BillingAccountsLocationsBucketsService) Delete(name string) *BillingAccountsLocationsBucketsDeleteCall {
  5922  	c := &BillingAccountsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5923  	c.name = name
  5924  	return c
  5925  }
  5926  
  5927  // Fields allows partial responses to be retrieved. See
  5928  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5929  // details.
  5930  func (c *BillingAccountsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsDeleteCall {
  5931  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5932  	return c
  5933  }
  5934  
  5935  // Context sets the context to be used in this call's Do method.
  5936  func (c *BillingAccountsLocationsBucketsDeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsDeleteCall {
  5937  	c.ctx_ = ctx
  5938  	return c
  5939  }
  5940  
  5941  // Header returns a http.Header that can be modified by the caller to add
  5942  // headers to the request.
  5943  func (c *BillingAccountsLocationsBucketsDeleteCall) Header() http.Header {
  5944  	if c.header_ == nil {
  5945  		c.header_ = make(http.Header)
  5946  	}
  5947  	return c.header_
  5948  }
  5949  
  5950  func (c *BillingAccountsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5951  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5952  	var body io.Reader = nil
  5953  	c.urlParams_.Set("alt", alt)
  5954  	c.urlParams_.Set("prettyPrint", "false")
  5955  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5956  	urls += "?" + c.urlParams_.Encode()
  5957  	req, err := http.NewRequest("DELETE", urls, body)
  5958  	if err != nil {
  5959  		return nil, err
  5960  	}
  5961  	req.Header = reqHeaders
  5962  	googleapi.Expand(req.URL, map[string]string{
  5963  		"name": c.name,
  5964  	})
  5965  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5966  }
  5967  
  5968  // Do executes the "logging.billingAccounts.locations.buckets.delete" call.
  5969  // Any non-2xx status code is an error. Response headers are in either
  5970  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5971  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5972  // whether the returned error was because http.StatusNotModified was returned.
  5973  func (c *BillingAccountsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5974  	gensupport.SetOptions(c.urlParams_, opts...)
  5975  	res, err := c.doRequest("json")
  5976  	if res != nil && res.StatusCode == http.StatusNotModified {
  5977  		if res.Body != nil {
  5978  			res.Body.Close()
  5979  		}
  5980  		return nil, gensupport.WrapError(&googleapi.Error{
  5981  			Code:   res.StatusCode,
  5982  			Header: res.Header,
  5983  		})
  5984  	}
  5985  	if err != nil {
  5986  		return nil, err
  5987  	}
  5988  	defer googleapi.CloseBody(res)
  5989  	if err := googleapi.CheckResponse(res); err != nil {
  5990  		return nil, gensupport.WrapError(err)
  5991  	}
  5992  	ret := &Empty{
  5993  		ServerResponse: googleapi.ServerResponse{
  5994  			Header:         res.Header,
  5995  			HTTPStatusCode: res.StatusCode,
  5996  		},
  5997  	}
  5998  	target := &ret
  5999  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6000  		return nil, err
  6001  	}
  6002  	return ret, nil
  6003  }
  6004  
  6005  type BillingAccountsLocationsBucketsGetCall struct {
  6006  	s            *Service
  6007  	name         string
  6008  	urlParams_   gensupport.URLParams
  6009  	ifNoneMatch_ string
  6010  	ctx_         context.Context
  6011  	header_      http.Header
  6012  }
  6013  
  6014  // Get: Gets a log bucket.
  6015  //
  6016  //   - name: The resource name of the bucket:
  6017  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  6018  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
  6019  //     ]"
  6020  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
  6021  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  6022  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
  6023  func (r *BillingAccountsLocationsBucketsService) Get(name string) *BillingAccountsLocationsBucketsGetCall {
  6024  	c := &BillingAccountsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6025  	c.name = name
  6026  	return c
  6027  }
  6028  
  6029  // Fields allows partial responses to be retrieved. See
  6030  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6031  // details.
  6032  func (c *BillingAccountsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsGetCall {
  6033  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6034  	return c
  6035  }
  6036  
  6037  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6038  // object's ETag matches the given value. This is useful for getting updates
  6039  // only after the object has changed since the last request.
  6040  func (c *BillingAccountsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsGetCall {
  6041  	c.ifNoneMatch_ = entityTag
  6042  	return c
  6043  }
  6044  
  6045  // Context sets the context to be used in this call's Do method.
  6046  func (c *BillingAccountsLocationsBucketsGetCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsGetCall {
  6047  	c.ctx_ = ctx
  6048  	return c
  6049  }
  6050  
  6051  // Header returns a http.Header that can be modified by the caller to add
  6052  // headers to the request.
  6053  func (c *BillingAccountsLocationsBucketsGetCall) Header() http.Header {
  6054  	if c.header_ == nil {
  6055  		c.header_ = make(http.Header)
  6056  	}
  6057  	return c.header_
  6058  }
  6059  
  6060  func (c *BillingAccountsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
  6061  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6062  	if c.ifNoneMatch_ != "" {
  6063  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6064  	}
  6065  	var body io.Reader = nil
  6066  	c.urlParams_.Set("alt", alt)
  6067  	c.urlParams_.Set("prettyPrint", "false")
  6068  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6069  	urls += "?" + c.urlParams_.Encode()
  6070  	req, err := http.NewRequest("GET", urls, body)
  6071  	if err != nil {
  6072  		return nil, err
  6073  	}
  6074  	req.Header = reqHeaders
  6075  	googleapi.Expand(req.URL, map[string]string{
  6076  		"name": c.name,
  6077  	})
  6078  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6079  }
  6080  
  6081  // Do executes the "logging.billingAccounts.locations.buckets.get" call.
  6082  // Any non-2xx status code is an error. Response headers are in either
  6083  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
  6084  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6085  // whether the returned error was because http.StatusNotModified was returned.
  6086  func (c *BillingAccountsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
  6087  	gensupport.SetOptions(c.urlParams_, opts...)
  6088  	res, err := c.doRequest("json")
  6089  	if res != nil && res.StatusCode == http.StatusNotModified {
  6090  		if res.Body != nil {
  6091  			res.Body.Close()
  6092  		}
  6093  		return nil, gensupport.WrapError(&googleapi.Error{
  6094  			Code:   res.StatusCode,
  6095  			Header: res.Header,
  6096  		})
  6097  	}
  6098  	if err != nil {
  6099  		return nil, err
  6100  	}
  6101  	defer googleapi.CloseBody(res)
  6102  	if err := googleapi.CheckResponse(res); err != nil {
  6103  		return nil, gensupport.WrapError(err)
  6104  	}
  6105  	ret := &LogBucket{
  6106  		ServerResponse: googleapi.ServerResponse{
  6107  			Header:         res.Header,
  6108  			HTTPStatusCode: res.StatusCode,
  6109  		},
  6110  	}
  6111  	target := &ret
  6112  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6113  		return nil, err
  6114  	}
  6115  	return ret, nil
  6116  }
  6117  
  6118  type BillingAccountsLocationsBucketsListCall struct {
  6119  	s            *Service
  6120  	parent       string
  6121  	urlParams_   gensupport.URLParams
  6122  	ifNoneMatch_ string
  6123  	ctx_         context.Context
  6124  	header_      http.Header
  6125  }
  6126  
  6127  // List: Lists log buckets.
  6128  //
  6129  //   - parent: The parent resource whose buckets are to be listed:
  6130  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
  6131  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
  6132  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
  6133  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion
  6134  //     of the resource must be specified, but supplying the character - in place
  6135  //     of LOCATION_ID will return all buckets.
  6136  func (r *BillingAccountsLocationsBucketsService) List(parent string) *BillingAccountsLocationsBucketsListCall {
  6137  	c := &BillingAccountsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6138  	c.parent = parent
  6139  	return c
  6140  }
  6141  
  6142  // PageSize sets the optional parameter "pageSize": The maximum number of
  6143  // results to return from this request. Non-positive values are ignored. The
  6144  // presence of nextPageToken in the response indicates that more results might
  6145  // be available.
  6146  func (c *BillingAccountsLocationsBucketsListCall) PageSize(pageSize int64) *BillingAccountsLocationsBucketsListCall {
  6147  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6148  	return c
  6149  }
  6150  
  6151  // PageToken sets the optional parameter "pageToken": If present, then retrieve
  6152  // the next batch of results from the preceding call to this method. pageToken
  6153  // must be the value of nextPageToken from the previous response. The values of
  6154  // other method parameters should be identical to those in the previous call.
  6155  func (c *BillingAccountsLocationsBucketsListCall) PageToken(pageToken string) *BillingAccountsLocationsBucketsListCall {
  6156  	c.urlParams_.Set("pageToken", pageToken)
  6157  	return c
  6158  }
  6159  
  6160  // Fields allows partial responses to be retrieved. See
  6161  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6162  // details.
  6163  func (c *BillingAccountsLocationsBucketsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsListCall {
  6164  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6165  	return c
  6166  }
  6167  
  6168  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6169  // object's ETag matches the given value. This is useful for getting updates
  6170  // only after the object has changed since the last request.
  6171  func (c *BillingAccountsLocationsBucketsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsListCall {
  6172  	c.ifNoneMatch_ = entityTag
  6173  	return c
  6174  }
  6175  
  6176  // Context sets the context to be used in this call's Do method.
  6177  func (c *BillingAccountsLocationsBucketsListCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsListCall {
  6178  	c.ctx_ = ctx
  6179  	return c
  6180  }
  6181  
  6182  // Header returns a http.Header that can be modified by the caller to add
  6183  // headers to the request.
  6184  func (c *BillingAccountsLocationsBucketsListCall) Header() http.Header {
  6185  	if c.header_ == nil {
  6186  		c.header_ = make(http.Header)
  6187  	}
  6188  	return c.header_
  6189  }
  6190  
  6191  func (c *BillingAccountsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
  6192  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6193  	if c.ifNoneMatch_ != "" {
  6194  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6195  	}
  6196  	var body io.Reader = nil
  6197  	c.urlParams_.Set("alt", alt)
  6198  	c.urlParams_.Set("prettyPrint", "false")
  6199  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
  6200  	urls += "?" + c.urlParams_.Encode()
  6201  	req, err := http.NewRequest("GET", urls, body)
  6202  	if err != nil {
  6203  		return nil, err
  6204  	}
  6205  	req.Header = reqHeaders
  6206  	googleapi.Expand(req.URL, map[string]string{
  6207  		"parent": c.parent,
  6208  	})
  6209  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6210  }
  6211  
  6212  // Do executes the "logging.billingAccounts.locations.buckets.list" call.
  6213  // Any non-2xx status code is an error. Response headers are in either
  6214  // *ListBucketsResponse.ServerResponse.Header or (if a response was returned at
  6215  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6216  // check whether the returned error was because http.StatusNotModified was
  6217  // returned.
  6218  func (c *BillingAccountsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
  6219  	gensupport.SetOptions(c.urlParams_, opts...)
  6220  	res, err := c.doRequest("json")
  6221  	if res != nil && res.StatusCode == http.StatusNotModified {
  6222  		if res.Body != nil {
  6223  			res.Body.Close()
  6224  		}
  6225  		return nil, gensupport.WrapError(&googleapi.Error{
  6226  			Code:   res.StatusCode,
  6227  			Header: res.Header,
  6228  		})
  6229  	}
  6230  	if err != nil {
  6231  		return nil, err
  6232  	}
  6233  	defer googleapi.CloseBody(res)
  6234  	if err := googleapi.CheckResponse(res); err != nil {
  6235  		return nil, gensupport.WrapError(err)
  6236  	}
  6237  	ret := &ListBucketsResponse{
  6238  		ServerResponse: googleapi.ServerResponse{
  6239  			Header:         res.Header,
  6240  			HTTPStatusCode: res.StatusCode,
  6241  		},
  6242  	}
  6243  	target := &ret
  6244  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6245  		return nil, err
  6246  	}
  6247  	return ret, nil
  6248  }
  6249  
  6250  // Pages invokes f for each page of results.
  6251  // A non-nil error returned from f will halt the iteration.
  6252  // The provided context supersedes any context provided to the Context method.
  6253  func (c *BillingAccountsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
  6254  	c.ctx_ = ctx
  6255  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6256  	for {
  6257  		x, err := c.Do()
  6258  		if err != nil {
  6259  			return err
  6260  		}
  6261  		if err := f(x); err != nil {
  6262  			return err
  6263  		}
  6264  		if x.NextPageToken == "" {
  6265  			return nil
  6266  		}
  6267  		c.PageToken(x.NextPageToken)
  6268  	}
  6269  }
  6270  
  6271  type BillingAccountsLocationsBucketsPatchCall struct {
  6272  	s          *Service
  6273  	name       string
  6274  	logbucket  *LogBucket
  6275  	urlParams_ gensupport.URLParams
  6276  	ctx_       context.Context
  6277  	header_    http.Header
  6278  }
  6279  
  6280  // Patch: Updates a log bucket.If the bucket has a lifecycle_state of
  6281  // DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket
  6282  // has been created, the bucket's location cannot be changed.
  6283  //
  6284  //   - name: The full resource name of the bucket to update.
  6285  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  6286  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
  6287  //     ]"
  6288  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
  6289  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  6290  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
  6291  func (r *BillingAccountsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *BillingAccountsLocationsBucketsPatchCall {
  6292  	c := &BillingAccountsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6293  	c.name = name
  6294  	c.logbucket = logbucket
  6295  	return c
  6296  }
  6297  
  6298  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
  6299  // that specifies the fields in bucket that need an update. A bucket field will
  6300  // be overwritten if, and only if, it is in the update mask. name and output
  6301  // only fields cannot be updated.For a detailed FieldMask definition, see:
  6302  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
  6303  // example: updateMask=retention_days
  6304  func (c *BillingAccountsLocationsBucketsPatchCall) UpdateMask(updateMask string) *BillingAccountsLocationsBucketsPatchCall {
  6305  	c.urlParams_.Set("updateMask", updateMask)
  6306  	return c
  6307  }
  6308  
  6309  // Fields allows partial responses to be retrieved. See
  6310  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6311  // details.
  6312  func (c *BillingAccountsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsPatchCall {
  6313  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6314  	return c
  6315  }
  6316  
  6317  // Context sets the context to be used in this call's Do method.
  6318  func (c *BillingAccountsLocationsBucketsPatchCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsPatchCall {
  6319  	c.ctx_ = ctx
  6320  	return c
  6321  }
  6322  
  6323  // Header returns a http.Header that can be modified by the caller to add
  6324  // headers to the request.
  6325  func (c *BillingAccountsLocationsBucketsPatchCall) Header() http.Header {
  6326  	if c.header_ == nil {
  6327  		c.header_ = make(http.Header)
  6328  	}
  6329  	return c.header_
  6330  }
  6331  
  6332  func (c *BillingAccountsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
  6333  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6334  	var body io.Reader = nil
  6335  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
  6336  	if err != nil {
  6337  		return nil, err
  6338  	}
  6339  	c.urlParams_.Set("alt", alt)
  6340  	c.urlParams_.Set("prettyPrint", "false")
  6341  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6342  	urls += "?" + c.urlParams_.Encode()
  6343  	req, err := http.NewRequest("PATCH", urls, body)
  6344  	if err != nil {
  6345  		return nil, err
  6346  	}
  6347  	req.Header = reqHeaders
  6348  	googleapi.Expand(req.URL, map[string]string{
  6349  		"name": c.name,
  6350  	})
  6351  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6352  }
  6353  
  6354  // Do executes the "logging.billingAccounts.locations.buckets.patch" call.
  6355  // Any non-2xx status code is an error. Response headers are in either
  6356  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
  6357  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6358  // whether the returned error was because http.StatusNotModified was returned.
  6359  func (c *BillingAccountsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
  6360  	gensupport.SetOptions(c.urlParams_, opts...)
  6361  	res, err := c.doRequest("json")
  6362  	if res != nil && res.StatusCode == http.StatusNotModified {
  6363  		if res.Body != nil {
  6364  			res.Body.Close()
  6365  		}
  6366  		return nil, gensupport.WrapError(&googleapi.Error{
  6367  			Code:   res.StatusCode,
  6368  			Header: res.Header,
  6369  		})
  6370  	}
  6371  	if err != nil {
  6372  		return nil, err
  6373  	}
  6374  	defer googleapi.CloseBody(res)
  6375  	if err := googleapi.CheckResponse(res); err != nil {
  6376  		return nil, gensupport.WrapError(err)
  6377  	}
  6378  	ret := &LogBucket{
  6379  		ServerResponse: googleapi.ServerResponse{
  6380  			Header:         res.Header,
  6381  			HTTPStatusCode: res.StatusCode,
  6382  		},
  6383  	}
  6384  	target := &ret
  6385  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6386  		return nil, err
  6387  	}
  6388  	return ret, nil
  6389  }
  6390  
  6391  type BillingAccountsLocationsBucketsUndeleteCall struct {
  6392  	s                     *Service
  6393  	name                  string
  6394  	undeletebucketrequest *UndeleteBucketRequest
  6395  	urlParams_            gensupport.URLParams
  6396  	ctx_                  context.Context
  6397  	header_               http.Header
  6398  }
  6399  
  6400  // Undelete: Undeletes a log bucket. A bucket that has been deleted can be
  6401  // undeleted within the grace period of 7 days.
  6402  //
  6403  //   - name: The full resource name of the bucket to undelete.
  6404  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  6405  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
  6406  //     ]"
  6407  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
  6408  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  6409  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
  6410  func (r *BillingAccountsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *BillingAccountsLocationsBucketsUndeleteCall {
  6411  	c := &BillingAccountsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6412  	c.name = name
  6413  	c.undeletebucketrequest = undeletebucketrequest
  6414  	return c
  6415  }
  6416  
  6417  // Fields allows partial responses to be retrieved. See
  6418  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6419  // details.
  6420  func (c *BillingAccountsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsUndeleteCall {
  6421  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6422  	return c
  6423  }
  6424  
  6425  // Context sets the context to be used in this call's Do method.
  6426  func (c *BillingAccountsLocationsBucketsUndeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsUndeleteCall {
  6427  	c.ctx_ = ctx
  6428  	return c
  6429  }
  6430  
  6431  // Header returns a http.Header that can be modified by the caller to add
  6432  // headers to the request.
  6433  func (c *BillingAccountsLocationsBucketsUndeleteCall) Header() http.Header {
  6434  	if c.header_ == nil {
  6435  		c.header_ = make(http.Header)
  6436  	}
  6437  	return c.header_
  6438  }
  6439  
  6440  func (c *BillingAccountsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
  6441  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6442  	var body io.Reader = nil
  6443  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
  6444  	if err != nil {
  6445  		return nil, err
  6446  	}
  6447  	c.urlParams_.Set("alt", alt)
  6448  	c.urlParams_.Set("prettyPrint", "false")
  6449  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
  6450  	urls += "?" + c.urlParams_.Encode()
  6451  	req, err := http.NewRequest("POST", urls, body)
  6452  	if err != nil {
  6453  		return nil, err
  6454  	}
  6455  	req.Header = reqHeaders
  6456  	googleapi.Expand(req.URL, map[string]string{
  6457  		"name": c.name,
  6458  	})
  6459  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6460  }
  6461  
  6462  // Do executes the "logging.billingAccounts.locations.buckets.undelete" call.
  6463  // Any non-2xx status code is an error. Response headers are in either
  6464  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  6465  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6466  // whether the returned error was because http.StatusNotModified was returned.
  6467  func (c *BillingAccountsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6468  	gensupport.SetOptions(c.urlParams_, opts...)
  6469  	res, err := c.doRequest("json")
  6470  	if res != nil && res.StatusCode == http.StatusNotModified {
  6471  		if res.Body != nil {
  6472  			res.Body.Close()
  6473  		}
  6474  		return nil, gensupport.WrapError(&googleapi.Error{
  6475  			Code:   res.StatusCode,
  6476  			Header: res.Header,
  6477  		})
  6478  	}
  6479  	if err != nil {
  6480  		return nil, err
  6481  	}
  6482  	defer googleapi.CloseBody(res)
  6483  	if err := googleapi.CheckResponse(res); err != nil {
  6484  		return nil, gensupport.WrapError(err)
  6485  	}
  6486  	ret := &Empty{
  6487  		ServerResponse: googleapi.ServerResponse{
  6488  			Header:         res.Header,
  6489  			HTTPStatusCode: res.StatusCode,
  6490  		},
  6491  	}
  6492  	target := &ret
  6493  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6494  		return nil, err
  6495  	}
  6496  	return ret, nil
  6497  }
  6498  
  6499  type BillingAccountsLocationsBucketsUpdateAsyncCall struct {
  6500  	s          *Service
  6501  	name       string
  6502  	logbucket  *LogBucket
  6503  	urlParams_ gensupport.URLParams
  6504  	ctx_       context.Context
  6505  	header_    http.Header
  6506  }
  6507  
  6508  // UpdateAsync: Updates a log bucket asynchronously.If the bucket has a
  6509  // lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be
  6510  // returned.After a bucket has been created, the bucket's location cannot be
  6511  // changed.
  6512  //
  6513  //   - name: The full resource name of the bucket to update.
  6514  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  6515  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
  6516  //     ]"
  6517  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
  6518  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  6519  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
  6520  func (r *BillingAccountsLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *BillingAccountsLocationsBucketsUpdateAsyncCall {
  6521  	c := &BillingAccountsLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6522  	c.name = name
  6523  	c.logbucket = logbucket
  6524  	return c
  6525  }
  6526  
  6527  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
  6528  // that specifies the fields in bucket that need an update. A bucket field will
  6529  // be overwritten if, and only if, it is in the update mask. name and output
  6530  // only fields cannot be updated.For a detailed FieldMask definition, see:
  6531  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
  6532  // example: updateMask=retention_days
  6533  func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *BillingAccountsLocationsBucketsUpdateAsyncCall {
  6534  	c.urlParams_.Set("updateMask", updateMask)
  6535  	return c
  6536  }
  6537  
  6538  // Fields allows partial responses to be retrieved. See
  6539  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6540  // details.
  6541  func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsUpdateAsyncCall {
  6542  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6543  	return c
  6544  }
  6545  
  6546  // Context sets the context to be used in this call's Do method.
  6547  func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsUpdateAsyncCall {
  6548  	c.ctx_ = ctx
  6549  	return c
  6550  }
  6551  
  6552  // Header returns a http.Header that can be modified by the caller to add
  6553  // headers to the request.
  6554  func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) Header() http.Header {
  6555  	if c.header_ == nil {
  6556  		c.header_ = make(http.Header)
  6557  	}
  6558  	return c.header_
  6559  }
  6560  
  6561  func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) {
  6562  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6563  	var body io.Reader = nil
  6564  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
  6565  	if err != nil {
  6566  		return nil, err
  6567  	}
  6568  	c.urlParams_.Set("alt", alt)
  6569  	c.urlParams_.Set("prettyPrint", "false")
  6570  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync")
  6571  	urls += "?" + c.urlParams_.Encode()
  6572  	req, err := http.NewRequest("POST", urls, body)
  6573  	if err != nil {
  6574  		return nil, err
  6575  	}
  6576  	req.Header = reqHeaders
  6577  	googleapi.Expand(req.URL, map[string]string{
  6578  		"name": c.name,
  6579  	})
  6580  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6581  }
  6582  
  6583  // Do executes the "logging.billingAccounts.locations.buckets.updateAsync" call.
  6584  // Any non-2xx status code is an error. Response headers are in either
  6585  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6586  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6587  // whether the returned error was because http.StatusNotModified was returned.
  6588  func (c *BillingAccountsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6589  	gensupport.SetOptions(c.urlParams_, opts...)
  6590  	res, err := c.doRequest("json")
  6591  	if res != nil && res.StatusCode == http.StatusNotModified {
  6592  		if res.Body != nil {
  6593  			res.Body.Close()
  6594  		}
  6595  		return nil, gensupport.WrapError(&googleapi.Error{
  6596  			Code:   res.StatusCode,
  6597  			Header: res.Header,
  6598  		})
  6599  	}
  6600  	if err != nil {
  6601  		return nil, err
  6602  	}
  6603  	defer googleapi.CloseBody(res)
  6604  	if err := googleapi.CheckResponse(res); err != nil {
  6605  		return nil, gensupport.WrapError(err)
  6606  	}
  6607  	ret := &Operation{
  6608  		ServerResponse: googleapi.ServerResponse{
  6609  			Header:         res.Header,
  6610  			HTTPStatusCode: res.StatusCode,
  6611  		},
  6612  	}
  6613  	target := &ret
  6614  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6615  		return nil, err
  6616  	}
  6617  	return ret, nil
  6618  }
  6619  
  6620  type BillingAccountsLocationsBucketsLinksCreateCall struct {
  6621  	s          *Service
  6622  	parent     string
  6623  	link       *Link
  6624  	urlParams_ gensupport.URLParams
  6625  	ctx_       context.Context
  6626  	header_    http.Header
  6627  }
  6628  
  6629  // Create: Asynchronously creates a linked dataset in BigQuery which makes it
  6630  // possible to use BigQuery to read the logs stored in the log bucket. A log
  6631  // bucket may currently only contain one link.
  6632  //
  6633  //   - parent: The full resource name of the bucket to create a link for.
  6634  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  6635  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
  6636  //     ]"
  6637  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
  6638  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
  6639  func (r *BillingAccountsLocationsBucketsLinksService) Create(parent string, link *Link) *BillingAccountsLocationsBucketsLinksCreateCall {
  6640  	c := &BillingAccountsLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6641  	c.parent = parent
  6642  	c.link = link
  6643  	return c
  6644  }
  6645  
  6646  // LinkId sets the optional parameter "linkId": Required. The ID to use for the
  6647  // link. The link_id can have up to 100 characters. A valid link_id must only
  6648  // have alphanumeric characters and underscores within it.
  6649  func (c *BillingAccountsLocationsBucketsLinksCreateCall) LinkId(linkId string) *BillingAccountsLocationsBucketsLinksCreateCall {
  6650  	c.urlParams_.Set("linkId", linkId)
  6651  	return c
  6652  }
  6653  
  6654  // Fields allows partial responses to be retrieved. See
  6655  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6656  // details.
  6657  func (c *BillingAccountsLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsLinksCreateCall {
  6658  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6659  	return c
  6660  }
  6661  
  6662  // Context sets the context to be used in this call's Do method.
  6663  func (c *BillingAccountsLocationsBucketsLinksCreateCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsLinksCreateCall {
  6664  	c.ctx_ = ctx
  6665  	return c
  6666  }
  6667  
  6668  // Header returns a http.Header that can be modified by the caller to add
  6669  // headers to the request.
  6670  func (c *BillingAccountsLocationsBucketsLinksCreateCall) Header() http.Header {
  6671  	if c.header_ == nil {
  6672  		c.header_ = make(http.Header)
  6673  	}
  6674  	return c.header_
  6675  }
  6676  
  6677  func (c *BillingAccountsLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
  6678  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6679  	var body io.Reader = nil
  6680  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
  6681  	if err != nil {
  6682  		return nil, err
  6683  	}
  6684  	c.urlParams_.Set("alt", alt)
  6685  	c.urlParams_.Set("prettyPrint", "false")
  6686  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
  6687  	urls += "?" + c.urlParams_.Encode()
  6688  	req, err := http.NewRequest("POST", urls, body)
  6689  	if err != nil {
  6690  		return nil, err
  6691  	}
  6692  	req.Header = reqHeaders
  6693  	googleapi.Expand(req.URL, map[string]string{
  6694  		"parent": c.parent,
  6695  	})
  6696  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6697  }
  6698  
  6699  // Do executes the "logging.billingAccounts.locations.buckets.links.create" call.
  6700  // Any non-2xx status code is an error. Response headers are in either
  6701  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6702  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6703  // whether the returned error was because http.StatusNotModified was returned.
  6704  func (c *BillingAccountsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6705  	gensupport.SetOptions(c.urlParams_, opts...)
  6706  	res, err := c.doRequest("json")
  6707  	if res != nil && res.StatusCode == http.StatusNotModified {
  6708  		if res.Body != nil {
  6709  			res.Body.Close()
  6710  		}
  6711  		return nil, gensupport.WrapError(&googleapi.Error{
  6712  			Code:   res.StatusCode,
  6713  			Header: res.Header,
  6714  		})
  6715  	}
  6716  	if err != nil {
  6717  		return nil, err
  6718  	}
  6719  	defer googleapi.CloseBody(res)
  6720  	if err := googleapi.CheckResponse(res); err != nil {
  6721  		return nil, gensupport.WrapError(err)
  6722  	}
  6723  	ret := &Operation{
  6724  		ServerResponse: googleapi.ServerResponse{
  6725  			Header:         res.Header,
  6726  			HTTPStatusCode: res.StatusCode,
  6727  		},
  6728  	}
  6729  	target := &ret
  6730  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6731  		return nil, err
  6732  	}
  6733  	return ret, nil
  6734  }
  6735  
  6736  type BillingAccountsLocationsBucketsLinksDeleteCall struct {
  6737  	s          *Service
  6738  	name       string
  6739  	urlParams_ gensupport.URLParams
  6740  	ctx_       context.Context
  6741  	header_    http.Header
  6742  }
  6743  
  6744  // Delete: Deletes a link. This will also delete the corresponding BigQuery
  6745  // linked dataset.
  6746  //
  6747  //   - name: The full resource name of the link to delete.
  6748  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L
  6749  //     INK_ID]"
  6750  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
  6751  //     ]/links/[LINK_ID]"
  6752  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
  6753  //     ET_ID]/links/[LINK_ID]"
  6754  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
  6755  //     K_ID]".
  6756  func (r *BillingAccountsLocationsBucketsLinksService) Delete(name string) *BillingAccountsLocationsBucketsLinksDeleteCall {
  6757  	c := &BillingAccountsLocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6758  	c.name = name
  6759  	return c
  6760  }
  6761  
  6762  // Fields allows partial responses to be retrieved. See
  6763  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6764  // details.
  6765  func (c *BillingAccountsLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsLinksDeleteCall {
  6766  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6767  	return c
  6768  }
  6769  
  6770  // Context sets the context to be used in this call's Do method.
  6771  func (c *BillingAccountsLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsLinksDeleteCall {
  6772  	c.ctx_ = ctx
  6773  	return c
  6774  }
  6775  
  6776  // Header returns a http.Header that can be modified by the caller to add
  6777  // headers to the request.
  6778  func (c *BillingAccountsLocationsBucketsLinksDeleteCall) Header() http.Header {
  6779  	if c.header_ == nil {
  6780  		c.header_ = make(http.Header)
  6781  	}
  6782  	return c.header_
  6783  }
  6784  
  6785  func (c *BillingAccountsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
  6786  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6787  	var body io.Reader = nil
  6788  	c.urlParams_.Set("alt", alt)
  6789  	c.urlParams_.Set("prettyPrint", "false")
  6790  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6791  	urls += "?" + c.urlParams_.Encode()
  6792  	req, err := http.NewRequest("DELETE", urls, body)
  6793  	if err != nil {
  6794  		return nil, err
  6795  	}
  6796  	req.Header = reqHeaders
  6797  	googleapi.Expand(req.URL, map[string]string{
  6798  		"name": c.name,
  6799  	})
  6800  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6801  }
  6802  
  6803  // Do executes the "logging.billingAccounts.locations.buckets.links.delete" call.
  6804  // Any non-2xx status code is an error. Response headers are in either
  6805  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6806  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6807  // whether the returned error was because http.StatusNotModified was returned.
  6808  func (c *BillingAccountsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6809  	gensupport.SetOptions(c.urlParams_, opts...)
  6810  	res, err := c.doRequest("json")
  6811  	if res != nil && res.StatusCode == http.StatusNotModified {
  6812  		if res.Body != nil {
  6813  			res.Body.Close()
  6814  		}
  6815  		return nil, gensupport.WrapError(&googleapi.Error{
  6816  			Code:   res.StatusCode,
  6817  			Header: res.Header,
  6818  		})
  6819  	}
  6820  	if err != nil {
  6821  		return nil, err
  6822  	}
  6823  	defer googleapi.CloseBody(res)
  6824  	if err := googleapi.CheckResponse(res); err != nil {
  6825  		return nil, gensupport.WrapError(err)
  6826  	}
  6827  	ret := &Operation{
  6828  		ServerResponse: googleapi.ServerResponse{
  6829  			Header:         res.Header,
  6830  			HTTPStatusCode: res.StatusCode,
  6831  		},
  6832  	}
  6833  	target := &ret
  6834  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6835  		return nil, err
  6836  	}
  6837  	return ret, nil
  6838  }
  6839  
  6840  type BillingAccountsLocationsBucketsLinksGetCall struct {
  6841  	s            *Service
  6842  	name         string
  6843  	urlParams_   gensupport.URLParams
  6844  	ifNoneMatch_ string
  6845  	ctx_         context.Context
  6846  	header_      http.Header
  6847  }
  6848  
  6849  // Get: Gets a link.
  6850  //
  6851  //   - name: The resource name of the link:
  6852  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L
  6853  //     INK_ID]"
  6854  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
  6855  //     ]/links/[LINK_ID]"
  6856  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
  6857  //     ET_ID]/links/[LINK_ID]"
  6858  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
  6859  //     K_ID]".
  6860  func (r *BillingAccountsLocationsBucketsLinksService) Get(name string) *BillingAccountsLocationsBucketsLinksGetCall {
  6861  	c := &BillingAccountsLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6862  	c.name = name
  6863  	return c
  6864  }
  6865  
  6866  // Fields allows partial responses to be retrieved. See
  6867  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6868  // details.
  6869  func (c *BillingAccountsLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsLinksGetCall {
  6870  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6871  	return c
  6872  }
  6873  
  6874  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6875  // object's ETag matches the given value. This is useful for getting updates
  6876  // only after the object has changed since the last request.
  6877  func (c *BillingAccountsLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsLinksGetCall {
  6878  	c.ifNoneMatch_ = entityTag
  6879  	return c
  6880  }
  6881  
  6882  // Context sets the context to be used in this call's Do method.
  6883  func (c *BillingAccountsLocationsBucketsLinksGetCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsLinksGetCall {
  6884  	c.ctx_ = ctx
  6885  	return c
  6886  }
  6887  
  6888  // Header returns a http.Header that can be modified by the caller to add
  6889  // headers to the request.
  6890  func (c *BillingAccountsLocationsBucketsLinksGetCall) Header() http.Header {
  6891  	if c.header_ == nil {
  6892  		c.header_ = make(http.Header)
  6893  	}
  6894  	return c.header_
  6895  }
  6896  
  6897  func (c *BillingAccountsLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) {
  6898  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6899  	if c.ifNoneMatch_ != "" {
  6900  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6901  	}
  6902  	var body io.Reader = nil
  6903  	c.urlParams_.Set("alt", alt)
  6904  	c.urlParams_.Set("prettyPrint", "false")
  6905  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6906  	urls += "?" + c.urlParams_.Encode()
  6907  	req, err := http.NewRequest("GET", urls, body)
  6908  	if err != nil {
  6909  		return nil, err
  6910  	}
  6911  	req.Header = reqHeaders
  6912  	googleapi.Expand(req.URL, map[string]string{
  6913  		"name": c.name,
  6914  	})
  6915  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6916  }
  6917  
  6918  // Do executes the "logging.billingAccounts.locations.buckets.links.get" call.
  6919  // Any non-2xx status code is an error. Response headers are in either
  6920  // *Link.ServerResponse.Header or (if a response was returned at all) in
  6921  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6922  // whether the returned error was because http.StatusNotModified was returned.
  6923  func (c *BillingAccountsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) {
  6924  	gensupport.SetOptions(c.urlParams_, opts...)
  6925  	res, err := c.doRequest("json")
  6926  	if res != nil && res.StatusCode == http.StatusNotModified {
  6927  		if res.Body != nil {
  6928  			res.Body.Close()
  6929  		}
  6930  		return nil, gensupport.WrapError(&googleapi.Error{
  6931  			Code:   res.StatusCode,
  6932  			Header: res.Header,
  6933  		})
  6934  	}
  6935  	if err != nil {
  6936  		return nil, err
  6937  	}
  6938  	defer googleapi.CloseBody(res)
  6939  	if err := googleapi.CheckResponse(res); err != nil {
  6940  		return nil, gensupport.WrapError(err)
  6941  	}
  6942  	ret := &Link{
  6943  		ServerResponse: googleapi.ServerResponse{
  6944  			Header:         res.Header,
  6945  			HTTPStatusCode: res.StatusCode,
  6946  		},
  6947  	}
  6948  	target := &ret
  6949  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6950  		return nil, err
  6951  	}
  6952  	return ret, nil
  6953  }
  6954  
  6955  type BillingAccountsLocationsBucketsLinksListCall struct {
  6956  	s            *Service
  6957  	parent       string
  6958  	urlParams_   gensupport.URLParams
  6959  	ifNoneMatch_ string
  6960  	ctx_         context.Context
  6961  	header_      http.Header
  6962  }
  6963  
  6964  // List: Lists links.
  6965  //
  6966  //   - parent: The parent resource whose links are to be listed:
  6967  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  6968  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
  6969  //     ]"
  6970  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
  6971  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
  6972  func (r *BillingAccountsLocationsBucketsLinksService) List(parent string) *BillingAccountsLocationsBucketsLinksListCall {
  6973  	c := &BillingAccountsLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6974  	c.parent = parent
  6975  	return c
  6976  }
  6977  
  6978  // PageSize sets the optional parameter "pageSize": The maximum number of
  6979  // results to return from this request.
  6980  func (c *BillingAccountsLocationsBucketsLinksListCall) PageSize(pageSize int64) *BillingAccountsLocationsBucketsLinksListCall {
  6981  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6982  	return c
  6983  }
  6984  
  6985  // PageToken sets the optional parameter "pageToken": If present, then retrieve
  6986  // the next batch of results from the preceding call to this method. pageToken
  6987  // must be the value of nextPageToken from the previous response.
  6988  func (c *BillingAccountsLocationsBucketsLinksListCall) PageToken(pageToken string) *BillingAccountsLocationsBucketsLinksListCall {
  6989  	c.urlParams_.Set("pageToken", pageToken)
  6990  	return c
  6991  }
  6992  
  6993  // Fields allows partial responses to be retrieved. See
  6994  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6995  // details.
  6996  func (c *BillingAccountsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsLinksListCall {
  6997  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6998  	return c
  6999  }
  7000  
  7001  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7002  // object's ETag matches the given value. This is useful for getting updates
  7003  // only after the object has changed since the last request.
  7004  func (c *BillingAccountsLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsLinksListCall {
  7005  	c.ifNoneMatch_ = entityTag
  7006  	return c
  7007  }
  7008  
  7009  // Context sets the context to be used in this call's Do method.
  7010  func (c *BillingAccountsLocationsBucketsLinksListCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsLinksListCall {
  7011  	c.ctx_ = ctx
  7012  	return c
  7013  }
  7014  
  7015  // Header returns a http.Header that can be modified by the caller to add
  7016  // headers to the request.
  7017  func (c *BillingAccountsLocationsBucketsLinksListCall) Header() http.Header {
  7018  	if c.header_ == nil {
  7019  		c.header_ = make(http.Header)
  7020  	}
  7021  	return c.header_
  7022  }
  7023  
  7024  func (c *BillingAccountsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) {
  7025  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7026  	if c.ifNoneMatch_ != "" {
  7027  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7028  	}
  7029  	var body io.Reader = nil
  7030  	c.urlParams_.Set("alt", alt)
  7031  	c.urlParams_.Set("prettyPrint", "false")
  7032  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
  7033  	urls += "?" + c.urlParams_.Encode()
  7034  	req, err := http.NewRequest("GET", urls, body)
  7035  	if err != nil {
  7036  		return nil, err
  7037  	}
  7038  	req.Header = reqHeaders
  7039  	googleapi.Expand(req.URL, map[string]string{
  7040  		"parent": c.parent,
  7041  	})
  7042  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7043  }
  7044  
  7045  // Do executes the "logging.billingAccounts.locations.buckets.links.list" call.
  7046  // Any non-2xx status code is an error. Response headers are in either
  7047  // *ListLinksResponse.ServerResponse.Header or (if a response was returned at
  7048  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7049  // check whether the returned error was because http.StatusNotModified was
  7050  // returned.
  7051  func (c *BillingAccountsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) {
  7052  	gensupport.SetOptions(c.urlParams_, opts...)
  7053  	res, err := c.doRequest("json")
  7054  	if res != nil && res.StatusCode == http.StatusNotModified {
  7055  		if res.Body != nil {
  7056  			res.Body.Close()
  7057  		}
  7058  		return nil, gensupport.WrapError(&googleapi.Error{
  7059  			Code:   res.StatusCode,
  7060  			Header: res.Header,
  7061  		})
  7062  	}
  7063  	if err != nil {
  7064  		return nil, err
  7065  	}
  7066  	defer googleapi.CloseBody(res)
  7067  	if err := googleapi.CheckResponse(res); err != nil {
  7068  		return nil, gensupport.WrapError(err)
  7069  	}
  7070  	ret := &ListLinksResponse{
  7071  		ServerResponse: googleapi.ServerResponse{
  7072  			Header:         res.Header,
  7073  			HTTPStatusCode: res.StatusCode,
  7074  		},
  7075  	}
  7076  	target := &ret
  7077  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7078  		return nil, err
  7079  	}
  7080  	return ret, nil
  7081  }
  7082  
  7083  // Pages invokes f for each page of results.
  7084  // A non-nil error returned from f will halt the iteration.
  7085  // The provided context supersedes any context provided to the Context method.
  7086  func (c *BillingAccountsLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error {
  7087  	c.ctx_ = ctx
  7088  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7089  	for {
  7090  		x, err := c.Do()
  7091  		if err != nil {
  7092  			return err
  7093  		}
  7094  		if err := f(x); err != nil {
  7095  			return err
  7096  		}
  7097  		if x.NextPageToken == "" {
  7098  			return nil
  7099  		}
  7100  		c.PageToken(x.NextPageToken)
  7101  	}
  7102  }
  7103  
  7104  type BillingAccountsLocationsBucketsViewsCreateCall struct {
  7105  	s          *Service
  7106  	parent     string
  7107  	logview    *LogView
  7108  	urlParams_ gensupport.URLParams
  7109  	ctx_       context.Context
  7110  	header_    http.Header
  7111  }
  7112  
  7113  // Create: Creates a view over log entries in a log bucket. A bucket may
  7114  // contain a maximum of 30 views.
  7115  //
  7116  //   - parent: The bucket in which to create the view
  7117  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For
  7118  //     example:"projects/my-project/locations/global/buckets/my-bucket".
  7119  func (r *BillingAccountsLocationsBucketsViewsService) Create(parent string, logview *LogView) *BillingAccountsLocationsBucketsViewsCreateCall {
  7120  	c := &BillingAccountsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7121  	c.parent = parent
  7122  	c.logview = logview
  7123  	return c
  7124  }
  7125  
  7126  // ViewId sets the optional parameter "viewId": Required. A client-assigned
  7127  // identifier such as "my-view". Identifiers are limited to 100 characters and
  7128  // can include only letters, digits, underscores, hyphens, and periods.
  7129  func (c *BillingAccountsLocationsBucketsViewsCreateCall) ViewId(viewId string) *BillingAccountsLocationsBucketsViewsCreateCall {
  7130  	c.urlParams_.Set("viewId", viewId)
  7131  	return c
  7132  }
  7133  
  7134  // Fields allows partial responses to be retrieved. See
  7135  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7136  // details.
  7137  func (c *BillingAccountsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsCreateCall {
  7138  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7139  	return c
  7140  }
  7141  
  7142  // Context sets the context to be used in this call's Do method.
  7143  func (c *BillingAccountsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsCreateCall {
  7144  	c.ctx_ = ctx
  7145  	return c
  7146  }
  7147  
  7148  // Header returns a http.Header that can be modified by the caller to add
  7149  // headers to the request.
  7150  func (c *BillingAccountsLocationsBucketsViewsCreateCall) Header() http.Header {
  7151  	if c.header_ == nil {
  7152  		c.header_ = make(http.Header)
  7153  	}
  7154  	return c.header_
  7155  }
  7156  
  7157  func (c *BillingAccountsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
  7158  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7159  	var body io.Reader = nil
  7160  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
  7161  	if err != nil {
  7162  		return nil, err
  7163  	}
  7164  	c.urlParams_.Set("alt", alt)
  7165  	c.urlParams_.Set("prettyPrint", "false")
  7166  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
  7167  	urls += "?" + c.urlParams_.Encode()
  7168  	req, err := http.NewRequest("POST", urls, body)
  7169  	if err != nil {
  7170  		return nil, err
  7171  	}
  7172  	req.Header = reqHeaders
  7173  	googleapi.Expand(req.URL, map[string]string{
  7174  		"parent": c.parent,
  7175  	})
  7176  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7177  }
  7178  
  7179  // Do executes the "logging.billingAccounts.locations.buckets.views.create" call.
  7180  // Any non-2xx status code is an error. Response headers are in either
  7181  // *LogView.ServerResponse.Header or (if a response was returned at all) in
  7182  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7183  // whether the returned error was because http.StatusNotModified was returned.
  7184  func (c *BillingAccountsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
  7185  	gensupport.SetOptions(c.urlParams_, opts...)
  7186  	res, err := c.doRequest("json")
  7187  	if res != nil && res.StatusCode == http.StatusNotModified {
  7188  		if res.Body != nil {
  7189  			res.Body.Close()
  7190  		}
  7191  		return nil, gensupport.WrapError(&googleapi.Error{
  7192  			Code:   res.StatusCode,
  7193  			Header: res.Header,
  7194  		})
  7195  	}
  7196  	if err != nil {
  7197  		return nil, err
  7198  	}
  7199  	defer googleapi.CloseBody(res)
  7200  	if err := googleapi.CheckResponse(res); err != nil {
  7201  		return nil, gensupport.WrapError(err)
  7202  	}
  7203  	ret := &LogView{
  7204  		ServerResponse: googleapi.ServerResponse{
  7205  			Header:         res.Header,
  7206  			HTTPStatusCode: res.StatusCode,
  7207  		},
  7208  	}
  7209  	target := &ret
  7210  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7211  		return nil, err
  7212  	}
  7213  	return ret, nil
  7214  }
  7215  
  7216  type BillingAccountsLocationsBucketsViewsDeleteCall struct {
  7217  	s          *Service
  7218  	name       string
  7219  	urlParams_ gensupport.URLParams
  7220  	ctx_       context.Context
  7221  	header_    http.Header
  7222  }
  7223  
  7224  // Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned,
  7225  // this indicates that system is not in a state where it can delete the view.
  7226  // If this occurs, please try again in a few minutes.
  7227  //
  7228  //   - name: The full resource name of the view to delete:
  7229  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
  7230  //     IEW_ID]" For
  7231  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
  7232  //     ew".
  7233  func (r *BillingAccountsLocationsBucketsViewsService) Delete(name string) *BillingAccountsLocationsBucketsViewsDeleteCall {
  7234  	c := &BillingAccountsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7235  	c.name = name
  7236  	return c
  7237  }
  7238  
  7239  // Fields allows partial responses to be retrieved. See
  7240  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7241  // details.
  7242  func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsDeleteCall {
  7243  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7244  	return c
  7245  }
  7246  
  7247  // Context sets the context to be used in this call's Do method.
  7248  func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsDeleteCall {
  7249  	c.ctx_ = ctx
  7250  	return c
  7251  }
  7252  
  7253  // Header returns a http.Header that can be modified by the caller to add
  7254  // headers to the request.
  7255  func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Header() http.Header {
  7256  	if c.header_ == nil {
  7257  		c.header_ = make(http.Header)
  7258  	}
  7259  	return c.header_
  7260  }
  7261  
  7262  func (c *BillingAccountsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7263  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7264  	var body io.Reader = nil
  7265  	c.urlParams_.Set("alt", alt)
  7266  	c.urlParams_.Set("prettyPrint", "false")
  7267  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  7268  	urls += "?" + c.urlParams_.Encode()
  7269  	req, err := http.NewRequest("DELETE", urls, body)
  7270  	if err != nil {
  7271  		return nil, err
  7272  	}
  7273  	req.Header = reqHeaders
  7274  	googleapi.Expand(req.URL, map[string]string{
  7275  		"name": c.name,
  7276  	})
  7277  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7278  }
  7279  
  7280  // Do executes the "logging.billingAccounts.locations.buckets.views.delete" call.
  7281  // Any non-2xx status code is an error. Response headers are in either
  7282  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7283  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7284  // whether the returned error was because http.StatusNotModified was returned.
  7285  func (c *BillingAccountsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7286  	gensupport.SetOptions(c.urlParams_, opts...)
  7287  	res, err := c.doRequest("json")
  7288  	if res != nil && res.StatusCode == http.StatusNotModified {
  7289  		if res.Body != nil {
  7290  			res.Body.Close()
  7291  		}
  7292  		return nil, gensupport.WrapError(&googleapi.Error{
  7293  			Code:   res.StatusCode,
  7294  			Header: res.Header,
  7295  		})
  7296  	}
  7297  	if err != nil {
  7298  		return nil, err
  7299  	}
  7300  	defer googleapi.CloseBody(res)
  7301  	if err := googleapi.CheckResponse(res); err != nil {
  7302  		return nil, gensupport.WrapError(err)
  7303  	}
  7304  	ret := &Empty{
  7305  		ServerResponse: googleapi.ServerResponse{
  7306  			Header:         res.Header,
  7307  			HTTPStatusCode: res.StatusCode,
  7308  		},
  7309  	}
  7310  	target := &ret
  7311  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7312  		return nil, err
  7313  	}
  7314  	return ret, nil
  7315  }
  7316  
  7317  type BillingAccountsLocationsBucketsViewsGetCall struct {
  7318  	s            *Service
  7319  	name         string
  7320  	urlParams_   gensupport.URLParams
  7321  	ifNoneMatch_ string
  7322  	ctx_         context.Context
  7323  	header_      http.Header
  7324  }
  7325  
  7326  // Get: Gets a view on a log bucket.
  7327  //
  7328  //   - name: The resource name of the policy:
  7329  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
  7330  //     IEW_ID]" For
  7331  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
  7332  //     ew".
  7333  func (r *BillingAccountsLocationsBucketsViewsService) Get(name string) *BillingAccountsLocationsBucketsViewsGetCall {
  7334  	c := &BillingAccountsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7335  	c.name = name
  7336  	return c
  7337  }
  7338  
  7339  // Fields allows partial responses to be retrieved. See
  7340  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7341  // details.
  7342  func (c *BillingAccountsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsGetCall {
  7343  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7344  	return c
  7345  }
  7346  
  7347  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7348  // object's ETag matches the given value. This is useful for getting updates
  7349  // only after the object has changed since the last request.
  7350  func (c *BillingAccountsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsViewsGetCall {
  7351  	c.ifNoneMatch_ = entityTag
  7352  	return c
  7353  }
  7354  
  7355  // Context sets the context to be used in this call's Do method.
  7356  func (c *BillingAccountsLocationsBucketsViewsGetCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsGetCall {
  7357  	c.ctx_ = ctx
  7358  	return c
  7359  }
  7360  
  7361  // Header returns a http.Header that can be modified by the caller to add
  7362  // headers to the request.
  7363  func (c *BillingAccountsLocationsBucketsViewsGetCall) Header() http.Header {
  7364  	if c.header_ == nil {
  7365  		c.header_ = make(http.Header)
  7366  	}
  7367  	return c.header_
  7368  }
  7369  
  7370  func (c *BillingAccountsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
  7371  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7372  	if c.ifNoneMatch_ != "" {
  7373  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7374  	}
  7375  	var body io.Reader = nil
  7376  	c.urlParams_.Set("alt", alt)
  7377  	c.urlParams_.Set("prettyPrint", "false")
  7378  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  7379  	urls += "?" + c.urlParams_.Encode()
  7380  	req, err := http.NewRequest("GET", urls, body)
  7381  	if err != nil {
  7382  		return nil, err
  7383  	}
  7384  	req.Header = reqHeaders
  7385  	googleapi.Expand(req.URL, map[string]string{
  7386  		"name": c.name,
  7387  	})
  7388  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7389  }
  7390  
  7391  // Do executes the "logging.billingAccounts.locations.buckets.views.get" call.
  7392  // Any non-2xx status code is an error. Response headers are in either
  7393  // *LogView.ServerResponse.Header or (if a response was returned at all) in
  7394  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7395  // whether the returned error was because http.StatusNotModified was returned.
  7396  func (c *BillingAccountsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
  7397  	gensupport.SetOptions(c.urlParams_, opts...)
  7398  	res, err := c.doRequest("json")
  7399  	if res != nil && res.StatusCode == http.StatusNotModified {
  7400  		if res.Body != nil {
  7401  			res.Body.Close()
  7402  		}
  7403  		return nil, gensupport.WrapError(&googleapi.Error{
  7404  			Code:   res.StatusCode,
  7405  			Header: res.Header,
  7406  		})
  7407  	}
  7408  	if err != nil {
  7409  		return nil, err
  7410  	}
  7411  	defer googleapi.CloseBody(res)
  7412  	if err := googleapi.CheckResponse(res); err != nil {
  7413  		return nil, gensupport.WrapError(err)
  7414  	}
  7415  	ret := &LogView{
  7416  		ServerResponse: googleapi.ServerResponse{
  7417  			Header:         res.Header,
  7418  			HTTPStatusCode: res.StatusCode,
  7419  		},
  7420  	}
  7421  	target := &ret
  7422  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7423  		return nil, err
  7424  	}
  7425  	return ret, nil
  7426  }
  7427  
  7428  type BillingAccountsLocationsBucketsViewsListCall struct {
  7429  	s            *Service
  7430  	parent       string
  7431  	urlParams_   gensupport.URLParams
  7432  	ifNoneMatch_ string
  7433  	ctx_         context.Context
  7434  	header_      http.Header
  7435  }
  7436  
  7437  // List: Lists views on a log bucket.
  7438  //
  7439  //   - parent: The bucket whose views are to be listed:
  7440  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
  7441  func (r *BillingAccountsLocationsBucketsViewsService) List(parent string) *BillingAccountsLocationsBucketsViewsListCall {
  7442  	c := &BillingAccountsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7443  	c.parent = parent
  7444  	return c
  7445  }
  7446  
  7447  // PageSize sets the optional parameter "pageSize": The maximum number of
  7448  // results to return from this request.Non-positive values are ignored. The
  7449  // presence of nextPageToken in the response indicates that more results might
  7450  // be available.
  7451  func (c *BillingAccountsLocationsBucketsViewsListCall) PageSize(pageSize int64) *BillingAccountsLocationsBucketsViewsListCall {
  7452  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7453  	return c
  7454  }
  7455  
  7456  // PageToken sets the optional parameter "pageToken": If present, then retrieve
  7457  // the next batch of results from the preceding call to this method. pageToken
  7458  // must be the value of nextPageToken from the previous response. The values of
  7459  // other method parameters should be identical to those in the previous call.
  7460  func (c *BillingAccountsLocationsBucketsViewsListCall) PageToken(pageToken string) *BillingAccountsLocationsBucketsViewsListCall {
  7461  	c.urlParams_.Set("pageToken", pageToken)
  7462  	return c
  7463  }
  7464  
  7465  // Fields allows partial responses to be retrieved. See
  7466  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7467  // details.
  7468  func (c *BillingAccountsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsListCall {
  7469  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7470  	return c
  7471  }
  7472  
  7473  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7474  // object's ETag matches the given value. This is useful for getting updates
  7475  // only after the object has changed since the last request.
  7476  func (c *BillingAccountsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsViewsListCall {
  7477  	c.ifNoneMatch_ = entityTag
  7478  	return c
  7479  }
  7480  
  7481  // Context sets the context to be used in this call's Do method.
  7482  func (c *BillingAccountsLocationsBucketsViewsListCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsListCall {
  7483  	c.ctx_ = ctx
  7484  	return c
  7485  }
  7486  
  7487  // Header returns a http.Header that can be modified by the caller to add
  7488  // headers to the request.
  7489  func (c *BillingAccountsLocationsBucketsViewsListCall) Header() http.Header {
  7490  	if c.header_ == nil {
  7491  		c.header_ = make(http.Header)
  7492  	}
  7493  	return c.header_
  7494  }
  7495  
  7496  func (c *BillingAccountsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
  7497  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7498  	if c.ifNoneMatch_ != "" {
  7499  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7500  	}
  7501  	var body io.Reader = nil
  7502  	c.urlParams_.Set("alt", alt)
  7503  	c.urlParams_.Set("prettyPrint", "false")
  7504  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
  7505  	urls += "?" + c.urlParams_.Encode()
  7506  	req, err := http.NewRequest("GET", urls, body)
  7507  	if err != nil {
  7508  		return nil, err
  7509  	}
  7510  	req.Header = reqHeaders
  7511  	googleapi.Expand(req.URL, map[string]string{
  7512  		"parent": c.parent,
  7513  	})
  7514  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7515  }
  7516  
  7517  // Do executes the "logging.billingAccounts.locations.buckets.views.list" call.
  7518  // Any non-2xx status code is an error. Response headers are in either
  7519  // *ListViewsResponse.ServerResponse.Header or (if a response was returned at
  7520  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7521  // check whether the returned error was because http.StatusNotModified was
  7522  // returned.
  7523  func (c *BillingAccountsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
  7524  	gensupport.SetOptions(c.urlParams_, opts...)
  7525  	res, err := c.doRequest("json")
  7526  	if res != nil && res.StatusCode == http.StatusNotModified {
  7527  		if res.Body != nil {
  7528  			res.Body.Close()
  7529  		}
  7530  		return nil, gensupport.WrapError(&googleapi.Error{
  7531  			Code:   res.StatusCode,
  7532  			Header: res.Header,
  7533  		})
  7534  	}
  7535  	if err != nil {
  7536  		return nil, err
  7537  	}
  7538  	defer googleapi.CloseBody(res)
  7539  	if err := googleapi.CheckResponse(res); err != nil {
  7540  		return nil, gensupport.WrapError(err)
  7541  	}
  7542  	ret := &ListViewsResponse{
  7543  		ServerResponse: googleapi.ServerResponse{
  7544  			Header:         res.Header,
  7545  			HTTPStatusCode: res.StatusCode,
  7546  		},
  7547  	}
  7548  	target := &ret
  7549  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7550  		return nil, err
  7551  	}
  7552  	return ret, nil
  7553  }
  7554  
  7555  // Pages invokes f for each page of results.
  7556  // A non-nil error returned from f will halt the iteration.
  7557  // The provided context supersedes any context provided to the Context method.
  7558  func (c *BillingAccountsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
  7559  	c.ctx_ = ctx
  7560  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7561  	for {
  7562  		x, err := c.Do()
  7563  		if err != nil {
  7564  			return err
  7565  		}
  7566  		if err := f(x); err != nil {
  7567  			return err
  7568  		}
  7569  		if x.NextPageToken == "" {
  7570  			return nil
  7571  		}
  7572  		c.PageToken(x.NextPageToken)
  7573  	}
  7574  }
  7575  
  7576  type BillingAccountsLocationsBucketsViewsPatchCall struct {
  7577  	s          *Service
  7578  	name       string
  7579  	logview    *LogView
  7580  	urlParams_ gensupport.URLParams
  7581  	ctx_       context.Context
  7582  	header_    http.Header
  7583  }
  7584  
  7585  // Patch: Updates a view on a log bucket. This method replaces the value of the
  7586  // filter field from the existing view with the corresponding value from the
  7587  // new view. If an UNAVAILABLE error is returned, this indicates that system is
  7588  // not in a state where it can update the view. If this occurs, please try
  7589  // again in a few minutes.
  7590  //
  7591  //   - name: The full resource name of the view to update
  7592  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
  7593  //     IEW_ID]" For
  7594  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
  7595  //     ew".
  7596  func (r *BillingAccountsLocationsBucketsViewsService) Patch(name string, logview *LogView) *BillingAccountsLocationsBucketsViewsPatchCall {
  7597  	c := &BillingAccountsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7598  	c.name = name
  7599  	c.logview = logview
  7600  	return c
  7601  }
  7602  
  7603  // UpdateMask sets the optional parameter "updateMask": Field mask that
  7604  // specifies the fields in view that need an update. A field will be
  7605  // overwritten if, and only if, it is in the update mask. name and output only
  7606  // fields cannot be updated.For a detailed FieldMask definition, see
  7607  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
  7608  // example: updateMask=filter
  7609  func (c *BillingAccountsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *BillingAccountsLocationsBucketsViewsPatchCall {
  7610  	c.urlParams_.Set("updateMask", updateMask)
  7611  	return c
  7612  }
  7613  
  7614  // Fields allows partial responses to be retrieved. See
  7615  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7616  // details.
  7617  func (c *BillingAccountsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsPatchCall {
  7618  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7619  	return c
  7620  }
  7621  
  7622  // Context sets the context to be used in this call's Do method.
  7623  func (c *BillingAccountsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsPatchCall {
  7624  	c.ctx_ = ctx
  7625  	return c
  7626  }
  7627  
  7628  // Header returns a http.Header that can be modified by the caller to add
  7629  // headers to the request.
  7630  func (c *BillingAccountsLocationsBucketsViewsPatchCall) Header() http.Header {
  7631  	if c.header_ == nil {
  7632  		c.header_ = make(http.Header)
  7633  	}
  7634  	return c.header_
  7635  }
  7636  
  7637  func (c *BillingAccountsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
  7638  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7639  	var body io.Reader = nil
  7640  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
  7641  	if err != nil {
  7642  		return nil, err
  7643  	}
  7644  	c.urlParams_.Set("alt", alt)
  7645  	c.urlParams_.Set("prettyPrint", "false")
  7646  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  7647  	urls += "?" + c.urlParams_.Encode()
  7648  	req, err := http.NewRequest("PATCH", urls, body)
  7649  	if err != nil {
  7650  		return nil, err
  7651  	}
  7652  	req.Header = reqHeaders
  7653  	googleapi.Expand(req.URL, map[string]string{
  7654  		"name": c.name,
  7655  	})
  7656  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7657  }
  7658  
  7659  // Do executes the "logging.billingAccounts.locations.buckets.views.patch" call.
  7660  // Any non-2xx status code is an error. Response headers are in either
  7661  // *LogView.ServerResponse.Header or (if a response was returned at all) in
  7662  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7663  // whether the returned error was because http.StatusNotModified was returned.
  7664  func (c *BillingAccountsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
  7665  	gensupport.SetOptions(c.urlParams_, opts...)
  7666  	res, err := c.doRequest("json")
  7667  	if res != nil && res.StatusCode == http.StatusNotModified {
  7668  		if res.Body != nil {
  7669  			res.Body.Close()
  7670  		}
  7671  		return nil, gensupport.WrapError(&googleapi.Error{
  7672  			Code:   res.StatusCode,
  7673  			Header: res.Header,
  7674  		})
  7675  	}
  7676  	if err != nil {
  7677  		return nil, err
  7678  	}
  7679  	defer googleapi.CloseBody(res)
  7680  	if err := googleapi.CheckResponse(res); err != nil {
  7681  		return nil, gensupport.WrapError(err)
  7682  	}
  7683  	ret := &LogView{
  7684  		ServerResponse: googleapi.ServerResponse{
  7685  			Header:         res.Header,
  7686  			HTTPStatusCode: res.StatusCode,
  7687  		},
  7688  	}
  7689  	target := &ret
  7690  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7691  		return nil, err
  7692  	}
  7693  	return ret, nil
  7694  }
  7695  
  7696  type BillingAccountsLocationsBucketsViewsLogsListCall struct {
  7697  	s            *Service
  7698  	parent       string
  7699  	urlParams_   gensupport.URLParams
  7700  	ifNoneMatch_ string
  7701  	ctx_         context.Context
  7702  	header_      http.Header
  7703  }
  7704  
  7705  // List: Lists the logs in projects, organizations, folders, or billing
  7706  // accounts. Only logs that have entries are listed.
  7707  //
  7708  //   - parent: The resource name to list logs for: projects/[PROJECT_ID]
  7709  //     organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
  7710  //     folders/[FOLDER_ID].
  7711  func (r *BillingAccountsLocationsBucketsViewsLogsService) List(parent string) *BillingAccountsLocationsBucketsViewsLogsListCall {
  7712  	c := &BillingAccountsLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7713  	c.parent = parent
  7714  	return c
  7715  }
  7716  
  7717  // PageSize sets the optional parameter "pageSize": The maximum number of
  7718  // results to return from this request. Non-positive values are ignored. The
  7719  // presence of nextPageToken in the response indicates that more results might
  7720  // be available.
  7721  func (c *BillingAccountsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *BillingAccountsLocationsBucketsViewsLogsListCall {
  7722  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7723  	return c
  7724  }
  7725  
  7726  // PageToken sets the optional parameter "pageToken": If present, then retrieve
  7727  // the next batch of results from the preceding call to this method. pageToken
  7728  // must be the value of nextPageToken from the previous response. The values of
  7729  // other method parameters should be identical to those in the previous call.
  7730  func (c *BillingAccountsLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *BillingAccountsLocationsBucketsViewsLogsListCall {
  7731  	c.urlParams_.Set("pageToken", pageToken)
  7732  	return c
  7733  }
  7734  
  7735  // ResourceNames sets the optional parameter "resourceNames": List of resource
  7736  // names to list logs for:
  7737  // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
  7738  // _ID]
  7739  // organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
  7740  // iews/[VIEW_ID]
  7741  // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
  7742  // ID]/views/[VIEW_ID]
  7743  // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
  7744  // D]To support legacy queries, it could also be: projects/[PROJECT_ID]
  7745  // organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
  7746  // folders/[FOLDER_ID]The resource name in the parent field is added to this
  7747  // list.
  7748  func (c *BillingAccountsLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *BillingAccountsLocationsBucketsViewsLogsListCall {
  7749  	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
  7750  	return c
  7751  }
  7752  
  7753  // Fields allows partial responses to be retrieved. See
  7754  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7755  // details.
  7756  func (c *BillingAccountsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsBucketsViewsLogsListCall {
  7757  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7758  	return c
  7759  }
  7760  
  7761  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7762  // object's ETag matches the given value. This is useful for getting updates
  7763  // only after the object has changed since the last request.
  7764  func (c *BillingAccountsLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsBucketsViewsLogsListCall {
  7765  	c.ifNoneMatch_ = entityTag
  7766  	return c
  7767  }
  7768  
  7769  // Context sets the context to be used in this call's Do method.
  7770  func (c *BillingAccountsLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *BillingAccountsLocationsBucketsViewsLogsListCall {
  7771  	c.ctx_ = ctx
  7772  	return c
  7773  }
  7774  
  7775  // Header returns a http.Header that can be modified by the caller to add
  7776  // headers to the request.
  7777  func (c *BillingAccountsLocationsBucketsViewsLogsListCall) Header() http.Header {
  7778  	if c.header_ == nil {
  7779  		c.header_ = make(http.Header)
  7780  	}
  7781  	return c.header_
  7782  }
  7783  
  7784  func (c *BillingAccountsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) {
  7785  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7786  	if c.ifNoneMatch_ != "" {
  7787  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7788  	}
  7789  	var body io.Reader = nil
  7790  	c.urlParams_.Set("alt", alt)
  7791  	c.urlParams_.Set("prettyPrint", "false")
  7792  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
  7793  	urls += "?" + c.urlParams_.Encode()
  7794  	req, err := http.NewRequest("GET", urls, body)
  7795  	if err != nil {
  7796  		return nil, err
  7797  	}
  7798  	req.Header = reqHeaders
  7799  	googleapi.Expand(req.URL, map[string]string{
  7800  		"parent": c.parent,
  7801  	})
  7802  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7803  }
  7804  
  7805  // Do executes the "logging.billingAccounts.locations.buckets.views.logs.list" call.
  7806  // Any non-2xx status code is an error. Response headers are in either
  7807  // *ListLogsResponse.ServerResponse.Header or (if a response was returned at
  7808  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7809  // check whether the returned error was because http.StatusNotModified was
  7810  // returned.
  7811  func (c *BillingAccountsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
  7812  	gensupport.SetOptions(c.urlParams_, opts...)
  7813  	res, err := c.doRequest("json")
  7814  	if res != nil && res.StatusCode == http.StatusNotModified {
  7815  		if res.Body != nil {
  7816  			res.Body.Close()
  7817  		}
  7818  		return nil, gensupport.WrapError(&googleapi.Error{
  7819  			Code:   res.StatusCode,
  7820  			Header: res.Header,
  7821  		})
  7822  	}
  7823  	if err != nil {
  7824  		return nil, err
  7825  	}
  7826  	defer googleapi.CloseBody(res)
  7827  	if err := googleapi.CheckResponse(res); err != nil {
  7828  		return nil, gensupport.WrapError(err)
  7829  	}
  7830  	ret := &ListLogsResponse{
  7831  		ServerResponse: googleapi.ServerResponse{
  7832  			Header:         res.Header,
  7833  			HTTPStatusCode: res.StatusCode,
  7834  		},
  7835  	}
  7836  	target := &ret
  7837  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7838  		return nil, err
  7839  	}
  7840  	return ret, nil
  7841  }
  7842  
  7843  // Pages invokes f for each page of results.
  7844  // A non-nil error returned from f will halt the iteration.
  7845  // The provided context supersedes any context provided to the Context method.
  7846  func (c *BillingAccountsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
  7847  	c.ctx_ = ctx
  7848  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7849  	for {
  7850  		x, err := c.Do()
  7851  		if err != nil {
  7852  			return err
  7853  		}
  7854  		if err := f(x); err != nil {
  7855  			return err
  7856  		}
  7857  		if x.NextPageToken == "" {
  7858  			return nil
  7859  		}
  7860  		c.PageToken(x.NextPageToken)
  7861  	}
  7862  }
  7863  
  7864  type BillingAccountsLocationsOperationsCancelCall struct {
  7865  	s                      *Service
  7866  	name                   string
  7867  	canceloperationrequest *CancelOperationRequest
  7868  	urlParams_             gensupport.URLParams
  7869  	ctx_                   context.Context
  7870  	header_                http.Header
  7871  }
  7872  
  7873  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  7874  // server makes a best effort to cancel the operation, but success is not
  7875  // guaranteed. If the server doesn't support this method, it returns
  7876  // google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or
  7877  // other methods to check whether the cancellation succeeded or whether the
  7878  // operation completed despite cancellation. On successful cancellation, the
  7879  // operation is not deleted; instead, it becomes an operation with an
  7880  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  7881  // Code.CANCELLED.
  7882  //
  7883  // - name: The name of the operation resource to be cancelled.
  7884  func (r *BillingAccountsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *BillingAccountsLocationsOperationsCancelCall {
  7885  	c := &BillingAccountsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7886  	c.name = name
  7887  	c.canceloperationrequest = canceloperationrequest
  7888  	return c
  7889  }
  7890  
  7891  // Fields allows partial responses to be retrieved. See
  7892  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7893  // details.
  7894  func (c *BillingAccountsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsOperationsCancelCall {
  7895  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7896  	return c
  7897  }
  7898  
  7899  // Context sets the context to be used in this call's Do method.
  7900  func (c *BillingAccountsLocationsOperationsCancelCall) Context(ctx context.Context) *BillingAccountsLocationsOperationsCancelCall {
  7901  	c.ctx_ = ctx
  7902  	return c
  7903  }
  7904  
  7905  // Header returns a http.Header that can be modified by the caller to add
  7906  // headers to the request.
  7907  func (c *BillingAccountsLocationsOperationsCancelCall) Header() http.Header {
  7908  	if c.header_ == nil {
  7909  		c.header_ = make(http.Header)
  7910  	}
  7911  	return c.header_
  7912  }
  7913  
  7914  func (c *BillingAccountsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  7915  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7916  	var body io.Reader = nil
  7917  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  7918  	if err != nil {
  7919  		return nil, err
  7920  	}
  7921  	c.urlParams_.Set("alt", alt)
  7922  	c.urlParams_.Set("prettyPrint", "false")
  7923  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
  7924  	urls += "?" + c.urlParams_.Encode()
  7925  	req, err := http.NewRequest("POST", urls, body)
  7926  	if err != nil {
  7927  		return nil, err
  7928  	}
  7929  	req.Header = reqHeaders
  7930  	googleapi.Expand(req.URL, map[string]string{
  7931  		"name": c.name,
  7932  	})
  7933  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7934  }
  7935  
  7936  // Do executes the "logging.billingAccounts.locations.operations.cancel" call.
  7937  // Any non-2xx status code is an error. Response headers are in either
  7938  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7939  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7940  // whether the returned error was because http.StatusNotModified was returned.
  7941  func (c *BillingAccountsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7942  	gensupport.SetOptions(c.urlParams_, opts...)
  7943  	res, err := c.doRequest("json")
  7944  	if res != nil && res.StatusCode == http.StatusNotModified {
  7945  		if res.Body != nil {
  7946  			res.Body.Close()
  7947  		}
  7948  		return nil, gensupport.WrapError(&googleapi.Error{
  7949  			Code:   res.StatusCode,
  7950  			Header: res.Header,
  7951  		})
  7952  	}
  7953  	if err != nil {
  7954  		return nil, err
  7955  	}
  7956  	defer googleapi.CloseBody(res)
  7957  	if err := googleapi.CheckResponse(res); err != nil {
  7958  		return nil, gensupport.WrapError(err)
  7959  	}
  7960  	ret := &Empty{
  7961  		ServerResponse: googleapi.ServerResponse{
  7962  			Header:         res.Header,
  7963  			HTTPStatusCode: res.StatusCode,
  7964  		},
  7965  	}
  7966  	target := &ret
  7967  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7968  		return nil, err
  7969  	}
  7970  	return ret, nil
  7971  }
  7972  
  7973  type BillingAccountsLocationsOperationsGetCall struct {
  7974  	s            *Service
  7975  	name         string
  7976  	urlParams_   gensupport.URLParams
  7977  	ifNoneMatch_ string
  7978  	ctx_         context.Context
  7979  	header_      http.Header
  7980  }
  7981  
  7982  // Get: Gets the latest state of a long-running operation. Clients can use this
  7983  // method to poll the operation result at intervals as recommended by the API
  7984  // service.
  7985  //
  7986  // - name: The name of the operation resource.
  7987  func (r *BillingAccountsLocationsOperationsService) Get(name string) *BillingAccountsLocationsOperationsGetCall {
  7988  	c := &BillingAccountsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7989  	c.name = name
  7990  	return c
  7991  }
  7992  
  7993  // Fields allows partial responses to be retrieved. See
  7994  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7995  // details.
  7996  func (c *BillingAccountsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsOperationsGetCall {
  7997  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7998  	return c
  7999  }
  8000  
  8001  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8002  // object's ETag matches the given value. This is useful for getting updates
  8003  // only after the object has changed since the last request.
  8004  func (c *BillingAccountsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsOperationsGetCall {
  8005  	c.ifNoneMatch_ = entityTag
  8006  	return c
  8007  }
  8008  
  8009  // Context sets the context to be used in this call's Do method.
  8010  func (c *BillingAccountsLocationsOperationsGetCall) Context(ctx context.Context) *BillingAccountsLocationsOperationsGetCall {
  8011  	c.ctx_ = ctx
  8012  	return c
  8013  }
  8014  
  8015  // Header returns a http.Header that can be modified by the caller to add
  8016  // headers to the request.
  8017  func (c *BillingAccountsLocationsOperationsGetCall) Header() http.Header {
  8018  	if c.header_ == nil {
  8019  		c.header_ = make(http.Header)
  8020  	}
  8021  	return c.header_
  8022  }
  8023  
  8024  func (c *BillingAccountsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  8025  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8026  	if c.ifNoneMatch_ != "" {
  8027  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8028  	}
  8029  	var body io.Reader = nil
  8030  	c.urlParams_.Set("alt", alt)
  8031  	c.urlParams_.Set("prettyPrint", "false")
  8032  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  8033  	urls += "?" + c.urlParams_.Encode()
  8034  	req, err := http.NewRequest("GET", urls, body)
  8035  	if err != nil {
  8036  		return nil, err
  8037  	}
  8038  	req.Header = reqHeaders
  8039  	googleapi.Expand(req.URL, map[string]string{
  8040  		"name": c.name,
  8041  	})
  8042  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8043  }
  8044  
  8045  // Do executes the "logging.billingAccounts.locations.operations.get" call.
  8046  // Any non-2xx status code is an error. Response headers are in either
  8047  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8048  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8049  // whether the returned error was because http.StatusNotModified was returned.
  8050  func (c *BillingAccountsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8051  	gensupport.SetOptions(c.urlParams_, opts...)
  8052  	res, err := c.doRequest("json")
  8053  	if res != nil && res.StatusCode == http.StatusNotModified {
  8054  		if res.Body != nil {
  8055  			res.Body.Close()
  8056  		}
  8057  		return nil, gensupport.WrapError(&googleapi.Error{
  8058  			Code:   res.StatusCode,
  8059  			Header: res.Header,
  8060  		})
  8061  	}
  8062  	if err != nil {
  8063  		return nil, err
  8064  	}
  8065  	defer googleapi.CloseBody(res)
  8066  	if err := googleapi.CheckResponse(res); err != nil {
  8067  		return nil, gensupport.WrapError(err)
  8068  	}
  8069  	ret := &Operation{
  8070  		ServerResponse: googleapi.ServerResponse{
  8071  			Header:         res.Header,
  8072  			HTTPStatusCode: res.StatusCode,
  8073  		},
  8074  	}
  8075  	target := &ret
  8076  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8077  		return nil, err
  8078  	}
  8079  	return ret, nil
  8080  }
  8081  
  8082  type BillingAccountsLocationsOperationsListCall struct {
  8083  	s            *Service
  8084  	name         string
  8085  	urlParams_   gensupport.URLParams
  8086  	ifNoneMatch_ string
  8087  	ctx_         context.Context
  8088  	header_      http.Header
  8089  }
  8090  
  8091  // List: Lists operations that match the specified filter in the request. If
  8092  // the server doesn't support this method, it returns UNIMPLEMENTED.
  8093  //
  8094  // - name: The name of the operation's parent resource.
  8095  func (r *BillingAccountsLocationsOperationsService) List(name string) *BillingAccountsLocationsOperationsListCall {
  8096  	c := &BillingAccountsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8097  	c.name = name
  8098  	return c
  8099  }
  8100  
  8101  // Filter sets the optional parameter "filter": The standard list filter.
  8102  func (c *BillingAccountsLocationsOperationsListCall) Filter(filter string) *BillingAccountsLocationsOperationsListCall {
  8103  	c.urlParams_.Set("filter", filter)
  8104  	return c
  8105  }
  8106  
  8107  // PageSize sets the optional parameter "pageSize": The standard list page
  8108  // size.
  8109  func (c *BillingAccountsLocationsOperationsListCall) PageSize(pageSize int64) *BillingAccountsLocationsOperationsListCall {
  8110  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8111  	return c
  8112  }
  8113  
  8114  // PageToken sets the optional parameter "pageToken": The standard list page
  8115  // token.
  8116  func (c *BillingAccountsLocationsOperationsListCall) PageToken(pageToken string) *BillingAccountsLocationsOperationsListCall {
  8117  	c.urlParams_.Set("pageToken", pageToken)
  8118  	return c
  8119  }
  8120  
  8121  // Fields allows partial responses to be retrieved. See
  8122  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8123  // details.
  8124  func (c *BillingAccountsLocationsOperationsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsOperationsListCall {
  8125  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8126  	return c
  8127  }
  8128  
  8129  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8130  // object's ETag matches the given value. This is useful for getting updates
  8131  // only after the object has changed since the last request.
  8132  func (c *BillingAccountsLocationsOperationsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsOperationsListCall {
  8133  	c.ifNoneMatch_ = entityTag
  8134  	return c
  8135  }
  8136  
  8137  // Context sets the context to be used in this call's Do method.
  8138  func (c *BillingAccountsLocationsOperationsListCall) Context(ctx context.Context) *BillingAccountsLocationsOperationsListCall {
  8139  	c.ctx_ = ctx
  8140  	return c
  8141  }
  8142  
  8143  // Header returns a http.Header that can be modified by the caller to add
  8144  // headers to the request.
  8145  func (c *BillingAccountsLocationsOperationsListCall) Header() http.Header {
  8146  	if c.header_ == nil {
  8147  		c.header_ = make(http.Header)
  8148  	}
  8149  	return c.header_
  8150  }
  8151  
  8152  func (c *BillingAccountsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  8153  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8154  	if c.ifNoneMatch_ != "" {
  8155  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8156  	}
  8157  	var body io.Reader = nil
  8158  	c.urlParams_.Set("alt", alt)
  8159  	c.urlParams_.Set("prettyPrint", "false")
  8160  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
  8161  	urls += "?" + c.urlParams_.Encode()
  8162  	req, err := http.NewRequest("GET", urls, body)
  8163  	if err != nil {
  8164  		return nil, err
  8165  	}
  8166  	req.Header = reqHeaders
  8167  	googleapi.Expand(req.URL, map[string]string{
  8168  		"name": c.name,
  8169  	})
  8170  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8171  }
  8172  
  8173  // Do executes the "logging.billingAccounts.locations.operations.list" call.
  8174  // Any non-2xx status code is an error. Response headers are in either
  8175  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  8176  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8177  // check whether the returned error was because http.StatusNotModified was
  8178  // returned.
  8179  func (c *BillingAccountsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  8180  	gensupport.SetOptions(c.urlParams_, opts...)
  8181  	res, err := c.doRequest("json")
  8182  	if res != nil && res.StatusCode == http.StatusNotModified {
  8183  		if res.Body != nil {
  8184  			res.Body.Close()
  8185  		}
  8186  		return nil, gensupport.WrapError(&googleapi.Error{
  8187  			Code:   res.StatusCode,
  8188  			Header: res.Header,
  8189  		})
  8190  	}
  8191  	if err != nil {
  8192  		return nil, err
  8193  	}
  8194  	defer googleapi.CloseBody(res)
  8195  	if err := googleapi.CheckResponse(res); err != nil {
  8196  		return nil, gensupport.WrapError(err)
  8197  	}
  8198  	ret := &ListOperationsResponse{
  8199  		ServerResponse: googleapi.ServerResponse{
  8200  			Header:         res.Header,
  8201  			HTTPStatusCode: res.StatusCode,
  8202  		},
  8203  	}
  8204  	target := &ret
  8205  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8206  		return nil, err
  8207  	}
  8208  	return ret, nil
  8209  }
  8210  
  8211  // Pages invokes f for each page of results.
  8212  // A non-nil error returned from f will halt the iteration.
  8213  // The provided context supersedes any context provided to the Context method.
  8214  func (c *BillingAccountsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  8215  	c.ctx_ = ctx
  8216  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8217  	for {
  8218  		x, err := c.Do()
  8219  		if err != nil {
  8220  			return err
  8221  		}
  8222  		if err := f(x); err != nil {
  8223  			return err
  8224  		}
  8225  		if x.NextPageToken == "" {
  8226  			return nil
  8227  		}
  8228  		c.PageToken(x.NextPageToken)
  8229  	}
  8230  }
  8231  
  8232  type BillingAccountsLocationsRecentQueriesListCall struct {
  8233  	s            *Service
  8234  	parent       string
  8235  	urlParams_   gensupport.URLParams
  8236  	ifNoneMatch_ string
  8237  	ctx_         context.Context
  8238  	header_      http.Header
  8239  }
  8240  
  8241  // List: Lists the RecentQueries that were created by the user making the
  8242  // request.
  8243  //
  8244  //   - parent: The resource to which the listed queries belong.
  8245  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
  8246  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
  8247  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
  8248  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For
  8249  //     example:projects/my-project/locations/us-central1Note: The location
  8250  //     portion of the resource must be specified, but supplying the character -
  8251  //     in place of LOCATION_ID will return all recent queries.
  8252  func (r *BillingAccountsLocationsRecentQueriesService) List(parent string) *BillingAccountsLocationsRecentQueriesListCall {
  8253  	c := &BillingAccountsLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8254  	c.parent = parent
  8255  	return c
  8256  }
  8257  
  8258  // PageSize sets the optional parameter "pageSize": The maximum number of
  8259  // results to return from this request. Non-positive values are ignored. The
  8260  // presence of nextPageToken in the response indicates that more results might
  8261  // be available.
  8262  func (c *BillingAccountsLocationsRecentQueriesListCall) PageSize(pageSize int64) *BillingAccountsLocationsRecentQueriesListCall {
  8263  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8264  	return c
  8265  }
  8266  
  8267  // PageToken sets the optional parameter "pageToken": If present, then retrieve
  8268  // the next batch of results from the preceding call to this method. pageToken
  8269  // must be the value of nextPageToken from the previous response. The values of
  8270  // other method parameters should be identical to those in the previous call.
  8271  func (c *BillingAccountsLocationsRecentQueriesListCall) PageToken(pageToken string) *BillingAccountsLocationsRecentQueriesListCall {
  8272  	c.urlParams_.Set("pageToken", pageToken)
  8273  	return c
  8274  }
  8275  
  8276  // Fields allows partial responses to be retrieved. See
  8277  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8278  // details.
  8279  func (c *BillingAccountsLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsRecentQueriesListCall {
  8280  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8281  	return c
  8282  }
  8283  
  8284  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8285  // object's ETag matches the given value. This is useful for getting updates
  8286  // only after the object has changed since the last request.
  8287  func (c *BillingAccountsLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsRecentQueriesListCall {
  8288  	c.ifNoneMatch_ = entityTag
  8289  	return c
  8290  }
  8291  
  8292  // Context sets the context to be used in this call's Do method.
  8293  func (c *BillingAccountsLocationsRecentQueriesListCall) Context(ctx context.Context) *BillingAccountsLocationsRecentQueriesListCall {
  8294  	c.ctx_ = ctx
  8295  	return c
  8296  }
  8297  
  8298  // Header returns a http.Header that can be modified by the caller to add
  8299  // headers to the request.
  8300  func (c *BillingAccountsLocationsRecentQueriesListCall) Header() http.Header {
  8301  	if c.header_ == nil {
  8302  		c.header_ = make(http.Header)
  8303  	}
  8304  	return c.header_
  8305  }
  8306  
  8307  func (c *BillingAccountsLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) {
  8308  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8309  	if c.ifNoneMatch_ != "" {
  8310  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8311  	}
  8312  	var body io.Reader = nil
  8313  	c.urlParams_.Set("alt", alt)
  8314  	c.urlParams_.Set("prettyPrint", "false")
  8315  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries")
  8316  	urls += "?" + c.urlParams_.Encode()
  8317  	req, err := http.NewRequest("GET", urls, body)
  8318  	if err != nil {
  8319  		return nil, err
  8320  	}
  8321  	req.Header = reqHeaders
  8322  	googleapi.Expand(req.URL, map[string]string{
  8323  		"parent": c.parent,
  8324  	})
  8325  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8326  }
  8327  
  8328  // Do executes the "logging.billingAccounts.locations.recentQueries.list" call.
  8329  // Any non-2xx status code is an error. Response headers are in either
  8330  // *ListRecentQueriesResponse.ServerResponse.Header or (if a response was
  8331  // returned at all) in error.(*googleapi.Error).Header. Use
  8332  // googleapi.IsNotModified to check whether the returned error was because
  8333  // http.StatusNotModified was returned.
  8334  func (c *BillingAccountsLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) {
  8335  	gensupport.SetOptions(c.urlParams_, opts...)
  8336  	res, err := c.doRequest("json")
  8337  	if res != nil && res.StatusCode == http.StatusNotModified {
  8338  		if res.Body != nil {
  8339  			res.Body.Close()
  8340  		}
  8341  		return nil, gensupport.WrapError(&googleapi.Error{
  8342  			Code:   res.StatusCode,
  8343  			Header: res.Header,
  8344  		})
  8345  	}
  8346  	if err != nil {
  8347  		return nil, err
  8348  	}
  8349  	defer googleapi.CloseBody(res)
  8350  	if err := googleapi.CheckResponse(res); err != nil {
  8351  		return nil, gensupport.WrapError(err)
  8352  	}
  8353  	ret := &ListRecentQueriesResponse{
  8354  		ServerResponse: googleapi.ServerResponse{
  8355  			Header:         res.Header,
  8356  			HTTPStatusCode: res.StatusCode,
  8357  		},
  8358  	}
  8359  	target := &ret
  8360  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8361  		return nil, err
  8362  	}
  8363  	return ret, nil
  8364  }
  8365  
  8366  // Pages invokes f for each page of results.
  8367  // A non-nil error returned from f will halt the iteration.
  8368  // The provided context supersedes any context provided to the Context method.
  8369  func (c *BillingAccountsLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error {
  8370  	c.ctx_ = ctx
  8371  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8372  	for {
  8373  		x, err := c.Do()
  8374  		if err != nil {
  8375  			return err
  8376  		}
  8377  		if err := f(x); err != nil {
  8378  			return err
  8379  		}
  8380  		if x.NextPageToken == "" {
  8381  			return nil
  8382  		}
  8383  		c.PageToken(x.NextPageToken)
  8384  	}
  8385  }
  8386  
  8387  type BillingAccountsLocationsSavedQueriesCreateCall struct {
  8388  	s          *Service
  8389  	parent     string
  8390  	savedquery *SavedQuery
  8391  	urlParams_ gensupport.URLParams
  8392  	ctx_       context.Context
  8393  	header_    http.Header
  8394  }
  8395  
  8396  // Create: Creates a new SavedQuery for the user making the request.
  8397  //
  8398  //   - parent: The parent resource in which to create the saved query:
  8399  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
  8400  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
  8401  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
  8402  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:
  8403  //     "projects/my-project/locations/global"
  8404  //     "organizations/123456789/locations/us-central1".
  8405  func (r *BillingAccountsLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *BillingAccountsLocationsSavedQueriesCreateCall {
  8406  	c := &BillingAccountsLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8407  	c.parent = parent
  8408  	c.savedquery = savedquery
  8409  	return c
  8410  }
  8411  
  8412  // SavedQueryId sets the optional parameter "savedQueryId": The ID to use for
  8413  // the saved query, which will become the final component of the saved query's
  8414  // resource name.If the saved_query_id is not provided, the system will
  8415  // generate an alphanumeric ID.The saved_query_id is limited to 100 characters
  8416  // and can include only the following characters: upper and lower-case
  8417  // alphanumeric characters, underscores, hyphens, periods.First character has
  8418  // to be alphanumeric.
  8419  func (c *BillingAccountsLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *BillingAccountsLocationsSavedQueriesCreateCall {
  8420  	c.urlParams_.Set("savedQueryId", savedQueryId)
  8421  	return c
  8422  }
  8423  
  8424  // Fields allows partial responses to be retrieved. See
  8425  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8426  // details.
  8427  func (c *BillingAccountsLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsSavedQueriesCreateCall {
  8428  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8429  	return c
  8430  }
  8431  
  8432  // Context sets the context to be used in this call's Do method.
  8433  func (c *BillingAccountsLocationsSavedQueriesCreateCall) Context(ctx context.Context) *BillingAccountsLocationsSavedQueriesCreateCall {
  8434  	c.ctx_ = ctx
  8435  	return c
  8436  }
  8437  
  8438  // Header returns a http.Header that can be modified by the caller to add
  8439  // headers to the request.
  8440  func (c *BillingAccountsLocationsSavedQueriesCreateCall) Header() http.Header {
  8441  	if c.header_ == nil {
  8442  		c.header_ = make(http.Header)
  8443  	}
  8444  	return c.header_
  8445  }
  8446  
  8447  func (c *BillingAccountsLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) {
  8448  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8449  	var body io.Reader = nil
  8450  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery)
  8451  	if err != nil {
  8452  		return nil, err
  8453  	}
  8454  	c.urlParams_.Set("alt", alt)
  8455  	c.urlParams_.Set("prettyPrint", "false")
  8456  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
  8457  	urls += "?" + c.urlParams_.Encode()
  8458  	req, err := http.NewRequest("POST", urls, body)
  8459  	if err != nil {
  8460  		return nil, err
  8461  	}
  8462  	req.Header = reqHeaders
  8463  	googleapi.Expand(req.URL, map[string]string{
  8464  		"parent": c.parent,
  8465  	})
  8466  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8467  }
  8468  
  8469  // Do executes the "logging.billingAccounts.locations.savedQueries.create" call.
  8470  // Any non-2xx status code is an error. Response headers are in either
  8471  // *SavedQuery.ServerResponse.Header or (if a response was returned at all) in
  8472  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8473  // whether the returned error was because http.StatusNotModified was returned.
  8474  func (c *BillingAccountsLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
  8475  	gensupport.SetOptions(c.urlParams_, opts...)
  8476  	res, err := c.doRequest("json")
  8477  	if res != nil && res.StatusCode == http.StatusNotModified {
  8478  		if res.Body != nil {
  8479  			res.Body.Close()
  8480  		}
  8481  		return nil, gensupport.WrapError(&googleapi.Error{
  8482  			Code:   res.StatusCode,
  8483  			Header: res.Header,
  8484  		})
  8485  	}
  8486  	if err != nil {
  8487  		return nil, err
  8488  	}
  8489  	defer googleapi.CloseBody(res)
  8490  	if err := googleapi.CheckResponse(res); err != nil {
  8491  		return nil, gensupport.WrapError(err)
  8492  	}
  8493  	ret := &SavedQuery{
  8494  		ServerResponse: googleapi.ServerResponse{
  8495  			Header:         res.Header,
  8496  			HTTPStatusCode: res.StatusCode,
  8497  		},
  8498  	}
  8499  	target := &ret
  8500  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8501  		return nil, err
  8502  	}
  8503  	return ret, nil
  8504  }
  8505  
  8506  type BillingAccountsLocationsSavedQueriesDeleteCall struct {
  8507  	s          *Service
  8508  	name       string
  8509  	urlParams_ gensupport.URLParams
  8510  	ctx_       context.Context
  8511  	header_    http.Header
  8512  }
  8513  
  8514  // Delete: Deletes an existing SavedQuery that was created by the user making
  8515  // the request.
  8516  //
  8517  //   - name: The full resource name of the saved query to delete.
  8518  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]"
  8519  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER
  8520  //     Y_ID]"
  8521  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/
  8522  //     [QUERY_ID]"
  8523  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For
  8524  //     example:
  8525  //     "projects/my-project/locations/global/savedQueries/my-saved-query".
  8526  func (r *BillingAccountsLocationsSavedQueriesService) Delete(name string) *BillingAccountsLocationsSavedQueriesDeleteCall {
  8527  	c := &BillingAccountsLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8528  	c.name = name
  8529  	return c
  8530  }
  8531  
  8532  // Fields allows partial responses to be retrieved. See
  8533  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8534  // details.
  8535  func (c *BillingAccountsLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsSavedQueriesDeleteCall {
  8536  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8537  	return c
  8538  }
  8539  
  8540  // Context sets the context to be used in this call's Do method.
  8541  func (c *BillingAccountsLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *BillingAccountsLocationsSavedQueriesDeleteCall {
  8542  	c.ctx_ = ctx
  8543  	return c
  8544  }
  8545  
  8546  // Header returns a http.Header that can be modified by the caller to add
  8547  // headers to the request.
  8548  func (c *BillingAccountsLocationsSavedQueriesDeleteCall) Header() http.Header {
  8549  	if c.header_ == nil {
  8550  		c.header_ = make(http.Header)
  8551  	}
  8552  	return c.header_
  8553  }
  8554  
  8555  func (c *BillingAccountsLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) {
  8556  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8557  	var body io.Reader = nil
  8558  	c.urlParams_.Set("alt", alt)
  8559  	c.urlParams_.Set("prettyPrint", "false")
  8560  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  8561  	urls += "?" + c.urlParams_.Encode()
  8562  	req, err := http.NewRequest("DELETE", urls, body)
  8563  	if err != nil {
  8564  		return nil, err
  8565  	}
  8566  	req.Header = reqHeaders
  8567  	googleapi.Expand(req.URL, map[string]string{
  8568  		"name": c.name,
  8569  	})
  8570  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8571  }
  8572  
  8573  // Do executes the "logging.billingAccounts.locations.savedQueries.delete" call.
  8574  // Any non-2xx status code is an error. Response headers are in either
  8575  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  8576  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8577  // whether the returned error was because http.StatusNotModified was returned.
  8578  func (c *BillingAccountsLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8579  	gensupport.SetOptions(c.urlParams_, opts...)
  8580  	res, err := c.doRequest("json")
  8581  	if res != nil && res.StatusCode == http.StatusNotModified {
  8582  		if res.Body != nil {
  8583  			res.Body.Close()
  8584  		}
  8585  		return nil, gensupport.WrapError(&googleapi.Error{
  8586  			Code:   res.StatusCode,
  8587  			Header: res.Header,
  8588  		})
  8589  	}
  8590  	if err != nil {
  8591  		return nil, err
  8592  	}
  8593  	defer googleapi.CloseBody(res)
  8594  	if err := googleapi.CheckResponse(res); err != nil {
  8595  		return nil, gensupport.WrapError(err)
  8596  	}
  8597  	ret := &Empty{
  8598  		ServerResponse: googleapi.ServerResponse{
  8599  			Header:         res.Header,
  8600  			HTTPStatusCode: res.StatusCode,
  8601  		},
  8602  	}
  8603  	target := &ret
  8604  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8605  		return nil, err
  8606  	}
  8607  	return ret, nil
  8608  }
  8609  
  8610  type BillingAccountsLocationsSavedQueriesListCall struct {
  8611  	s            *Service
  8612  	parent       string
  8613  	urlParams_   gensupport.URLParams
  8614  	ifNoneMatch_ string
  8615  	ctx_         context.Context
  8616  	header_      http.Header
  8617  }
  8618  
  8619  // List: Lists the SavedQueries that were created by the user making the
  8620  // request.
  8621  //
  8622  //   - parent: The resource to which the listed queries belong.
  8623  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
  8624  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
  8625  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
  8626  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:
  8627  //     "projects/my-project/locations/us-central1" Note: The locations portion of
  8628  //     the resource must be specified. To get a list of all saved queries, a
  8629  //     wildcard character - can be used for LOCATION_ID, for example:
  8630  //     "projects/my-project/locations/-".
  8631  func (r *BillingAccountsLocationsSavedQueriesService) List(parent string) *BillingAccountsLocationsSavedQueriesListCall {
  8632  	c := &BillingAccountsLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8633  	c.parent = parent
  8634  	return c
  8635  }
  8636  
  8637  // PageSize sets the optional parameter "pageSize": The maximum number of
  8638  // results to return from this request.Non-positive values are ignored. The
  8639  // presence of nextPageToken in the response indicates that more results might
  8640  // be available.
  8641  func (c *BillingAccountsLocationsSavedQueriesListCall) PageSize(pageSize int64) *BillingAccountsLocationsSavedQueriesListCall {
  8642  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8643  	return c
  8644  }
  8645  
  8646  // PageToken sets the optional parameter "pageToken": If present, then retrieve
  8647  // the next batch of results from the preceding call to this method. pageToken
  8648  // must be the value of nextPageToken from the previous response. The values of
  8649  // other method parameters should be identical to those in the previous call.
  8650  func (c *BillingAccountsLocationsSavedQueriesListCall) PageToken(pageToken string) *BillingAccountsLocationsSavedQueriesListCall {
  8651  	c.urlParams_.Set("pageToken", pageToken)
  8652  	return c
  8653  }
  8654  
  8655  // Fields allows partial responses to be retrieved. See
  8656  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8657  // details.
  8658  func (c *BillingAccountsLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsSavedQueriesListCall {
  8659  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8660  	return c
  8661  }
  8662  
  8663  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8664  // object's ETag matches the given value. This is useful for getting updates
  8665  // only after the object has changed since the last request.
  8666  func (c *BillingAccountsLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsSavedQueriesListCall {
  8667  	c.ifNoneMatch_ = entityTag
  8668  	return c
  8669  }
  8670  
  8671  // Context sets the context to be used in this call's Do method.
  8672  func (c *BillingAccountsLocationsSavedQueriesListCall) Context(ctx context.Context) *BillingAccountsLocationsSavedQueriesListCall {
  8673  	c.ctx_ = ctx
  8674  	return c
  8675  }
  8676  
  8677  // Header returns a http.Header that can be modified by the caller to add
  8678  // headers to the request.
  8679  func (c *BillingAccountsLocationsSavedQueriesListCall) Header() http.Header {
  8680  	if c.header_ == nil {
  8681  		c.header_ = make(http.Header)
  8682  	}
  8683  	return c.header_
  8684  }
  8685  
  8686  func (c *BillingAccountsLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) {
  8687  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8688  	if c.ifNoneMatch_ != "" {
  8689  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8690  	}
  8691  	var body io.Reader = nil
  8692  	c.urlParams_.Set("alt", alt)
  8693  	c.urlParams_.Set("prettyPrint", "false")
  8694  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
  8695  	urls += "?" + c.urlParams_.Encode()
  8696  	req, err := http.NewRequest("GET", urls, body)
  8697  	if err != nil {
  8698  		return nil, err
  8699  	}
  8700  	req.Header = reqHeaders
  8701  	googleapi.Expand(req.URL, map[string]string{
  8702  		"parent": c.parent,
  8703  	})
  8704  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8705  }
  8706  
  8707  // Do executes the "logging.billingAccounts.locations.savedQueries.list" call.
  8708  // Any non-2xx status code is an error. Response headers are in either
  8709  // *ListSavedQueriesResponse.ServerResponse.Header or (if a response was
  8710  // returned at all) in error.(*googleapi.Error).Header. Use
  8711  // googleapi.IsNotModified to check whether the returned error was because
  8712  // http.StatusNotModified was returned.
  8713  func (c *BillingAccountsLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) {
  8714  	gensupport.SetOptions(c.urlParams_, opts...)
  8715  	res, err := c.doRequest("json")
  8716  	if res != nil && res.StatusCode == http.StatusNotModified {
  8717  		if res.Body != nil {
  8718  			res.Body.Close()
  8719  		}
  8720  		return nil, gensupport.WrapError(&googleapi.Error{
  8721  			Code:   res.StatusCode,
  8722  			Header: res.Header,
  8723  		})
  8724  	}
  8725  	if err != nil {
  8726  		return nil, err
  8727  	}
  8728  	defer googleapi.CloseBody(res)
  8729  	if err := googleapi.CheckResponse(res); err != nil {
  8730  		return nil, gensupport.WrapError(err)
  8731  	}
  8732  	ret := &ListSavedQueriesResponse{
  8733  		ServerResponse: googleapi.ServerResponse{
  8734  			Header:         res.Header,
  8735  			HTTPStatusCode: res.StatusCode,
  8736  		},
  8737  	}
  8738  	target := &ret
  8739  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8740  		return nil, err
  8741  	}
  8742  	return ret, nil
  8743  }
  8744  
  8745  // Pages invokes f for each page of results.
  8746  // A non-nil error returned from f will halt the iteration.
  8747  // The provided context supersedes any context provided to the Context method.
  8748  func (c *BillingAccountsLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error {
  8749  	c.ctx_ = ctx
  8750  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8751  	for {
  8752  		x, err := c.Do()
  8753  		if err != nil {
  8754  			return err
  8755  		}
  8756  		if err := f(x); err != nil {
  8757  			return err
  8758  		}
  8759  		if x.NextPageToken == "" {
  8760  			return nil
  8761  		}
  8762  		c.PageToken(x.NextPageToken)
  8763  	}
  8764  }
  8765  
  8766  type BillingAccountsLogsDeleteCall struct {
  8767  	s          *Service
  8768  	logName    string
  8769  	urlParams_ gensupport.URLParams
  8770  	ctx_       context.Context
  8771  	header_    http.Header
  8772  }
  8773  
  8774  // Delete: Deletes all the log entries in a log for the _Default Log Bucket.
  8775  // The log reappears if it receives new entries. Log entries written shortly
  8776  // before the delete operation might not be deleted. Entries received after the
  8777  // delete operation with a timestamp before the operation will be deleted.
  8778  //
  8779  //   - logName: The resource name of the log to delete:
  8780  //     projects/[PROJECT_ID]/logs/[LOG_ID]
  8781  //     organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
  8782  //     billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
  8783  //     folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
  8784  //     example, "projects/my-project-id/logs/syslog",
  8785  //     "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more
  8786  //     information about log names, see LogEntry.
  8787  func (r *BillingAccountsLogsService) Delete(logName string) *BillingAccountsLogsDeleteCall {
  8788  	c := &BillingAccountsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8789  	c.logName = logName
  8790  	return c
  8791  }
  8792  
  8793  // Fields allows partial responses to be retrieved. See
  8794  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8795  // details.
  8796  func (c *BillingAccountsLogsDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsLogsDeleteCall {
  8797  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8798  	return c
  8799  }
  8800  
  8801  // Context sets the context to be used in this call's Do method.
  8802  func (c *BillingAccountsLogsDeleteCall) Context(ctx context.Context) *BillingAccountsLogsDeleteCall {
  8803  	c.ctx_ = ctx
  8804  	return c
  8805  }
  8806  
  8807  // Header returns a http.Header that can be modified by the caller to add
  8808  // headers to the request.
  8809  func (c *BillingAccountsLogsDeleteCall) Header() http.Header {
  8810  	if c.header_ == nil {
  8811  		c.header_ = make(http.Header)
  8812  	}
  8813  	return c.header_
  8814  }
  8815  
  8816  func (c *BillingAccountsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8817  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8818  	var body io.Reader = nil
  8819  	c.urlParams_.Set("alt", alt)
  8820  	c.urlParams_.Set("prettyPrint", "false")
  8821  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
  8822  	urls += "?" + c.urlParams_.Encode()
  8823  	req, err := http.NewRequest("DELETE", urls, body)
  8824  	if err != nil {
  8825  		return nil, err
  8826  	}
  8827  	req.Header = reqHeaders
  8828  	googleapi.Expand(req.URL, map[string]string{
  8829  		"logName": c.logName,
  8830  	})
  8831  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8832  }
  8833  
  8834  // Do executes the "logging.billingAccounts.logs.delete" call.
  8835  // Any non-2xx status code is an error. Response headers are in either
  8836  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  8837  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8838  // whether the returned error was because http.StatusNotModified was returned.
  8839  func (c *BillingAccountsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8840  	gensupport.SetOptions(c.urlParams_, opts...)
  8841  	res, err := c.doRequest("json")
  8842  	if res != nil && res.StatusCode == http.StatusNotModified {
  8843  		if res.Body != nil {
  8844  			res.Body.Close()
  8845  		}
  8846  		return nil, gensupport.WrapError(&googleapi.Error{
  8847  			Code:   res.StatusCode,
  8848  			Header: res.Header,
  8849  		})
  8850  	}
  8851  	if err != nil {
  8852  		return nil, err
  8853  	}
  8854  	defer googleapi.CloseBody(res)
  8855  	if err := googleapi.CheckResponse(res); err != nil {
  8856  		return nil, gensupport.WrapError(err)
  8857  	}
  8858  	ret := &Empty{
  8859  		ServerResponse: googleapi.ServerResponse{
  8860  			Header:         res.Header,
  8861  			HTTPStatusCode: res.StatusCode,
  8862  		},
  8863  	}
  8864  	target := &ret
  8865  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8866  		return nil, err
  8867  	}
  8868  	return ret, nil
  8869  }
  8870  
  8871  type BillingAccountsLogsListCall struct {
  8872  	s            *Service
  8873  	parent       string
  8874  	urlParams_   gensupport.URLParams
  8875  	ifNoneMatch_ string
  8876  	ctx_         context.Context
  8877  	header_      http.Header
  8878  }
  8879  
  8880  // List: Lists the logs in projects, organizations, folders, or billing
  8881  // accounts. Only logs that have entries are listed.
  8882  //
  8883  //   - parent: The resource name to list logs for: projects/[PROJECT_ID]
  8884  //     organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
  8885  //     folders/[FOLDER_ID].
  8886  func (r *BillingAccountsLogsService) List(parent string) *BillingAccountsLogsListCall {
  8887  	c := &BillingAccountsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8888  	c.parent = parent
  8889  	return c
  8890  }
  8891  
  8892  // PageSize sets the optional parameter "pageSize": The maximum number of
  8893  // results to return from this request. Non-positive values are ignored. The
  8894  // presence of nextPageToken in the response indicates that more results might
  8895  // be available.
  8896  func (c *BillingAccountsLogsListCall) PageSize(pageSize int64) *BillingAccountsLogsListCall {
  8897  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8898  	return c
  8899  }
  8900  
  8901  // PageToken sets the optional parameter "pageToken": If present, then retrieve
  8902  // the next batch of results from the preceding call to this method. pageToken
  8903  // must be the value of nextPageToken from the previous response. The values of
  8904  // other method parameters should be identical to those in the previous call.
  8905  func (c *BillingAccountsLogsListCall) PageToken(pageToken string) *BillingAccountsLogsListCall {
  8906  	c.urlParams_.Set("pageToken", pageToken)
  8907  	return c
  8908  }
  8909  
  8910  // ResourceNames sets the optional parameter "resourceNames": List of resource
  8911  // names to list logs for:
  8912  // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
  8913  // _ID]
  8914  // organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
  8915  // iews/[VIEW_ID]
  8916  // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
  8917  // ID]/views/[VIEW_ID]
  8918  // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
  8919  // D]To support legacy queries, it could also be: projects/[PROJECT_ID]
  8920  // organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
  8921  // folders/[FOLDER_ID]The resource name in the parent field is added to this
  8922  // list.
  8923  func (c *BillingAccountsLogsListCall) ResourceNames(resourceNames ...string) *BillingAccountsLogsListCall {
  8924  	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
  8925  	return c
  8926  }
  8927  
  8928  // Fields allows partial responses to be retrieved. See
  8929  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8930  // details.
  8931  func (c *BillingAccountsLogsListCall) Fields(s ...googleapi.Field) *BillingAccountsLogsListCall {
  8932  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8933  	return c
  8934  }
  8935  
  8936  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8937  // object's ETag matches the given value. This is useful for getting updates
  8938  // only after the object has changed since the last request.
  8939  func (c *BillingAccountsLogsListCall) IfNoneMatch(entityTag string) *BillingAccountsLogsListCall {
  8940  	c.ifNoneMatch_ = entityTag
  8941  	return c
  8942  }
  8943  
  8944  // Context sets the context to be used in this call's Do method.
  8945  func (c *BillingAccountsLogsListCall) Context(ctx context.Context) *BillingAccountsLogsListCall {
  8946  	c.ctx_ = ctx
  8947  	return c
  8948  }
  8949  
  8950  // Header returns a http.Header that can be modified by the caller to add
  8951  // headers to the request.
  8952  func (c *BillingAccountsLogsListCall) Header() http.Header {
  8953  	if c.header_ == nil {
  8954  		c.header_ = make(http.Header)
  8955  	}
  8956  	return c.header_
  8957  }
  8958  
  8959  func (c *BillingAccountsLogsListCall) doRequest(alt string) (*http.Response, error) {
  8960  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8961  	if c.ifNoneMatch_ != "" {
  8962  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8963  	}
  8964  	var body io.Reader = nil
  8965  	c.urlParams_.Set("alt", alt)
  8966  	c.urlParams_.Set("prettyPrint", "false")
  8967  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
  8968  	urls += "?" + c.urlParams_.Encode()
  8969  	req, err := http.NewRequest("GET", urls, body)
  8970  	if err != nil {
  8971  		return nil, err
  8972  	}
  8973  	req.Header = reqHeaders
  8974  	googleapi.Expand(req.URL, map[string]string{
  8975  		"parent": c.parent,
  8976  	})
  8977  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8978  }
  8979  
  8980  // Do executes the "logging.billingAccounts.logs.list" call.
  8981  // Any non-2xx status code is an error. Response headers are in either
  8982  // *ListLogsResponse.ServerResponse.Header or (if a response was returned at
  8983  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8984  // check whether the returned error was because http.StatusNotModified was
  8985  // returned.
  8986  func (c *BillingAccountsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
  8987  	gensupport.SetOptions(c.urlParams_, opts...)
  8988  	res, err := c.doRequest("json")
  8989  	if res != nil && res.StatusCode == http.StatusNotModified {
  8990  		if res.Body != nil {
  8991  			res.Body.Close()
  8992  		}
  8993  		return nil, gensupport.WrapError(&googleapi.Error{
  8994  			Code:   res.StatusCode,
  8995  			Header: res.Header,
  8996  		})
  8997  	}
  8998  	if err != nil {
  8999  		return nil, err
  9000  	}
  9001  	defer googleapi.CloseBody(res)
  9002  	if err := googleapi.CheckResponse(res); err != nil {
  9003  		return nil, gensupport.WrapError(err)
  9004  	}
  9005  	ret := &ListLogsResponse{
  9006  		ServerResponse: googleapi.ServerResponse{
  9007  			Header:         res.Header,
  9008  			HTTPStatusCode: res.StatusCode,
  9009  		},
  9010  	}
  9011  	target := &ret
  9012  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9013  		return nil, err
  9014  	}
  9015  	return ret, nil
  9016  }
  9017  
  9018  // Pages invokes f for each page of results.
  9019  // A non-nil error returned from f will halt the iteration.
  9020  // The provided context supersedes any context provided to the Context method.
  9021  func (c *BillingAccountsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
  9022  	c.ctx_ = ctx
  9023  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9024  	for {
  9025  		x, err := c.Do()
  9026  		if err != nil {
  9027  			return err
  9028  		}
  9029  		if err := f(x); err != nil {
  9030  			return err
  9031  		}
  9032  		if x.NextPageToken == "" {
  9033  			return nil
  9034  		}
  9035  		c.PageToken(x.NextPageToken)
  9036  	}
  9037  }
  9038  
  9039  type BillingAccountsSinksCreateCall struct {
  9040  	s          *Service
  9041  	parent     string
  9042  	logsink    *LogSink
  9043  	urlParams_ gensupport.URLParams
  9044  	ctx_       context.Context
  9045  	header_    http.Header
  9046  }
  9047  
  9048  // Create: Creates a sink that exports specified log entries to a destination.
  9049  // The export begins upon ingress, unless the sink's writer_identity is not
  9050  // permitted to write to the destination. A sink can export log entries only
  9051  // from the resource owning the sink.
  9052  //
  9053  //   - parent: The resource in which to create the sink: "projects/[PROJECT_ID]"
  9054  //     "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]"
  9055  //     "folders/[FOLDER_ID]" For examples:"projects/my-project"
  9056  //     "organizations/123456789".
  9057  func (r *BillingAccountsSinksService) Create(parent string, logsink *LogSink) *BillingAccountsSinksCreateCall {
  9058  	c := &BillingAccountsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9059  	c.parent = parent
  9060  	c.logsink = logsink
  9061  	return c
  9062  }
  9063  
  9064  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
  9065  // service account provided by the caller that will be used to write the log
  9066  // entries. The format must be serviceAccount:some@email. This field can only
  9067  // be specified if you are routing logs to a destination outside this sink's
  9068  // project. If not specified, a Logging service account will automatically be
  9069  // generated.
  9070  func (c *BillingAccountsSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *BillingAccountsSinksCreateCall {
  9071  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
  9072  	return c
  9073  }
  9074  
  9075  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity":
  9076  // Determines the kind of IAM identity returned as writer_identity in the new
  9077  // sink. If this value is omitted or set to false, and if the sink's parent is
  9078  // a project, then the value returned as writer_identity is the same group or
  9079  // service account used by Cloud Logging before the addition of writer
  9080  // identities to this API. The sink's destination must be in the same project
  9081  // as the sink itself.If this field is set to true, or if the sink is owned by
  9082  // a non-project resource such as an organization, then the value of
  9083  // writer_identity will be a service agent
  9084  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
  9085  // used by the sinks with the same parent. For more information, see
  9086  // writer_identity in LogSink.
  9087  func (c *BillingAccountsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksCreateCall {
  9088  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
  9089  	return c
  9090  }
  9091  
  9092  // Fields allows partial responses to be retrieved. See
  9093  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9094  // details.
  9095  func (c *BillingAccountsSinksCreateCall) Fields(s ...googleapi.Field) *BillingAccountsSinksCreateCall {
  9096  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9097  	return c
  9098  }
  9099  
  9100  // Context sets the context to be used in this call's Do method.
  9101  func (c *BillingAccountsSinksCreateCall) Context(ctx context.Context) *BillingAccountsSinksCreateCall {
  9102  	c.ctx_ = ctx
  9103  	return c
  9104  }
  9105  
  9106  // Header returns a http.Header that can be modified by the caller to add
  9107  // headers to the request.
  9108  func (c *BillingAccountsSinksCreateCall) Header() http.Header {
  9109  	if c.header_ == nil {
  9110  		c.header_ = make(http.Header)
  9111  	}
  9112  	return c.header_
  9113  }
  9114  
  9115  func (c *BillingAccountsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
  9116  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9117  	var body io.Reader = nil
  9118  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
  9119  	if err != nil {
  9120  		return nil, err
  9121  	}
  9122  	c.urlParams_.Set("alt", alt)
  9123  	c.urlParams_.Set("prettyPrint", "false")
  9124  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
  9125  	urls += "?" + c.urlParams_.Encode()
  9126  	req, err := http.NewRequest("POST", urls, body)
  9127  	if err != nil {
  9128  		return nil, err
  9129  	}
  9130  	req.Header = reqHeaders
  9131  	googleapi.Expand(req.URL, map[string]string{
  9132  		"parent": c.parent,
  9133  	})
  9134  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9135  }
  9136  
  9137  // Do executes the "logging.billingAccounts.sinks.create" call.
  9138  // Any non-2xx status code is an error. Response headers are in either
  9139  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
  9140  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9141  // whether the returned error was because http.StatusNotModified was returned.
  9142  func (c *BillingAccountsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
  9143  	gensupport.SetOptions(c.urlParams_, opts...)
  9144  	res, err := c.doRequest("json")
  9145  	if res != nil && res.StatusCode == http.StatusNotModified {
  9146  		if res.Body != nil {
  9147  			res.Body.Close()
  9148  		}
  9149  		return nil, gensupport.WrapError(&googleapi.Error{
  9150  			Code:   res.StatusCode,
  9151  			Header: res.Header,
  9152  		})
  9153  	}
  9154  	if err != nil {
  9155  		return nil, err
  9156  	}
  9157  	defer googleapi.CloseBody(res)
  9158  	if err := googleapi.CheckResponse(res); err != nil {
  9159  		return nil, gensupport.WrapError(err)
  9160  	}
  9161  	ret := &LogSink{
  9162  		ServerResponse: googleapi.ServerResponse{
  9163  			Header:         res.Header,
  9164  			HTTPStatusCode: res.StatusCode,
  9165  		},
  9166  	}
  9167  	target := &ret
  9168  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9169  		return nil, err
  9170  	}
  9171  	return ret, nil
  9172  }
  9173  
  9174  type BillingAccountsSinksDeleteCall struct {
  9175  	s          *Service
  9176  	sinkNameid string
  9177  	urlParams_ gensupport.URLParams
  9178  	ctx_       context.Context
  9179  	header_    http.Header
  9180  }
  9181  
  9182  // Delete: Deletes a sink. If the sink has a unique writer_identity, then that
  9183  // service account is also deleted.
  9184  //
  9185  //   - sinkName: The full resource name of the sink to delete, including the
  9186  //     parent resource and the sink identifier:
  9187  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  9188  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  9189  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
  9190  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
  9191  //     example:"projects/my-project/sinks/my-sink".
  9192  func (r *BillingAccountsSinksService) Delete(sinkNameid string) *BillingAccountsSinksDeleteCall {
  9193  	c := &BillingAccountsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9194  	c.sinkNameid = sinkNameid
  9195  	return c
  9196  }
  9197  
  9198  // Fields allows partial responses to be retrieved. See
  9199  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9200  // details.
  9201  func (c *BillingAccountsSinksDeleteCall) Fields(s ...googleapi.Field) *BillingAccountsSinksDeleteCall {
  9202  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9203  	return c
  9204  }
  9205  
  9206  // Context sets the context to be used in this call's Do method.
  9207  func (c *BillingAccountsSinksDeleteCall) Context(ctx context.Context) *BillingAccountsSinksDeleteCall {
  9208  	c.ctx_ = ctx
  9209  	return c
  9210  }
  9211  
  9212  // Header returns a http.Header that can be modified by the caller to add
  9213  // headers to the request.
  9214  func (c *BillingAccountsSinksDeleteCall) Header() http.Header {
  9215  	if c.header_ == nil {
  9216  		c.header_ = make(http.Header)
  9217  	}
  9218  	return c.header_
  9219  }
  9220  
  9221  func (c *BillingAccountsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
  9222  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9223  	var body io.Reader = nil
  9224  	c.urlParams_.Set("alt", alt)
  9225  	c.urlParams_.Set("prettyPrint", "false")
  9226  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
  9227  	urls += "?" + c.urlParams_.Encode()
  9228  	req, err := http.NewRequest("DELETE", urls, body)
  9229  	if err != nil {
  9230  		return nil, err
  9231  	}
  9232  	req.Header = reqHeaders
  9233  	googleapi.Expand(req.URL, map[string]string{
  9234  		"sinkName": c.sinkNameid,
  9235  	})
  9236  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9237  }
  9238  
  9239  // Do executes the "logging.billingAccounts.sinks.delete" call.
  9240  // Any non-2xx status code is an error. Response headers are in either
  9241  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  9242  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9243  // whether the returned error was because http.StatusNotModified was returned.
  9244  func (c *BillingAccountsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  9245  	gensupport.SetOptions(c.urlParams_, opts...)
  9246  	res, err := c.doRequest("json")
  9247  	if res != nil && res.StatusCode == http.StatusNotModified {
  9248  		if res.Body != nil {
  9249  			res.Body.Close()
  9250  		}
  9251  		return nil, gensupport.WrapError(&googleapi.Error{
  9252  			Code:   res.StatusCode,
  9253  			Header: res.Header,
  9254  		})
  9255  	}
  9256  	if err != nil {
  9257  		return nil, err
  9258  	}
  9259  	defer googleapi.CloseBody(res)
  9260  	if err := googleapi.CheckResponse(res); err != nil {
  9261  		return nil, gensupport.WrapError(err)
  9262  	}
  9263  	ret := &Empty{
  9264  		ServerResponse: googleapi.ServerResponse{
  9265  			Header:         res.Header,
  9266  			HTTPStatusCode: res.StatusCode,
  9267  		},
  9268  	}
  9269  	target := &ret
  9270  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9271  		return nil, err
  9272  	}
  9273  	return ret, nil
  9274  }
  9275  
  9276  type BillingAccountsSinksGetCall struct {
  9277  	s            *Service
  9278  	sinkName     string
  9279  	urlParams_   gensupport.URLParams
  9280  	ifNoneMatch_ string
  9281  	ctx_         context.Context
  9282  	header_      http.Header
  9283  }
  9284  
  9285  // Get: Gets a sink.
  9286  //
  9287  //   - sinkName: The resource name of the sink:
  9288  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  9289  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  9290  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
  9291  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
  9292  //     example:"projects/my-project/sinks/my-sink".
  9293  func (r *BillingAccountsSinksService) Get(sinkName string) *BillingAccountsSinksGetCall {
  9294  	c := &BillingAccountsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9295  	c.sinkName = sinkName
  9296  	return c
  9297  }
  9298  
  9299  // Fields allows partial responses to be retrieved. See
  9300  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9301  // details.
  9302  func (c *BillingAccountsSinksGetCall) Fields(s ...googleapi.Field) *BillingAccountsSinksGetCall {
  9303  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9304  	return c
  9305  }
  9306  
  9307  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9308  // object's ETag matches the given value. This is useful for getting updates
  9309  // only after the object has changed since the last request.
  9310  func (c *BillingAccountsSinksGetCall) IfNoneMatch(entityTag string) *BillingAccountsSinksGetCall {
  9311  	c.ifNoneMatch_ = entityTag
  9312  	return c
  9313  }
  9314  
  9315  // Context sets the context to be used in this call's Do method.
  9316  func (c *BillingAccountsSinksGetCall) Context(ctx context.Context) *BillingAccountsSinksGetCall {
  9317  	c.ctx_ = ctx
  9318  	return c
  9319  }
  9320  
  9321  // Header returns a http.Header that can be modified by the caller to add
  9322  // headers to the request.
  9323  func (c *BillingAccountsSinksGetCall) Header() http.Header {
  9324  	if c.header_ == nil {
  9325  		c.header_ = make(http.Header)
  9326  	}
  9327  	return c.header_
  9328  }
  9329  
  9330  func (c *BillingAccountsSinksGetCall) doRequest(alt string) (*http.Response, error) {
  9331  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9332  	if c.ifNoneMatch_ != "" {
  9333  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9334  	}
  9335  	var body io.Reader = nil
  9336  	c.urlParams_.Set("alt", alt)
  9337  	c.urlParams_.Set("prettyPrint", "false")
  9338  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
  9339  	urls += "?" + c.urlParams_.Encode()
  9340  	req, err := http.NewRequest("GET", urls, body)
  9341  	if err != nil {
  9342  		return nil, err
  9343  	}
  9344  	req.Header = reqHeaders
  9345  	googleapi.Expand(req.URL, map[string]string{
  9346  		"sinkName": c.sinkName,
  9347  	})
  9348  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9349  }
  9350  
  9351  // Do executes the "logging.billingAccounts.sinks.get" call.
  9352  // Any non-2xx status code is an error. Response headers are in either
  9353  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
  9354  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9355  // whether the returned error was because http.StatusNotModified was returned.
  9356  func (c *BillingAccountsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
  9357  	gensupport.SetOptions(c.urlParams_, opts...)
  9358  	res, err := c.doRequest("json")
  9359  	if res != nil && res.StatusCode == http.StatusNotModified {
  9360  		if res.Body != nil {
  9361  			res.Body.Close()
  9362  		}
  9363  		return nil, gensupport.WrapError(&googleapi.Error{
  9364  			Code:   res.StatusCode,
  9365  			Header: res.Header,
  9366  		})
  9367  	}
  9368  	if err != nil {
  9369  		return nil, err
  9370  	}
  9371  	defer googleapi.CloseBody(res)
  9372  	if err := googleapi.CheckResponse(res); err != nil {
  9373  		return nil, gensupport.WrapError(err)
  9374  	}
  9375  	ret := &LogSink{
  9376  		ServerResponse: googleapi.ServerResponse{
  9377  			Header:         res.Header,
  9378  			HTTPStatusCode: res.StatusCode,
  9379  		},
  9380  	}
  9381  	target := &ret
  9382  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9383  		return nil, err
  9384  	}
  9385  	return ret, nil
  9386  }
  9387  
  9388  type BillingAccountsSinksListCall struct {
  9389  	s            *Service
  9390  	parent       string
  9391  	urlParams_   gensupport.URLParams
  9392  	ifNoneMatch_ string
  9393  	ctx_         context.Context
  9394  	header_      http.Header
  9395  }
  9396  
  9397  // List: Lists sinks.
  9398  //
  9399  //   - parent: The parent resource whose sinks are to be listed:
  9400  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
  9401  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
  9402  func (r *BillingAccountsSinksService) List(parent string) *BillingAccountsSinksListCall {
  9403  	c := &BillingAccountsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9404  	c.parent = parent
  9405  	return c
  9406  }
  9407  
  9408  // Filter sets the optional parameter "filter": A filter expression to
  9409  // constrain the sinks returned. Today, this only supports the following
  9410  // strings: ” 'in_scope("ALL")', 'in_scope("ANCESTOR")',
  9411  // 'in_scope("DEFAULT")'.Description of scopes below. ALL: Includes all of the
  9412  // sinks which can be returned in any other scope. ANCESTOR: Includes
  9413  // intercepting sinks owned by ancestor resources. DEFAULT: Includes sinks
  9414  // owned by parent.When the empty string is provided, then the filter
  9415  // 'in_scope("DEFAULT")' is applied.
  9416  func (c *BillingAccountsSinksListCall) Filter(filter string) *BillingAccountsSinksListCall {
  9417  	c.urlParams_.Set("filter", filter)
  9418  	return c
  9419  }
  9420  
  9421  // PageSize sets the optional parameter "pageSize": The maximum number of
  9422  // results to return from this request. Non-positive values are ignored. The
  9423  // presence of nextPageToken in the response indicates that more results might
  9424  // be available.
  9425  func (c *BillingAccountsSinksListCall) PageSize(pageSize int64) *BillingAccountsSinksListCall {
  9426  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9427  	return c
  9428  }
  9429  
  9430  // PageToken sets the optional parameter "pageToken": If present, then retrieve
  9431  // the next batch of results from the preceding call to this method. pageToken
  9432  // must be the value of nextPageToken from the previous response. The values of
  9433  // other method parameters should be identical to those in the previous call.
  9434  func (c *BillingAccountsSinksListCall) PageToken(pageToken string) *BillingAccountsSinksListCall {
  9435  	c.urlParams_.Set("pageToken", pageToken)
  9436  	return c
  9437  }
  9438  
  9439  // Fields allows partial responses to be retrieved. See
  9440  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9441  // details.
  9442  func (c *BillingAccountsSinksListCall) Fields(s ...googleapi.Field) *BillingAccountsSinksListCall {
  9443  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9444  	return c
  9445  }
  9446  
  9447  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9448  // object's ETag matches the given value. This is useful for getting updates
  9449  // only after the object has changed since the last request.
  9450  func (c *BillingAccountsSinksListCall) IfNoneMatch(entityTag string) *BillingAccountsSinksListCall {
  9451  	c.ifNoneMatch_ = entityTag
  9452  	return c
  9453  }
  9454  
  9455  // Context sets the context to be used in this call's Do method.
  9456  func (c *BillingAccountsSinksListCall) Context(ctx context.Context) *BillingAccountsSinksListCall {
  9457  	c.ctx_ = ctx
  9458  	return c
  9459  }
  9460  
  9461  // Header returns a http.Header that can be modified by the caller to add
  9462  // headers to the request.
  9463  func (c *BillingAccountsSinksListCall) Header() http.Header {
  9464  	if c.header_ == nil {
  9465  		c.header_ = make(http.Header)
  9466  	}
  9467  	return c.header_
  9468  }
  9469  
  9470  func (c *BillingAccountsSinksListCall) doRequest(alt string) (*http.Response, error) {
  9471  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9472  	if c.ifNoneMatch_ != "" {
  9473  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9474  	}
  9475  	var body io.Reader = nil
  9476  	c.urlParams_.Set("alt", alt)
  9477  	c.urlParams_.Set("prettyPrint", "false")
  9478  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
  9479  	urls += "?" + c.urlParams_.Encode()
  9480  	req, err := http.NewRequest("GET", urls, body)
  9481  	if err != nil {
  9482  		return nil, err
  9483  	}
  9484  	req.Header = reqHeaders
  9485  	googleapi.Expand(req.URL, map[string]string{
  9486  		"parent": c.parent,
  9487  	})
  9488  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9489  }
  9490  
  9491  // Do executes the "logging.billingAccounts.sinks.list" call.
  9492  // Any non-2xx status code is an error. Response headers are in either
  9493  // *ListSinksResponse.ServerResponse.Header or (if a response was returned at
  9494  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9495  // check whether the returned error was because http.StatusNotModified was
  9496  // returned.
  9497  func (c *BillingAccountsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
  9498  	gensupport.SetOptions(c.urlParams_, opts...)
  9499  	res, err := c.doRequest("json")
  9500  	if res != nil && res.StatusCode == http.StatusNotModified {
  9501  		if res.Body != nil {
  9502  			res.Body.Close()
  9503  		}
  9504  		return nil, gensupport.WrapError(&googleapi.Error{
  9505  			Code:   res.StatusCode,
  9506  			Header: res.Header,
  9507  		})
  9508  	}
  9509  	if err != nil {
  9510  		return nil, err
  9511  	}
  9512  	defer googleapi.CloseBody(res)
  9513  	if err := googleapi.CheckResponse(res); err != nil {
  9514  		return nil, gensupport.WrapError(err)
  9515  	}
  9516  	ret := &ListSinksResponse{
  9517  		ServerResponse: googleapi.ServerResponse{
  9518  			Header:         res.Header,
  9519  			HTTPStatusCode: res.StatusCode,
  9520  		},
  9521  	}
  9522  	target := &ret
  9523  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9524  		return nil, err
  9525  	}
  9526  	return ret, nil
  9527  }
  9528  
  9529  // Pages invokes f for each page of results.
  9530  // A non-nil error returned from f will halt the iteration.
  9531  // The provided context supersedes any context provided to the Context method.
  9532  func (c *BillingAccountsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
  9533  	c.ctx_ = ctx
  9534  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9535  	for {
  9536  		x, err := c.Do()
  9537  		if err != nil {
  9538  			return err
  9539  		}
  9540  		if err := f(x); err != nil {
  9541  			return err
  9542  		}
  9543  		if x.NextPageToken == "" {
  9544  			return nil
  9545  		}
  9546  		c.PageToken(x.NextPageToken)
  9547  	}
  9548  }
  9549  
  9550  type BillingAccountsSinksPatchCall struct {
  9551  	s          *Service
  9552  	sinkNameid string
  9553  	logsink    *LogSink
  9554  	urlParams_ gensupport.URLParams
  9555  	ctx_       context.Context
  9556  	header_    http.Header
  9557  }
  9558  
  9559  // Patch: Updates a sink. This method replaces the values of the destination
  9560  // and filter fields of the existing sink with the corresponding values from
  9561  // the new sink.The updated sink might also have a new writer_identity; see the
  9562  // unique_writer_identity field.
  9563  //
  9564  //   - sinkName: The full resource name of the sink to update, including the
  9565  //     parent resource and the sink identifier:
  9566  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  9567  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  9568  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
  9569  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
  9570  //     example:"projects/my-project/sinks/my-sink".
  9571  func (r *BillingAccountsSinksService) Patch(sinkNameid string, logsink *LogSink) *BillingAccountsSinksPatchCall {
  9572  	c := &BillingAccountsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9573  	c.sinkNameid = sinkNameid
  9574  	c.logsink = logsink
  9575  	return c
  9576  }
  9577  
  9578  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
  9579  // service account provided by the caller that will be used to write the log
  9580  // entries. The format must be serviceAccount:some@email. This field can only
  9581  // be specified if you are routing logs to a destination outside this sink's
  9582  // project. If not specified, a Logging service account will automatically be
  9583  // generated.
  9584  func (c *BillingAccountsSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *BillingAccountsSinksPatchCall {
  9585  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
  9586  	return c
  9587  }
  9588  
  9589  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See
  9590  // sinks.create for a description of this field. When updating a sink, the
  9591  // effect of this field on the value of writer_identity in the updated sink
  9592  // depends on both the old and new values of this field: If the old and new
  9593  // values of this field are both false or both true, then there is no change to
  9594  // the sink's writer_identity. If the old value is false and the new value is
  9595  // true, then writer_identity is changed to a service agent
  9596  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
  9597  // owned by Cloud Logging. It is an error if the old value is true and the new
  9598  // value is set to false or defaulted to false.
  9599  func (c *BillingAccountsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksPatchCall {
  9600  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
  9601  	return c
  9602  }
  9603  
  9604  // UpdateMask sets the optional parameter "updateMask": Field mask that
  9605  // specifies the fields in sink that need an update. A sink field will be
  9606  // overwritten if, and only if, it is in the update mask. name and output only
  9607  // fields cannot be updated.An empty updateMask is temporarily treated as using
  9608  // the following mask for backwards compatibility
  9609  // purposes:destination,filter,includeChildrenAt some point in the future,
  9610  // behavior will be removed and specifying an empty updateMask will be an
  9611  // error.For a detailed FieldMask definition, see
  9612  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
  9613  // example: updateMask=filter
  9614  func (c *BillingAccountsSinksPatchCall) UpdateMask(updateMask string) *BillingAccountsSinksPatchCall {
  9615  	c.urlParams_.Set("updateMask", updateMask)
  9616  	return c
  9617  }
  9618  
  9619  // Fields allows partial responses to be retrieved. See
  9620  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9621  // details.
  9622  func (c *BillingAccountsSinksPatchCall) Fields(s ...googleapi.Field) *BillingAccountsSinksPatchCall {
  9623  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9624  	return c
  9625  }
  9626  
  9627  // Context sets the context to be used in this call's Do method.
  9628  func (c *BillingAccountsSinksPatchCall) Context(ctx context.Context) *BillingAccountsSinksPatchCall {
  9629  	c.ctx_ = ctx
  9630  	return c
  9631  }
  9632  
  9633  // Header returns a http.Header that can be modified by the caller to add
  9634  // headers to the request.
  9635  func (c *BillingAccountsSinksPatchCall) Header() http.Header {
  9636  	if c.header_ == nil {
  9637  		c.header_ = make(http.Header)
  9638  	}
  9639  	return c.header_
  9640  }
  9641  
  9642  func (c *BillingAccountsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
  9643  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9644  	var body io.Reader = nil
  9645  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
  9646  	if err != nil {
  9647  		return nil, err
  9648  	}
  9649  	c.urlParams_.Set("alt", alt)
  9650  	c.urlParams_.Set("prettyPrint", "false")
  9651  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
  9652  	urls += "?" + c.urlParams_.Encode()
  9653  	req, err := http.NewRequest("PATCH", urls, body)
  9654  	if err != nil {
  9655  		return nil, err
  9656  	}
  9657  	req.Header = reqHeaders
  9658  	googleapi.Expand(req.URL, map[string]string{
  9659  		"sinkName": c.sinkNameid,
  9660  	})
  9661  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9662  }
  9663  
  9664  // Do executes the "logging.billingAccounts.sinks.patch" call.
  9665  // Any non-2xx status code is an error. Response headers are in either
  9666  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
  9667  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9668  // whether the returned error was because http.StatusNotModified was returned.
  9669  func (c *BillingAccountsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
  9670  	gensupport.SetOptions(c.urlParams_, opts...)
  9671  	res, err := c.doRequest("json")
  9672  	if res != nil && res.StatusCode == http.StatusNotModified {
  9673  		if res.Body != nil {
  9674  			res.Body.Close()
  9675  		}
  9676  		return nil, gensupport.WrapError(&googleapi.Error{
  9677  			Code:   res.StatusCode,
  9678  			Header: res.Header,
  9679  		})
  9680  	}
  9681  	if err != nil {
  9682  		return nil, err
  9683  	}
  9684  	defer googleapi.CloseBody(res)
  9685  	if err := googleapi.CheckResponse(res); err != nil {
  9686  		return nil, gensupport.WrapError(err)
  9687  	}
  9688  	ret := &LogSink{
  9689  		ServerResponse: googleapi.ServerResponse{
  9690  			Header:         res.Header,
  9691  			HTTPStatusCode: res.StatusCode,
  9692  		},
  9693  	}
  9694  	target := &ret
  9695  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9696  		return nil, err
  9697  	}
  9698  	return ret, nil
  9699  }
  9700  
  9701  type BillingAccountsSinksUpdateCall struct {
  9702  	s          *Service
  9703  	sinkNameid string
  9704  	logsink    *LogSink
  9705  	urlParams_ gensupport.URLParams
  9706  	ctx_       context.Context
  9707  	header_    http.Header
  9708  }
  9709  
  9710  // Update: Updates a sink. This method replaces the values of the destination
  9711  // and filter fields of the existing sink with the corresponding values from
  9712  // the new sink.The updated sink might also have a new writer_identity; see the
  9713  // unique_writer_identity field.
  9714  //
  9715  //   - sinkName: The full resource name of the sink to update, including the
  9716  //     parent resource and the sink identifier:
  9717  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  9718  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  9719  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
  9720  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
  9721  //     example:"projects/my-project/sinks/my-sink".
  9722  func (r *BillingAccountsSinksService) Update(sinkNameid string, logsink *LogSink) *BillingAccountsSinksUpdateCall {
  9723  	c := &BillingAccountsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9724  	c.sinkNameid = sinkNameid
  9725  	c.logsink = logsink
  9726  	return c
  9727  }
  9728  
  9729  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
  9730  // service account provided by the caller that will be used to write the log
  9731  // entries. The format must be serviceAccount:some@email. This field can only
  9732  // be specified if you are routing logs to a destination outside this sink's
  9733  // project. If not specified, a Logging service account will automatically be
  9734  // generated.
  9735  func (c *BillingAccountsSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *BillingAccountsSinksUpdateCall {
  9736  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
  9737  	return c
  9738  }
  9739  
  9740  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See
  9741  // sinks.create for a description of this field. When updating a sink, the
  9742  // effect of this field on the value of writer_identity in the updated sink
  9743  // depends on both the old and new values of this field: If the old and new
  9744  // values of this field are both false or both true, then there is no change to
  9745  // the sink's writer_identity. If the old value is false and the new value is
  9746  // true, then writer_identity is changed to a service agent
  9747  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
  9748  // owned by Cloud Logging. It is an error if the old value is true and the new
  9749  // value is set to false or defaulted to false.
  9750  func (c *BillingAccountsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *BillingAccountsSinksUpdateCall {
  9751  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
  9752  	return c
  9753  }
  9754  
  9755  // UpdateMask sets the optional parameter "updateMask": Field mask that
  9756  // specifies the fields in sink that need an update. A sink field will be
  9757  // overwritten if, and only if, it is in the update mask. name and output only
  9758  // fields cannot be updated.An empty updateMask is temporarily treated as using
  9759  // the following mask for backwards compatibility
  9760  // purposes:destination,filter,includeChildrenAt some point in the future,
  9761  // behavior will be removed and specifying an empty updateMask will be an
  9762  // error.For a detailed FieldMask definition, see
  9763  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
  9764  // example: updateMask=filter
  9765  func (c *BillingAccountsSinksUpdateCall) UpdateMask(updateMask string) *BillingAccountsSinksUpdateCall {
  9766  	c.urlParams_.Set("updateMask", updateMask)
  9767  	return c
  9768  }
  9769  
  9770  // Fields allows partial responses to be retrieved. See
  9771  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9772  // details.
  9773  func (c *BillingAccountsSinksUpdateCall) Fields(s ...googleapi.Field) *BillingAccountsSinksUpdateCall {
  9774  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9775  	return c
  9776  }
  9777  
  9778  // Context sets the context to be used in this call's Do method.
  9779  func (c *BillingAccountsSinksUpdateCall) Context(ctx context.Context) *BillingAccountsSinksUpdateCall {
  9780  	c.ctx_ = ctx
  9781  	return c
  9782  }
  9783  
  9784  // Header returns a http.Header that can be modified by the caller to add
  9785  // headers to the request.
  9786  func (c *BillingAccountsSinksUpdateCall) Header() http.Header {
  9787  	if c.header_ == nil {
  9788  		c.header_ = make(http.Header)
  9789  	}
  9790  	return c.header_
  9791  }
  9792  
  9793  func (c *BillingAccountsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
  9794  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9795  	var body io.Reader = nil
  9796  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
  9797  	if err != nil {
  9798  		return nil, err
  9799  	}
  9800  	c.urlParams_.Set("alt", alt)
  9801  	c.urlParams_.Set("prettyPrint", "false")
  9802  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
  9803  	urls += "?" + c.urlParams_.Encode()
  9804  	req, err := http.NewRequest("PUT", urls, body)
  9805  	if err != nil {
  9806  		return nil, err
  9807  	}
  9808  	req.Header = reqHeaders
  9809  	googleapi.Expand(req.URL, map[string]string{
  9810  		"sinkName": c.sinkNameid,
  9811  	})
  9812  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9813  }
  9814  
  9815  // Do executes the "logging.billingAccounts.sinks.update" call.
  9816  // Any non-2xx status code is an error. Response headers are in either
  9817  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
  9818  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9819  // whether the returned error was because http.StatusNotModified was returned.
  9820  func (c *BillingAccountsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
  9821  	gensupport.SetOptions(c.urlParams_, opts...)
  9822  	res, err := c.doRequest("json")
  9823  	if res != nil && res.StatusCode == http.StatusNotModified {
  9824  		if res.Body != nil {
  9825  			res.Body.Close()
  9826  		}
  9827  		return nil, gensupport.WrapError(&googleapi.Error{
  9828  			Code:   res.StatusCode,
  9829  			Header: res.Header,
  9830  		})
  9831  	}
  9832  	if err != nil {
  9833  		return nil, err
  9834  	}
  9835  	defer googleapi.CloseBody(res)
  9836  	if err := googleapi.CheckResponse(res); err != nil {
  9837  		return nil, gensupport.WrapError(err)
  9838  	}
  9839  	ret := &LogSink{
  9840  		ServerResponse: googleapi.ServerResponse{
  9841  			Header:         res.Header,
  9842  			HTTPStatusCode: res.StatusCode,
  9843  		},
  9844  	}
  9845  	target := &ret
  9846  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9847  		return nil, err
  9848  	}
  9849  	return ret, nil
  9850  }
  9851  
  9852  type EntriesCopyCall struct {
  9853  	s                     *Service
  9854  	copylogentriesrequest *CopyLogEntriesRequest
  9855  	urlParams_            gensupport.URLParams
  9856  	ctx_                  context.Context
  9857  	header_               http.Header
  9858  }
  9859  
  9860  // Copy: Copies a set of log entries from a log bucket to a Cloud Storage
  9861  // bucket.
  9862  func (r *EntriesService) Copy(copylogentriesrequest *CopyLogEntriesRequest) *EntriesCopyCall {
  9863  	c := &EntriesCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9864  	c.copylogentriesrequest = copylogentriesrequest
  9865  	return c
  9866  }
  9867  
  9868  // Fields allows partial responses to be retrieved. See
  9869  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9870  // details.
  9871  func (c *EntriesCopyCall) Fields(s ...googleapi.Field) *EntriesCopyCall {
  9872  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9873  	return c
  9874  }
  9875  
  9876  // Context sets the context to be used in this call's Do method.
  9877  func (c *EntriesCopyCall) Context(ctx context.Context) *EntriesCopyCall {
  9878  	c.ctx_ = ctx
  9879  	return c
  9880  }
  9881  
  9882  // Header returns a http.Header that can be modified by the caller to add
  9883  // headers to the request.
  9884  func (c *EntriesCopyCall) Header() http.Header {
  9885  	if c.header_ == nil {
  9886  		c.header_ = make(http.Header)
  9887  	}
  9888  	return c.header_
  9889  }
  9890  
  9891  func (c *EntriesCopyCall) doRequest(alt string) (*http.Response, error) {
  9892  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9893  	var body io.Reader = nil
  9894  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.copylogentriesrequest)
  9895  	if err != nil {
  9896  		return nil, err
  9897  	}
  9898  	c.urlParams_.Set("alt", alt)
  9899  	c.urlParams_.Set("prettyPrint", "false")
  9900  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:copy")
  9901  	urls += "?" + c.urlParams_.Encode()
  9902  	req, err := http.NewRequest("POST", urls, body)
  9903  	if err != nil {
  9904  		return nil, err
  9905  	}
  9906  	req.Header = reqHeaders
  9907  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9908  }
  9909  
  9910  // Do executes the "logging.entries.copy" call.
  9911  // Any non-2xx status code is an error. Response headers are in either
  9912  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9913  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9914  // whether the returned error was because http.StatusNotModified was returned.
  9915  func (c *EntriesCopyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9916  	gensupport.SetOptions(c.urlParams_, opts...)
  9917  	res, err := c.doRequest("json")
  9918  	if res != nil && res.StatusCode == http.StatusNotModified {
  9919  		if res.Body != nil {
  9920  			res.Body.Close()
  9921  		}
  9922  		return nil, gensupport.WrapError(&googleapi.Error{
  9923  			Code:   res.StatusCode,
  9924  			Header: res.Header,
  9925  		})
  9926  	}
  9927  	if err != nil {
  9928  		return nil, err
  9929  	}
  9930  	defer googleapi.CloseBody(res)
  9931  	if err := googleapi.CheckResponse(res); err != nil {
  9932  		return nil, gensupport.WrapError(err)
  9933  	}
  9934  	ret := &Operation{
  9935  		ServerResponse: googleapi.ServerResponse{
  9936  			Header:         res.Header,
  9937  			HTTPStatusCode: res.StatusCode,
  9938  		},
  9939  	}
  9940  	target := &ret
  9941  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9942  		return nil, err
  9943  	}
  9944  	return ret, nil
  9945  }
  9946  
  9947  type EntriesListCall struct {
  9948  	s                     *Service
  9949  	listlogentriesrequest *ListLogEntriesRequest
  9950  	urlParams_            gensupport.URLParams
  9951  	ctx_                  context.Context
  9952  	header_               http.Header
  9953  }
  9954  
  9955  // List: Lists log entries. Use this method to retrieve log entries that
  9956  // originated from a project/folder/organization/billing account. For ways to
  9957  // export log entries, see Exporting Logs
  9958  // (https://cloud.google.com/logging/docs/export).
  9959  func (r *EntriesService) List(listlogentriesrequest *ListLogEntriesRequest) *EntriesListCall {
  9960  	c := &EntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9961  	c.listlogentriesrequest = listlogentriesrequest
  9962  	return c
  9963  }
  9964  
  9965  // Fields allows partial responses to be retrieved. See
  9966  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9967  // details.
  9968  func (c *EntriesListCall) Fields(s ...googleapi.Field) *EntriesListCall {
  9969  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9970  	return c
  9971  }
  9972  
  9973  // Context sets the context to be used in this call's Do method.
  9974  func (c *EntriesListCall) Context(ctx context.Context) *EntriesListCall {
  9975  	c.ctx_ = ctx
  9976  	return c
  9977  }
  9978  
  9979  // Header returns a http.Header that can be modified by the caller to add
  9980  // headers to the request.
  9981  func (c *EntriesListCall) Header() http.Header {
  9982  	if c.header_ == nil {
  9983  		c.header_ = make(http.Header)
  9984  	}
  9985  	return c.header_
  9986  }
  9987  
  9988  func (c *EntriesListCall) doRequest(alt string) (*http.Response, error) {
  9989  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9990  	var body io.Reader = nil
  9991  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listlogentriesrequest)
  9992  	if err != nil {
  9993  		return nil, err
  9994  	}
  9995  	c.urlParams_.Set("alt", alt)
  9996  	c.urlParams_.Set("prettyPrint", "false")
  9997  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:list")
  9998  	urls += "?" + c.urlParams_.Encode()
  9999  	req, err := http.NewRequest("POST", urls, body)
 10000  	if err != nil {
 10001  		return nil, err
 10002  	}
 10003  	req.Header = reqHeaders
 10004  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10005  }
 10006  
 10007  // Do executes the "logging.entries.list" call.
 10008  // Any non-2xx status code is an error. Response headers are in either
 10009  // *ListLogEntriesResponse.ServerResponse.Header or (if a response was returned
 10010  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10011  // check whether the returned error was because http.StatusNotModified was
 10012  // returned.
 10013  func (c *EntriesListCall) Do(opts ...googleapi.CallOption) (*ListLogEntriesResponse, error) {
 10014  	gensupport.SetOptions(c.urlParams_, opts...)
 10015  	res, err := c.doRequest("json")
 10016  	if res != nil && res.StatusCode == http.StatusNotModified {
 10017  		if res.Body != nil {
 10018  			res.Body.Close()
 10019  		}
 10020  		return nil, gensupport.WrapError(&googleapi.Error{
 10021  			Code:   res.StatusCode,
 10022  			Header: res.Header,
 10023  		})
 10024  	}
 10025  	if err != nil {
 10026  		return nil, err
 10027  	}
 10028  	defer googleapi.CloseBody(res)
 10029  	if err := googleapi.CheckResponse(res); err != nil {
 10030  		return nil, gensupport.WrapError(err)
 10031  	}
 10032  	ret := &ListLogEntriesResponse{
 10033  		ServerResponse: googleapi.ServerResponse{
 10034  			Header:         res.Header,
 10035  			HTTPStatusCode: res.StatusCode,
 10036  		},
 10037  	}
 10038  	target := &ret
 10039  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10040  		return nil, err
 10041  	}
 10042  	return ret, nil
 10043  }
 10044  
 10045  // Pages invokes f for each page of results.
 10046  // A non-nil error returned from f will halt the iteration.
 10047  // The provided context supersedes any context provided to the Context method.
 10048  func (c *EntriesListCall) Pages(ctx context.Context, f func(*ListLogEntriesResponse) error) error {
 10049  	c.ctx_ = ctx
 10050  	defer func(pt string) { c.listlogentriesrequest.PageToken = pt }(c.listlogentriesrequest.PageToken)
 10051  	for {
 10052  		x, err := c.Do()
 10053  		if err != nil {
 10054  			return err
 10055  		}
 10056  		if err := f(x); err != nil {
 10057  			return err
 10058  		}
 10059  		if x.NextPageToken == "" {
 10060  			return nil
 10061  		}
 10062  		c.listlogentriesrequest.PageToken = x.NextPageToken
 10063  	}
 10064  }
 10065  
 10066  type EntriesTailCall struct {
 10067  	s                     *Service
 10068  	taillogentriesrequest *TailLogEntriesRequest
 10069  	urlParams_            gensupport.URLParams
 10070  	ctx_                  context.Context
 10071  	header_               http.Header
 10072  }
 10073  
 10074  // Tail: Streaming read of log entries as they are received. Until the stream
 10075  // is terminated, it will continue reading logs.
 10076  func (r *EntriesService) Tail(taillogentriesrequest *TailLogEntriesRequest) *EntriesTailCall {
 10077  	c := &EntriesTailCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10078  	c.taillogentriesrequest = taillogentriesrequest
 10079  	return c
 10080  }
 10081  
 10082  // Fields allows partial responses to be retrieved. See
 10083  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10084  // details.
 10085  func (c *EntriesTailCall) Fields(s ...googleapi.Field) *EntriesTailCall {
 10086  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10087  	return c
 10088  }
 10089  
 10090  // Context sets the context to be used in this call's Do method.
 10091  func (c *EntriesTailCall) Context(ctx context.Context) *EntriesTailCall {
 10092  	c.ctx_ = ctx
 10093  	return c
 10094  }
 10095  
 10096  // Header returns a http.Header that can be modified by the caller to add
 10097  // headers to the request.
 10098  func (c *EntriesTailCall) Header() http.Header {
 10099  	if c.header_ == nil {
 10100  		c.header_ = make(http.Header)
 10101  	}
 10102  	return c.header_
 10103  }
 10104  
 10105  func (c *EntriesTailCall) doRequest(alt string) (*http.Response, error) {
 10106  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10107  	var body io.Reader = nil
 10108  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.taillogentriesrequest)
 10109  	if err != nil {
 10110  		return nil, err
 10111  	}
 10112  	c.urlParams_.Set("alt", alt)
 10113  	c.urlParams_.Set("prettyPrint", "false")
 10114  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:tail")
 10115  	urls += "?" + c.urlParams_.Encode()
 10116  	req, err := http.NewRequest("POST", urls, body)
 10117  	if err != nil {
 10118  		return nil, err
 10119  	}
 10120  	req.Header = reqHeaders
 10121  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10122  }
 10123  
 10124  // Do executes the "logging.entries.tail" call.
 10125  // Any non-2xx status code is an error. Response headers are in either
 10126  // *TailLogEntriesResponse.ServerResponse.Header or (if a response was returned
 10127  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10128  // check whether the returned error was because http.StatusNotModified was
 10129  // returned.
 10130  func (c *EntriesTailCall) Do(opts ...googleapi.CallOption) (*TailLogEntriesResponse, error) {
 10131  	gensupport.SetOptions(c.urlParams_, opts...)
 10132  	res, err := c.doRequest("json")
 10133  	if res != nil && res.StatusCode == http.StatusNotModified {
 10134  		if res.Body != nil {
 10135  			res.Body.Close()
 10136  		}
 10137  		return nil, gensupport.WrapError(&googleapi.Error{
 10138  			Code:   res.StatusCode,
 10139  			Header: res.Header,
 10140  		})
 10141  	}
 10142  	if err != nil {
 10143  		return nil, err
 10144  	}
 10145  	defer googleapi.CloseBody(res)
 10146  	if err := googleapi.CheckResponse(res); err != nil {
 10147  		return nil, gensupport.WrapError(err)
 10148  	}
 10149  	ret := &TailLogEntriesResponse{
 10150  		ServerResponse: googleapi.ServerResponse{
 10151  			Header:         res.Header,
 10152  			HTTPStatusCode: res.StatusCode,
 10153  		},
 10154  	}
 10155  	target := &ret
 10156  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10157  		return nil, err
 10158  	}
 10159  	return ret, nil
 10160  }
 10161  
 10162  type EntriesWriteCall struct {
 10163  	s                      *Service
 10164  	writelogentriesrequest *WriteLogEntriesRequest
 10165  	urlParams_             gensupport.URLParams
 10166  	ctx_                   context.Context
 10167  	header_                http.Header
 10168  }
 10169  
 10170  // Write: Writes log entries to Logging. This API method is the only way to
 10171  // send log entries to Logging. This method is used, directly or indirectly, by
 10172  // the Logging agent (fluentd) and all logging libraries configured to use
 10173  // Logging. A single request may contain log entries for a maximum of 1000
 10174  // different resource names (projects, organizations, billing accounts or
 10175  // folders), where the resource name for a log entry is determined from its
 10176  // logName field.
 10177  func (r *EntriesService) Write(writelogentriesrequest *WriteLogEntriesRequest) *EntriesWriteCall {
 10178  	c := &EntriesWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10179  	c.writelogentriesrequest = writelogentriesrequest
 10180  	return c
 10181  }
 10182  
 10183  // Fields allows partial responses to be retrieved. See
 10184  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10185  // details.
 10186  func (c *EntriesWriteCall) Fields(s ...googleapi.Field) *EntriesWriteCall {
 10187  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10188  	return c
 10189  }
 10190  
 10191  // Context sets the context to be used in this call's Do method.
 10192  func (c *EntriesWriteCall) Context(ctx context.Context) *EntriesWriteCall {
 10193  	c.ctx_ = ctx
 10194  	return c
 10195  }
 10196  
 10197  // Header returns a http.Header that can be modified by the caller to add
 10198  // headers to the request.
 10199  func (c *EntriesWriteCall) Header() http.Header {
 10200  	if c.header_ == nil {
 10201  		c.header_ = make(http.Header)
 10202  	}
 10203  	return c.header_
 10204  }
 10205  
 10206  func (c *EntriesWriteCall) doRequest(alt string) (*http.Response, error) {
 10207  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10208  	var body io.Reader = nil
 10209  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.writelogentriesrequest)
 10210  	if err != nil {
 10211  		return nil, err
 10212  	}
 10213  	c.urlParams_.Set("alt", alt)
 10214  	c.urlParams_.Set("prettyPrint", "false")
 10215  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:write")
 10216  	urls += "?" + c.urlParams_.Encode()
 10217  	req, err := http.NewRequest("POST", urls, body)
 10218  	if err != nil {
 10219  		return nil, err
 10220  	}
 10221  	req.Header = reqHeaders
 10222  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10223  }
 10224  
 10225  // Do executes the "logging.entries.write" call.
 10226  // Any non-2xx status code is an error. Response headers are in either
 10227  // *WriteLogEntriesResponse.ServerResponse.Header or (if a response was
 10228  // returned at all) in error.(*googleapi.Error).Header. Use
 10229  // googleapi.IsNotModified to check whether the returned error was because
 10230  // http.StatusNotModified was returned.
 10231  func (c *EntriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteLogEntriesResponse, error) {
 10232  	gensupport.SetOptions(c.urlParams_, opts...)
 10233  	res, err := c.doRequest("json")
 10234  	if res != nil && res.StatusCode == http.StatusNotModified {
 10235  		if res.Body != nil {
 10236  			res.Body.Close()
 10237  		}
 10238  		return nil, gensupport.WrapError(&googleapi.Error{
 10239  			Code:   res.StatusCode,
 10240  			Header: res.Header,
 10241  		})
 10242  	}
 10243  	if err != nil {
 10244  		return nil, err
 10245  	}
 10246  	defer googleapi.CloseBody(res)
 10247  	if err := googleapi.CheckResponse(res); err != nil {
 10248  		return nil, gensupport.WrapError(err)
 10249  	}
 10250  	ret := &WriteLogEntriesResponse{
 10251  		ServerResponse: googleapi.ServerResponse{
 10252  			Header:         res.Header,
 10253  			HTTPStatusCode: res.StatusCode,
 10254  		},
 10255  	}
 10256  	target := &ret
 10257  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10258  		return nil, err
 10259  	}
 10260  	return ret, nil
 10261  }
 10262  
 10263  type ExclusionsCreateCall struct {
 10264  	s            *Service
 10265  	parent       string
 10266  	logexclusion *LogExclusion
 10267  	urlParams_   gensupport.URLParams
 10268  	ctx_         context.Context
 10269  	header_      http.Header
 10270  }
 10271  
 10272  // Create: Creates a new exclusion in the _Default sink in a specified parent
 10273  // resource. Only log entries belonging to that resource can be excluded. You
 10274  // can have up to 10 exclusions in a resource.
 10275  //
 10276  //   - parent: The parent resource in which to create the exclusion:
 10277  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 10278  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
 10279  //     examples:"projects/my-logging-project" "organizations/123456789".
 10280  func (r *ExclusionsService) Create(parent string, logexclusion *LogExclusion) *ExclusionsCreateCall {
 10281  	c := &ExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10282  	c.parent = parent
 10283  	c.logexclusion = logexclusion
 10284  	return c
 10285  }
 10286  
 10287  // Fields allows partial responses to be retrieved. See
 10288  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10289  // details.
 10290  func (c *ExclusionsCreateCall) Fields(s ...googleapi.Field) *ExclusionsCreateCall {
 10291  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10292  	return c
 10293  }
 10294  
 10295  // Context sets the context to be used in this call's Do method.
 10296  func (c *ExclusionsCreateCall) Context(ctx context.Context) *ExclusionsCreateCall {
 10297  	c.ctx_ = ctx
 10298  	return c
 10299  }
 10300  
 10301  // Header returns a http.Header that can be modified by the caller to add
 10302  // headers to the request.
 10303  func (c *ExclusionsCreateCall) Header() http.Header {
 10304  	if c.header_ == nil {
 10305  		c.header_ = make(http.Header)
 10306  	}
 10307  	return c.header_
 10308  }
 10309  
 10310  func (c *ExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
 10311  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10312  	var body io.Reader = nil
 10313  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
 10314  	if err != nil {
 10315  		return nil, err
 10316  	}
 10317  	c.urlParams_.Set("alt", alt)
 10318  	c.urlParams_.Set("prettyPrint", "false")
 10319  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
 10320  	urls += "?" + c.urlParams_.Encode()
 10321  	req, err := http.NewRequest("POST", urls, body)
 10322  	if err != nil {
 10323  		return nil, err
 10324  	}
 10325  	req.Header = reqHeaders
 10326  	googleapi.Expand(req.URL, map[string]string{
 10327  		"parent": c.parent,
 10328  	})
 10329  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10330  }
 10331  
 10332  // Do executes the "logging.exclusions.create" call.
 10333  // Any non-2xx status code is an error. Response headers are in either
 10334  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 10335  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10336  // whether the returned error was because http.StatusNotModified was returned.
 10337  func (c *ExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 10338  	gensupport.SetOptions(c.urlParams_, opts...)
 10339  	res, err := c.doRequest("json")
 10340  	if res != nil && res.StatusCode == http.StatusNotModified {
 10341  		if res.Body != nil {
 10342  			res.Body.Close()
 10343  		}
 10344  		return nil, gensupport.WrapError(&googleapi.Error{
 10345  			Code:   res.StatusCode,
 10346  			Header: res.Header,
 10347  		})
 10348  	}
 10349  	if err != nil {
 10350  		return nil, err
 10351  	}
 10352  	defer googleapi.CloseBody(res)
 10353  	if err := googleapi.CheckResponse(res); err != nil {
 10354  		return nil, gensupport.WrapError(err)
 10355  	}
 10356  	ret := &LogExclusion{
 10357  		ServerResponse: googleapi.ServerResponse{
 10358  			Header:         res.Header,
 10359  			HTTPStatusCode: res.StatusCode,
 10360  		},
 10361  	}
 10362  	target := &ret
 10363  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10364  		return nil, err
 10365  	}
 10366  	return ret, nil
 10367  }
 10368  
 10369  type ExclusionsDeleteCall struct {
 10370  	s          *Service
 10371  	name       string
 10372  	urlParams_ gensupport.URLParams
 10373  	ctx_       context.Context
 10374  	header_    http.Header
 10375  }
 10376  
 10377  // Delete: Deletes an exclusion in the _Default sink.
 10378  //
 10379  //   - name: The resource name of an existing exclusion to delete:
 10380  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 10381  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 10382  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 10383  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 10384  //     example:"projects/my-project/exclusions/my-exclusion".
 10385  func (r *ExclusionsService) Delete(name string) *ExclusionsDeleteCall {
 10386  	c := &ExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10387  	c.name = name
 10388  	return c
 10389  }
 10390  
 10391  // Fields allows partial responses to be retrieved. See
 10392  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10393  // details.
 10394  func (c *ExclusionsDeleteCall) Fields(s ...googleapi.Field) *ExclusionsDeleteCall {
 10395  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10396  	return c
 10397  }
 10398  
 10399  // Context sets the context to be used in this call's Do method.
 10400  func (c *ExclusionsDeleteCall) Context(ctx context.Context) *ExclusionsDeleteCall {
 10401  	c.ctx_ = ctx
 10402  	return c
 10403  }
 10404  
 10405  // Header returns a http.Header that can be modified by the caller to add
 10406  // headers to the request.
 10407  func (c *ExclusionsDeleteCall) Header() http.Header {
 10408  	if c.header_ == nil {
 10409  		c.header_ = make(http.Header)
 10410  	}
 10411  	return c.header_
 10412  }
 10413  
 10414  func (c *ExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
 10415  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10416  	var body io.Reader = nil
 10417  	c.urlParams_.Set("alt", alt)
 10418  	c.urlParams_.Set("prettyPrint", "false")
 10419  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 10420  	urls += "?" + c.urlParams_.Encode()
 10421  	req, err := http.NewRequest("DELETE", urls, body)
 10422  	if err != nil {
 10423  		return nil, err
 10424  	}
 10425  	req.Header = reqHeaders
 10426  	googleapi.Expand(req.URL, map[string]string{
 10427  		"name": c.name,
 10428  	})
 10429  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10430  }
 10431  
 10432  // Do executes the "logging.exclusions.delete" call.
 10433  // Any non-2xx status code is an error. Response headers are in either
 10434  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 10435  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10436  // whether the returned error was because http.StatusNotModified was returned.
 10437  func (c *ExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 10438  	gensupport.SetOptions(c.urlParams_, opts...)
 10439  	res, err := c.doRequest("json")
 10440  	if res != nil && res.StatusCode == http.StatusNotModified {
 10441  		if res.Body != nil {
 10442  			res.Body.Close()
 10443  		}
 10444  		return nil, gensupport.WrapError(&googleapi.Error{
 10445  			Code:   res.StatusCode,
 10446  			Header: res.Header,
 10447  		})
 10448  	}
 10449  	if err != nil {
 10450  		return nil, err
 10451  	}
 10452  	defer googleapi.CloseBody(res)
 10453  	if err := googleapi.CheckResponse(res); err != nil {
 10454  		return nil, gensupport.WrapError(err)
 10455  	}
 10456  	ret := &Empty{
 10457  		ServerResponse: googleapi.ServerResponse{
 10458  			Header:         res.Header,
 10459  			HTTPStatusCode: res.StatusCode,
 10460  		},
 10461  	}
 10462  	target := &ret
 10463  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10464  		return nil, err
 10465  	}
 10466  	return ret, nil
 10467  }
 10468  
 10469  type ExclusionsGetCall struct {
 10470  	s            *Service
 10471  	name         string
 10472  	urlParams_   gensupport.URLParams
 10473  	ifNoneMatch_ string
 10474  	ctx_         context.Context
 10475  	header_      http.Header
 10476  }
 10477  
 10478  // Get: Gets the description of an exclusion in the _Default sink.
 10479  //
 10480  //   - name: The resource name of an existing exclusion:
 10481  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 10482  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 10483  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 10484  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 10485  //     example:"projects/my-project/exclusions/my-exclusion".
 10486  func (r *ExclusionsService) Get(name string) *ExclusionsGetCall {
 10487  	c := &ExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10488  	c.name = name
 10489  	return c
 10490  }
 10491  
 10492  // Fields allows partial responses to be retrieved. See
 10493  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10494  // details.
 10495  func (c *ExclusionsGetCall) Fields(s ...googleapi.Field) *ExclusionsGetCall {
 10496  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10497  	return c
 10498  }
 10499  
 10500  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10501  // object's ETag matches the given value. This is useful for getting updates
 10502  // only after the object has changed since the last request.
 10503  func (c *ExclusionsGetCall) IfNoneMatch(entityTag string) *ExclusionsGetCall {
 10504  	c.ifNoneMatch_ = entityTag
 10505  	return c
 10506  }
 10507  
 10508  // Context sets the context to be used in this call's Do method.
 10509  func (c *ExclusionsGetCall) Context(ctx context.Context) *ExclusionsGetCall {
 10510  	c.ctx_ = ctx
 10511  	return c
 10512  }
 10513  
 10514  // Header returns a http.Header that can be modified by the caller to add
 10515  // headers to the request.
 10516  func (c *ExclusionsGetCall) Header() http.Header {
 10517  	if c.header_ == nil {
 10518  		c.header_ = make(http.Header)
 10519  	}
 10520  	return c.header_
 10521  }
 10522  
 10523  func (c *ExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
 10524  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10525  	if c.ifNoneMatch_ != "" {
 10526  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10527  	}
 10528  	var body io.Reader = nil
 10529  	c.urlParams_.Set("alt", alt)
 10530  	c.urlParams_.Set("prettyPrint", "false")
 10531  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 10532  	urls += "?" + c.urlParams_.Encode()
 10533  	req, err := http.NewRequest("GET", urls, body)
 10534  	if err != nil {
 10535  		return nil, err
 10536  	}
 10537  	req.Header = reqHeaders
 10538  	googleapi.Expand(req.URL, map[string]string{
 10539  		"name": c.name,
 10540  	})
 10541  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10542  }
 10543  
 10544  // Do executes the "logging.exclusions.get" call.
 10545  // Any non-2xx status code is an error. Response headers are in either
 10546  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 10547  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10548  // whether the returned error was because http.StatusNotModified was returned.
 10549  func (c *ExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 10550  	gensupport.SetOptions(c.urlParams_, opts...)
 10551  	res, err := c.doRequest("json")
 10552  	if res != nil && res.StatusCode == http.StatusNotModified {
 10553  		if res.Body != nil {
 10554  			res.Body.Close()
 10555  		}
 10556  		return nil, gensupport.WrapError(&googleapi.Error{
 10557  			Code:   res.StatusCode,
 10558  			Header: res.Header,
 10559  		})
 10560  	}
 10561  	if err != nil {
 10562  		return nil, err
 10563  	}
 10564  	defer googleapi.CloseBody(res)
 10565  	if err := googleapi.CheckResponse(res); err != nil {
 10566  		return nil, gensupport.WrapError(err)
 10567  	}
 10568  	ret := &LogExclusion{
 10569  		ServerResponse: googleapi.ServerResponse{
 10570  			Header:         res.Header,
 10571  			HTTPStatusCode: res.StatusCode,
 10572  		},
 10573  	}
 10574  	target := &ret
 10575  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10576  		return nil, err
 10577  	}
 10578  	return ret, nil
 10579  }
 10580  
 10581  type ExclusionsListCall struct {
 10582  	s            *Service
 10583  	parent       string
 10584  	urlParams_   gensupport.URLParams
 10585  	ifNoneMatch_ string
 10586  	ctx_         context.Context
 10587  	header_      http.Header
 10588  }
 10589  
 10590  // List: Lists all the exclusions on the _Default sink in a parent resource.
 10591  //
 10592  //   - parent: The parent resource whose exclusions are to be listed.
 10593  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 10594  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
 10595  func (r *ExclusionsService) List(parent string) *ExclusionsListCall {
 10596  	c := &ExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10597  	c.parent = parent
 10598  	return c
 10599  }
 10600  
 10601  // PageSize sets the optional parameter "pageSize": The maximum number of
 10602  // results to return from this request. Non-positive values are ignored. The
 10603  // presence of nextPageToken in the response indicates that more results might
 10604  // be available.
 10605  func (c *ExclusionsListCall) PageSize(pageSize int64) *ExclusionsListCall {
 10606  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 10607  	return c
 10608  }
 10609  
 10610  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 10611  // the next batch of results from the preceding call to this method. pageToken
 10612  // must be the value of nextPageToken from the previous response. The values of
 10613  // other method parameters should be identical to those in the previous call.
 10614  func (c *ExclusionsListCall) PageToken(pageToken string) *ExclusionsListCall {
 10615  	c.urlParams_.Set("pageToken", pageToken)
 10616  	return c
 10617  }
 10618  
 10619  // Fields allows partial responses to be retrieved. See
 10620  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10621  // details.
 10622  func (c *ExclusionsListCall) Fields(s ...googleapi.Field) *ExclusionsListCall {
 10623  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10624  	return c
 10625  }
 10626  
 10627  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10628  // object's ETag matches the given value. This is useful for getting updates
 10629  // only after the object has changed since the last request.
 10630  func (c *ExclusionsListCall) IfNoneMatch(entityTag string) *ExclusionsListCall {
 10631  	c.ifNoneMatch_ = entityTag
 10632  	return c
 10633  }
 10634  
 10635  // Context sets the context to be used in this call's Do method.
 10636  func (c *ExclusionsListCall) Context(ctx context.Context) *ExclusionsListCall {
 10637  	c.ctx_ = ctx
 10638  	return c
 10639  }
 10640  
 10641  // Header returns a http.Header that can be modified by the caller to add
 10642  // headers to the request.
 10643  func (c *ExclusionsListCall) Header() http.Header {
 10644  	if c.header_ == nil {
 10645  		c.header_ = make(http.Header)
 10646  	}
 10647  	return c.header_
 10648  }
 10649  
 10650  func (c *ExclusionsListCall) doRequest(alt string) (*http.Response, error) {
 10651  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10652  	if c.ifNoneMatch_ != "" {
 10653  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10654  	}
 10655  	var body io.Reader = nil
 10656  	c.urlParams_.Set("alt", alt)
 10657  	c.urlParams_.Set("prettyPrint", "false")
 10658  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
 10659  	urls += "?" + c.urlParams_.Encode()
 10660  	req, err := http.NewRequest("GET", urls, body)
 10661  	if err != nil {
 10662  		return nil, err
 10663  	}
 10664  	req.Header = reqHeaders
 10665  	googleapi.Expand(req.URL, map[string]string{
 10666  		"parent": c.parent,
 10667  	})
 10668  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10669  }
 10670  
 10671  // Do executes the "logging.exclusions.list" call.
 10672  // Any non-2xx status code is an error. Response headers are in either
 10673  // *ListExclusionsResponse.ServerResponse.Header or (if a response was returned
 10674  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10675  // check whether the returned error was because http.StatusNotModified was
 10676  // returned.
 10677  func (c *ExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
 10678  	gensupport.SetOptions(c.urlParams_, opts...)
 10679  	res, err := c.doRequest("json")
 10680  	if res != nil && res.StatusCode == http.StatusNotModified {
 10681  		if res.Body != nil {
 10682  			res.Body.Close()
 10683  		}
 10684  		return nil, gensupport.WrapError(&googleapi.Error{
 10685  			Code:   res.StatusCode,
 10686  			Header: res.Header,
 10687  		})
 10688  	}
 10689  	if err != nil {
 10690  		return nil, err
 10691  	}
 10692  	defer googleapi.CloseBody(res)
 10693  	if err := googleapi.CheckResponse(res); err != nil {
 10694  		return nil, gensupport.WrapError(err)
 10695  	}
 10696  	ret := &ListExclusionsResponse{
 10697  		ServerResponse: googleapi.ServerResponse{
 10698  			Header:         res.Header,
 10699  			HTTPStatusCode: res.StatusCode,
 10700  		},
 10701  	}
 10702  	target := &ret
 10703  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10704  		return nil, err
 10705  	}
 10706  	return ret, nil
 10707  }
 10708  
 10709  // Pages invokes f for each page of results.
 10710  // A non-nil error returned from f will halt the iteration.
 10711  // The provided context supersedes any context provided to the Context method.
 10712  func (c *ExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
 10713  	c.ctx_ = ctx
 10714  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10715  	for {
 10716  		x, err := c.Do()
 10717  		if err != nil {
 10718  			return err
 10719  		}
 10720  		if err := f(x); err != nil {
 10721  			return err
 10722  		}
 10723  		if x.NextPageToken == "" {
 10724  			return nil
 10725  		}
 10726  		c.PageToken(x.NextPageToken)
 10727  	}
 10728  }
 10729  
 10730  type ExclusionsPatchCall struct {
 10731  	s            *Service
 10732  	name         string
 10733  	logexclusion *LogExclusion
 10734  	urlParams_   gensupport.URLParams
 10735  	ctx_         context.Context
 10736  	header_      http.Header
 10737  }
 10738  
 10739  // Patch: Changes one or more properties of an existing exclusion in the
 10740  // _Default sink.
 10741  //
 10742  //   - name: The resource name of the exclusion to update:
 10743  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 10744  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 10745  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 10746  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 10747  //     example:"projects/my-project/exclusions/my-exclusion".
 10748  func (r *ExclusionsService) Patch(name string, logexclusion *LogExclusion) *ExclusionsPatchCall {
 10749  	c := &ExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10750  	c.name = name
 10751  	c.logexclusion = logexclusion
 10752  	return c
 10753  }
 10754  
 10755  // UpdateMask sets the optional parameter "updateMask": Required. A non-empty
 10756  // list of fields to change in the existing exclusion. New values for the
 10757  // fields are taken from the corresponding fields in the LogExclusion included
 10758  // in this request. Fields not mentioned in update_mask are not changed and are
 10759  // ignored in the request.For example, to change the filter and description of
 10760  // an exclusion, specify an update_mask of "filter,description".
 10761  func (c *ExclusionsPatchCall) UpdateMask(updateMask string) *ExclusionsPatchCall {
 10762  	c.urlParams_.Set("updateMask", updateMask)
 10763  	return c
 10764  }
 10765  
 10766  // Fields allows partial responses to be retrieved. See
 10767  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10768  // details.
 10769  func (c *ExclusionsPatchCall) Fields(s ...googleapi.Field) *ExclusionsPatchCall {
 10770  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10771  	return c
 10772  }
 10773  
 10774  // Context sets the context to be used in this call's Do method.
 10775  func (c *ExclusionsPatchCall) Context(ctx context.Context) *ExclusionsPatchCall {
 10776  	c.ctx_ = ctx
 10777  	return c
 10778  }
 10779  
 10780  // Header returns a http.Header that can be modified by the caller to add
 10781  // headers to the request.
 10782  func (c *ExclusionsPatchCall) Header() http.Header {
 10783  	if c.header_ == nil {
 10784  		c.header_ = make(http.Header)
 10785  	}
 10786  	return c.header_
 10787  }
 10788  
 10789  func (c *ExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
 10790  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10791  	var body io.Reader = nil
 10792  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
 10793  	if err != nil {
 10794  		return nil, err
 10795  	}
 10796  	c.urlParams_.Set("alt", alt)
 10797  	c.urlParams_.Set("prettyPrint", "false")
 10798  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 10799  	urls += "?" + c.urlParams_.Encode()
 10800  	req, err := http.NewRequest("PATCH", urls, body)
 10801  	if err != nil {
 10802  		return nil, err
 10803  	}
 10804  	req.Header = reqHeaders
 10805  	googleapi.Expand(req.URL, map[string]string{
 10806  		"name": c.name,
 10807  	})
 10808  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10809  }
 10810  
 10811  // Do executes the "logging.exclusions.patch" call.
 10812  // Any non-2xx status code is an error. Response headers are in either
 10813  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 10814  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10815  // whether the returned error was because http.StatusNotModified was returned.
 10816  func (c *ExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 10817  	gensupport.SetOptions(c.urlParams_, opts...)
 10818  	res, err := c.doRequest("json")
 10819  	if res != nil && res.StatusCode == http.StatusNotModified {
 10820  		if res.Body != nil {
 10821  			res.Body.Close()
 10822  		}
 10823  		return nil, gensupport.WrapError(&googleapi.Error{
 10824  			Code:   res.StatusCode,
 10825  			Header: res.Header,
 10826  		})
 10827  	}
 10828  	if err != nil {
 10829  		return nil, err
 10830  	}
 10831  	defer googleapi.CloseBody(res)
 10832  	if err := googleapi.CheckResponse(res); err != nil {
 10833  		return nil, gensupport.WrapError(err)
 10834  	}
 10835  	ret := &LogExclusion{
 10836  		ServerResponse: googleapi.ServerResponse{
 10837  			Header:         res.Header,
 10838  			HTTPStatusCode: res.StatusCode,
 10839  		},
 10840  	}
 10841  	target := &ret
 10842  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10843  		return nil, err
 10844  	}
 10845  	return ret, nil
 10846  }
 10847  
 10848  type FoldersGetCmekSettingsCall struct {
 10849  	s            *Service
 10850  	name         string
 10851  	urlParams_   gensupport.URLParams
 10852  	ifNoneMatch_ string
 10853  	ctx_         context.Context
 10854  	header_      http.Header
 10855  }
 10856  
 10857  // GetCmekSettings: Gets the Logging CMEK settings for the given resource.Note:
 10858  // CMEK for the Log Router can be configured for Google Cloud projects,
 10859  // folders, organizations, and billing accounts. Once configured for an
 10860  // organization, it applies to all projects and folders in the Google Cloud
 10861  // organization.See Enabling CMEK for Log Router
 10862  // (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
 10863  // information.
 10864  //
 10865  //   - name: The resource for which to retrieve CMEK settings.
 10866  //     "projects/[PROJECT_ID]/cmekSettings"
 10867  //     "organizations/[ORGANIZATION_ID]/cmekSettings"
 10868  //     "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
 10869  //     "folders/[FOLDER_ID]/cmekSettings" For
 10870  //     example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router
 10871  //     can be configured for Google Cloud projects, folders, organizations, and
 10872  //     billing accounts. Once configured for an organization, it applies to all
 10873  //     projects and folders in the Google Cloud organization.
 10874  func (r *FoldersService) GetCmekSettings(name string) *FoldersGetCmekSettingsCall {
 10875  	c := &FoldersGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10876  	c.name = name
 10877  	return c
 10878  }
 10879  
 10880  // Fields allows partial responses to be retrieved. See
 10881  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10882  // details.
 10883  func (c *FoldersGetCmekSettingsCall) Fields(s ...googleapi.Field) *FoldersGetCmekSettingsCall {
 10884  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10885  	return c
 10886  }
 10887  
 10888  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10889  // object's ETag matches the given value. This is useful for getting updates
 10890  // only after the object has changed since the last request.
 10891  func (c *FoldersGetCmekSettingsCall) IfNoneMatch(entityTag string) *FoldersGetCmekSettingsCall {
 10892  	c.ifNoneMatch_ = entityTag
 10893  	return c
 10894  }
 10895  
 10896  // Context sets the context to be used in this call's Do method.
 10897  func (c *FoldersGetCmekSettingsCall) Context(ctx context.Context) *FoldersGetCmekSettingsCall {
 10898  	c.ctx_ = ctx
 10899  	return c
 10900  }
 10901  
 10902  // Header returns a http.Header that can be modified by the caller to add
 10903  // headers to the request.
 10904  func (c *FoldersGetCmekSettingsCall) Header() http.Header {
 10905  	if c.header_ == nil {
 10906  		c.header_ = make(http.Header)
 10907  	}
 10908  	return c.header_
 10909  }
 10910  
 10911  func (c *FoldersGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
 10912  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10913  	if c.ifNoneMatch_ != "" {
 10914  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10915  	}
 10916  	var body io.Reader = nil
 10917  	c.urlParams_.Set("alt", alt)
 10918  	c.urlParams_.Set("prettyPrint", "false")
 10919  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
 10920  	urls += "?" + c.urlParams_.Encode()
 10921  	req, err := http.NewRequest("GET", urls, body)
 10922  	if err != nil {
 10923  		return nil, err
 10924  	}
 10925  	req.Header = reqHeaders
 10926  	googleapi.Expand(req.URL, map[string]string{
 10927  		"name": c.name,
 10928  	})
 10929  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10930  }
 10931  
 10932  // Do executes the "logging.folders.getCmekSettings" call.
 10933  // Any non-2xx status code is an error. Response headers are in either
 10934  // *CmekSettings.ServerResponse.Header or (if a response was returned at all)
 10935  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10936  // whether the returned error was because http.StatusNotModified was returned.
 10937  func (c *FoldersGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
 10938  	gensupport.SetOptions(c.urlParams_, opts...)
 10939  	res, err := c.doRequest("json")
 10940  	if res != nil && res.StatusCode == http.StatusNotModified {
 10941  		if res.Body != nil {
 10942  			res.Body.Close()
 10943  		}
 10944  		return nil, gensupport.WrapError(&googleapi.Error{
 10945  			Code:   res.StatusCode,
 10946  			Header: res.Header,
 10947  		})
 10948  	}
 10949  	if err != nil {
 10950  		return nil, err
 10951  	}
 10952  	defer googleapi.CloseBody(res)
 10953  	if err := googleapi.CheckResponse(res); err != nil {
 10954  		return nil, gensupport.WrapError(err)
 10955  	}
 10956  	ret := &CmekSettings{
 10957  		ServerResponse: googleapi.ServerResponse{
 10958  			Header:         res.Header,
 10959  			HTTPStatusCode: res.StatusCode,
 10960  		},
 10961  	}
 10962  	target := &ret
 10963  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10964  		return nil, err
 10965  	}
 10966  	return ret, nil
 10967  }
 10968  
 10969  type FoldersGetSettingsCall struct {
 10970  	s            *Service
 10971  	name         string
 10972  	urlParams_   gensupport.URLParams
 10973  	ifNoneMatch_ string
 10974  	ctx_         context.Context
 10975  	header_      http.Header
 10976  }
 10977  
 10978  // GetSettings: Gets the settings for the given resource.Note: Settings can be
 10979  // retrieved for Google Cloud projects, folders, organizations, and billing
 10980  // accounts.See View default resource settings for Logging
 10981  // (https://cloud.google.com/logging/docs/default-settings#view-org-settings)
 10982  // for more information.
 10983  //
 10984  //   - name: The resource for which to retrieve settings.
 10985  //     "projects/[PROJECT_ID]/settings"
 10986  //     "organizations/[ORGANIZATION_ID]/settings"
 10987  //     "billingAccounts/[BILLING_ACCOUNT_ID]/settings"
 10988  //     "folders/[FOLDER_ID]/settings" For
 10989  //     example:"organizations/12345/settings"Note: Settings can be retrieved for
 10990  //     Google Cloud projects, folders, organizations, and billing accounts.
 10991  func (r *FoldersService) GetSettings(name string) *FoldersGetSettingsCall {
 10992  	c := &FoldersGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10993  	c.name = name
 10994  	return c
 10995  }
 10996  
 10997  // Fields allows partial responses to be retrieved. See
 10998  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10999  // details.
 11000  func (c *FoldersGetSettingsCall) Fields(s ...googleapi.Field) *FoldersGetSettingsCall {
 11001  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11002  	return c
 11003  }
 11004  
 11005  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11006  // object's ETag matches the given value. This is useful for getting updates
 11007  // only after the object has changed since the last request.
 11008  func (c *FoldersGetSettingsCall) IfNoneMatch(entityTag string) *FoldersGetSettingsCall {
 11009  	c.ifNoneMatch_ = entityTag
 11010  	return c
 11011  }
 11012  
 11013  // Context sets the context to be used in this call's Do method.
 11014  func (c *FoldersGetSettingsCall) Context(ctx context.Context) *FoldersGetSettingsCall {
 11015  	c.ctx_ = ctx
 11016  	return c
 11017  }
 11018  
 11019  // Header returns a http.Header that can be modified by the caller to add
 11020  // headers to the request.
 11021  func (c *FoldersGetSettingsCall) Header() http.Header {
 11022  	if c.header_ == nil {
 11023  		c.header_ = make(http.Header)
 11024  	}
 11025  	return c.header_
 11026  }
 11027  
 11028  func (c *FoldersGetSettingsCall) doRequest(alt string) (*http.Response, error) {
 11029  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11030  	if c.ifNoneMatch_ != "" {
 11031  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11032  	}
 11033  	var body io.Reader = nil
 11034  	c.urlParams_.Set("alt", alt)
 11035  	c.urlParams_.Set("prettyPrint", "false")
 11036  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
 11037  	urls += "?" + c.urlParams_.Encode()
 11038  	req, err := http.NewRequest("GET", urls, body)
 11039  	if err != nil {
 11040  		return nil, err
 11041  	}
 11042  	req.Header = reqHeaders
 11043  	googleapi.Expand(req.URL, map[string]string{
 11044  		"name": c.name,
 11045  	})
 11046  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11047  }
 11048  
 11049  // Do executes the "logging.folders.getSettings" call.
 11050  // Any non-2xx status code is an error. Response headers are in either
 11051  // *Settings.ServerResponse.Header or (if a response was returned at all) in
 11052  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11053  // whether the returned error was because http.StatusNotModified was returned.
 11054  func (c *FoldersGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
 11055  	gensupport.SetOptions(c.urlParams_, opts...)
 11056  	res, err := c.doRequest("json")
 11057  	if res != nil && res.StatusCode == http.StatusNotModified {
 11058  		if res.Body != nil {
 11059  			res.Body.Close()
 11060  		}
 11061  		return nil, gensupport.WrapError(&googleapi.Error{
 11062  			Code:   res.StatusCode,
 11063  			Header: res.Header,
 11064  		})
 11065  	}
 11066  	if err != nil {
 11067  		return nil, err
 11068  	}
 11069  	defer googleapi.CloseBody(res)
 11070  	if err := googleapi.CheckResponse(res); err != nil {
 11071  		return nil, gensupport.WrapError(err)
 11072  	}
 11073  	ret := &Settings{
 11074  		ServerResponse: googleapi.ServerResponse{
 11075  			Header:         res.Header,
 11076  			HTTPStatusCode: res.StatusCode,
 11077  		},
 11078  	}
 11079  	target := &ret
 11080  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11081  		return nil, err
 11082  	}
 11083  	return ret, nil
 11084  }
 11085  
 11086  type FoldersUpdateSettingsCall struct {
 11087  	s          *Service
 11088  	name       string
 11089  	settings   *Settings
 11090  	urlParams_ gensupport.URLParams
 11091  	ctx_       context.Context
 11092  	header_    http.Header
 11093  }
 11094  
 11095  // UpdateSettings: Updates the settings for the given resource. This method
 11096  // applies to all feature configurations for organization and
 11097  // folders.UpdateSettings fails when any of the following are true: The value
 11098  // of storage_location either isn't supported by Logging or violates the
 11099  // location OrgPolicy. The default_sink_config field is set, but it has an
 11100  // unspecified filter write mode. The value of kms_key_name is invalid. The
 11101  // associated service account doesn't have the required
 11102  // roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access
 11103  // to the key is disabled.See Configure default settings for organizations and
 11104  // folders (https://cloud.google.com/logging/docs/default-settings) for more
 11105  // information.
 11106  //
 11107  //   - name: The resource name for the settings to update.
 11108  //     "organizations/[ORGANIZATION_ID]/settings" For
 11109  //     example:"organizations/12345/settings".
 11110  func (r *FoldersService) UpdateSettings(name string, settings *Settings) *FoldersUpdateSettingsCall {
 11111  	c := &FoldersUpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11112  	c.name = name
 11113  	c.settings = settings
 11114  	return c
 11115  }
 11116  
 11117  // UpdateMask sets the optional parameter "updateMask": Field mask identifying
 11118  // which fields from settings should be updated. A field will be overwritten if
 11119  // and only if it is in the update mask. Output only fields cannot be
 11120  // updated.See FieldMask for more information.For example:
 11121  // "updateMask=kmsKeyName"
 11122  func (c *FoldersUpdateSettingsCall) UpdateMask(updateMask string) *FoldersUpdateSettingsCall {
 11123  	c.urlParams_.Set("updateMask", updateMask)
 11124  	return c
 11125  }
 11126  
 11127  // Fields allows partial responses to be retrieved. See
 11128  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11129  // details.
 11130  func (c *FoldersUpdateSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateSettingsCall {
 11131  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11132  	return c
 11133  }
 11134  
 11135  // Context sets the context to be used in this call's Do method.
 11136  func (c *FoldersUpdateSettingsCall) Context(ctx context.Context) *FoldersUpdateSettingsCall {
 11137  	c.ctx_ = ctx
 11138  	return c
 11139  }
 11140  
 11141  // Header returns a http.Header that can be modified by the caller to add
 11142  // headers to the request.
 11143  func (c *FoldersUpdateSettingsCall) Header() http.Header {
 11144  	if c.header_ == nil {
 11145  		c.header_ = make(http.Header)
 11146  	}
 11147  	return c.header_
 11148  }
 11149  
 11150  func (c *FoldersUpdateSettingsCall) doRequest(alt string) (*http.Response, error) {
 11151  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11152  	var body io.Reader = nil
 11153  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.settings)
 11154  	if err != nil {
 11155  		return nil, err
 11156  	}
 11157  	c.urlParams_.Set("alt", alt)
 11158  	c.urlParams_.Set("prettyPrint", "false")
 11159  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
 11160  	urls += "?" + c.urlParams_.Encode()
 11161  	req, err := http.NewRequest("PATCH", urls, body)
 11162  	if err != nil {
 11163  		return nil, err
 11164  	}
 11165  	req.Header = reqHeaders
 11166  	googleapi.Expand(req.URL, map[string]string{
 11167  		"name": c.name,
 11168  	})
 11169  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11170  }
 11171  
 11172  // Do executes the "logging.folders.updateSettings" call.
 11173  // Any non-2xx status code is an error. Response headers are in either
 11174  // *Settings.ServerResponse.Header or (if a response was returned at all) in
 11175  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11176  // whether the returned error was because http.StatusNotModified was returned.
 11177  func (c *FoldersUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
 11178  	gensupport.SetOptions(c.urlParams_, opts...)
 11179  	res, err := c.doRequest("json")
 11180  	if res != nil && res.StatusCode == http.StatusNotModified {
 11181  		if res.Body != nil {
 11182  			res.Body.Close()
 11183  		}
 11184  		return nil, gensupport.WrapError(&googleapi.Error{
 11185  			Code:   res.StatusCode,
 11186  			Header: res.Header,
 11187  		})
 11188  	}
 11189  	if err != nil {
 11190  		return nil, err
 11191  	}
 11192  	defer googleapi.CloseBody(res)
 11193  	if err := googleapi.CheckResponse(res); err != nil {
 11194  		return nil, gensupport.WrapError(err)
 11195  	}
 11196  	ret := &Settings{
 11197  		ServerResponse: googleapi.ServerResponse{
 11198  			Header:         res.Header,
 11199  			HTTPStatusCode: res.StatusCode,
 11200  		},
 11201  	}
 11202  	target := &ret
 11203  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11204  		return nil, err
 11205  	}
 11206  	return ret, nil
 11207  }
 11208  
 11209  type FoldersExclusionsCreateCall struct {
 11210  	s            *Service
 11211  	parent       string
 11212  	logexclusion *LogExclusion
 11213  	urlParams_   gensupport.URLParams
 11214  	ctx_         context.Context
 11215  	header_      http.Header
 11216  }
 11217  
 11218  // Create: Creates a new exclusion in the _Default sink in a specified parent
 11219  // resource. Only log entries belonging to that resource can be excluded. You
 11220  // can have up to 10 exclusions in a resource.
 11221  //
 11222  //   - parent: The parent resource in which to create the exclusion:
 11223  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 11224  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
 11225  //     examples:"projects/my-logging-project" "organizations/123456789".
 11226  func (r *FoldersExclusionsService) Create(parent string, logexclusion *LogExclusion) *FoldersExclusionsCreateCall {
 11227  	c := &FoldersExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11228  	c.parent = parent
 11229  	c.logexclusion = logexclusion
 11230  	return c
 11231  }
 11232  
 11233  // Fields allows partial responses to be retrieved. See
 11234  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11235  // details.
 11236  func (c *FoldersExclusionsCreateCall) Fields(s ...googleapi.Field) *FoldersExclusionsCreateCall {
 11237  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11238  	return c
 11239  }
 11240  
 11241  // Context sets the context to be used in this call's Do method.
 11242  func (c *FoldersExclusionsCreateCall) Context(ctx context.Context) *FoldersExclusionsCreateCall {
 11243  	c.ctx_ = ctx
 11244  	return c
 11245  }
 11246  
 11247  // Header returns a http.Header that can be modified by the caller to add
 11248  // headers to the request.
 11249  func (c *FoldersExclusionsCreateCall) Header() http.Header {
 11250  	if c.header_ == nil {
 11251  		c.header_ = make(http.Header)
 11252  	}
 11253  	return c.header_
 11254  }
 11255  
 11256  func (c *FoldersExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
 11257  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11258  	var body io.Reader = nil
 11259  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
 11260  	if err != nil {
 11261  		return nil, err
 11262  	}
 11263  	c.urlParams_.Set("alt", alt)
 11264  	c.urlParams_.Set("prettyPrint", "false")
 11265  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
 11266  	urls += "?" + c.urlParams_.Encode()
 11267  	req, err := http.NewRequest("POST", urls, body)
 11268  	if err != nil {
 11269  		return nil, err
 11270  	}
 11271  	req.Header = reqHeaders
 11272  	googleapi.Expand(req.URL, map[string]string{
 11273  		"parent": c.parent,
 11274  	})
 11275  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11276  }
 11277  
 11278  // Do executes the "logging.folders.exclusions.create" call.
 11279  // Any non-2xx status code is an error. Response headers are in either
 11280  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 11281  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11282  // whether the returned error was because http.StatusNotModified was returned.
 11283  func (c *FoldersExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 11284  	gensupport.SetOptions(c.urlParams_, opts...)
 11285  	res, err := c.doRequest("json")
 11286  	if res != nil && res.StatusCode == http.StatusNotModified {
 11287  		if res.Body != nil {
 11288  			res.Body.Close()
 11289  		}
 11290  		return nil, gensupport.WrapError(&googleapi.Error{
 11291  			Code:   res.StatusCode,
 11292  			Header: res.Header,
 11293  		})
 11294  	}
 11295  	if err != nil {
 11296  		return nil, err
 11297  	}
 11298  	defer googleapi.CloseBody(res)
 11299  	if err := googleapi.CheckResponse(res); err != nil {
 11300  		return nil, gensupport.WrapError(err)
 11301  	}
 11302  	ret := &LogExclusion{
 11303  		ServerResponse: googleapi.ServerResponse{
 11304  			Header:         res.Header,
 11305  			HTTPStatusCode: res.StatusCode,
 11306  		},
 11307  	}
 11308  	target := &ret
 11309  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11310  		return nil, err
 11311  	}
 11312  	return ret, nil
 11313  }
 11314  
 11315  type FoldersExclusionsDeleteCall struct {
 11316  	s          *Service
 11317  	name       string
 11318  	urlParams_ gensupport.URLParams
 11319  	ctx_       context.Context
 11320  	header_    http.Header
 11321  }
 11322  
 11323  // Delete: Deletes an exclusion in the _Default sink.
 11324  //
 11325  //   - name: The resource name of an existing exclusion to delete:
 11326  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 11327  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 11328  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 11329  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 11330  //     example:"projects/my-project/exclusions/my-exclusion".
 11331  func (r *FoldersExclusionsService) Delete(name string) *FoldersExclusionsDeleteCall {
 11332  	c := &FoldersExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11333  	c.name = name
 11334  	return c
 11335  }
 11336  
 11337  // Fields allows partial responses to be retrieved. See
 11338  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11339  // details.
 11340  func (c *FoldersExclusionsDeleteCall) Fields(s ...googleapi.Field) *FoldersExclusionsDeleteCall {
 11341  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11342  	return c
 11343  }
 11344  
 11345  // Context sets the context to be used in this call's Do method.
 11346  func (c *FoldersExclusionsDeleteCall) Context(ctx context.Context) *FoldersExclusionsDeleteCall {
 11347  	c.ctx_ = ctx
 11348  	return c
 11349  }
 11350  
 11351  // Header returns a http.Header that can be modified by the caller to add
 11352  // headers to the request.
 11353  func (c *FoldersExclusionsDeleteCall) Header() http.Header {
 11354  	if c.header_ == nil {
 11355  		c.header_ = make(http.Header)
 11356  	}
 11357  	return c.header_
 11358  }
 11359  
 11360  func (c *FoldersExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
 11361  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11362  	var body io.Reader = nil
 11363  	c.urlParams_.Set("alt", alt)
 11364  	c.urlParams_.Set("prettyPrint", "false")
 11365  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 11366  	urls += "?" + c.urlParams_.Encode()
 11367  	req, err := http.NewRequest("DELETE", urls, body)
 11368  	if err != nil {
 11369  		return nil, err
 11370  	}
 11371  	req.Header = reqHeaders
 11372  	googleapi.Expand(req.URL, map[string]string{
 11373  		"name": c.name,
 11374  	})
 11375  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11376  }
 11377  
 11378  // Do executes the "logging.folders.exclusions.delete" call.
 11379  // Any non-2xx status code is an error. Response headers are in either
 11380  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 11381  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11382  // whether the returned error was because http.StatusNotModified was returned.
 11383  func (c *FoldersExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 11384  	gensupport.SetOptions(c.urlParams_, opts...)
 11385  	res, err := c.doRequest("json")
 11386  	if res != nil && res.StatusCode == http.StatusNotModified {
 11387  		if res.Body != nil {
 11388  			res.Body.Close()
 11389  		}
 11390  		return nil, gensupport.WrapError(&googleapi.Error{
 11391  			Code:   res.StatusCode,
 11392  			Header: res.Header,
 11393  		})
 11394  	}
 11395  	if err != nil {
 11396  		return nil, err
 11397  	}
 11398  	defer googleapi.CloseBody(res)
 11399  	if err := googleapi.CheckResponse(res); err != nil {
 11400  		return nil, gensupport.WrapError(err)
 11401  	}
 11402  	ret := &Empty{
 11403  		ServerResponse: googleapi.ServerResponse{
 11404  			Header:         res.Header,
 11405  			HTTPStatusCode: res.StatusCode,
 11406  		},
 11407  	}
 11408  	target := &ret
 11409  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11410  		return nil, err
 11411  	}
 11412  	return ret, nil
 11413  }
 11414  
 11415  type FoldersExclusionsGetCall struct {
 11416  	s            *Service
 11417  	name         string
 11418  	urlParams_   gensupport.URLParams
 11419  	ifNoneMatch_ string
 11420  	ctx_         context.Context
 11421  	header_      http.Header
 11422  }
 11423  
 11424  // Get: Gets the description of an exclusion in the _Default sink.
 11425  //
 11426  //   - name: The resource name of an existing exclusion:
 11427  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 11428  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 11429  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 11430  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 11431  //     example:"projects/my-project/exclusions/my-exclusion".
 11432  func (r *FoldersExclusionsService) Get(name string) *FoldersExclusionsGetCall {
 11433  	c := &FoldersExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11434  	c.name = name
 11435  	return c
 11436  }
 11437  
 11438  // Fields allows partial responses to be retrieved. See
 11439  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11440  // details.
 11441  func (c *FoldersExclusionsGetCall) Fields(s ...googleapi.Field) *FoldersExclusionsGetCall {
 11442  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11443  	return c
 11444  }
 11445  
 11446  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11447  // object's ETag matches the given value. This is useful for getting updates
 11448  // only after the object has changed since the last request.
 11449  func (c *FoldersExclusionsGetCall) IfNoneMatch(entityTag string) *FoldersExclusionsGetCall {
 11450  	c.ifNoneMatch_ = entityTag
 11451  	return c
 11452  }
 11453  
 11454  // Context sets the context to be used in this call's Do method.
 11455  func (c *FoldersExclusionsGetCall) Context(ctx context.Context) *FoldersExclusionsGetCall {
 11456  	c.ctx_ = ctx
 11457  	return c
 11458  }
 11459  
 11460  // Header returns a http.Header that can be modified by the caller to add
 11461  // headers to the request.
 11462  func (c *FoldersExclusionsGetCall) Header() http.Header {
 11463  	if c.header_ == nil {
 11464  		c.header_ = make(http.Header)
 11465  	}
 11466  	return c.header_
 11467  }
 11468  
 11469  func (c *FoldersExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
 11470  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11471  	if c.ifNoneMatch_ != "" {
 11472  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11473  	}
 11474  	var body io.Reader = nil
 11475  	c.urlParams_.Set("alt", alt)
 11476  	c.urlParams_.Set("prettyPrint", "false")
 11477  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 11478  	urls += "?" + c.urlParams_.Encode()
 11479  	req, err := http.NewRequest("GET", urls, body)
 11480  	if err != nil {
 11481  		return nil, err
 11482  	}
 11483  	req.Header = reqHeaders
 11484  	googleapi.Expand(req.URL, map[string]string{
 11485  		"name": c.name,
 11486  	})
 11487  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11488  }
 11489  
 11490  // Do executes the "logging.folders.exclusions.get" call.
 11491  // Any non-2xx status code is an error. Response headers are in either
 11492  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 11493  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11494  // whether the returned error was because http.StatusNotModified was returned.
 11495  func (c *FoldersExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 11496  	gensupport.SetOptions(c.urlParams_, opts...)
 11497  	res, err := c.doRequest("json")
 11498  	if res != nil && res.StatusCode == http.StatusNotModified {
 11499  		if res.Body != nil {
 11500  			res.Body.Close()
 11501  		}
 11502  		return nil, gensupport.WrapError(&googleapi.Error{
 11503  			Code:   res.StatusCode,
 11504  			Header: res.Header,
 11505  		})
 11506  	}
 11507  	if err != nil {
 11508  		return nil, err
 11509  	}
 11510  	defer googleapi.CloseBody(res)
 11511  	if err := googleapi.CheckResponse(res); err != nil {
 11512  		return nil, gensupport.WrapError(err)
 11513  	}
 11514  	ret := &LogExclusion{
 11515  		ServerResponse: googleapi.ServerResponse{
 11516  			Header:         res.Header,
 11517  			HTTPStatusCode: res.StatusCode,
 11518  		},
 11519  	}
 11520  	target := &ret
 11521  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11522  		return nil, err
 11523  	}
 11524  	return ret, nil
 11525  }
 11526  
 11527  type FoldersExclusionsListCall struct {
 11528  	s            *Service
 11529  	parent       string
 11530  	urlParams_   gensupport.URLParams
 11531  	ifNoneMatch_ string
 11532  	ctx_         context.Context
 11533  	header_      http.Header
 11534  }
 11535  
 11536  // List: Lists all the exclusions on the _Default sink in a parent resource.
 11537  //
 11538  //   - parent: The parent resource whose exclusions are to be listed.
 11539  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 11540  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
 11541  func (r *FoldersExclusionsService) List(parent string) *FoldersExclusionsListCall {
 11542  	c := &FoldersExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11543  	c.parent = parent
 11544  	return c
 11545  }
 11546  
 11547  // PageSize sets the optional parameter "pageSize": The maximum number of
 11548  // results to return from this request. Non-positive values are ignored. The
 11549  // presence of nextPageToken in the response indicates that more results might
 11550  // be available.
 11551  func (c *FoldersExclusionsListCall) PageSize(pageSize int64) *FoldersExclusionsListCall {
 11552  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 11553  	return c
 11554  }
 11555  
 11556  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 11557  // the next batch of results from the preceding call to this method. pageToken
 11558  // must be the value of nextPageToken from the previous response. The values of
 11559  // other method parameters should be identical to those in the previous call.
 11560  func (c *FoldersExclusionsListCall) PageToken(pageToken string) *FoldersExclusionsListCall {
 11561  	c.urlParams_.Set("pageToken", pageToken)
 11562  	return c
 11563  }
 11564  
 11565  // Fields allows partial responses to be retrieved. See
 11566  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11567  // details.
 11568  func (c *FoldersExclusionsListCall) Fields(s ...googleapi.Field) *FoldersExclusionsListCall {
 11569  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11570  	return c
 11571  }
 11572  
 11573  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11574  // object's ETag matches the given value. This is useful for getting updates
 11575  // only after the object has changed since the last request.
 11576  func (c *FoldersExclusionsListCall) IfNoneMatch(entityTag string) *FoldersExclusionsListCall {
 11577  	c.ifNoneMatch_ = entityTag
 11578  	return c
 11579  }
 11580  
 11581  // Context sets the context to be used in this call's Do method.
 11582  func (c *FoldersExclusionsListCall) Context(ctx context.Context) *FoldersExclusionsListCall {
 11583  	c.ctx_ = ctx
 11584  	return c
 11585  }
 11586  
 11587  // Header returns a http.Header that can be modified by the caller to add
 11588  // headers to the request.
 11589  func (c *FoldersExclusionsListCall) Header() http.Header {
 11590  	if c.header_ == nil {
 11591  		c.header_ = make(http.Header)
 11592  	}
 11593  	return c.header_
 11594  }
 11595  
 11596  func (c *FoldersExclusionsListCall) doRequest(alt string) (*http.Response, error) {
 11597  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11598  	if c.ifNoneMatch_ != "" {
 11599  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11600  	}
 11601  	var body io.Reader = nil
 11602  	c.urlParams_.Set("alt", alt)
 11603  	c.urlParams_.Set("prettyPrint", "false")
 11604  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
 11605  	urls += "?" + c.urlParams_.Encode()
 11606  	req, err := http.NewRequest("GET", urls, body)
 11607  	if err != nil {
 11608  		return nil, err
 11609  	}
 11610  	req.Header = reqHeaders
 11611  	googleapi.Expand(req.URL, map[string]string{
 11612  		"parent": c.parent,
 11613  	})
 11614  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11615  }
 11616  
 11617  // Do executes the "logging.folders.exclusions.list" call.
 11618  // Any non-2xx status code is an error. Response headers are in either
 11619  // *ListExclusionsResponse.ServerResponse.Header or (if a response was returned
 11620  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11621  // check whether the returned error was because http.StatusNotModified was
 11622  // returned.
 11623  func (c *FoldersExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
 11624  	gensupport.SetOptions(c.urlParams_, opts...)
 11625  	res, err := c.doRequest("json")
 11626  	if res != nil && res.StatusCode == http.StatusNotModified {
 11627  		if res.Body != nil {
 11628  			res.Body.Close()
 11629  		}
 11630  		return nil, gensupport.WrapError(&googleapi.Error{
 11631  			Code:   res.StatusCode,
 11632  			Header: res.Header,
 11633  		})
 11634  	}
 11635  	if err != nil {
 11636  		return nil, err
 11637  	}
 11638  	defer googleapi.CloseBody(res)
 11639  	if err := googleapi.CheckResponse(res); err != nil {
 11640  		return nil, gensupport.WrapError(err)
 11641  	}
 11642  	ret := &ListExclusionsResponse{
 11643  		ServerResponse: googleapi.ServerResponse{
 11644  			Header:         res.Header,
 11645  			HTTPStatusCode: res.StatusCode,
 11646  		},
 11647  	}
 11648  	target := &ret
 11649  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11650  		return nil, err
 11651  	}
 11652  	return ret, nil
 11653  }
 11654  
 11655  // Pages invokes f for each page of results.
 11656  // A non-nil error returned from f will halt the iteration.
 11657  // The provided context supersedes any context provided to the Context method.
 11658  func (c *FoldersExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
 11659  	c.ctx_ = ctx
 11660  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11661  	for {
 11662  		x, err := c.Do()
 11663  		if err != nil {
 11664  			return err
 11665  		}
 11666  		if err := f(x); err != nil {
 11667  			return err
 11668  		}
 11669  		if x.NextPageToken == "" {
 11670  			return nil
 11671  		}
 11672  		c.PageToken(x.NextPageToken)
 11673  	}
 11674  }
 11675  
 11676  type FoldersExclusionsPatchCall struct {
 11677  	s            *Service
 11678  	name         string
 11679  	logexclusion *LogExclusion
 11680  	urlParams_   gensupport.URLParams
 11681  	ctx_         context.Context
 11682  	header_      http.Header
 11683  }
 11684  
 11685  // Patch: Changes one or more properties of an existing exclusion in the
 11686  // _Default sink.
 11687  //
 11688  //   - name: The resource name of the exclusion to update:
 11689  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 11690  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 11691  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 11692  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 11693  //     example:"projects/my-project/exclusions/my-exclusion".
 11694  func (r *FoldersExclusionsService) Patch(name string, logexclusion *LogExclusion) *FoldersExclusionsPatchCall {
 11695  	c := &FoldersExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11696  	c.name = name
 11697  	c.logexclusion = logexclusion
 11698  	return c
 11699  }
 11700  
 11701  // UpdateMask sets the optional parameter "updateMask": Required. A non-empty
 11702  // list of fields to change in the existing exclusion. New values for the
 11703  // fields are taken from the corresponding fields in the LogExclusion included
 11704  // in this request. Fields not mentioned in update_mask are not changed and are
 11705  // ignored in the request.For example, to change the filter and description of
 11706  // an exclusion, specify an update_mask of "filter,description".
 11707  func (c *FoldersExclusionsPatchCall) UpdateMask(updateMask string) *FoldersExclusionsPatchCall {
 11708  	c.urlParams_.Set("updateMask", updateMask)
 11709  	return c
 11710  }
 11711  
 11712  // Fields allows partial responses to be retrieved. See
 11713  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11714  // details.
 11715  func (c *FoldersExclusionsPatchCall) Fields(s ...googleapi.Field) *FoldersExclusionsPatchCall {
 11716  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11717  	return c
 11718  }
 11719  
 11720  // Context sets the context to be used in this call's Do method.
 11721  func (c *FoldersExclusionsPatchCall) Context(ctx context.Context) *FoldersExclusionsPatchCall {
 11722  	c.ctx_ = ctx
 11723  	return c
 11724  }
 11725  
 11726  // Header returns a http.Header that can be modified by the caller to add
 11727  // headers to the request.
 11728  func (c *FoldersExclusionsPatchCall) Header() http.Header {
 11729  	if c.header_ == nil {
 11730  		c.header_ = make(http.Header)
 11731  	}
 11732  	return c.header_
 11733  }
 11734  
 11735  func (c *FoldersExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
 11736  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11737  	var body io.Reader = nil
 11738  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
 11739  	if err != nil {
 11740  		return nil, err
 11741  	}
 11742  	c.urlParams_.Set("alt", alt)
 11743  	c.urlParams_.Set("prettyPrint", "false")
 11744  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 11745  	urls += "?" + c.urlParams_.Encode()
 11746  	req, err := http.NewRequest("PATCH", urls, body)
 11747  	if err != nil {
 11748  		return nil, err
 11749  	}
 11750  	req.Header = reqHeaders
 11751  	googleapi.Expand(req.URL, map[string]string{
 11752  		"name": c.name,
 11753  	})
 11754  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11755  }
 11756  
 11757  // Do executes the "logging.folders.exclusions.patch" call.
 11758  // Any non-2xx status code is an error. Response headers are in either
 11759  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 11760  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11761  // whether the returned error was because http.StatusNotModified was returned.
 11762  func (c *FoldersExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 11763  	gensupport.SetOptions(c.urlParams_, opts...)
 11764  	res, err := c.doRequest("json")
 11765  	if res != nil && res.StatusCode == http.StatusNotModified {
 11766  		if res.Body != nil {
 11767  			res.Body.Close()
 11768  		}
 11769  		return nil, gensupport.WrapError(&googleapi.Error{
 11770  			Code:   res.StatusCode,
 11771  			Header: res.Header,
 11772  		})
 11773  	}
 11774  	if err != nil {
 11775  		return nil, err
 11776  	}
 11777  	defer googleapi.CloseBody(res)
 11778  	if err := googleapi.CheckResponse(res); err != nil {
 11779  		return nil, gensupport.WrapError(err)
 11780  	}
 11781  	ret := &LogExclusion{
 11782  		ServerResponse: googleapi.ServerResponse{
 11783  			Header:         res.Header,
 11784  			HTTPStatusCode: res.StatusCode,
 11785  		},
 11786  	}
 11787  	target := &ret
 11788  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11789  		return nil, err
 11790  	}
 11791  	return ret, nil
 11792  }
 11793  
 11794  type FoldersLocationsGetCall struct {
 11795  	s            *Service
 11796  	name         string
 11797  	urlParams_   gensupport.URLParams
 11798  	ifNoneMatch_ string
 11799  	ctx_         context.Context
 11800  	header_      http.Header
 11801  }
 11802  
 11803  // Get: Gets information about a location.
 11804  //
 11805  // - name: Resource name for the location.
 11806  func (r *FoldersLocationsService) Get(name string) *FoldersLocationsGetCall {
 11807  	c := &FoldersLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11808  	c.name = name
 11809  	return c
 11810  }
 11811  
 11812  // Fields allows partial responses to be retrieved. See
 11813  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11814  // details.
 11815  func (c *FoldersLocationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsGetCall {
 11816  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11817  	return c
 11818  }
 11819  
 11820  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11821  // object's ETag matches the given value. This is useful for getting updates
 11822  // only after the object has changed since the last request.
 11823  func (c *FoldersLocationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsGetCall {
 11824  	c.ifNoneMatch_ = entityTag
 11825  	return c
 11826  }
 11827  
 11828  // Context sets the context to be used in this call's Do method.
 11829  func (c *FoldersLocationsGetCall) Context(ctx context.Context) *FoldersLocationsGetCall {
 11830  	c.ctx_ = ctx
 11831  	return c
 11832  }
 11833  
 11834  // Header returns a http.Header that can be modified by the caller to add
 11835  // headers to the request.
 11836  func (c *FoldersLocationsGetCall) Header() http.Header {
 11837  	if c.header_ == nil {
 11838  		c.header_ = make(http.Header)
 11839  	}
 11840  	return c.header_
 11841  }
 11842  
 11843  func (c *FoldersLocationsGetCall) doRequest(alt string) (*http.Response, error) {
 11844  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11845  	if c.ifNoneMatch_ != "" {
 11846  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11847  	}
 11848  	var body io.Reader = nil
 11849  	c.urlParams_.Set("alt", alt)
 11850  	c.urlParams_.Set("prettyPrint", "false")
 11851  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 11852  	urls += "?" + c.urlParams_.Encode()
 11853  	req, err := http.NewRequest("GET", urls, body)
 11854  	if err != nil {
 11855  		return nil, err
 11856  	}
 11857  	req.Header = reqHeaders
 11858  	googleapi.Expand(req.URL, map[string]string{
 11859  		"name": c.name,
 11860  	})
 11861  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11862  }
 11863  
 11864  // Do executes the "logging.folders.locations.get" call.
 11865  // Any non-2xx status code is an error. Response headers are in either
 11866  // *Location.ServerResponse.Header or (if a response was returned at all) in
 11867  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11868  // whether the returned error was because http.StatusNotModified was returned.
 11869  func (c *FoldersLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
 11870  	gensupport.SetOptions(c.urlParams_, opts...)
 11871  	res, err := c.doRequest("json")
 11872  	if res != nil && res.StatusCode == http.StatusNotModified {
 11873  		if res.Body != nil {
 11874  			res.Body.Close()
 11875  		}
 11876  		return nil, gensupport.WrapError(&googleapi.Error{
 11877  			Code:   res.StatusCode,
 11878  			Header: res.Header,
 11879  		})
 11880  	}
 11881  	if err != nil {
 11882  		return nil, err
 11883  	}
 11884  	defer googleapi.CloseBody(res)
 11885  	if err := googleapi.CheckResponse(res); err != nil {
 11886  		return nil, gensupport.WrapError(err)
 11887  	}
 11888  	ret := &Location{
 11889  		ServerResponse: googleapi.ServerResponse{
 11890  			Header:         res.Header,
 11891  			HTTPStatusCode: res.StatusCode,
 11892  		},
 11893  	}
 11894  	target := &ret
 11895  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11896  		return nil, err
 11897  	}
 11898  	return ret, nil
 11899  }
 11900  
 11901  type FoldersLocationsListCall struct {
 11902  	s            *Service
 11903  	name         string
 11904  	urlParams_   gensupport.URLParams
 11905  	ifNoneMatch_ string
 11906  	ctx_         context.Context
 11907  	header_      http.Header
 11908  }
 11909  
 11910  // List: Lists information about the supported locations for this service.
 11911  //
 11912  // - name: The resource that owns the locations collection, if applicable.
 11913  func (r *FoldersLocationsService) List(name string) *FoldersLocationsListCall {
 11914  	c := &FoldersLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11915  	c.name = name
 11916  	return c
 11917  }
 11918  
 11919  // Filter sets the optional parameter "filter": A filter to narrow down results
 11920  // to a preferred subset. The filtering language accepts strings like
 11921  // "displayName=tokyo", and is documented in more detail in AIP-160
 11922  // (https://google.aip.dev/160).
 11923  func (c *FoldersLocationsListCall) Filter(filter string) *FoldersLocationsListCall {
 11924  	c.urlParams_.Set("filter", filter)
 11925  	return c
 11926  }
 11927  
 11928  // PageSize sets the optional parameter "pageSize": The maximum number of
 11929  // results to return. If not set, the service selects a default.
 11930  func (c *FoldersLocationsListCall) PageSize(pageSize int64) *FoldersLocationsListCall {
 11931  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 11932  	return c
 11933  }
 11934  
 11935  // PageToken sets the optional parameter "pageToken": A page token received
 11936  // from the next_page_token field in the response. Send that page token to
 11937  // receive the subsequent page.
 11938  func (c *FoldersLocationsListCall) PageToken(pageToken string) *FoldersLocationsListCall {
 11939  	c.urlParams_.Set("pageToken", pageToken)
 11940  	return c
 11941  }
 11942  
 11943  // Fields allows partial responses to be retrieved. See
 11944  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11945  // details.
 11946  func (c *FoldersLocationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsListCall {
 11947  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11948  	return c
 11949  }
 11950  
 11951  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11952  // object's ETag matches the given value. This is useful for getting updates
 11953  // only after the object has changed since the last request.
 11954  func (c *FoldersLocationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsListCall {
 11955  	c.ifNoneMatch_ = entityTag
 11956  	return c
 11957  }
 11958  
 11959  // Context sets the context to be used in this call's Do method.
 11960  func (c *FoldersLocationsListCall) Context(ctx context.Context) *FoldersLocationsListCall {
 11961  	c.ctx_ = ctx
 11962  	return c
 11963  }
 11964  
 11965  // Header returns a http.Header that can be modified by the caller to add
 11966  // headers to the request.
 11967  func (c *FoldersLocationsListCall) Header() http.Header {
 11968  	if c.header_ == nil {
 11969  		c.header_ = make(http.Header)
 11970  	}
 11971  	return c.header_
 11972  }
 11973  
 11974  func (c *FoldersLocationsListCall) doRequest(alt string) (*http.Response, error) {
 11975  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11976  	if c.ifNoneMatch_ != "" {
 11977  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11978  	}
 11979  	var body io.Reader = nil
 11980  	c.urlParams_.Set("alt", alt)
 11981  	c.urlParams_.Set("prettyPrint", "false")
 11982  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
 11983  	urls += "?" + c.urlParams_.Encode()
 11984  	req, err := http.NewRequest("GET", urls, body)
 11985  	if err != nil {
 11986  		return nil, err
 11987  	}
 11988  	req.Header = reqHeaders
 11989  	googleapi.Expand(req.URL, map[string]string{
 11990  		"name": c.name,
 11991  	})
 11992  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11993  }
 11994  
 11995  // Do executes the "logging.folders.locations.list" call.
 11996  // Any non-2xx status code is an error. Response headers are in either
 11997  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
 11998  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11999  // check whether the returned error was because http.StatusNotModified was
 12000  // returned.
 12001  func (c *FoldersLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
 12002  	gensupport.SetOptions(c.urlParams_, opts...)
 12003  	res, err := c.doRequest("json")
 12004  	if res != nil && res.StatusCode == http.StatusNotModified {
 12005  		if res.Body != nil {
 12006  			res.Body.Close()
 12007  		}
 12008  		return nil, gensupport.WrapError(&googleapi.Error{
 12009  			Code:   res.StatusCode,
 12010  			Header: res.Header,
 12011  		})
 12012  	}
 12013  	if err != nil {
 12014  		return nil, err
 12015  	}
 12016  	defer googleapi.CloseBody(res)
 12017  	if err := googleapi.CheckResponse(res); err != nil {
 12018  		return nil, gensupport.WrapError(err)
 12019  	}
 12020  	ret := &ListLocationsResponse{
 12021  		ServerResponse: googleapi.ServerResponse{
 12022  			Header:         res.Header,
 12023  			HTTPStatusCode: res.StatusCode,
 12024  		},
 12025  	}
 12026  	target := &ret
 12027  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12028  		return nil, err
 12029  	}
 12030  	return ret, nil
 12031  }
 12032  
 12033  // Pages invokes f for each page of results.
 12034  // A non-nil error returned from f will halt the iteration.
 12035  // The provided context supersedes any context provided to the Context method.
 12036  func (c *FoldersLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
 12037  	c.ctx_ = ctx
 12038  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12039  	for {
 12040  		x, err := c.Do()
 12041  		if err != nil {
 12042  			return err
 12043  		}
 12044  		if err := f(x); err != nil {
 12045  			return err
 12046  		}
 12047  		if x.NextPageToken == "" {
 12048  			return nil
 12049  		}
 12050  		c.PageToken(x.NextPageToken)
 12051  	}
 12052  }
 12053  
 12054  type FoldersLocationsBucketsCreateCall struct {
 12055  	s          *Service
 12056  	parent     string
 12057  	logbucket  *LogBucket
 12058  	urlParams_ gensupport.URLParams
 12059  	ctx_       context.Context
 12060  	header_    http.Header
 12061  }
 12062  
 12063  // Create: Creates a log bucket that can be used to store log entries. After a
 12064  // bucket has been created, the bucket's location cannot be changed.
 12065  //
 12066  //   - parent: The resource in which to create the log bucket:
 12067  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
 12068  //     example:"projects/my-project/locations/global".
 12069  func (r *FoldersLocationsBucketsService) Create(parent string, logbucket *LogBucket) *FoldersLocationsBucketsCreateCall {
 12070  	c := &FoldersLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12071  	c.parent = parent
 12072  	c.logbucket = logbucket
 12073  	return c
 12074  }
 12075  
 12076  // BucketId sets the optional parameter "bucketId": Required. A client-assigned
 12077  // identifier such as "my-bucket". Identifiers are limited to 100 characters
 12078  // and can include only letters, digits, underscores, hyphens, and periods.
 12079  // Bucket identifiers must start with an alphanumeric character.
 12080  func (c *FoldersLocationsBucketsCreateCall) BucketId(bucketId string) *FoldersLocationsBucketsCreateCall {
 12081  	c.urlParams_.Set("bucketId", bucketId)
 12082  	return c
 12083  }
 12084  
 12085  // Fields allows partial responses to be retrieved. See
 12086  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12087  // details.
 12088  func (c *FoldersLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsCreateCall {
 12089  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12090  	return c
 12091  }
 12092  
 12093  // Context sets the context to be used in this call's Do method.
 12094  func (c *FoldersLocationsBucketsCreateCall) Context(ctx context.Context) *FoldersLocationsBucketsCreateCall {
 12095  	c.ctx_ = ctx
 12096  	return c
 12097  }
 12098  
 12099  // Header returns a http.Header that can be modified by the caller to add
 12100  // headers to the request.
 12101  func (c *FoldersLocationsBucketsCreateCall) Header() http.Header {
 12102  	if c.header_ == nil {
 12103  		c.header_ = make(http.Header)
 12104  	}
 12105  	return c.header_
 12106  }
 12107  
 12108  func (c *FoldersLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
 12109  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12110  	var body io.Reader = nil
 12111  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 12112  	if err != nil {
 12113  		return nil, err
 12114  	}
 12115  	c.urlParams_.Set("alt", alt)
 12116  	c.urlParams_.Set("prettyPrint", "false")
 12117  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
 12118  	urls += "?" + c.urlParams_.Encode()
 12119  	req, err := http.NewRequest("POST", urls, body)
 12120  	if err != nil {
 12121  		return nil, err
 12122  	}
 12123  	req.Header = reqHeaders
 12124  	googleapi.Expand(req.URL, map[string]string{
 12125  		"parent": c.parent,
 12126  	})
 12127  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12128  }
 12129  
 12130  // Do executes the "logging.folders.locations.buckets.create" call.
 12131  // Any non-2xx status code is an error. Response headers are in either
 12132  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 12133  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12134  // whether the returned error was because http.StatusNotModified was returned.
 12135  func (c *FoldersLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 12136  	gensupport.SetOptions(c.urlParams_, opts...)
 12137  	res, err := c.doRequest("json")
 12138  	if res != nil && res.StatusCode == http.StatusNotModified {
 12139  		if res.Body != nil {
 12140  			res.Body.Close()
 12141  		}
 12142  		return nil, gensupport.WrapError(&googleapi.Error{
 12143  			Code:   res.StatusCode,
 12144  			Header: res.Header,
 12145  		})
 12146  	}
 12147  	if err != nil {
 12148  		return nil, err
 12149  	}
 12150  	defer googleapi.CloseBody(res)
 12151  	if err := googleapi.CheckResponse(res); err != nil {
 12152  		return nil, gensupport.WrapError(err)
 12153  	}
 12154  	ret := &LogBucket{
 12155  		ServerResponse: googleapi.ServerResponse{
 12156  			Header:         res.Header,
 12157  			HTTPStatusCode: res.StatusCode,
 12158  		},
 12159  	}
 12160  	target := &ret
 12161  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12162  		return nil, err
 12163  	}
 12164  	return ret, nil
 12165  }
 12166  
 12167  type FoldersLocationsBucketsCreateAsyncCall struct {
 12168  	s          *Service
 12169  	parent     string
 12170  	logbucket  *LogBucket
 12171  	urlParams_ gensupport.URLParams
 12172  	ctx_       context.Context
 12173  	header_    http.Header
 12174  }
 12175  
 12176  // CreateAsync: Creates a log bucket asynchronously that can be used to store
 12177  // log entries.After a bucket has been created, the bucket's location cannot be
 12178  // changed.
 12179  //
 12180  //   - parent: The resource in which to create the log bucket:
 12181  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
 12182  //     example:"projects/my-project/locations/global".
 12183  func (r *FoldersLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *FoldersLocationsBucketsCreateAsyncCall {
 12184  	c := &FoldersLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12185  	c.parent = parent
 12186  	c.logbucket = logbucket
 12187  	return c
 12188  }
 12189  
 12190  // BucketId sets the optional parameter "bucketId": Required. A client-assigned
 12191  // identifier such as "my-bucket". Identifiers are limited to 100 characters
 12192  // and can include only letters, digits, underscores, hyphens, and periods.
 12193  // Bucket identifiers must start with an alphanumeric character.
 12194  func (c *FoldersLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *FoldersLocationsBucketsCreateAsyncCall {
 12195  	c.urlParams_.Set("bucketId", bucketId)
 12196  	return c
 12197  }
 12198  
 12199  // Fields allows partial responses to be retrieved. See
 12200  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12201  // details.
 12202  func (c *FoldersLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsCreateAsyncCall {
 12203  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12204  	return c
 12205  }
 12206  
 12207  // Context sets the context to be used in this call's Do method.
 12208  func (c *FoldersLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *FoldersLocationsBucketsCreateAsyncCall {
 12209  	c.ctx_ = ctx
 12210  	return c
 12211  }
 12212  
 12213  // Header returns a http.Header that can be modified by the caller to add
 12214  // headers to the request.
 12215  func (c *FoldersLocationsBucketsCreateAsyncCall) Header() http.Header {
 12216  	if c.header_ == nil {
 12217  		c.header_ = make(http.Header)
 12218  	}
 12219  	return c.header_
 12220  }
 12221  
 12222  func (c *FoldersLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) {
 12223  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12224  	var body io.Reader = nil
 12225  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 12226  	if err != nil {
 12227  		return nil, err
 12228  	}
 12229  	c.urlParams_.Set("alt", alt)
 12230  	c.urlParams_.Set("prettyPrint", "false")
 12231  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync")
 12232  	urls += "?" + c.urlParams_.Encode()
 12233  	req, err := http.NewRequest("POST", urls, body)
 12234  	if err != nil {
 12235  		return nil, err
 12236  	}
 12237  	req.Header = reqHeaders
 12238  	googleapi.Expand(req.URL, map[string]string{
 12239  		"parent": c.parent,
 12240  	})
 12241  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12242  }
 12243  
 12244  // Do executes the "logging.folders.locations.buckets.createAsync" call.
 12245  // Any non-2xx status code is an error. Response headers are in either
 12246  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12247  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12248  // whether the returned error was because http.StatusNotModified was returned.
 12249  func (c *FoldersLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12250  	gensupport.SetOptions(c.urlParams_, opts...)
 12251  	res, err := c.doRequest("json")
 12252  	if res != nil && res.StatusCode == http.StatusNotModified {
 12253  		if res.Body != nil {
 12254  			res.Body.Close()
 12255  		}
 12256  		return nil, gensupport.WrapError(&googleapi.Error{
 12257  			Code:   res.StatusCode,
 12258  			Header: res.Header,
 12259  		})
 12260  	}
 12261  	if err != nil {
 12262  		return nil, err
 12263  	}
 12264  	defer googleapi.CloseBody(res)
 12265  	if err := googleapi.CheckResponse(res); err != nil {
 12266  		return nil, gensupport.WrapError(err)
 12267  	}
 12268  	ret := &Operation{
 12269  		ServerResponse: googleapi.ServerResponse{
 12270  			Header:         res.Header,
 12271  			HTTPStatusCode: res.StatusCode,
 12272  		},
 12273  	}
 12274  	target := &ret
 12275  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12276  		return nil, err
 12277  	}
 12278  	return ret, nil
 12279  }
 12280  
 12281  type FoldersLocationsBucketsDeleteCall struct {
 12282  	s          *Service
 12283  	name       string
 12284  	urlParams_ gensupport.URLParams
 12285  	ctx_       context.Context
 12286  	header_    http.Header
 12287  }
 12288  
 12289  // Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the
 12290  // DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log
 12291  // entries in the bucket will be permanently deleted.
 12292  //
 12293  //   - name: The full resource name of the bucket to delete.
 12294  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 12295  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 12296  //     ]"
 12297  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 12298  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 12299  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 12300  func (r *FoldersLocationsBucketsService) Delete(name string) *FoldersLocationsBucketsDeleteCall {
 12301  	c := &FoldersLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12302  	c.name = name
 12303  	return c
 12304  }
 12305  
 12306  // Fields allows partial responses to be retrieved. See
 12307  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12308  // details.
 12309  func (c *FoldersLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsDeleteCall {
 12310  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12311  	return c
 12312  }
 12313  
 12314  // Context sets the context to be used in this call's Do method.
 12315  func (c *FoldersLocationsBucketsDeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsDeleteCall {
 12316  	c.ctx_ = ctx
 12317  	return c
 12318  }
 12319  
 12320  // Header returns a http.Header that can be modified by the caller to add
 12321  // headers to the request.
 12322  func (c *FoldersLocationsBucketsDeleteCall) Header() http.Header {
 12323  	if c.header_ == nil {
 12324  		c.header_ = make(http.Header)
 12325  	}
 12326  	return c.header_
 12327  }
 12328  
 12329  func (c *FoldersLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
 12330  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12331  	var body io.Reader = nil
 12332  	c.urlParams_.Set("alt", alt)
 12333  	c.urlParams_.Set("prettyPrint", "false")
 12334  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 12335  	urls += "?" + c.urlParams_.Encode()
 12336  	req, err := http.NewRequest("DELETE", urls, body)
 12337  	if err != nil {
 12338  		return nil, err
 12339  	}
 12340  	req.Header = reqHeaders
 12341  	googleapi.Expand(req.URL, map[string]string{
 12342  		"name": c.name,
 12343  	})
 12344  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12345  }
 12346  
 12347  // Do executes the "logging.folders.locations.buckets.delete" call.
 12348  // Any non-2xx status code is an error. Response headers are in either
 12349  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 12350  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12351  // whether the returned error was because http.StatusNotModified was returned.
 12352  func (c *FoldersLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 12353  	gensupport.SetOptions(c.urlParams_, opts...)
 12354  	res, err := c.doRequest("json")
 12355  	if res != nil && res.StatusCode == http.StatusNotModified {
 12356  		if res.Body != nil {
 12357  			res.Body.Close()
 12358  		}
 12359  		return nil, gensupport.WrapError(&googleapi.Error{
 12360  			Code:   res.StatusCode,
 12361  			Header: res.Header,
 12362  		})
 12363  	}
 12364  	if err != nil {
 12365  		return nil, err
 12366  	}
 12367  	defer googleapi.CloseBody(res)
 12368  	if err := googleapi.CheckResponse(res); err != nil {
 12369  		return nil, gensupport.WrapError(err)
 12370  	}
 12371  	ret := &Empty{
 12372  		ServerResponse: googleapi.ServerResponse{
 12373  			Header:         res.Header,
 12374  			HTTPStatusCode: res.StatusCode,
 12375  		},
 12376  	}
 12377  	target := &ret
 12378  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12379  		return nil, err
 12380  	}
 12381  	return ret, nil
 12382  }
 12383  
 12384  type FoldersLocationsBucketsGetCall struct {
 12385  	s            *Service
 12386  	name         string
 12387  	urlParams_   gensupport.URLParams
 12388  	ifNoneMatch_ string
 12389  	ctx_         context.Context
 12390  	header_      http.Header
 12391  }
 12392  
 12393  // Get: Gets a log bucket.
 12394  //
 12395  //   - name: The resource name of the bucket:
 12396  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 12397  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 12398  //     ]"
 12399  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 12400  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 12401  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 12402  func (r *FoldersLocationsBucketsService) Get(name string) *FoldersLocationsBucketsGetCall {
 12403  	c := &FoldersLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12404  	c.name = name
 12405  	return c
 12406  }
 12407  
 12408  // Fields allows partial responses to be retrieved. See
 12409  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12410  // details.
 12411  func (c *FoldersLocationsBucketsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsGetCall {
 12412  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12413  	return c
 12414  }
 12415  
 12416  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12417  // object's ETag matches the given value. This is useful for getting updates
 12418  // only after the object has changed since the last request.
 12419  func (c *FoldersLocationsBucketsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsGetCall {
 12420  	c.ifNoneMatch_ = entityTag
 12421  	return c
 12422  }
 12423  
 12424  // Context sets the context to be used in this call's Do method.
 12425  func (c *FoldersLocationsBucketsGetCall) Context(ctx context.Context) *FoldersLocationsBucketsGetCall {
 12426  	c.ctx_ = ctx
 12427  	return c
 12428  }
 12429  
 12430  // Header returns a http.Header that can be modified by the caller to add
 12431  // headers to the request.
 12432  func (c *FoldersLocationsBucketsGetCall) Header() http.Header {
 12433  	if c.header_ == nil {
 12434  		c.header_ = make(http.Header)
 12435  	}
 12436  	return c.header_
 12437  }
 12438  
 12439  func (c *FoldersLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
 12440  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12441  	if c.ifNoneMatch_ != "" {
 12442  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12443  	}
 12444  	var body io.Reader = nil
 12445  	c.urlParams_.Set("alt", alt)
 12446  	c.urlParams_.Set("prettyPrint", "false")
 12447  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 12448  	urls += "?" + c.urlParams_.Encode()
 12449  	req, err := http.NewRequest("GET", urls, body)
 12450  	if err != nil {
 12451  		return nil, err
 12452  	}
 12453  	req.Header = reqHeaders
 12454  	googleapi.Expand(req.URL, map[string]string{
 12455  		"name": c.name,
 12456  	})
 12457  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12458  }
 12459  
 12460  // Do executes the "logging.folders.locations.buckets.get" call.
 12461  // Any non-2xx status code is an error. Response headers are in either
 12462  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 12463  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12464  // whether the returned error was because http.StatusNotModified was returned.
 12465  func (c *FoldersLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 12466  	gensupport.SetOptions(c.urlParams_, opts...)
 12467  	res, err := c.doRequest("json")
 12468  	if res != nil && res.StatusCode == http.StatusNotModified {
 12469  		if res.Body != nil {
 12470  			res.Body.Close()
 12471  		}
 12472  		return nil, gensupport.WrapError(&googleapi.Error{
 12473  			Code:   res.StatusCode,
 12474  			Header: res.Header,
 12475  		})
 12476  	}
 12477  	if err != nil {
 12478  		return nil, err
 12479  	}
 12480  	defer googleapi.CloseBody(res)
 12481  	if err := googleapi.CheckResponse(res); err != nil {
 12482  		return nil, gensupport.WrapError(err)
 12483  	}
 12484  	ret := &LogBucket{
 12485  		ServerResponse: googleapi.ServerResponse{
 12486  			Header:         res.Header,
 12487  			HTTPStatusCode: res.StatusCode,
 12488  		},
 12489  	}
 12490  	target := &ret
 12491  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12492  		return nil, err
 12493  	}
 12494  	return ret, nil
 12495  }
 12496  
 12497  type FoldersLocationsBucketsListCall struct {
 12498  	s            *Service
 12499  	parent       string
 12500  	urlParams_   gensupport.URLParams
 12501  	ifNoneMatch_ string
 12502  	ctx_         context.Context
 12503  	header_      http.Header
 12504  }
 12505  
 12506  // List: Lists log buckets.
 12507  //
 12508  //   - parent: The parent resource whose buckets are to be listed:
 12509  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 12510  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 12511  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 12512  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion
 12513  //     of the resource must be specified, but supplying the character - in place
 12514  //     of LOCATION_ID will return all buckets.
 12515  func (r *FoldersLocationsBucketsService) List(parent string) *FoldersLocationsBucketsListCall {
 12516  	c := &FoldersLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12517  	c.parent = parent
 12518  	return c
 12519  }
 12520  
 12521  // PageSize sets the optional parameter "pageSize": The maximum number of
 12522  // results to return from this request. Non-positive values are ignored. The
 12523  // presence of nextPageToken in the response indicates that more results might
 12524  // be available.
 12525  func (c *FoldersLocationsBucketsListCall) PageSize(pageSize int64) *FoldersLocationsBucketsListCall {
 12526  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 12527  	return c
 12528  }
 12529  
 12530  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 12531  // the next batch of results from the preceding call to this method. pageToken
 12532  // must be the value of nextPageToken from the previous response. The values of
 12533  // other method parameters should be identical to those in the previous call.
 12534  func (c *FoldersLocationsBucketsListCall) PageToken(pageToken string) *FoldersLocationsBucketsListCall {
 12535  	c.urlParams_.Set("pageToken", pageToken)
 12536  	return c
 12537  }
 12538  
 12539  // Fields allows partial responses to be retrieved. See
 12540  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12541  // details.
 12542  func (c *FoldersLocationsBucketsListCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsListCall {
 12543  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12544  	return c
 12545  }
 12546  
 12547  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12548  // object's ETag matches the given value. This is useful for getting updates
 12549  // only after the object has changed since the last request.
 12550  func (c *FoldersLocationsBucketsListCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsListCall {
 12551  	c.ifNoneMatch_ = entityTag
 12552  	return c
 12553  }
 12554  
 12555  // Context sets the context to be used in this call's Do method.
 12556  func (c *FoldersLocationsBucketsListCall) Context(ctx context.Context) *FoldersLocationsBucketsListCall {
 12557  	c.ctx_ = ctx
 12558  	return c
 12559  }
 12560  
 12561  // Header returns a http.Header that can be modified by the caller to add
 12562  // headers to the request.
 12563  func (c *FoldersLocationsBucketsListCall) Header() http.Header {
 12564  	if c.header_ == nil {
 12565  		c.header_ = make(http.Header)
 12566  	}
 12567  	return c.header_
 12568  }
 12569  
 12570  func (c *FoldersLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
 12571  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12572  	if c.ifNoneMatch_ != "" {
 12573  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12574  	}
 12575  	var body io.Reader = nil
 12576  	c.urlParams_.Set("alt", alt)
 12577  	c.urlParams_.Set("prettyPrint", "false")
 12578  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
 12579  	urls += "?" + c.urlParams_.Encode()
 12580  	req, err := http.NewRequest("GET", urls, body)
 12581  	if err != nil {
 12582  		return nil, err
 12583  	}
 12584  	req.Header = reqHeaders
 12585  	googleapi.Expand(req.URL, map[string]string{
 12586  		"parent": c.parent,
 12587  	})
 12588  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12589  }
 12590  
 12591  // Do executes the "logging.folders.locations.buckets.list" call.
 12592  // Any non-2xx status code is an error. Response headers are in either
 12593  // *ListBucketsResponse.ServerResponse.Header or (if a response was returned at
 12594  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12595  // check whether the returned error was because http.StatusNotModified was
 12596  // returned.
 12597  func (c *FoldersLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
 12598  	gensupport.SetOptions(c.urlParams_, opts...)
 12599  	res, err := c.doRequest("json")
 12600  	if res != nil && res.StatusCode == http.StatusNotModified {
 12601  		if res.Body != nil {
 12602  			res.Body.Close()
 12603  		}
 12604  		return nil, gensupport.WrapError(&googleapi.Error{
 12605  			Code:   res.StatusCode,
 12606  			Header: res.Header,
 12607  		})
 12608  	}
 12609  	if err != nil {
 12610  		return nil, err
 12611  	}
 12612  	defer googleapi.CloseBody(res)
 12613  	if err := googleapi.CheckResponse(res); err != nil {
 12614  		return nil, gensupport.WrapError(err)
 12615  	}
 12616  	ret := &ListBucketsResponse{
 12617  		ServerResponse: googleapi.ServerResponse{
 12618  			Header:         res.Header,
 12619  			HTTPStatusCode: res.StatusCode,
 12620  		},
 12621  	}
 12622  	target := &ret
 12623  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12624  		return nil, err
 12625  	}
 12626  	return ret, nil
 12627  }
 12628  
 12629  // Pages invokes f for each page of results.
 12630  // A non-nil error returned from f will halt the iteration.
 12631  // The provided context supersedes any context provided to the Context method.
 12632  func (c *FoldersLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
 12633  	c.ctx_ = ctx
 12634  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12635  	for {
 12636  		x, err := c.Do()
 12637  		if err != nil {
 12638  			return err
 12639  		}
 12640  		if err := f(x); err != nil {
 12641  			return err
 12642  		}
 12643  		if x.NextPageToken == "" {
 12644  			return nil
 12645  		}
 12646  		c.PageToken(x.NextPageToken)
 12647  	}
 12648  }
 12649  
 12650  type FoldersLocationsBucketsPatchCall struct {
 12651  	s          *Service
 12652  	name       string
 12653  	logbucket  *LogBucket
 12654  	urlParams_ gensupport.URLParams
 12655  	ctx_       context.Context
 12656  	header_    http.Header
 12657  }
 12658  
 12659  // Patch: Updates a log bucket.If the bucket has a lifecycle_state of
 12660  // DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket
 12661  // has been created, the bucket's location cannot be changed.
 12662  //
 12663  //   - name: The full resource name of the bucket to update.
 12664  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 12665  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 12666  //     ]"
 12667  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 12668  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 12669  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 12670  func (r *FoldersLocationsBucketsService) Patch(name string, logbucket *LogBucket) *FoldersLocationsBucketsPatchCall {
 12671  	c := &FoldersLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12672  	c.name = name
 12673  	c.logbucket = logbucket
 12674  	return c
 12675  }
 12676  
 12677  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
 12678  // that specifies the fields in bucket that need an update. A bucket field will
 12679  // be overwritten if, and only if, it is in the update mask. name and output
 12680  // only fields cannot be updated.For a detailed FieldMask definition, see:
 12681  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 12682  // example: updateMask=retention_days
 12683  func (c *FoldersLocationsBucketsPatchCall) UpdateMask(updateMask string) *FoldersLocationsBucketsPatchCall {
 12684  	c.urlParams_.Set("updateMask", updateMask)
 12685  	return c
 12686  }
 12687  
 12688  // Fields allows partial responses to be retrieved. See
 12689  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12690  // details.
 12691  func (c *FoldersLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsPatchCall {
 12692  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12693  	return c
 12694  }
 12695  
 12696  // Context sets the context to be used in this call's Do method.
 12697  func (c *FoldersLocationsBucketsPatchCall) Context(ctx context.Context) *FoldersLocationsBucketsPatchCall {
 12698  	c.ctx_ = ctx
 12699  	return c
 12700  }
 12701  
 12702  // Header returns a http.Header that can be modified by the caller to add
 12703  // headers to the request.
 12704  func (c *FoldersLocationsBucketsPatchCall) Header() http.Header {
 12705  	if c.header_ == nil {
 12706  		c.header_ = make(http.Header)
 12707  	}
 12708  	return c.header_
 12709  }
 12710  
 12711  func (c *FoldersLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
 12712  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12713  	var body io.Reader = nil
 12714  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 12715  	if err != nil {
 12716  		return nil, err
 12717  	}
 12718  	c.urlParams_.Set("alt", alt)
 12719  	c.urlParams_.Set("prettyPrint", "false")
 12720  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 12721  	urls += "?" + c.urlParams_.Encode()
 12722  	req, err := http.NewRequest("PATCH", urls, body)
 12723  	if err != nil {
 12724  		return nil, err
 12725  	}
 12726  	req.Header = reqHeaders
 12727  	googleapi.Expand(req.URL, map[string]string{
 12728  		"name": c.name,
 12729  	})
 12730  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12731  }
 12732  
 12733  // Do executes the "logging.folders.locations.buckets.patch" call.
 12734  // Any non-2xx status code is an error. Response headers are in either
 12735  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 12736  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12737  // whether the returned error was because http.StatusNotModified was returned.
 12738  func (c *FoldersLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 12739  	gensupport.SetOptions(c.urlParams_, opts...)
 12740  	res, err := c.doRequest("json")
 12741  	if res != nil && res.StatusCode == http.StatusNotModified {
 12742  		if res.Body != nil {
 12743  			res.Body.Close()
 12744  		}
 12745  		return nil, gensupport.WrapError(&googleapi.Error{
 12746  			Code:   res.StatusCode,
 12747  			Header: res.Header,
 12748  		})
 12749  	}
 12750  	if err != nil {
 12751  		return nil, err
 12752  	}
 12753  	defer googleapi.CloseBody(res)
 12754  	if err := googleapi.CheckResponse(res); err != nil {
 12755  		return nil, gensupport.WrapError(err)
 12756  	}
 12757  	ret := &LogBucket{
 12758  		ServerResponse: googleapi.ServerResponse{
 12759  			Header:         res.Header,
 12760  			HTTPStatusCode: res.StatusCode,
 12761  		},
 12762  	}
 12763  	target := &ret
 12764  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12765  		return nil, err
 12766  	}
 12767  	return ret, nil
 12768  }
 12769  
 12770  type FoldersLocationsBucketsUndeleteCall struct {
 12771  	s                     *Service
 12772  	name                  string
 12773  	undeletebucketrequest *UndeleteBucketRequest
 12774  	urlParams_            gensupport.URLParams
 12775  	ctx_                  context.Context
 12776  	header_               http.Header
 12777  }
 12778  
 12779  // Undelete: Undeletes a log bucket. A bucket that has been deleted can be
 12780  // undeleted within the grace period of 7 days.
 12781  //
 12782  //   - name: The full resource name of the bucket to undelete.
 12783  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 12784  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 12785  //     ]"
 12786  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 12787  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 12788  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 12789  func (r *FoldersLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *FoldersLocationsBucketsUndeleteCall {
 12790  	c := &FoldersLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12791  	c.name = name
 12792  	c.undeletebucketrequest = undeletebucketrequest
 12793  	return c
 12794  }
 12795  
 12796  // Fields allows partial responses to be retrieved. See
 12797  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12798  // details.
 12799  func (c *FoldersLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsUndeleteCall {
 12800  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12801  	return c
 12802  }
 12803  
 12804  // Context sets the context to be used in this call's Do method.
 12805  func (c *FoldersLocationsBucketsUndeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsUndeleteCall {
 12806  	c.ctx_ = ctx
 12807  	return c
 12808  }
 12809  
 12810  // Header returns a http.Header that can be modified by the caller to add
 12811  // headers to the request.
 12812  func (c *FoldersLocationsBucketsUndeleteCall) Header() http.Header {
 12813  	if c.header_ == nil {
 12814  		c.header_ = make(http.Header)
 12815  	}
 12816  	return c.header_
 12817  }
 12818  
 12819  func (c *FoldersLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
 12820  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12821  	var body io.Reader = nil
 12822  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
 12823  	if err != nil {
 12824  		return nil, err
 12825  	}
 12826  	c.urlParams_.Set("alt", alt)
 12827  	c.urlParams_.Set("prettyPrint", "false")
 12828  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
 12829  	urls += "?" + c.urlParams_.Encode()
 12830  	req, err := http.NewRequest("POST", urls, body)
 12831  	if err != nil {
 12832  		return nil, err
 12833  	}
 12834  	req.Header = reqHeaders
 12835  	googleapi.Expand(req.URL, map[string]string{
 12836  		"name": c.name,
 12837  	})
 12838  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12839  }
 12840  
 12841  // Do executes the "logging.folders.locations.buckets.undelete" call.
 12842  // Any non-2xx status code is an error. Response headers are in either
 12843  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 12844  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12845  // whether the returned error was because http.StatusNotModified was returned.
 12846  func (c *FoldersLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 12847  	gensupport.SetOptions(c.urlParams_, opts...)
 12848  	res, err := c.doRequest("json")
 12849  	if res != nil && res.StatusCode == http.StatusNotModified {
 12850  		if res.Body != nil {
 12851  			res.Body.Close()
 12852  		}
 12853  		return nil, gensupport.WrapError(&googleapi.Error{
 12854  			Code:   res.StatusCode,
 12855  			Header: res.Header,
 12856  		})
 12857  	}
 12858  	if err != nil {
 12859  		return nil, err
 12860  	}
 12861  	defer googleapi.CloseBody(res)
 12862  	if err := googleapi.CheckResponse(res); err != nil {
 12863  		return nil, gensupport.WrapError(err)
 12864  	}
 12865  	ret := &Empty{
 12866  		ServerResponse: googleapi.ServerResponse{
 12867  			Header:         res.Header,
 12868  			HTTPStatusCode: res.StatusCode,
 12869  		},
 12870  	}
 12871  	target := &ret
 12872  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12873  		return nil, err
 12874  	}
 12875  	return ret, nil
 12876  }
 12877  
 12878  type FoldersLocationsBucketsUpdateAsyncCall struct {
 12879  	s          *Service
 12880  	name       string
 12881  	logbucket  *LogBucket
 12882  	urlParams_ gensupport.URLParams
 12883  	ctx_       context.Context
 12884  	header_    http.Header
 12885  }
 12886  
 12887  // UpdateAsync: Updates a log bucket asynchronously.If the bucket has a
 12888  // lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be
 12889  // returned.After a bucket has been created, the bucket's location cannot be
 12890  // changed.
 12891  //
 12892  //   - name: The full resource name of the bucket to update.
 12893  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 12894  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 12895  //     ]"
 12896  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 12897  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 12898  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 12899  func (r *FoldersLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *FoldersLocationsBucketsUpdateAsyncCall {
 12900  	c := &FoldersLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12901  	c.name = name
 12902  	c.logbucket = logbucket
 12903  	return c
 12904  }
 12905  
 12906  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
 12907  // that specifies the fields in bucket that need an update. A bucket field will
 12908  // be overwritten if, and only if, it is in the update mask. name and output
 12909  // only fields cannot be updated.For a detailed FieldMask definition, see:
 12910  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 12911  // example: updateMask=retention_days
 12912  func (c *FoldersLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *FoldersLocationsBucketsUpdateAsyncCall {
 12913  	c.urlParams_.Set("updateMask", updateMask)
 12914  	return c
 12915  }
 12916  
 12917  // Fields allows partial responses to be retrieved. See
 12918  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12919  // details.
 12920  func (c *FoldersLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsUpdateAsyncCall {
 12921  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12922  	return c
 12923  }
 12924  
 12925  // Context sets the context to be used in this call's Do method.
 12926  func (c *FoldersLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *FoldersLocationsBucketsUpdateAsyncCall {
 12927  	c.ctx_ = ctx
 12928  	return c
 12929  }
 12930  
 12931  // Header returns a http.Header that can be modified by the caller to add
 12932  // headers to the request.
 12933  func (c *FoldersLocationsBucketsUpdateAsyncCall) Header() http.Header {
 12934  	if c.header_ == nil {
 12935  		c.header_ = make(http.Header)
 12936  	}
 12937  	return c.header_
 12938  }
 12939  
 12940  func (c *FoldersLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) {
 12941  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12942  	var body io.Reader = nil
 12943  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 12944  	if err != nil {
 12945  		return nil, err
 12946  	}
 12947  	c.urlParams_.Set("alt", alt)
 12948  	c.urlParams_.Set("prettyPrint", "false")
 12949  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync")
 12950  	urls += "?" + c.urlParams_.Encode()
 12951  	req, err := http.NewRequest("POST", urls, body)
 12952  	if err != nil {
 12953  		return nil, err
 12954  	}
 12955  	req.Header = reqHeaders
 12956  	googleapi.Expand(req.URL, map[string]string{
 12957  		"name": c.name,
 12958  	})
 12959  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12960  }
 12961  
 12962  // Do executes the "logging.folders.locations.buckets.updateAsync" call.
 12963  // Any non-2xx status code is an error. Response headers are in either
 12964  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12965  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12966  // whether the returned error was because http.StatusNotModified was returned.
 12967  func (c *FoldersLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12968  	gensupport.SetOptions(c.urlParams_, opts...)
 12969  	res, err := c.doRequest("json")
 12970  	if res != nil && res.StatusCode == http.StatusNotModified {
 12971  		if res.Body != nil {
 12972  			res.Body.Close()
 12973  		}
 12974  		return nil, gensupport.WrapError(&googleapi.Error{
 12975  			Code:   res.StatusCode,
 12976  			Header: res.Header,
 12977  		})
 12978  	}
 12979  	if err != nil {
 12980  		return nil, err
 12981  	}
 12982  	defer googleapi.CloseBody(res)
 12983  	if err := googleapi.CheckResponse(res); err != nil {
 12984  		return nil, gensupport.WrapError(err)
 12985  	}
 12986  	ret := &Operation{
 12987  		ServerResponse: googleapi.ServerResponse{
 12988  			Header:         res.Header,
 12989  			HTTPStatusCode: res.StatusCode,
 12990  		},
 12991  	}
 12992  	target := &ret
 12993  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12994  		return nil, err
 12995  	}
 12996  	return ret, nil
 12997  }
 12998  
 12999  type FoldersLocationsBucketsLinksCreateCall struct {
 13000  	s          *Service
 13001  	parent     string
 13002  	link       *Link
 13003  	urlParams_ gensupport.URLParams
 13004  	ctx_       context.Context
 13005  	header_    http.Header
 13006  }
 13007  
 13008  // Create: Asynchronously creates a linked dataset in BigQuery which makes it
 13009  // possible to use BigQuery to read the logs stored in the log bucket. A log
 13010  // bucket may currently only contain one link.
 13011  //
 13012  //   - parent: The full resource name of the bucket to create a link for.
 13013  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 13014  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 13015  //     ]"
 13016  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 13017  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 13018  func (r *FoldersLocationsBucketsLinksService) Create(parent string, link *Link) *FoldersLocationsBucketsLinksCreateCall {
 13019  	c := &FoldersLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13020  	c.parent = parent
 13021  	c.link = link
 13022  	return c
 13023  }
 13024  
 13025  // LinkId sets the optional parameter "linkId": Required. The ID to use for the
 13026  // link. The link_id can have up to 100 characters. A valid link_id must only
 13027  // have alphanumeric characters and underscores within it.
 13028  func (c *FoldersLocationsBucketsLinksCreateCall) LinkId(linkId string) *FoldersLocationsBucketsLinksCreateCall {
 13029  	c.urlParams_.Set("linkId", linkId)
 13030  	return c
 13031  }
 13032  
 13033  // Fields allows partial responses to be retrieved. See
 13034  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13035  // details.
 13036  func (c *FoldersLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsLinksCreateCall {
 13037  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13038  	return c
 13039  }
 13040  
 13041  // Context sets the context to be used in this call's Do method.
 13042  func (c *FoldersLocationsBucketsLinksCreateCall) Context(ctx context.Context) *FoldersLocationsBucketsLinksCreateCall {
 13043  	c.ctx_ = ctx
 13044  	return c
 13045  }
 13046  
 13047  // Header returns a http.Header that can be modified by the caller to add
 13048  // headers to the request.
 13049  func (c *FoldersLocationsBucketsLinksCreateCall) Header() http.Header {
 13050  	if c.header_ == nil {
 13051  		c.header_ = make(http.Header)
 13052  	}
 13053  	return c.header_
 13054  }
 13055  
 13056  func (c *FoldersLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
 13057  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13058  	var body io.Reader = nil
 13059  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
 13060  	if err != nil {
 13061  		return nil, err
 13062  	}
 13063  	c.urlParams_.Set("alt", alt)
 13064  	c.urlParams_.Set("prettyPrint", "false")
 13065  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
 13066  	urls += "?" + c.urlParams_.Encode()
 13067  	req, err := http.NewRequest("POST", urls, body)
 13068  	if err != nil {
 13069  		return nil, err
 13070  	}
 13071  	req.Header = reqHeaders
 13072  	googleapi.Expand(req.URL, map[string]string{
 13073  		"parent": c.parent,
 13074  	})
 13075  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13076  }
 13077  
 13078  // Do executes the "logging.folders.locations.buckets.links.create" call.
 13079  // Any non-2xx status code is an error. Response headers are in either
 13080  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 13081  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13082  // whether the returned error was because http.StatusNotModified was returned.
 13083  func (c *FoldersLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 13084  	gensupport.SetOptions(c.urlParams_, opts...)
 13085  	res, err := c.doRequest("json")
 13086  	if res != nil && res.StatusCode == http.StatusNotModified {
 13087  		if res.Body != nil {
 13088  			res.Body.Close()
 13089  		}
 13090  		return nil, gensupport.WrapError(&googleapi.Error{
 13091  			Code:   res.StatusCode,
 13092  			Header: res.Header,
 13093  		})
 13094  	}
 13095  	if err != nil {
 13096  		return nil, err
 13097  	}
 13098  	defer googleapi.CloseBody(res)
 13099  	if err := googleapi.CheckResponse(res); err != nil {
 13100  		return nil, gensupport.WrapError(err)
 13101  	}
 13102  	ret := &Operation{
 13103  		ServerResponse: googleapi.ServerResponse{
 13104  			Header:         res.Header,
 13105  			HTTPStatusCode: res.StatusCode,
 13106  		},
 13107  	}
 13108  	target := &ret
 13109  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13110  		return nil, err
 13111  	}
 13112  	return ret, nil
 13113  }
 13114  
 13115  type FoldersLocationsBucketsLinksDeleteCall struct {
 13116  	s          *Service
 13117  	name       string
 13118  	urlParams_ gensupport.URLParams
 13119  	ctx_       context.Context
 13120  	header_    http.Header
 13121  }
 13122  
 13123  // Delete: Deletes a link. This will also delete the corresponding BigQuery
 13124  // linked dataset.
 13125  //
 13126  //   - name: The full resource name of the link to delete.
 13127  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L
 13128  //     INK_ID]"
 13129  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 13130  //     ]/links/[LINK_ID]"
 13131  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 13132  //     ET_ID]/links/[LINK_ID]"
 13133  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
 13134  //     K_ID]".
 13135  func (r *FoldersLocationsBucketsLinksService) Delete(name string) *FoldersLocationsBucketsLinksDeleteCall {
 13136  	c := &FoldersLocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13137  	c.name = name
 13138  	return c
 13139  }
 13140  
 13141  // Fields allows partial responses to be retrieved. See
 13142  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13143  // details.
 13144  func (c *FoldersLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsLinksDeleteCall {
 13145  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13146  	return c
 13147  }
 13148  
 13149  // Context sets the context to be used in this call's Do method.
 13150  func (c *FoldersLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsLinksDeleteCall {
 13151  	c.ctx_ = ctx
 13152  	return c
 13153  }
 13154  
 13155  // Header returns a http.Header that can be modified by the caller to add
 13156  // headers to the request.
 13157  func (c *FoldersLocationsBucketsLinksDeleteCall) Header() http.Header {
 13158  	if c.header_ == nil {
 13159  		c.header_ = make(http.Header)
 13160  	}
 13161  	return c.header_
 13162  }
 13163  
 13164  func (c *FoldersLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 13165  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13166  	var body io.Reader = nil
 13167  	c.urlParams_.Set("alt", alt)
 13168  	c.urlParams_.Set("prettyPrint", "false")
 13169  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 13170  	urls += "?" + c.urlParams_.Encode()
 13171  	req, err := http.NewRequest("DELETE", urls, body)
 13172  	if err != nil {
 13173  		return nil, err
 13174  	}
 13175  	req.Header = reqHeaders
 13176  	googleapi.Expand(req.URL, map[string]string{
 13177  		"name": c.name,
 13178  	})
 13179  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13180  }
 13181  
 13182  // Do executes the "logging.folders.locations.buckets.links.delete" call.
 13183  // Any non-2xx status code is an error. Response headers are in either
 13184  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 13185  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13186  // whether the returned error was because http.StatusNotModified was returned.
 13187  func (c *FoldersLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 13188  	gensupport.SetOptions(c.urlParams_, opts...)
 13189  	res, err := c.doRequest("json")
 13190  	if res != nil && res.StatusCode == http.StatusNotModified {
 13191  		if res.Body != nil {
 13192  			res.Body.Close()
 13193  		}
 13194  		return nil, gensupport.WrapError(&googleapi.Error{
 13195  			Code:   res.StatusCode,
 13196  			Header: res.Header,
 13197  		})
 13198  	}
 13199  	if err != nil {
 13200  		return nil, err
 13201  	}
 13202  	defer googleapi.CloseBody(res)
 13203  	if err := googleapi.CheckResponse(res); err != nil {
 13204  		return nil, gensupport.WrapError(err)
 13205  	}
 13206  	ret := &Operation{
 13207  		ServerResponse: googleapi.ServerResponse{
 13208  			Header:         res.Header,
 13209  			HTTPStatusCode: res.StatusCode,
 13210  		},
 13211  	}
 13212  	target := &ret
 13213  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13214  		return nil, err
 13215  	}
 13216  	return ret, nil
 13217  }
 13218  
 13219  type FoldersLocationsBucketsLinksGetCall struct {
 13220  	s            *Service
 13221  	name         string
 13222  	urlParams_   gensupport.URLParams
 13223  	ifNoneMatch_ string
 13224  	ctx_         context.Context
 13225  	header_      http.Header
 13226  }
 13227  
 13228  // Get: Gets a link.
 13229  //
 13230  //   - name: The resource name of the link:
 13231  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L
 13232  //     INK_ID]"
 13233  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 13234  //     ]/links/[LINK_ID]"
 13235  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 13236  //     ET_ID]/links/[LINK_ID]"
 13237  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
 13238  //     K_ID]".
 13239  func (r *FoldersLocationsBucketsLinksService) Get(name string) *FoldersLocationsBucketsLinksGetCall {
 13240  	c := &FoldersLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13241  	c.name = name
 13242  	return c
 13243  }
 13244  
 13245  // Fields allows partial responses to be retrieved. See
 13246  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13247  // details.
 13248  func (c *FoldersLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsLinksGetCall {
 13249  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13250  	return c
 13251  }
 13252  
 13253  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13254  // object's ETag matches the given value. This is useful for getting updates
 13255  // only after the object has changed since the last request.
 13256  func (c *FoldersLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsLinksGetCall {
 13257  	c.ifNoneMatch_ = entityTag
 13258  	return c
 13259  }
 13260  
 13261  // Context sets the context to be used in this call's Do method.
 13262  func (c *FoldersLocationsBucketsLinksGetCall) Context(ctx context.Context) *FoldersLocationsBucketsLinksGetCall {
 13263  	c.ctx_ = ctx
 13264  	return c
 13265  }
 13266  
 13267  // Header returns a http.Header that can be modified by the caller to add
 13268  // headers to the request.
 13269  func (c *FoldersLocationsBucketsLinksGetCall) Header() http.Header {
 13270  	if c.header_ == nil {
 13271  		c.header_ = make(http.Header)
 13272  	}
 13273  	return c.header_
 13274  }
 13275  
 13276  func (c *FoldersLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) {
 13277  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13278  	if c.ifNoneMatch_ != "" {
 13279  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13280  	}
 13281  	var body io.Reader = nil
 13282  	c.urlParams_.Set("alt", alt)
 13283  	c.urlParams_.Set("prettyPrint", "false")
 13284  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 13285  	urls += "?" + c.urlParams_.Encode()
 13286  	req, err := http.NewRequest("GET", urls, body)
 13287  	if err != nil {
 13288  		return nil, err
 13289  	}
 13290  	req.Header = reqHeaders
 13291  	googleapi.Expand(req.URL, map[string]string{
 13292  		"name": c.name,
 13293  	})
 13294  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13295  }
 13296  
 13297  // Do executes the "logging.folders.locations.buckets.links.get" call.
 13298  // Any non-2xx status code is an error. Response headers are in either
 13299  // *Link.ServerResponse.Header or (if a response was returned at all) in
 13300  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13301  // whether the returned error was because http.StatusNotModified was returned.
 13302  func (c *FoldersLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) {
 13303  	gensupport.SetOptions(c.urlParams_, opts...)
 13304  	res, err := c.doRequest("json")
 13305  	if res != nil && res.StatusCode == http.StatusNotModified {
 13306  		if res.Body != nil {
 13307  			res.Body.Close()
 13308  		}
 13309  		return nil, gensupport.WrapError(&googleapi.Error{
 13310  			Code:   res.StatusCode,
 13311  			Header: res.Header,
 13312  		})
 13313  	}
 13314  	if err != nil {
 13315  		return nil, err
 13316  	}
 13317  	defer googleapi.CloseBody(res)
 13318  	if err := googleapi.CheckResponse(res); err != nil {
 13319  		return nil, gensupport.WrapError(err)
 13320  	}
 13321  	ret := &Link{
 13322  		ServerResponse: googleapi.ServerResponse{
 13323  			Header:         res.Header,
 13324  			HTTPStatusCode: res.StatusCode,
 13325  		},
 13326  	}
 13327  	target := &ret
 13328  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13329  		return nil, err
 13330  	}
 13331  	return ret, nil
 13332  }
 13333  
 13334  type FoldersLocationsBucketsLinksListCall struct {
 13335  	s            *Service
 13336  	parent       string
 13337  	urlParams_   gensupport.URLParams
 13338  	ifNoneMatch_ string
 13339  	ctx_         context.Context
 13340  	header_      http.Header
 13341  }
 13342  
 13343  // List: Lists links.
 13344  //
 13345  //   - parent: The parent resource whose links are to be listed:
 13346  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 13347  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 13348  //     ]"
 13349  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 13350  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 13351  func (r *FoldersLocationsBucketsLinksService) List(parent string) *FoldersLocationsBucketsLinksListCall {
 13352  	c := &FoldersLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13353  	c.parent = parent
 13354  	return c
 13355  }
 13356  
 13357  // PageSize sets the optional parameter "pageSize": The maximum number of
 13358  // results to return from this request.
 13359  func (c *FoldersLocationsBucketsLinksListCall) PageSize(pageSize int64) *FoldersLocationsBucketsLinksListCall {
 13360  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 13361  	return c
 13362  }
 13363  
 13364  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 13365  // the next batch of results from the preceding call to this method. pageToken
 13366  // must be the value of nextPageToken from the previous response.
 13367  func (c *FoldersLocationsBucketsLinksListCall) PageToken(pageToken string) *FoldersLocationsBucketsLinksListCall {
 13368  	c.urlParams_.Set("pageToken", pageToken)
 13369  	return c
 13370  }
 13371  
 13372  // Fields allows partial responses to be retrieved. See
 13373  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13374  // details.
 13375  func (c *FoldersLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsLinksListCall {
 13376  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13377  	return c
 13378  }
 13379  
 13380  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13381  // object's ETag matches the given value. This is useful for getting updates
 13382  // only after the object has changed since the last request.
 13383  func (c *FoldersLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsLinksListCall {
 13384  	c.ifNoneMatch_ = entityTag
 13385  	return c
 13386  }
 13387  
 13388  // Context sets the context to be used in this call's Do method.
 13389  func (c *FoldersLocationsBucketsLinksListCall) Context(ctx context.Context) *FoldersLocationsBucketsLinksListCall {
 13390  	c.ctx_ = ctx
 13391  	return c
 13392  }
 13393  
 13394  // Header returns a http.Header that can be modified by the caller to add
 13395  // headers to the request.
 13396  func (c *FoldersLocationsBucketsLinksListCall) Header() http.Header {
 13397  	if c.header_ == nil {
 13398  		c.header_ = make(http.Header)
 13399  	}
 13400  	return c.header_
 13401  }
 13402  
 13403  func (c *FoldersLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) {
 13404  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13405  	if c.ifNoneMatch_ != "" {
 13406  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13407  	}
 13408  	var body io.Reader = nil
 13409  	c.urlParams_.Set("alt", alt)
 13410  	c.urlParams_.Set("prettyPrint", "false")
 13411  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
 13412  	urls += "?" + c.urlParams_.Encode()
 13413  	req, err := http.NewRequest("GET", urls, body)
 13414  	if err != nil {
 13415  		return nil, err
 13416  	}
 13417  	req.Header = reqHeaders
 13418  	googleapi.Expand(req.URL, map[string]string{
 13419  		"parent": c.parent,
 13420  	})
 13421  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13422  }
 13423  
 13424  // Do executes the "logging.folders.locations.buckets.links.list" call.
 13425  // Any non-2xx status code is an error. Response headers are in either
 13426  // *ListLinksResponse.ServerResponse.Header or (if a response was returned at
 13427  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 13428  // check whether the returned error was because http.StatusNotModified was
 13429  // returned.
 13430  func (c *FoldersLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) {
 13431  	gensupport.SetOptions(c.urlParams_, opts...)
 13432  	res, err := c.doRequest("json")
 13433  	if res != nil && res.StatusCode == http.StatusNotModified {
 13434  		if res.Body != nil {
 13435  			res.Body.Close()
 13436  		}
 13437  		return nil, gensupport.WrapError(&googleapi.Error{
 13438  			Code:   res.StatusCode,
 13439  			Header: res.Header,
 13440  		})
 13441  	}
 13442  	if err != nil {
 13443  		return nil, err
 13444  	}
 13445  	defer googleapi.CloseBody(res)
 13446  	if err := googleapi.CheckResponse(res); err != nil {
 13447  		return nil, gensupport.WrapError(err)
 13448  	}
 13449  	ret := &ListLinksResponse{
 13450  		ServerResponse: googleapi.ServerResponse{
 13451  			Header:         res.Header,
 13452  			HTTPStatusCode: res.StatusCode,
 13453  		},
 13454  	}
 13455  	target := &ret
 13456  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13457  		return nil, err
 13458  	}
 13459  	return ret, nil
 13460  }
 13461  
 13462  // Pages invokes f for each page of results.
 13463  // A non-nil error returned from f will halt the iteration.
 13464  // The provided context supersedes any context provided to the Context method.
 13465  func (c *FoldersLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error {
 13466  	c.ctx_ = ctx
 13467  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 13468  	for {
 13469  		x, err := c.Do()
 13470  		if err != nil {
 13471  			return err
 13472  		}
 13473  		if err := f(x); err != nil {
 13474  			return err
 13475  		}
 13476  		if x.NextPageToken == "" {
 13477  			return nil
 13478  		}
 13479  		c.PageToken(x.NextPageToken)
 13480  	}
 13481  }
 13482  
 13483  type FoldersLocationsBucketsViewsCreateCall struct {
 13484  	s          *Service
 13485  	parent     string
 13486  	logview    *LogView
 13487  	urlParams_ gensupport.URLParams
 13488  	ctx_       context.Context
 13489  	header_    http.Header
 13490  }
 13491  
 13492  // Create: Creates a view over log entries in a log bucket. A bucket may
 13493  // contain a maximum of 30 views.
 13494  //
 13495  //   - parent: The bucket in which to create the view
 13496  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For
 13497  //     example:"projects/my-project/locations/global/buckets/my-bucket".
 13498  func (r *FoldersLocationsBucketsViewsService) Create(parent string, logview *LogView) *FoldersLocationsBucketsViewsCreateCall {
 13499  	c := &FoldersLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13500  	c.parent = parent
 13501  	c.logview = logview
 13502  	return c
 13503  }
 13504  
 13505  // ViewId sets the optional parameter "viewId": Required. A client-assigned
 13506  // identifier such as "my-view". Identifiers are limited to 100 characters and
 13507  // can include only letters, digits, underscores, hyphens, and periods.
 13508  func (c *FoldersLocationsBucketsViewsCreateCall) ViewId(viewId string) *FoldersLocationsBucketsViewsCreateCall {
 13509  	c.urlParams_.Set("viewId", viewId)
 13510  	return c
 13511  }
 13512  
 13513  // Fields allows partial responses to be retrieved. See
 13514  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13515  // details.
 13516  func (c *FoldersLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsCreateCall {
 13517  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13518  	return c
 13519  }
 13520  
 13521  // Context sets the context to be used in this call's Do method.
 13522  func (c *FoldersLocationsBucketsViewsCreateCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsCreateCall {
 13523  	c.ctx_ = ctx
 13524  	return c
 13525  }
 13526  
 13527  // Header returns a http.Header that can be modified by the caller to add
 13528  // headers to the request.
 13529  func (c *FoldersLocationsBucketsViewsCreateCall) Header() http.Header {
 13530  	if c.header_ == nil {
 13531  		c.header_ = make(http.Header)
 13532  	}
 13533  	return c.header_
 13534  }
 13535  
 13536  func (c *FoldersLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
 13537  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13538  	var body io.Reader = nil
 13539  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
 13540  	if err != nil {
 13541  		return nil, err
 13542  	}
 13543  	c.urlParams_.Set("alt", alt)
 13544  	c.urlParams_.Set("prettyPrint", "false")
 13545  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
 13546  	urls += "?" + c.urlParams_.Encode()
 13547  	req, err := http.NewRequest("POST", urls, body)
 13548  	if err != nil {
 13549  		return nil, err
 13550  	}
 13551  	req.Header = reqHeaders
 13552  	googleapi.Expand(req.URL, map[string]string{
 13553  		"parent": c.parent,
 13554  	})
 13555  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13556  }
 13557  
 13558  // Do executes the "logging.folders.locations.buckets.views.create" call.
 13559  // Any non-2xx status code is an error. Response headers are in either
 13560  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 13561  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13562  // whether the returned error was because http.StatusNotModified was returned.
 13563  func (c *FoldersLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 13564  	gensupport.SetOptions(c.urlParams_, opts...)
 13565  	res, err := c.doRequest("json")
 13566  	if res != nil && res.StatusCode == http.StatusNotModified {
 13567  		if res.Body != nil {
 13568  			res.Body.Close()
 13569  		}
 13570  		return nil, gensupport.WrapError(&googleapi.Error{
 13571  			Code:   res.StatusCode,
 13572  			Header: res.Header,
 13573  		})
 13574  	}
 13575  	if err != nil {
 13576  		return nil, err
 13577  	}
 13578  	defer googleapi.CloseBody(res)
 13579  	if err := googleapi.CheckResponse(res); err != nil {
 13580  		return nil, gensupport.WrapError(err)
 13581  	}
 13582  	ret := &LogView{
 13583  		ServerResponse: googleapi.ServerResponse{
 13584  			Header:         res.Header,
 13585  			HTTPStatusCode: res.StatusCode,
 13586  		},
 13587  	}
 13588  	target := &ret
 13589  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13590  		return nil, err
 13591  	}
 13592  	return ret, nil
 13593  }
 13594  
 13595  type FoldersLocationsBucketsViewsDeleteCall struct {
 13596  	s          *Service
 13597  	name       string
 13598  	urlParams_ gensupport.URLParams
 13599  	ctx_       context.Context
 13600  	header_    http.Header
 13601  }
 13602  
 13603  // Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned,
 13604  // this indicates that system is not in a state where it can delete the view.
 13605  // If this occurs, please try again in a few minutes.
 13606  //
 13607  //   - name: The full resource name of the view to delete:
 13608  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 13609  //     IEW_ID]" For
 13610  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 13611  //     ew".
 13612  func (r *FoldersLocationsBucketsViewsService) Delete(name string) *FoldersLocationsBucketsViewsDeleteCall {
 13613  	c := &FoldersLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13614  	c.name = name
 13615  	return c
 13616  }
 13617  
 13618  // Fields allows partial responses to be retrieved. See
 13619  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13620  // details.
 13621  func (c *FoldersLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsDeleteCall {
 13622  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13623  	return c
 13624  }
 13625  
 13626  // Context sets the context to be used in this call's Do method.
 13627  func (c *FoldersLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsDeleteCall {
 13628  	c.ctx_ = ctx
 13629  	return c
 13630  }
 13631  
 13632  // Header returns a http.Header that can be modified by the caller to add
 13633  // headers to the request.
 13634  func (c *FoldersLocationsBucketsViewsDeleteCall) Header() http.Header {
 13635  	if c.header_ == nil {
 13636  		c.header_ = make(http.Header)
 13637  	}
 13638  	return c.header_
 13639  }
 13640  
 13641  func (c *FoldersLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
 13642  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13643  	var body io.Reader = nil
 13644  	c.urlParams_.Set("alt", alt)
 13645  	c.urlParams_.Set("prettyPrint", "false")
 13646  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 13647  	urls += "?" + c.urlParams_.Encode()
 13648  	req, err := http.NewRequest("DELETE", urls, body)
 13649  	if err != nil {
 13650  		return nil, err
 13651  	}
 13652  	req.Header = reqHeaders
 13653  	googleapi.Expand(req.URL, map[string]string{
 13654  		"name": c.name,
 13655  	})
 13656  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13657  }
 13658  
 13659  // Do executes the "logging.folders.locations.buckets.views.delete" call.
 13660  // Any non-2xx status code is an error. Response headers are in either
 13661  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 13662  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13663  // whether the returned error was because http.StatusNotModified was returned.
 13664  func (c *FoldersLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 13665  	gensupport.SetOptions(c.urlParams_, opts...)
 13666  	res, err := c.doRequest("json")
 13667  	if res != nil && res.StatusCode == http.StatusNotModified {
 13668  		if res.Body != nil {
 13669  			res.Body.Close()
 13670  		}
 13671  		return nil, gensupport.WrapError(&googleapi.Error{
 13672  			Code:   res.StatusCode,
 13673  			Header: res.Header,
 13674  		})
 13675  	}
 13676  	if err != nil {
 13677  		return nil, err
 13678  	}
 13679  	defer googleapi.CloseBody(res)
 13680  	if err := googleapi.CheckResponse(res); err != nil {
 13681  		return nil, gensupport.WrapError(err)
 13682  	}
 13683  	ret := &Empty{
 13684  		ServerResponse: googleapi.ServerResponse{
 13685  			Header:         res.Header,
 13686  			HTTPStatusCode: res.StatusCode,
 13687  		},
 13688  	}
 13689  	target := &ret
 13690  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13691  		return nil, err
 13692  	}
 13693  	return ret, nil
 13694  }
 13695  
 13696  type FoldersLocationsBucketsViewsGetCall struct {
 13697  	s            *Service
 13698  	name         string
 13699  	urlParams_   gensupport.URLParams
 13700  	ifNoneMatch_ string
 13701  	ctx_         context.Context
 13702  	header_      http.Header
 13703  }
 13704  
 13705  // Get: Gets a view on a log bucket.
 13706  //
 13707  //   - name: The resource name of the policy:
 13708  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 13709  //     IEW_ID]" For
 13710  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 13711  //     ew".
 13712  func (r *FoldersLocationsBucketsViewsService) Get(name string) *FoldersLocationsBucketsViewsGetCall {
 13713  	c := &FoldersLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13714  	c.name = name
 13715  	return c
 13716  }
 13717  
 13718  // Fields allows partial responses to be retrieved. See
 13719  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13720  // details.
 13721  func (c *FoldersLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsGetCall {
 13722  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13723  	return c
 13724  }
 13725  
 13726  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13727  // object's ETag matches the given value. This is useful for getting updates
 13728  // only after the object has changed since the last request.
 13729  func (c *FoldersLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsViewsGetCall {
 13730  	c.ifNoneMatch_ = entityTag
 13731  	return c
 13732  }
 13733  
 13734  // Context sets the context to be used in this call's Do method.
 13735  func (c *FoldersLocationsBucketsViewsGetCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsGetCall {
 13736  	c.ctx_ = ctx
 13737  	return c
 13738  }
 13739  
 13740  // Header returns a http.Header that can be modified by the caller to add
 13741  // headers to the request.
 13742  func (c *FoldersLocationsBucketsViewsGetCall) Header() http.Header {
 13743  	if c.header_ == nil {
 13744  		c.header_ = make(http.Header)
 13745  	}
 13746  	return c.header_
 13747  }
 13748  
 13749  func (c *FoldersLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
 13750  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13751  	if c.ifNoneMatch_ != "" {
 13752  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13753  	}
 13754  	var body io.Reader = nil
 13755  	c.urlParams_.Set("alt", alt)
 13756  	c.urlParams_.Set("prettyPrint", "false")
 13757  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 13758  	urls += "?" + c.urlParams_.Encode()
 13759  	req, err := http.NewRequest("GET", urls, body)
 13760  	if err != nil {
 13761  		return nil, err
 13762  	}
 13763  	req.Header = reqHeaders
 13764  	googleapi.Expand(req.URL, map[string]string{
 13765  		"name": c.name,
 13766  	})
 13767  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13768  }
 13769  
 13770  // Do executes the "logging.folders.locations.buckets.views.get" call.
 13771  // Any non-2xx status code is an error. Response headers are in either
 13772  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 13773  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13774  // whether the returned error was because http.StatusNotModified was returned.
 13775  func (c *FoldersLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 13776  	gensupport.SetOptions(c.urlParams_, opts...)
 13777  	res, err := c.doRequest("json")
 13778  	if res != nil && res.StatusCode == http.StatusNotModified {
 13779  		if res.Body != nil {
 13780  			res.Body.Close()
 13781  		}
 13782  		return nil, gensupport.WrapError(&googleapi.Error{
 13783  			Code:   res.StatusCode,
 13784  			Header: res.Header,
 13785  		})
 13786  	}
 13787  	if err != nil {
 13788  		return nil, err
 13789  	}
 13790  	defer googleapi.CloseBody(res)
 13791  	if err := googleapi.CheckResponse(res); err != nil {
 13792  		return nil, gensupport.WrapError(err)
 13793  	}
 13794  	ret := &LogView{
 13795  		ServerResponse: googleapi.ServerResponse{
 13796  			Header:         res.Header,
 13797  			HTTPStatusCode: res.StatusCode,
 13798  		},
 13799  	}
 13800  	target := &ret
 13801  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13802  		return nil, err
 13803  	}
 13804  	return ret, nil
 13805  }
 13806  
 13807  type FoldersLocationsBucketsViewsGetIamPolicyCall struct {
 13808  	s                   *Service
 13809  	resource            string
 13810  	getiampolicyrequest *GetIamPolicyRequest
 13811  	urlParams_          gensupport.URLParams
 13812  	ctx_                context.Context
 13813  	header_             http.Header
 13814  }
 13815  
 13816  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 13817  // empty policy if the resource exists and does not have a policy set.
 13818  //
 13819  //   - resource: REQUIRED: The resource for which the policy is being requested.
 13820  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 13821  //     for the appropriate value for this field.
 13822  func (r *FoldersLocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *FoldersLocationsBucketsViewsGetIamPolicyCall {
 13823  	c := &FoldersLocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13824  	c.resource = resource
 13825  	c.getiampolicyrequest = getiampolicyrequest
 13826  	return c
 13827  }
 13828  
 13829  // Fields allows partial responses to be retrieved. See
 13830  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13831  // details.
 13832  func (c *FoldersLocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsGetIamPolicyCall {
 13833  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13834  	return c
 13835  }
 13836  
 13837  // Context sets the context to be used in this call's Do method.
 13838  func (c *FoldersLocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsGetIamPolicyCall {
 13839  	c.ctx_ = ctx
 13840  	return c
 13841  }
 13842  
 13843  // Header returns a http.Header that can be modified by the caller to add
 13844  // headers to the request.
 13845  func (c *FoldersLocationsBucketsViewsGetIamPolicyCall) Header() http.Header {
 13846  	if c.header_ == nil {
 13847  		c.header_ = make(http.Header)
 13848  	}
 13849  	return c.header_
 13850  }
 13851  
 13852  func (c *FoldersLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 13853  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13854  	var body io.Reader = nil
 13855  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
 13856  	if err != nil {
 13857  		return nil, err
 13858  	}
 13859  	c.urlParams_.Set("alt", alt)
 13860  	c.urlParams_.Set("prettyPrint", "false")
 13861  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
 13862  	urls += "?" + c.urlParams_.Encode()
 13863  	req, err := http.NewRequest("POST", urls, body)
 13864  	if err != nil {
 13865  		return nil, err
 13866  	}
 13867  	req.Header = reqHeaders
 13868  	googleapi.Expand(req.URL, map[string]string{
 13869  		"resource": c.resource,
 13870  	})
 13871  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13872  }
 13873  
 13874  // Do executes the "logging.folders.locations.buckets.views.getIamPolicy" call.
 13875  // Any non-2xx status code is an error. Response headers are in either
 13876  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 13877  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13878  // whether the returned error was because http.StatusNotModified was returned.
 13879  func (c *FoldersLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 13880  	gensupport.SetOptions(c.urlParams_, opts...)
 13881  	res, err := c.doRequest("json")
 13882  	if res != nil && res.StatusCode == http.StatusNotModified {
 13883  		if res.Body != nil {
 13884  			res.Body.Close()
 13885  		}
 13886  		return nil, gensupport.WrapError(&googleapi.Error{
 13887  			Code:   res.StatusCode,
 13888  			Header: res.Header,
 13889  		})
 13890  	}
 13891  	if err != nil {
 13892  		return nil, err
 13893  	}
 13894  	defer googleapi.CloseBody(res)
 13895  	if err := googleapi.CheckResponse(res); err != nil {
 13896  		return nil, gensupport.WrapError(err)
 13897  	}
 13898  	ret := &Policy{
 13899  		ServerResponse: googleapi.ServerResponse{
 13900  			Header:         res.Header,
 13901  			HTTPStatusCode: res.StatusCode,
 13902  		},
 13903  	}
 13904  	target := &ret
 13905  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13906  		return nil, err
 13907  	}
 13908  	return ret, nil
 13909  }
 13910  
 13911  type FoldersLocationsBucketsViewsListCall struct {
 13912  	s            *Service
 13913  	parent       string
 13914  	urlParams_   gensupport.URLParams
 13915  	ifNoneMatch_ string
 13916  	ctx_         context.Context
 13917  	header_      http.Header
 13918  }
 13919  
 13920  // List: Lists views on a log bucket.
 13921  //
 13922  //   - parent: The bucket whose views are to be listed:
 13923  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 13924  func (r *FoldersLocationsBucketsViewsService) List(parent string) *FoldersLocationsBucketsViewsListCall {
 13925  	c := &FoldersLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13926  	c.parent = parent
 13927  	return c
 13928  }
 13929  
 13930  // PageSize sets the optional parameter "pageSize": The maximum number of
 13931  // results to return from this request.Non-positive values are ignored. The
 13932  // presence of nextPageToken in the response indicates that more results might
 13933  // be available.
 13934  func (c *FoldersLocationsBucketsViewsListCall) PageSize(pageSize int64) *FoldersLocationsBucketsViewsListCall {
 13935  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 13936  	return c
 13937  }
 13938  
 13939  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 13940  // the next batch of results from the preceding call to this method. pageToken
 13941  // must be the value of nextPageToken from the previous response. The values of
 13942  // other method parameters should be identical to those in the previous call.
 13943  func (c *FoldersLocationsBucketsViewsListCall) PageToken(pageToken string) *FoldersLocationsBucketsViewsListCall {
 13944  	c.urlParams_.Set("pageToken", pageToken)
 13945  	return c
 13946  }
 13947  
 13948  // Fields allows partial responses to be retrieved. See
 13949  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13950  // details.
 13951  func (c *FoldersLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsListCall {
 13952  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13953  	return c
 13954  }
 13955  
 13956  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13957  // object's ETag matches the given value. This is useful for getting updates
 13958  // only after the object has changed since the last request.
 13959  func (c *FoldersLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsViewsListCall {
 13960  	c.ifNoneMatch_ = entityTag
 13961  	return c
 13962  }
 13963  
 13964  // Context sets the context to be used in this call's Do method.
 13965  func (c *FoldersLocationsBucketsViewsListCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsListCall {
 13966  	c.ctx_ = ctx
 13967  	return c
 13968  }
 13969  
 13970  // Header returns a http.Header that can be modified by the caller to add
 13971  // headers to the request.
 13972  func (c *FoldersLocationsBucketsViewsListCall) Header() http.Header {
 13973  	if c.header_ == nil {
 13974  		c.header_ = make(http.Header)
 13975  	}
 13976  	return c.header_
 13977  }
 13978  
 13979  func (c *FoldersLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
 13980  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13981  	if c.ifNoneMatch_ != "" {
 13982  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13983  	}
 13984  	var body io.Reader = nil
 13985  	c.urlParams_.Set("alt", alt)
 13986  	c.urlParams_.Set("prettyPrint", "false")
 13987  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
 13988  	urls += "?" + c.urlParams_.Encode()
 13989  	req, err := http.NewRequest("GET", urls, body)
 13990  	if err != nil {
 13991  		return nil, err
 13992  	}
 13993  	req.Header = reqHeaders
 13994  	googleapi.Expand(req.URL, map[string]string{
 13995  		"parent": c.parent,
 13996  	})
 13997  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13998  }
 13999  
 14000  // Do executes the "logging.folders.locations.buckets.views.list" call.
 14001  // Any non-2xx status code is an error. Response headers are in either
 14002  // *ListViewsResponse.ServerResponse.Header or (if a response was returned at
 14003  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14004  // check whether the returned error was because http.StatusNotModified was
 14005  // returned.
 14006  func (c *FoldersLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
 14007  	gensupport.SetOptions(c.urlParams_, opts...)
 14008  	res, err := c.doRequest("json")
 14009  	if res != nil && res.StatusCode == http.StatusNotModified {
 14010  		if res.Body != nil {
 14011  			res.Body.Close()
 14012  		}
 14013  		return nil, gensupport.WrapError(&googleapi.Error{
 14014  			Code:   res.StatusCode,
 14015  			Header: res.Header,
 14016  		})
 14017  	}
 14018  	if err != nil {
 14019  		return nil, err
 14020  	}
 14021  	defer googleapi.CloseBody(res)
 14022  	if err := googleapi.CheckResponse(res); err != nil {
 14023  		return nil, gensupport.WrapError(err)
 14024  	}
 14025  	ret := &ListViewsResponse{
 14026  		ServerResponse: googleapi.ServerResponse{
 14027  			Header:         res.Header,
 14028  			HTTPStatusCode: res.StatusCode,
 14029  		},
 14030  	}
 14031  	target := &ret
 14032  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14033  		return nil, err
 14034  	}
 14035  	return ret, nil
 14036  }
 14037  
 14038  // Pages invokes f for each page of results.
 14039  // A non-nil error returned from f will halt the iteration.
 14040  // The provided context supersedes any context provided to the Context method.
 14041  func (c *FoldersLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
 14042  	c.ctx_ = ctx
 14043  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 14044  	for {
 14045  		x, err := c.Do()
 14046  		if err != nil {
 14047  			return err
 14048  		}
 14049  		if err := f(x); err != nil {
 14050  			return err
 14051  		}
 14052  		if x.NextPageToken == "" {
 14053  			return nil
 14054  		}
 14055  		c.PageToken(x.NextPageToken)
 14056  	}
 14057  }
 14058  
 14059  type FoldersLocationsBucketsViewsPatchCall struct {
 14060  	s          *Service
 14061  	name       string
 14062  	logview    *LogView
 14063  	urlParams_ gensupport.URLParams
 14064  	ctx_       context.Context
 14065  	header_    http.Header
 14066  }
 14067  
 14068  // Patch: Updates a view on a log bucket. This method replaces the value of the
 14069  // filter field from the existing view with the corresponding value from the
 14070  // new view. If an UNAVAILABLE error is returned, this indicates that system is
 14071  // not in a state where it can update the view. If this occurs, please try
 14072  // again in a few minutes.
 14073  //
 14074  //   - name: The full resource name of the view to update
 14075  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 14076  //     IEW_ID]" For
 14077  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 14078  //     ew".
 14079  func (r *FoldersLocationsBucketsViewsService) Patch(name string, logview *LogView) *FoldersLocationsBucketsViewsPatchCall {
 14080  	c := &FoldersLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14081  	c.name = name
 14082  	c.logview = logview
 14083  	return c
 14084  }
 14085  
 14086  // UpdateMask sets the optional parameter "updateMask": Field mask that
 14087  // specifies the fields in view that need an update. A field will be
 14088  // overwritten if, and only if, it is in the update mask. name and output only
 14089  // fields cannot be updated.For a detailed FieldMask definition, see
 14090  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 14091  // example: updateMask=filter
 14092  func (c *FoldersLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *FoldersLocationsBucketsViewsPatchCall {
 14093  	c.urlParams_.Set("updateMask", updateMask)
 14094  	return c
 14095  }
 14096  
 14097  // Fields allows partial responses to be retrieved. See
 14098  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14099  // details.
 14100  func (c *FoldersLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsPatchCall {
 14101  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14102  	return c
 14103  }
 14104  
 14105  // Context sets the context to be used in this call's Do method.
 14106  func (c *FoldersLocationsBucketsViewsPatchCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsPatchCall {
 14107  	c.ctx_ = ctx
 14108  	return c
 14109  }
 14110  
 14111  // Header returns a http.Header that can be modified by the caller to add
 14112  // headers to the request.
 14113  func (c *FoldersLocationsBucketsViewsPatchCall) Header() http.Header {
 14114  	if c.header_ == nil {
 14115  		c.header_ = make(http.Header)
 14116  	}
 14117  	return c.header_
 14118  }
 14119  
 14120  func (c *FoldersLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
 14121  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14122  	var body io.Reader = nil
 14123  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
 14124  	if err != nil {
 14125  		return nil, err
 14126  	}
 14127  	c.urlParams_.Set("alt", alt)
 14128  	c.urlParams_.Set("prettyPrint", "false")
 14129  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 14130  	urls += "?" + c.urlParams_.Encode()
 14131  	req, err := http.NewRequest("PATCH", urls, body)
 14132  	if err != nil {
 14133  		return nil, err
 14134  	}
 14135  	req.Header = reqHeaders
 14136  	googleapi.Expand(req.URL, map[string]string{
 14137  		"name": c.name,
 14138  	})
 14139  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14140  }
 14141  
 14142  // Do executes the "logging.folders.locations.buckets.views.patch" call.
 14143  // Any non-2xx status code is an error. Response headers are in either
 14144  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 14145  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14146  // whether the returned error was because http.StatusNotModified was returned.
 14147  func (c *FoldersLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 14148  	gensupport.SetOptions(c.urlParams_, opts...)
 14149  	res, err := c.doRequest("json")
 14150  	if res != nil && res.StatusCode == http.StatusNotModified {
 14151  		if res.Body != nil {
 14152  			res.Body.Close()
 14153  		}
 14154  		return nil, gensupport.WrapError(&googleapi.Error{
 14155  			Code:   res.StatusCode,
 14156  			Header: res.Header,
 14157  		})
 14158  	}
 14159  	if err != nil {
 14160  		return nil, err
 14161  	}
 14162  	defer googleapi.CloseBody(res)
 14163  	if err := googleapi.CheckResponse(res); err != nil {
 14164  		return nil, gensupport.WrapError(err)
 14165  	}
 14166  	ret := &LogView{
 14167  		ServerResponse: googleapi.ServerResponse{
 14168  			Header:         res.Header,
 14169  			HTTPStatusCode: res.StatusCode,
 14170  		},
 14171  	}
 14172  	target := &ret
 14173  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14174  		return nil, err
 14175  	}
 14176  	return ret, nil
 14177  }
 14178  
 14179  type FoldersLocationsBucketsViewsSetIamPolicyCall struct {
 14180  	s                   *Service
 14181  	resource            string
 14182  	setiampolicyrequest *SetIamPolicyRequest
 14183  	urlParams_          gensupport.URLParams
 14184  	ctx_                context.Context
 14185  	header_             http.Header
 14186  }
 14187  
 14188  // SetIamPolicy: Sets the access control policy on the specified resource.
 14189  // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
 14190  // PERMISSION_DENIED errors.
 14191  //
 14192  //   - resource: REQUIRED: The resource for which the policy is being specified.
 14193  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 14194  //     for the appropriate value for this field.
 14195  func (r *FoldersLocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *FoldersLocationsBucketsViewsSetIamPolicyCall {
 14196  	c := &FoldersLocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14197  	c.resource = resource
 14198  	c.setiampolicyrequest = setiampolicyrequest
 14199  	return c
 14200  }
 14201  
 14202  // Fields allows partial responses to be retrieved. See
 14203  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14204  // details.
 14205  func (c *FoldersLocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsSetIamPolicyCall {
 14206  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14207  	return c
 14208  }
 14209  
 14210  // Context sets the context to be used in this call's Do method.
 14211  func (c *FoldersLocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsSetIamPolicyCall {
 14212  	c.ctx_ = ctx
 14213  	return c
 14214  }
 14215  
 14216  // Header returns a http.Header that can be modified by the caller to add
 14217  // headers to the request.
 14218  func (c *FoldersLocationsBucketsViewsSetIamPolicyCall) Header() http.Header {
 14219  	if c.header_ == nil {
 14220  		c.header_ = make(http.Header)
 14221  	}
 14222  	return c.header_
 14223  }
 14224  
 14225  func (c *FoldersLocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 14226  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14227  	var body io.Reader = nil
 14228  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 14229  	if err != nil {
 14230  		return nil, err
 14231  	}
 14232  	c.urlParams_.Set("alt", alt)
 14233  	c.urlParams_.Set("prettyPrint", "false")
 14234  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
 14235  	urls += "?" + c.urlParams_.Encode()
 14236  	req, err := http.NewRequest("POST", urls, body)
 14237  	if err != nil {
 14238  		return nil, err
 14239  	}
 14240  	req.Header = reqHeaders
 14241  	googleapi.Expand(req.URL, map[string]string{
 14242  		"resource": c.resource,
 14243  	})
 14244  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14245  }
 14246  
 14247  // Do executes the "logging.folders.locations.buckets.views.setIamPolicy" call.
 14248  // Any non-2xx status code is an error. Response headers are in either
 14249  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 14250  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14251  // whether the returned error was because http.StatusNotModified was returned.
 14252  func (c *FoldersLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 14253  	gensupport.SetOptions(c.urlParams_, opts...)
 14254  	res, err := c.doRequest("json")
 14255  	if res != nil && res.StatusCode == http.StatusNotModified {
 14256  		if res.Body != nil {
 14257  			res.Body.Close()
 14258  		}
 14259  		return nil, gensupport.WrapError(&googleapi.Error{
 14260  			Code:   res.StatusCode,
 14261  			Header: res.Header,
 14262  		})
 14263  	}
 14264  	if err != nil {
 14265  		return nil, err
 14266  	}
 14267  	defer googleapi.CloseBody(res)
 14268  	if err := googleapi.CheckResponse(res); err != nil {
 14269  		return nil, gensupport.WrapError(err)
 14270  	}
 14271  	ret := &Policy{
 14272  		ServerResponse: googleapi.ServerResponse{
 14273  			Header:         res.Header,
 14274  			HTTPStatusCode: res.StatusCode,
 14275  		},
 14276  	}
 14277  	target := &ret
 14278  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14279  		return nil, err
 14280  	}
 14281  	return ret, nil
 14282  }
 14283  
 14284  type FoldersLocationsBucketsViewsTestIamPermissionsCall struct {
 14285  	s                         *Service
 14286  	resource                  string
 14287  	testiampermissionsrequest *TestIamPermissionsRequest
 14288  	urlParams_                gensupport.URLParams
 14289  	ctx_                      context.Context
 14290  	header_                   http.Header
 14291  }
 14292  
 14293  // TestIamPermissions: Returns permissions that a caller has on the specified
 14294  // resource. If the resource does not exist, this will return an empty set of
 14295  // permissions, not a NOT_FOUND error.Note: This operation is designed to be
 14296  // used for building permission-aware UIs and command-line tools, not for
 14297  // authorization checking. This operation may "fail open" without warning.
 14298  //
 14299  //   - resource: REQUIRED: The resource for which the policy detail is being
 14300  //     requested. See Resource names
 14301  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 14302  //     value for this field.
 14303  func (r *FoldersLocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *FoldersLocationsBucketsViewsTestIamPermissionsCall {
 14304  	c := &FoldersLocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14305  	c.resource = resource
 14306  	c.testiampermissionsrequest = testiampermissionsrequest
 14307  	return c
 14308  }
 14309  
 14310  // Fields allows partial responses to be retrieved. See
 14311  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14312  // details.
 14313  func (c *FoldersLocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsTestIamPermissionsCall {
 14314  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14315  	return c
 14316  }
 14317  
 14318  // Context sets the context to be used in this call's Do method.
 14319  func (c *FoldersLocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsTestIamPermissionsCall {
 14320  	c.ctx_ = ctx
 14321  	return c
 14322  }
 14323  
 14324  // Header returns a http.Header that can be modified by the caller to add
 14325  // headers to the request.
 14326  func (c *FoldersLocationsBucketsViewsTestIamPermissionsCall) Header() http.Header {
 14327  	if c.header_ == nil {
 14328  		c.header_ = make(http.Header)
 14329  	}
 14330  	return c.header_
 14331  }
 14332  
 14333  func (c *FoldersLocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 14334  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14335  	var body io.Reader = nil
 14336  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 14337  	if err != nil {
 14338  		return nil, err
 14339  	}
 14340  	c.urlParams_.Set("alt", alt)
 14341  	c.urlParams_.Set("prettyPrint", "false")
 14342  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
 14343  	urls += "?" + c.urlParams_.Encode()
 14344  	req, err := http.NewRequest("POST", urls, body)
 14345  	if err != nil {
 14346  		return nil, err
 14347  	}
 14348  	req.Header = reqHeaders
 14349  	googleapi.Expand(req.URL, map[string]string{
 14350  		"resource": c.resource,
 14351  	})
 14352  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14353  }
 14354  
 14355  // Do executes the "logging.folders.locations.buckets.views.testIamPermissions" call.
 14356  // Any non-2xx status code is an error. Response headers are in either
 14357  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 14358  // returned at all) in error.(*googleapi.Error).Header. Use
 14359  // googleapi.IsNotModified to check whether the returned error was because
 14360  // http.StatusNotModified was returned.
 14361  func (c *FoldersLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 14362  	gensupport.SetOptions(c.urlParams_, opts...)
 14363  	res, err := c.doRequest("json")
 14364  	if res != nil && res.StatusCode == http.StatusNotModified {
 14365  		if res.Body != nil {
 14366  			res.Body.Close()
 14367  		}
 14368  		return nil, gensupport.WrapError(&googleapi.Error{
 14369  			Code:   res.StatusCode,
 14370  			Header: res.Header,
 14371  		})
 14372  	}
 14373  	if err != nil {
 14374  		return nil, err
 14375  	}
 14376  	defer googleapi.CloseBody(res)
 14377  	if err := googleapi.CheckResponse(res); err != nil {
 14378  		return nil, gensupport.WrapError(err)
 14379  	}
 14380  	ret := &TestIamPermissionsResponse{
 14381  		ServerResponse: googleapi.ServerResponse{
 14382  			Header:         res.Header,
 14383  			HTTPStatusCode: res.StatusCode,
 14384  		},
 14385  	}
 14386  	target := &ret
 14387  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14388  		return nil, err
 14389  	}
 14390  	return ret, nil
 14391  }
 14392  
 14393  type FoldersLocationsBucketsViewsLogsListCall struct {
 14394  	s            *Service
 14395  	parent       string
 14396  	urlParams_   gensupport.URLParams
 14397  	ifNoneMatch_ string
 14398  	ctx_         context.Context
 14399  	header_      http.Header
 14400  }
 14401  
 14402  // List: Lists the logs in projects, organizations, folders, or billing
 14403  // accounts. Only logs that have entries are listed.
 14404  //
 14405  //   - parent: The resource name to list logs for: projects/[PROJECT_ID]
 14406  //     organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 14407  //     folders/[FOLDER_ID].
 14408  func (r *FoldersLocationsBucketsViewsLogsService) List(parent string) *FoldersLocationsBucketsViewsLogsListCall {
 14409  	c := &FoldersLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14410  	c.parent = parent
 14411  	return c
 14412  }
 14413  
 14414  // PageSize sets the optional parameter "pageSize": The maximum number of
 14415  // results to return from this request. Non-positive values are ignored. The
 14416  // presence of nextPageToken in the response indicates that more results might
 14417  // be available.
 14418  func (c *FoldersLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *FoldersLocationsBucketsViewsLogsListCall {
 14419  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 14420  	return c
 14421  }
 14422  
 14423  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 14424  // the next batch of results from the preceding call to this method. pageToken
 14425  // must be the value of nextPageToken from the previous response. The values of
 14426  // other method parameters should be identical to those in the previous call.
 14427  func (c *FoldersLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *FoldersLocationsBucketsViewsLogsListCall {
 14428  	c.urlParams_.Set("pageToken", pageToken)
 14429  	return c
 14430  }
 14431  
 14432  // ResourceNames sets the optional parameter "resourceNames": List of resource
 14433  // names to list logs for:
 14434  // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
 14435  // _ID]
 14436  // organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
 14437  // iews/[VIEW_ID]
 14438  // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
 14439  // ID]/views/[VIEW_ID]
 14440  // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
 14441  // D]To support legacy queries, it could also be: projects/[PROJECT_ID]
 14442  // organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 14443  // folders/[FOLDER_ID]The resource name in the parent field is added to this
 14444  // list.
 14445  func (c *FoldersLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *FoldersLocationsBucketsViewsLogsListCall {
 14446  	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
 14447  	return c
 14448  }
 14449  
 14450  // Fields allows partial responses to be retrieved. See
 14451  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14452  // details.
 14453  func (c *FoldersLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *FoldersLocationsBucketsViewsLogsListCall {
 14454  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14455  	return c
 14456  }
 14457  
 14458  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14459  // object's ETag matches the given value. This is useful for getting updates
 14460  // only after the object has changed since the last request.
 14461  func (c *FoldersLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *FoldersLocationsBucketsViewsLogsListCall {
 14462  	c.ifNoneMatch_ = entityTag
 14463  	return c
 14464  }
 14465  
 14466  // Context sets the context to be used in this call's Do method.
 14467  func (c *FoldersLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *FoldersLocationsBucketsViewsLogsListCall {
 14468  	c.ctx_ = ctx
 14469  	return c
 14470  }
 14471  
 14472  // Header returns a http.Header that can be modified by the caller to add
 14473  // headers to the request.
 14474  func (c *FoldersLocationsBucketsViewsLogsListCall) Header() http.Header {
 14475  	if c.header_ == nil {
 14476  		c.header_ = make(http.Header)
 14477  	}
 14478  	return c.header_
 14479  }
 14480  
 14481  func (c *FoldersLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) {
 14482  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14483  	if c.ifNoneMatch_ != "" {
 14484  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 14485  	}
 14486  	var body io.Reader = nil
 14487  	c.urlParams_.Set("alt", alt)
 14488  	c.urlParams_.Set("prettyPrint", "false")
 14489  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
 14490  	urls += "?" + c.urlParams_.Encode()
 14491  	req, err := http.NewRequest("GET", urls, body)
 14492  	if err != nil {
 14493  		return nil, err
 14494  	}
 14495  	req.Header = reqHeaders
 14496  	googleapi.Expand(req.URL, map[string]string{
 14497  		"parent": c.parent,
 14498  	})
 14499  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14500  }
 14501  
 14502  // Do executes the "logging.folders.locations.buckets.views.logs.list" call.
 14503  // Any non-2xx status code is an error. Response headers are in either
 14504  // *ListLogsResponse.ServerResponse.Header or (if a response was returned at
 14505  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14506  // check whether the returned error was because http.StatusNotModified was
 14507  // returned.
 14508  func (c *FoldersLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
 14509  	gensupport.SetOptions(c.urlParams_, opts...)
 14510  	res, err := c.doRequest("json")
 14511  	if res != nil && res.StatusCode == http.StatusNotModified {
 14512  		if res.Body != nil {
 14513  			res.Body.Close()
 14514  		}
 14515  		return nil, gensupport.WrapError(&googleapi.Error{
 14516  			Code:   res.StatusCode,
 14517  			Header: res.Header,
 14518  		})
 14519  	}
 14520  	if err != nil {
 14521  		return nil, err
 14522  	}
 14523  	defer googleapi.CloseBody(res)
 14524  	if err := googleapi.CheckResponse(res); err != nil {
 14525  		return nil, gensupport.WrapError(err)
 14526  	}
 14527  	ret := &ListLogsResponse{
 14528  		ServerResponse: googleapi.ServerResponse{
 14529  			Header:         res.Header,
 14530  			HTTPStatusCode: res.StatusCode,
 14531  		},
 14532  	}
 14533  	target := &ret
 14534  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14535  		return nil, err
 14536  	}
 14537  	return ret, nil
 14538  }
 14539  
 14540  // Pages invokes f for each page of results.
 14541  // A non-nil error returned from f will halt the iteration.
 14542  // The provided context supersedes any context provided to the Context method.
 14543  func (c *FoldersLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
 14544  	c.ctx_ = ctx
 14545  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 14546  	for {
 14547  		x, err := c.Do()
 14548  		if err != nil {
 14549  			return err
 14550  		}
 14551  		if err := f(x); err != nil {
 14552  			return err
 14553  		}
 14554  		if x.NextPageToken == "" {
 14555  			return nil
 14556  		}
 14557  		c.PageToken(x.NextPageToken)
 14558  	}
 14559  }
 14560  
 14561  type FoldersLocationsOperationsCancelCall struct {
 14562  	s                      *Service
 14563  	name                   string
 14564  	canceloperationrequest *CancelOperationRequest
 14565  	urlParams_             gensupport.URLParams
 14566  	ctx_                   context.Context
 14567  	header_                http.Header
 14568  }
 14569  
 14570  // Cancel: Starts asynchronous cancellation on a long-running operation. The
 14571  // server makes a best effort to cancel the operation, but success is not
 14572  // guaranteed. If the server doesn't support this method, it returns
 14573  // google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or
 14574  // other methods to check whether the cancellation succeeded or whether the
 14575  // operation completed despite cancellation. On successful cancellation, the
 14576  // operation is not deleted; instead, it becomes an operation with an
 14577  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
 14578  // Code.CANCELLED.
 14579  //
 14580  // - name: The name of the operation resource to be cancelled.
 14581  func (r *FoldersLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *FoldersLocationsOperationsCancelCall {
 14582  	c := &FoldersLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14583  	c.name = name
 14584  	c.canceloperationrequest = canceloperationrequest
 14585  	return c
 14586  }
 14587  
 14588  // Fields allows partial responses to be retrieved. See
 14589  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14590  // details.
 14591  func (c *FoldersLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsCancelCall {
 14592  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14593  	return c
 14594  }
 14595  
 14596  // Context sets the context to be used in this call's Do method.
 14597  func (c *FoldersLocationsOperationsCancelCall) Context(ctx context.Context) *FoldersLocationsOperationsCancelCall {
 14598  	c.ctx_ = ctx
 14599  	return c
 14600  }
 14601  
 14602  // Header returns a http.Header that can be modified by the caller to add
 14603  // headers to the request.
 14604  func (c *FoldersLocationsOperationsCancelCall) Header() http.Header {
 14605  	if c.header_ == nil {
 14606  		c.header_ = make(http.Header)
 14607  	}
 14608  	return c.header_
 14609  }
 14610  
 14611  func (c *FoldersLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
 14612  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14613  	var body io.Reader = nil
 14614  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
 14615  	if err != nil {
 14616  		return nil, err
 14617  	}
 14618  	c.urlParams_.Set("alt", alt)
 14619  	c.urlParams_.Set("prettyPrint", "false")
 14620  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
 14621  	urls += "?" + c.urlParams_.Encode()
 14622  	req, err := http.NewRequest("POST", urls, body)
 14623  	if err != nil {
 14624  		return nil, err
 14625  	}
 14626  	req.Header = reqHeaders
 14627  	googleapi.Expand(req.URL, map[string]string{
 14628  		"name": c.name,
 14629  	})
 14630  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14631  }
 14632  
 14633  // Do executes the "logging.folders.locations.operations.cancel" call.
 14634  // Any non-2xx status code is an error. Response headers are in either
 14635  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 14636  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14637  // whether the returned error was because http.StatusNotModified was returned.
 14638  func (c *FoldersLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 14639  	gensupport.SetOptions(c.urlParams_, opts...)
 14640  	res, err := c.doRequest("json")
 14641  	if res != nil && res.StatusCode == http.StatusNotModified {
 14642  		if res.Body != nil {
 14643  			res.Body.Close()
 14644  		}
 14645  		return nil, gensupport.WrapError(&googleapi.Error{
 14646  			Code:   res.StatusCode,
 14647  			Header: res.Header,
 14648  		})
 14649  	}
 14650  	if err != nil {
 14651  		return nil, err
 14652  	}
 14653  	defer googleapi.CloseBody(res)
 14654  	if err := googleapi.CheckResponse(res); err != nil {
 14655  		return nil, gensupport.WrapError(err)
 14656  	}
 14657  	ret := &Empty{
 14658  		ServerResponse: googleapi.ServerResponse{
 14659  			Header:         res.Header,
 14660  			HTTPStatusCode: res.StatusCode,
 14661  		},
 14662  	}
 14663  	target := &ret
 14664  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14665  		return nil, err
 14666  	}
 14667  	return ret, nil
 14668  }
 14669  
 14670  type FoldersLocationsOperationsGetCall struct {
 14671  	s            *Service
 14672  	name         string
 14673  	urlParams_   gensupport.URLParams
 14674  	ifNoneMatch_ string
 14675  	ctx_         context.Context
 14676  	header_      http.Header
 14677  }
 14678  
 14679  // Get: Gets the latest state of a long-running operation. Clients can use this
 14680  // method to poll the operation result at intervals as recommended by the API
 14681  // service.
 14682  //
 14683  // - name: The name of the operation resource.
 14684  func (r *FoldersLocationsOperationsService) Get(name string) *FoldersLocationsOperationsGetCall {
 14685  	c := &FoldersLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14686  	c.name = name
 14687  	return c
 14688  }
 14689  
 14690  // Fields allows partial responses to be retrieved. See
 14691  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14692  // details.
 14693  func (c *FoldersLocationsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsGetCall {
 14694  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14695  	return c
 14696  }
 14697  
 14698  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14699  // object's ETag matches the given value. This is useful for getting updates
 14700  // only after the object has changed since the last request.
 14701  func (c *FoldersLocationsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOperationsGetCall {
 14702  	c.ifNoneMatch_ = entityTag
 14703  	return c
 14704  }
 14705  
 14706  // Context sets the context to be used in this call's Do method.
 14707  func (c *FoldersLocationsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOperationsGetCall {
 14708  	c.ctx_ = ctx
 14709  	return c
 14710  }
 14711  
 14712  // Header returns a http.Header that can be modified by the caller to add
 14713  // headers to the request.
 14714  func (c *FoldersLocationsOperationsGetCall) Header() http.Header {
 14715  	if c.header_ == nil {
 14716  		c.header_ = make(http.Header)
 14717  	}
 14718  	return c.header_
 14719  }
 14720  
 14721  func (c *FoldersLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 14722  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14723  	if c.ifNoneMatch_ != "" {
 14724  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 14725  	}
 14726  	var body io.Reader = nil
 14727  	c.urlParams_.Set("alt", alt)
 14728  	c.urlParams_.Set("prettyPrint", "false")
 14729  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 14730  	urls += "?" + c.urlParams_.Encode()
 14731  	req, err := http.NewRequest("GET", urls, body)
 14732  	if err != nil {
 14733  		return nil, err
 14734  	}
 14735  	req.Header = reqHeaders
 14736  	googleapi.Expand(req.URL, map[string]string{
 14737  		"name": c.name,
 14738  	})
 14739  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14740  }
 14741  
 14742  // Do executes the "logging.folders.locations.operations.get" call.
 14743  // Any non-2xx status code is an error. Response headers are in either
 14744  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 14745  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14746  // whether the returned error was because http.StatusNotModified was returned.
 14747  func (c *FoldersLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 14748  	gensupport.SetOptions(c.urlParams_, opts...)
 14749  	res, err := c.doRequest("json")
 14750  	if res != nil && res.StatusCode == http.StatusNotModified {
 14751  		if res.Body != nil {
 14752  			res.Body.Close()
 14753  		}
 14754  		return nil, gensupport.WrapError(&googleapi.Error{
 14755  			Code:   res.StatusCode,
 14756  			Header: res.Header,
 14757  		})
 14758  	}
 14759  	if err != nil {
 14760  		return nil, err
 14761  	}
 14762  	defer googleapi.CloseBody(res)
 14763  	if err := googleapi.CheckResponse(res); err != nil {
 14764  		return nil, gensupport.WrapError(err)
 14765  	}
 14766  	ret := &Operation{
 14767  		ServerResponse: googleapi.ServerResponse{
 14768  			Header:         res.Header,
 14769  			HTTPStatusCode: res.StatusCode,
 14770  		},
 14771  	}
 14772  	target := &ret
 14773  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14774  		return nil, err
 14775  	}
 14776  	return ret, nil
 14777  }
 14778  
 14779  type FoldersLocationsOperationsListCall struct {
 14780  	s            *Service
 14781  	name         string
 14782  	urlParams_   gensupport.URLParams
 14783  	ifNoneMatch_ string
 14784  	ctx_         context.Context
 14785  	header_      http.Header
 14786  }
 14787  
 14788  // List: Lists operations that match the specified filter in the request. If
 14789  // the server doesn't support this method, it returns UNIMPLEMENTED.
 14790  //
 14791  // - name: The name of the operation's parent resource.
 14792  func (r *FoldersLocationsOperationsService) List(name string) *FoldersLocationsOperationsListCall {
 14793  	c := &FoldersLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14794  	c.name = name
 14795  	return c
 14796  }
 14797  
 14798  // Filter sets the optional parameter "filter": The standard list filter.
 14799  func (c *FoldersLocationsOperationsListCall) Filter(filter string) *FoldersLocationsOperationsListCall {
 14800  	c.urlParams_.Set("filter", filter)
 14801  	return c
 14802  }
 14803  
 14804  // PageSize sets the optional parameter "pageSize": The standard list page
 14805  // size.
 14806  func (c *FoldersLocationsOperationsListCall) PageSize(pageSize int64) *FoldersLocationsOperationsListCall {
 14807  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 14808  	return c
 14809  }
 14810  
 14811  // PageToken sets the optional parameter "pageToken": The standard list page
 14812  // token.
 14813  func (c *FoldersLocationsOperationsListCall) PageToken(pageToken string) *FoldersLocationsOperationsListCall {
 14814  	c.urlParams_.Set("pageToken", pageToken)
 14815  	return c
 14816  }
 14817  
 14818  // Fields allows partial responses to be retrieved. See
 14819  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14820  // details.
 14821  func (c *FoldersLocationsOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsListCall {
 14822  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14823  	return c
 14824  }
 14825  
 14826  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14827  // object's ETag matches the given value. This is useful for getting updates
 14828  // only after the object has changed since the last request.
 14829  func (c *FoldersLocationsOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsOperationsListCall {
 14830  	c.ifNoneMatch_ = entityTag
 14831  	return c
 14832  }
 14833  
 14834  // Context sets the context to be used in this call's Do method.
 14835  func (c *FoldersLocationsOperationsListCall) Context(ctx context.Context) *FoldersLocationsOperationsListCall {
 14836  	c.ctx_ = ctx
 14837  	return c
 14838  }
 14839  
 14840  // Header returns a http.Header that can be modified by the caller to add
 14841  // headers to the request.
 14842  func (c *FoldersLocationsOperationsListCall) Header() http.Header {
 14843  	if c.header_ == nil {
 14844  		c.header_ = make(http.Header)
 14845  	}
 14846  	return c.header_
 14847  }
 14848  
 14849  func (c *FoldersLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 14850  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14851  	if c.ifNoneMatch_ != "" {
 14852  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 14853  	}
 14854  	var body io.Reader = nil
 14855  	c.urlParams_.Set("alt", alt)
 14856  	c.urlParams_.Set("prettyPrint", "false")
 14857  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
 14858  	urls += "?" + c.urlParams_.Encode()
 14859  	req, err := http.NewRequest("GET", urls, body)
 14860  	if err != nil {
 14861  		return nil, err
 14862  	}
 14863  	req.Header = reqHeaders
 14864  	googleapi.Expand(req.URL, map[string]string{
 14865  		"name": c.name,
 14866  	})
 14867  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14868  }
 14869  
 14870  // Do executes the "logging.folders.locations.operations.list" call.
 14871  // Any non-2xx status code is an error. Response headers are in either
 14872  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
 14873  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14874  // check whether the returned error was because http.StatusNotModified was
 14875  // returned.
 14876  func (c *FoldersLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
 14877  	gensupport.SetOptions(c.urlParams_, opts...)
 14878  	res, err := c.doRequest("json")
 14879  	if res != nil && res.StatusCode == http.StatusNotModified {
 14880  		if res.Body != nil {
 14881  			res.Body.Close()
 14882  		}
 14883  		return nil, gensupport.WrapError(&googleapi.Error{
 14884  			Code:   res.StatusCode,
 14885  			Header: res.Header,
 14886  		})
 14887  	}
 14888  	if err != nil {
 14889  		return nil, err
 14890  	}
 14891  	defer googleapi.CloseBody(res)
 14892  	if err := googleapi.CheckResponse(res); err != nil {
 14893  		return nil, gensupport.WrapError(err)
 14894  	}
 14895  	ret := &ListOperationsResponse{
 14896  		ServerResponse: googleapi.ServerResponse{
 14897  			Header:         res.Header,
 14898  			HTTPStatusCode: res.StatusCode,
 14899  		},
 14900  	}
 14901  	target := &ret
 14902  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14903  		return nil, err
 14904  	}
 14905  	return ret, nil
 14906  }
 14907  
 14908  // Pages invokes f for each page of results.
 14909  // A non-nil error returned from f will halt the iteration.
 14910  // The provided context supersedes any context provided to the Context method.
 14911  func (c *FoldersLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
 14912  	c.ctx_ = ctx
 14913  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 14914  	for {
 14915  		x, err := c.Do()
 14916  		if err != nil {
 14917  			return err
 14918  		}
 14919  		if err := f(x); err != nil {
 14920  			return err
 14921  		}
 14922  		if x.NextPageToken == "" {
 14923  			return nil
 14924  		}
 14925  		c.PageToken(x.NextPageToken)
 14926  	}
 14927  }
 14928  
 14929  type FoldersLocationsRecentQueriesListCall struct {
 14930  	s            *Service
 14931  	parent       string
 14932  	urlParams_   gensupport.URLParams
 14933  	ifNoneMatch_ string
 14934  	ctx_         context.Context
 14935  	header_      http.Header
 14936  }
 14937  
 14938  // List: Lists the RecentQueries that were created by the user making the
 14939  // request.
 14940  //
 14941  //   - parent: The resource to which the listed queries belong.
 14942  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 14943  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 14944  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 14945  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For
 14946  //     example:projects/my-project/locations/us-central1Note: The location
 14947  //     portion of the resource must be specified, but supplying the character -
 14948  //     in place of LOCATION_ID will return all recent queries.
 14949  func (r *FoldersLocationsRecentQueriesService) List(parent string) *FoldersLocationsRecentQueriesListCall {
 14950  	c := &FoldersLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14951  	c.parent = parent
 14952  	return c
 14953  }
 14954  
 14955  // PageSize sets the optional parameter "pageSize": The maximum number of
 14956  // results to return from this request. Non-positive values are ignored. The
 14957  // presence of nextPageToken in the response indicates that more results might
 14958  // be available.
 14959  func (c *FoldersLocationsRecentQueriesListCall) PageSize(pageSize int64) *FoldersLocationsRecentQueriesListCall {
 14960  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 14961  	return c
 14962  }
 14963  
 14964  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 14965  // the next batch of results from the preceding call to this method. pageToken
 14966  // must be the value of nextPageToken from the previous response. The values of
 14967  // other method parameters should be identical to those in the previous call.
 14968  func (c *FoldersLocationsRecentQueriesListCall) PageToken(pageToken string) *FoldersLocationsRecentQueriesListCall {
 14969  	c.urlParams_.Set("pageToken", pageToken)
 14970  	return c
 14971  }
 14972  
 14973  // Fields allows partial responses to be retrieved. See
 14974  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14975  // details.
 14976  func (c *FoldersLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *FoldersLocationsRecentQueriesListCall {
 14977  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14978  	return c
 14979  }
 14980  
 14981  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14982  // object's ETag matches the given value. This is useful for getting updates
 14983  // only after the object has changed since the last request.
 14984  func (c *FoldersLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *FoldersLocationsRecentQueriesListCall {
 14985  	c.ifNoneMatch_ = entityTag
 14986  	return c
 14987  }
 14988  
 14989  // Context sets the context to be used in this call's Do method.
 14990  func (c *FoldersLocationsRecentQueriesListCall) Context(ctx context.Context) *FoldersLocationsRecentQueriesListCall {
 14991  	c.ctx_ = ctx
 14992  	return c
 14993  }
 14994  
 14995  // Header returns a http.Header that can be modified by the caller to add
 14996  // headers to the request.
 14997  func (c *FoldersLocationsRecentQueriesListCall) Header() http.Header {
 14998  	if c.header_ == nil {
 14999  		c.header_ = make(http.Header)
 15000  	}
 15001  	return c.header_
 15002  }
 15003  
 15004  func (c *FoldersLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) {
 15005  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15006  	if c.ifNoneMatch_ != "" {
 15007  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15008  	}
 15009  	var body io.Reader = nil
 15010  	c.urlParams_.Set("alt", alt)
 15011  	c.urlParams_.Set("prettyPrint", "false")
 15012  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries")
 15013  	urls += "?" + c.urlParams_.Encode()
 15014  	req, err := http.NewRequest("GET", urls, body)
 15015  	if err != nil {
 15016  		return nil, err
 15017  	}
 15018  	req.Header = reqHeaders
 15019  	googleapi.Expand(req.URL, map[string]string{
 15020  		"parent": c.parent,
 15021  	})
 15022  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15023  }
 15024  
 15025  // Do executes the "logging.folders.locations.recentQueries.list" call.
 15026  // Any non-2xx status code is an error. Response headers are in either
 15027  // *ListRecentQueriesResponse.ServerResponse.Header or (if a response was
 15028  // returned at all) in error.(*googleapi.Error).Header. Use
 15029  // googleapi.IsNotModified to check whether the returned error was because
 15030  // http.StatusNotModified was returned.
 15031  func (c *FoldersLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) {
 15032  	gensupport.SetOptions(c.urlParams_, opts...)
 15033  	res, err := c.doRequest("json")
 15034  	if res != nil && res.StatusCode == http.StatusNotModified {
 15035  		if res.Body != nil {
 15036  			res.Body.Close()
 15037  		}
 15038  		return nil, gensupport.WrapError(&googleapi.Error{
 15039  			Code:   res.StatusCode,
 15040  			Header: res.Header,
 15041  		})
 15042  	}
 15043  	if err != nil {
 15044  		return nil, err
 15045  	}
 15046  	defer googleapi.CloseBody(res)
 15047  	if err := googleapi.CheckResponse(res); err != nil {
 15048  		return nil, gensupport.WrapError(err)
 15049  	}
 15050  	ret := &ListRecentQueriesResponse{
 15051  		ServerResponse: googleapi.ServerResponse{
 15052  			Header:         res.Header,
 15053  			HTTPStatusCode: res.StatusCode,
 15054  		},
 15055  	}
 15056  	target := &ret
 15057  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15058  		return nil, err
 15059  	}
 15060  	return ret, nil
 15061  }
 15062  
 15063  // Pages invokes f for each page of results.
 15064  // A non-nil error returned from f will halt the iteration.
 15065  // The provided context supersedes any context provided to the Context method.
 15066  func (c *FoldersLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error {
 15067  	c.ctx_ = ctx
 15068  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 15069  	for {
 15070  		x, err := c.Do()
 15071  		if err != nil {
 15072  			return err
 15073  		}
 15074  		if err := f(x); err != nil {
 15075  			return err
 15076  		}
 15077  		if x.NextPageToken == "" {
 15078  			return nil
 15079  		}
 15080  		c.PageToken(x.NextPageToken)
 15081  	}
 15082  }
 15083  
 15084  type FoldersLocationsSavedQueriesCreateCall struct {
 15085  	s          *Service
 15086  	parent     string
 15087  	savedquery *SavedQuery
 15088  	urlParams_ gensupport.URLParams
 15089  	ctx_       context.Context
 15090  	header_    http.Header
 15091  }
 15092  
 15093  // Create: Creates a new SavedQuery for the user making the request.
 15094  //
 15095  //   - parent: The parent resource in which to create the saved query:
 15096  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 15097  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 15098  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 15099  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:
 15100  //     "projects/my-project/locations/global"
 15101  //     "organizations/123456789/locations/us-central1".
 15102  func (r *FoldersLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *FoldersLocationsSavedQueriesCreateCall {
 15103  	c := &FoldersLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15104  	c.parent = parent
 15105  	c.savedquery = savedquery
 15106  	return c
 15107  }
 15108  
 15109  // SavedQueryId sets the optional parameter "savedQueryId": The ID to use for
 15110  // the saved query, which will become the final component of the saved query's
 15111  // resource name.If the saved_query_id is not provided, the system will
 15112  // generate an alphanumeric ID.The saved_query_id is limited to 100 characters
 15113  // and can include only the following characters: upper and lower-case
 15114  // alphanumeric characters, underscores, hyphens, periods.First character has
 15115  // to be alphanumeric.
 15116  func (c *FoldersLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *FoldersLocationsSavedQueriesCreateCall {
 15117  	c.urlParams_.Set("savedQueryId", savedQueryId)
 15118  	return c
 15119  }
 15120  
 15121  // Fields allows partial responses to be retrieved. See
 15122  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15123  // details.
 15124  func (c *FoldersLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesCreateCall {
 15125  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15126  	return c
 15127  }
 15128  
 15129  // Context sets the context to be used in this call's Do method.
 15130  func (c *FoldersLocationsSavedQueriesCreateCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesCreateCall {
 15131  	c.ctx_ = ctx
 15132  	return c
 15133  }
 15134  
 15135  // Header returns a http.Header that can be modified by the caller to add
 15136  // headers to the request.
 15137  func (c *FoldersLocationsSavedQueriesCreateCall) Header() http.Header {
 15138  	if c.header_ == nil {
 15139  		c.header_ = make(http.Header)
 15140  	}
 15141  	return c.header_
 15142  }
 15143  
 15144  func (c *FoldersLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) {
 15145  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 15146  	var body io.Reader = nil
 15147  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery)
 15148  	if err != nil {
 15149  		return nil, err
 15150  	}
 15151  	c.urlParams_.Set("alt", alt)
 15152  	c.urlParams_.Set("prettyPrint", "false")
 15153  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
 15154  	urls += "?" + c.urlParams_.Encode()
 15155  	req, err := http.NewRequest("POST", urls, body)
 15156  	if err != nil {
 15157  		return nil, err
 15158  	}
 15159  	req.Header = reqHeaders
 15160  	googleapi.Expand(req.URL, map[string]string{
 15161  		"parent": c.parent,
 15162  	})
 15163  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15164  }
 15165  
 15166  // Do executes the "logging.folders.locations.savedQueries.create" call.
 15167  // Any non-2xx status code is an error. Response headers are in either
 15168  // *SavedQuery.ServerResponse.Header or (if a response was returned at all) in
 15169  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15170  // whether the returned error was because http.StatusNotModified was returned.
 15171  func (c *FoldersLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
 15172  	gensupport.SetOptions(c.urlParams_, opts...)
 15173  	res, err := c.doRequest("json")
 15174  	if res != nil && res.StatusCode == http.StatusNotModified {
 15175  		if res.Body != nil {
 15176  			res.Body.Close()
 15177  		}
 15178  		return nil, gensupport.WrapError(&googleapi.Error{
 15179  			Code:   res.StatusCode,
 15180  			Header: res.Header,
 15181  		})
 15182  	}
 15183  	if err != nil {
 15184  		return nil, err
 15185  	}
 15186  	defer googleapi.CloseBody(res)
 15187  	if err := googleapi.CheckResponse(res); err != nil {
 15188  		return nil, gensupport.WrapError(err)
 15189  	}
 15190  	ret := &SavedQuery{
 15191  		ServerResponse: googleapi.ServerResponse{
 15192  			Header:         res.Header,
 15193  			HTTPStatusCode: res.StatusCode,
 15194  		},
 15195  	}
 15196  	target := &ret
 15197  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15198  		return nil, err
 15199  	}
 15200  	return ret, nil
 15201  }
 15202  
 15203  type FoldersLocationsSavedQueriesDeleteCall struct {
 15204  	s          *Service
 15205  	name       string
 15206  	urlParams_ gensupport.URLParams
 15207  	ctx_       context.Context
 15208  	header_    http.Header
 15209  }
 15210  
 15211  // Delete: Deletes an existing SavedQuery that was created by the user making
 15212  // the request.
 15213  //
 15214  //   - name: The full resource name of the saved query to delete.
 15215  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]"
 15216  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER
 15217  //     Y_ID]"
 15218  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/
 15219  //     [QUERY_ID]"
 15220  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For
 15221  //     example:
 15222  //     "projects/my-project/locations/global/savedQueries/my-saved-query".
 15223  func (r *FoldersLocationsSavedQueriesService) Delete(name string) *FoldersLocationsSavedQueriesDeleteCall {
 15224  	c := &FoldersLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15225  	c.name = name
 15226  	return c
 15227  }
 15228  
 15229  // Fields allows partial responses to be retrieved. See
 15230  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15231  // details.
 15232  func (c *FoldersLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesDeleteCall {
 15233  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15234  	return c
 15235  }
 15236  
 15237  // Context sets the context to be used in this call's Do method.
 15238  func (c *FoldersLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesDeleteCall {
 15239  	c.ctx_ = ctx
 15240  	return c
 15241  }
 15242  
 15243  // Header returns a http.Header that can be modified by the caller to add
 15244  // headers to the request.
 15245  func (c *FoldersLocationsSavedQueriesDeleteCall) Header() http.Header {
 15246  	if c.header_ == nil {
 15247  		c.header_ = make(http.Header)
 15248  	}
 15249  	return c.header_
 15250  }
 15251  
 15252  func (c *FoldersLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) {
 15253  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15254  	var body io.Reader = nil
 15255  	c.urlParams_.Set("alt", alt)
 15256  	c.urlParams_.Set("prettyPrint", "false")
 15257  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 15258  	urls += "?" + c.urlParams_.Encode()
 15259  	req, err := http.NewRequest("DELETE", urls, body)
 15260  	if err != nil {
 15261  		return nil, err
 15262  	}
 15263  	req.Header = reqHeaders
 15264  	googleapi.Expand(req.URL, map[string]string{
 15265  		"name": c.name,
 15266  	})
 15267  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15268  }
 15269  
 15270  // Do executes the "logging.folders.locations.savedQueries.delete" call.
 15271  // Any non-2xx status code is an error. Response headers are in either
 15272  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 15273  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15274  // whether the returned error was because http.StatusNotModified was returned.
 15275  func (c *FoldersLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 15276  	gensupport.SetOptions(c.urlParams_, opts...)
 15277  	res, err := c.doRequest("json")
 15278  	if res != nil && res.StatusCode == http.StatusNotModified {
 15279  		if res.Body != nil {
 15280  			res.Body.Close()
 15281  		}
 15282  		return nil, gensupport.WrapError(&googleapi.Error{
 15283  			Code:   res.StatusCode,
 15284  			Header: res.Header,
 15285  		})
 15286  	}
 15287  	if err != nil {
 15288  		return nil, err
 15289  	}
 15290  	defer googleapi.CloseBody(res)
 15291  	if err := googleapi.CheckResponse(res); err != nil {
 15292  		return nil, gensupport.WrapError(err)
 15293  	}
 15294  	ret := &Empty{
 15295  		ServerResponse: googleapi.ServerResponse{
 15296  			Header:         res.Header,
 15297  			HTTPStatusCode: res.StatusCode,
 15298  		},
 15299  	}
 15300  	target := &ret
 15301  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15302  		return nil, err
 15303  	}
 15304  	return ret, nil
 15305  }
 15306  
 15307  type FoldersLocationsSavedQueriesListCall struct {
 15308  	s            *Service
 15309  	parent       string
 15310  	urlParams_   gensupport.URLParams
 15311  	ifNoneMatch_ string
 15312  	ctx_         context.Context
 15313  	header_      http.Header
 15314  }
 15315  
 15316  // List: Lists the SavedQueries that were created by the user making the
 15317  // request.
 15318  //
 15319  //   - parent: The resource to which the listed queries belong.
 15320  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 15321  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 15322  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 15323  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:
 15324  //     "projects/my-project/locations/us-central1" Note: The locations portion of
 15325  //     the resource must be specified. To get a list of all saved queries, a
 15326  //     wildcard character - can be used for LOCATION_ID, for example:
 15327  //     "projects/my-project/locations/-".
 15328  func (r *FoldersLocationsSavedQueriesService) List(parent string) *FoldersLocationsSavedQueriesListCall {
 15329  	c := &FoldersLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15330  	c.parent = parent
 15331  	return c
 15332  }
 15333  
 15334  // PageSize sets the optional parameter "pageSize": The maximum number of
 15335  // results to return from this request.Non-positive values are ignored. The
 15336  // presence of nextPageToken in the response indicates that more results might
 15337  // be available.
 15338  func (c *FoldersLocationsSavedQueriesListCall) PageSize(pageSize int64) *FoldersLocationsSavedQueriesListCall {
 15339  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 15340  	return c
 15341  }
 15342  
 15343  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 15344  // the next batch of results from the preceding call to this method. pageToken
 15345  // must be the value of nextPageToken from the previous response. The values of
 15346  // other method parameters should be identical to those in the previous call.
 15347  func (c *FoldersLocationsSavedQueriesListCall) PageToken(pageToken string) *FoldersLocationsSavedQueriesListCall {
 15348  	c.urlParams_.Set("pageToken", pageToken)
 15349  	return c
 15350  }
 15351  
 15352  // Fields allows partial responses to be retrieved. See
 15353  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15354  // details.
 15355  func (c *FoldersLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesListCall {
 15356  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15357  	return c
 15358  }
 15359  
 15360  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15361  // object's ETag matches the given value. This is useful for getting updates
 15362  // only after the object has changed since the last request.
 15363  func (c *FoldersLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *FoldersLocationsSavedQueriesListCall {
 15364  	c.ifNoneMatch_ = entityTag
 15365  	return c
 15366  }
 15367  
 15368  // Context sets the context to be used in this call's Do method.
 15369  func (c *FoldersLocationsSavedQueriesListCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesListCall {
 15370  	c.ctx_ = ctx
 15371  	return c
 15372  }
 15373  
 15374  // Header returns a http.Header that can be modified by the caller to add
 15375  // headers to the request.
 15376  func (c *FoldersLocationsSavedQueriesListCall) Header() http.Header {
 15377  	if c.header_ == nil {
 15378  		c.header_ = make(http.Header)
 15379  	}
 15380  	return c.header_
 15381  }
 15382  
 15383  func (c *FoldersLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) {
 15384  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15385  	if c.ifNoneMatch_ != "" {
 15386  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15387  	}
 15388  	var body io.Reader = nil
 15389  	c.urlParams_.Set("alt", alt)
 15390  	c.urlParams_.Set("prettyPrint", "false")
 15391  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
 15392  	urls += "?" + c.urlParams_.Encode()
 15393  	req, err := http.NewRequest("GET", urls, body)
 15394  	if err != nil {
 15395  		return nil, err
 15396  	}
 15397  	req.Header = reqHeaders
 15398  	googleapi.Expand(req.URL, map[string]string{
 15399  		"parent": c.parent,
 15400  	})
 15401  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15402  }
 15403  
 15404  // Do executes the "logging.folders.locations.savedQueries.list" call.
 15405  // Any non-2xx status code is an error. Response headers are in either
 15406  // *ListSavedQueriesResponse.ServerResponse.Header or (if a response was
 15407  // returned at all) in error.(*googleapi.Error).Header. Use
 15408  // googleapi.IsNotModified to check whether the returned error was because
 15409  // http.StatusNotModified was returned.
 15410  func (c *FoldersLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) {
 15411  	gensupport.SetOptions(c.urlParams_, opts...)
 15412  	res, err := c.doRequest("json")
 15413  	if res != nil && res.StatusCode == http.StatusNotModified {
 15414  		if res.Body != nil {
 15415  			res.Body.Close()
 15416  		}
 15417  		return nil, gensupport.WrapError(&googleapi.Error{
 15418  			Code:   res.StatusCode,
 15419  			Header: res.Header,
 15420  		})
 15421  	}
 15422  	if err != nil {
 15423  		return nil, err
 15424  	}
 15425  	defer googleapi.CloseBody(res)
 15426  	if err := googleapi.CheckResponse(res); err != nil {
 15427  		return nil, gensupport.WrapError(err)
 15428  	}
 15429  	ret := &ListSavedQueriesResponse{
 15430  		ServerResponse: googleapi.ServerResponse{
 15431  			Header:         res.Header,
 15432  			HTTPStatusCode: res.StatusCode,
 15433  		},
 15434  	}
 15435  	target := &ret
 15436  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15437  		return nil, err
 15438  	}
 15439  	return ret, nil
 15440  }
 15441  
 15442  // Pages invokes f for each page of results.
 15443  // A non-nil error returned from f will halt the iteration.
 15444  // The provided context supersedes any context provided to the Context method.
 15445  func (c *FoldersLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error {
 15446  	c.ctx_ = ctx
 15447  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 15448  	for {
 15449  		x, err := c.Do()
 15450  		if err != nil {
 15451  			return err
 15452  		}
 15453  		if err := f(x); err != nil {
 15454  			return err
 15455  		}
 15456  		if x.NextPageToken == "" {
 15457  			return nil
 15458  		}
 15459  		c.PageToken(x.NextPageToken)
 15460  	}
 15461  }
 15462  
 15463  type FoldersLogsDeleteCall struct {
 15464  	s          *Service
 15465  	logName    string
 15466  	urlParams_ gensupport.URLParams
 15467  	ctx_       context.Context
 15468  	header_    http.Header
 15469  }
 15470  
 15471  // Delete: Deletes all the log entries in a log for the _Default Log Bucket.
 15472  // The log reappears if it receives new entries. Log entries written shortly
 15473  // before the delete operation might not be deleted. Entries received after the
 15474  // delete operation with a timestamp before the operation will be deleted.
 15475  //
 15476  //   - logName: The resource name of the log to delete:
 15477  //     projects/[PROJECT_ID]/logs/[LOG_ID]
 15478  //     organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
 15479  //     billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
 15480  //     folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
 15481  //     example, "projects/my-project-id/logs/syslog",
 15482  //     "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more
 15483  //     information about log names, see LogEntry.
 15484  func (r *FoldersLogsService) Delete(logName string) *FoldersLogsDeleteCall {
 15485  	c := &FoldersLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15486  	c.logName = logName
 15487  	return c
 15488  }
 15489  
 15490  // Fields allows partial responses to be retrieved. See
 15491  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15492  // details.
 15493  func (c *FoldersLogsDeleteCall) Fields(s ...googleapi.Field) *FoldersLogsDeleteCall {
 15494  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15495  	return c
 15496  }
 15497  
 15498  // Context sets the context to be used in this call's Do method.
 15499  func (c *FoldersLogsDeleteCall) Context(ctx context.Context) *FoldersLogsDeleteCall {
 15500  	c.ctx_ = ctx
 15501  	return c
 15502  }
 15503  
 15504  // Header returns a http.Header that can be modified by the caller to add
 15505  // headers to the request.
 15506  func (c *FoldersLogsDeleteCall) Header() http.Header {
 15507  	if c.header_ == nil {
 15508  		c.header_ = make(http.Header)
 15509  	}
 15510  	return c.header_
 15511  }
 15512  
 15513  func (c *FoldersLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
 15514  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15515  	var body io.Reader = nil
 15516  	c.urlParams_.Set("alt", alt)
 15517  	c.urlParams_.Set("prettyPrint", "false")
 15518  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
 15519  	urls += "?" + c.urlParams_.Encode()
 15520  	req, err := http.NewRequest("DELETE", urls, body)
 15521  	if err != nil {
 15522  		return nil, err
 15523  	}
 15524  	req.Header = reqHeaders
 15525  	googleapi.Expand(req.URL, map[string]string{
 15526  		"logName": c.logName,
 15527  	})
 15528  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15529  }
 15530  
 15531  // Do executes the "logging.folders.logs.delete" call.
 15532  // Any non-2xx status code is an error. Response headers are in either
 15533  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 15534  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15535  // whether the returned error was because http.StatusNotModified was returned.
 15536  func (c *FoldersLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 15537  	gensupport.SetOptions(c.urlParams_, opts...)
 15538  	res, err := c.doRequest("json")
 15539  	if res != nil && res.StatusCode == http.StatusNotModified {
 15540  		if res.Body != nil {
 15541  			res.Body.Close()
 15542  		}
 15543  		return nil, gensupport.WrapError(&googleapi.Error{
 15544  			Code:   res.StatusCode,
 15545  			Header: res.Header,
 15546  		})
 15547  	}
 15548  	if err != nil {
 15549  		return nil, err
 15550  	}
 15551  	defer googleapi.CloseBody(res)
 15552  	if err := googleapi.CheckResponse(res); err != nil {
 15553  		return nil, gensupport.WrapError(err)
 15554  	}
 15555  	ret := &Empty{
 15556  		ServerResponse: googleapi.ServerResponse{
 15557  			Header:         res.Header,
 15558  			HTTPStatusCode: res.StatusCode,
 15559  		},
 15560  	}
 15561  	target := &ret
 15562  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15563  		return nil, err
 15564  	}
 15565  	return ret, nil
 15566  }
 15567  
 15568  type FoldersLogsListCall struct {
 15569  	s            *Service
 15570  	parent       string
 15571  	urlParams_   gensupport.URLParams
 15572  	ifNoneMatch_ string
 15573  	ctx_         context.Context
 15574  	header_      http.Header
 15575  }
 15576  
 15577  // List: Lists the logs in projects, organizations, folders, or billing
 15578  // accounts. Only logs that have entries are listed.
 15579  //
 15580  //   - parent: The resource name to list logs for: projects/[PROJECT_ID]
 15581  //     organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 15582  //     folders/[FOLDER_ID].
 15583  func (r *FoldersLogsService) List(parent string) *FoldersLogsListCall {
 15584  	c := &FoldersLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15585  	c.parent = parent
 15586  	return c
 15587  }
 15588  
 15589  // PageSize sets the optional parameter "pageSize": The maximum number of
 15590  // results to return from this request. Non-positive values are ignored. The
 15591  // presence of nextPageToken in the response indicates that more results might
 15592  // be available.
 15593  func (c *FoldersLogsListCall) PageSize(pageSize int64) *FoldersLogsListCall {
 15594  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 15595  	return c
 15596  }
 15597  
 15598  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 15599  // the next batch of results from the preceding call to this method. pageToken
 15600  // must be the value of nextPageToken from the previous response. The values of
 15601  // other method parameters should be identical to those in the previous call.
 15602  func (c *FoldersLogsListCall) PageToken(pageToken string) *FoldersLogsListCall {
 15603  	c.urlParams_.Set("pageToken", pageToken)
 15604  	return c
 15605  }
 15606  
 15607  // ResourceNames sets the optional parameter "resourceNames": List of resource
 15608  // names to list logs for:
 15609  // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
 15610  // _ID]
 15611  // organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
 15612  // iews/[VIEW_ID]
 15613  // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
 15614  // ID]/views/[VIEW_ID]
 15615  // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
 15616  // D]To support legacy queries, it could also be: projects/[PROJECT_ID]
 15617  // organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 15618  // folders/[FOLDER_ID]The resource name in the parent field is added to this
 15619  // list.
 15620  func (c *FoldersLogsListCall) ResourceNames(resourceNames ...string) *FoldersLogsListCall {
 15621  	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
 15622  	return c
 15623  }
 15624  
 15625  // Fields allows partial responses to be retrieved. See
 15626  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15627  // details.
 15628  func (c *FoldersLogsListCall) Fields(s ...googleapi.Field) *FoldersLogsListCall {
 15629  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15630  	return c
 15631  }
 15632  
 15633  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15634  // object's ETag matches the given value. This is useful for getting updates
 15635  // only after the object has changed since the last request.
 15636  func (c *FoldersLogsListCall) IfNoneMatch(entityTag string) *FoldersLogsListCall {
 15637  	c.ifNoneMatch_ = entityTag
 15638  	return c
 15639  }
 15640  
 15641  // Context sets the context to be used in this call's Do method.
 15642  func (c *FoldersLogsListCall) Context(ctx context.Context) *FoldersLogsListCall {
 15643  	c.ctx_ = ctx
 15644  	return c
 15645  }
 15646  
 15647  // Header returns a http.Header that can be modified by the caller to add
 15648  // headers to the request.
 15649  func (c *FoldersLogsListCall) Header() http.Header {
 15650  	if c.header_ == nil {
 15651  		c.header_ = make(http.Header)
 15652  	}
 15653  	return c.header_
 15654  }
 15655  
 15656  func (c *FoldersLogsListCall) doRequest(alt string) (*http.Response, error) {
 15657  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15658  	if c.ifNoneMatch_ != "" {
 15659  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15660  	}
 15661  	var body io.Reader = nil
 15662  	c.urlParams_.Set("alt", alt)
 15663  	c.urlParams_.Set("prettyPrint", "false")
 15664  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
 15665  	urls += "?" + c.urlParams_.Encode()
 15666  	req, err := http.NewRequest("GET", urls, body)
 15667  	if err != nil {
 15668  		return nil, err
 15669  	}
 15670  	req.Header = reqHeaders
 15671  	googleapi.Expand(req.URL, map[string]string{
 15672  		"parent": c.parent,
 15673  	})
 15674  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15675  }
 15676  
 15677  // Do executes the "logging.folders.logs.list" call.
 15678  // Any non-2xx status code is an error. Response headers are in either
 15679  // *ListLogsResponse.ServerResponse.Header or (if a response was returned at
 15680  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 15681  // check whether the returned error was because http.StatusNotModified was
 15682  // returned.
 15683  func (c *FoldersLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
 15684  	gensupport.SetOptions(c.urlParams_, opts...)
 15685  	res, err := c.doRequest("json")
 15686  	if res != nil && res.StatusCode == http.StatusNotModified {
 15687  		if res.Body != nil {
 15688  			res.Body.Close()
 15689  		}
 15690  		return nil, gensupport.WrapError(&googleapi.Error{
 15691  			Code:   res.StatusCode,
 15692  			Header: res.Header,
 15693  		})
 15694  	}
 15695  	if err != nil {
 15696  		return nil, err
 15697  	}
 15698  	defer googleapi.CloseBody(res)
 15699  	if err := googleapi.CheckResponse(res); err != nil {
 15700  		return nil, gensupport.WrapError(err)
 15701  	}
 15702  	ret := &ListLogsResponse{
 15703  		ServerResponse: googleapi.ServerResponse{
 15704  			Header:         res.Header,
 15705  			HTTPStatusCode: res.StatusCode,
 15706  		},
 15707  	}
 15708  	target := &ret
 15709  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15710  		return nil, err
 15711  	}
 15712  	return ret, nil
 15713  }
 15714  
 15715  // Pages invokes f for each page of results.
 15716  // A non-nil error returned from f will halt the iteration.
 15717  // The provided context supersedes any context provided to the Context method.
 15718  func (c *FoldersLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
 15719  	c.ctx_ = ctx
 15720  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 15721  	for {
 15722  		x, err := c.Do()
 15723  		if err != nil {
 15724  			return err
 15725  		}
 15726  		if err := f(x); err != nil {
 15727  			return err
 15728  		}
 15729  		if x.NextPageToken == "" {
 15730  			return nil
 15731  		}
 15732  		c.PageToken(x.NextPageToken)
 15733  	}
 15734  }
 15735  
 15736  type FoldersSinksCreateCall struct {
 15737  	s          *Service
 15738  	parent     string
 15739  	logsink    *LogSink
 15740  	urlParams_ gensupport.URLParams
 15741  	ctx_       context.Context
 15742  	header_    http.Header
 15743  }
 15744  
 15745  // Create: Creates a sink that exports specified log entries to a destination.
 15746  // The export begins upon ingress, unless the sink's writer_identity is not
 15747  // permitted to write to the destination. A sink can export log entries only
 15748  // from the resource owning the sink.
 15749  //
 15750  //   - parent: The resource in which to create the sink: "projects/[PROJECT_ID]"
 15751  //     "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]"
 15752  //     "folders/[FOLDER_ID]" For examples:"projects/my-project"
 15753  //     "organizations/123456789".
 15754  func (r *FoldersSinksService) Create(parent string, logsink *LogSink) *FoldersSinksCreateCall {
 15755  	c := &FoldersSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15756  	c.parent = parent
 15757  	c.logsink = logsink
 15758  	return c
 15759  }
 15760  
 15761  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 15762  // service account provided by the caller that will be used to write the log
 15763  // entries. The format must be serviceAccount:some@email. This field can only
 15764  // be specified if you are routing logs to a destination outside this sink's
 15765  // project. If not specified, a Logging service account will automatically be
 15766  // generated.
 15767  func (c *FoldersSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksCreateCall {
 15768  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 15769  	return c
 15770  }
 15771  
 15772  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity":
 15773  // Determines the kind of IAM identity returned as writer_identity in the new
 15774  // sink. If this value is omitted or set to false, and if the sink's parent is
 15775  // a project, then the value returned as writer_identity is the same group or
 15776  // service account used by Cloud Logging before the addition of writer
 15777  // identities to this API. The sink's destination must be in the same project
 15778  // as the sink itself.If this field is set to true, or if the sink is owned by
 15779  // a non-project resource such as an organization, then the value of
 15780  // writer_identity will be a service agent
 15781  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 15782  // used by the sinks with the same parent. For more information, see
 15783  // writer_identity in LogSink.
 15784  func (c *FoldersSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksCreateCall {
 15785  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 15786  	return c
 15787  }
 15788  
 15789  // Fields allows partial responses to be retrieved. See
 15790  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15791  // details.
 15792  func (c *FoldersSinksCreateCall) Fields(s ...googleapi.Field) *FoldersSinksCreateCall {
 15793  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15794  	return c
 15795  }
 15796  
 15797  // Context sets the context to be used in this call's Do method.
 15798  func (c *FoldersSinksCreateCall) Context(ctx context.Context) *FoldersSinksCreateCall {
 15799  	c.ctx_ = ctx
 15800  	return c
 15801  }
 15802  
 15803  // Header returns a http.Header that can be modified by the caller to add
 15804  // headers to the request.
 15805  func (c *FoldersSinksCreateCall) Header() http.Header {
 15806  	if c.header_ == nil {
 15807  		c.header_ = make(http.Header)
 15808  	}
 15809  	return c.header_
 15810  }
 15811  
 15812  func (c *FoldersSinksCreateCall) doRequest(alt string) (*http.Response, error) {
 15813  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 15814  	var body io.Reader = nil
 15815  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 15816  	if err != nil {
 15817  		return nil, err
 15818  	}
 15819  	c.urlParams_.Set("alt", alt)
 15820  	c.urlParams_.Set("prettyPrint", "false")
 15821  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
 15822  	urls += "?" + c.urlParams_.Encode()
 15823  	req, err := http.NewRequest("POST", urls, body)
 15824  	if err != nil {
 15825  		return nil, err
 15826  	}
 15827  	req.Header = reqHeaders
 15828  	googleapi.Expand(req.URL, map[string]string{
 15829  		"parent": c.parent,
 15830  	})
 15831  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15832  }
 15833  
 15834  // Do executes the "logging.folders.sinks.create" call.
 15835  // Any non-2xx status code is an error. Response headers are in either
 15836  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 15837  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15838  // whether the returned error was because http.StatusNotModified was returned.
 15839  func (c *FoldersSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 15840  	gensupport.SetOptions(c.urlParams_, opts...)
 15841  	res, err := c.doRequest("json")
 15842  	if res != nil && res.StatusCode == http.StatusNotModified {
 15843  		if res.Body != nil {
 15844  			res.Body.Close()
 15845  		}
 15846  		return nil, gensupport.WrapError(&googleapi.Error{
 15847  			Code:   res.StatusCode,
 15848  			Header: res.Header,
 15849  		})
 15850  	}
 15851  	if err != nil {
 15852  		return nil, err
 15853  	}
 15854  	defer googleapi.CloseBody(res)
 15855  	if err := googleapi.CheckResponse(res); err != nil {
 15856  		return nil, gensupport.WrapError(err)
 15857  	}
 15858  	ret := &LogSink{
 15859  		ServerResponse: googleapi.ServerResponse{
 15860  			Header:         res.Header,
 15861  			HTTPStatusCode: res.StatusCode,
 15862  		},
 15863  	}
 15864  	target := &ret
 15865  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15866  		return nil, err
 15867  	}
 15868  	return ret, nil
 15869  }
 15870  
 15871  type FoldersSinksDeleteCall struct {
 15872  	s          *Service
 15873  	sinkNameid string
 15874  	urlParams_ gensupport.URLParams
 15875  	ctx_       context.Context
 15876  	header_    http.Header
 15877  }
 15878  
 15879  // Delete: Deletes a sink. If the sink has a unique writer_identity, then that
 15880  // service account is also deleted.
 15881  //
 15882  //   - sinkName: The full resource name of the sink to delete, including the
 15883  //     parent resource and the sink identifier:
 15884  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 15885  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 15886  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 15887  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 15888  //     example:"projects/my-project/sinks/my-sink".
 15889  func (r *FoldersSinksService) Delete(sinkNameid string) *FoldersSinksDeleteCall {
 15890  	c := &FoldersSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15891  	c.sinkNameid = sinkNameid
 15892  	return c
 15893  }
 15894  
 15895  // Fields allows partial responses to be retrieved. See
 15896  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15897  // details.
 15898  func (c *FoldersSinksDeleteCall) Fields(s ...googleapi.Field) *FoldersSinksDeleteCall {
 15899  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15900  	return c
 15901  }
 15902  
 15903  // Context sets the context to be used in this call's Do method.
 15904  func (c *FoldersSinksDeleteCall) Context(ctx context.Context) *FoldersSinksDeleteCall {
 15905  	c.ctx_ = ctx
 15906  	return c
 15907  }
 15908  
 15909  // Header returns a http.Header that can be modified by the caller to add
 15910  // headers to the request.
 15911  func (c *FoldersSinksDeleteCall) Header() http.Header {
 15912  	if c.header_ == nil {
 15913  		c.header_ = make(http.Header)
 15914  	}
 15915  	return c.header_
 15916  }
 15917  
 15918  func (c *FoldersSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 15919  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15920  	var body io.Reader = nil
 15921  	c.urlParams_.Set("alt", alt)
 15922  	c.urlParams_.Set("prettyPrint", "false")
 15923  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 15924  	urls += "?" + c.urlParams_.Encode()
 15925  	req, err := http.NewRequest("DELETE", urls, body)
 15926  	if err != nil {
 15927  		return nil, err
 15928  	}
 15929  	req.Header = reqHeaders
 15930  	googleapi.Expand(req.URL, map[string]string{
 15931  		"sinkName": c.sinkNameid,
 15932  	})
 15933  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15934  }
 15935  
 15936  // Do executes the "logging.folders.sinks.delete" call.
 15937  // Any non-2xx status code is an error. Response headers are in either
 15938  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 15939  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15940  // whether the returned error was because http.StatusNotModified was returned.
 15941  func (c *FoldersSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 15942  	gensupport.SetOptions(c.urlParams_, opts...)
 15943  	res, err := c.doRequest("json")
 15944  	if res != nil && res.StatusCode == http.StatusNotModified {
 15945  		if res.Body != nil {
 15946  			res.Body.Close()
 15947  		}
 15948  		return nil, gensupport.WrapError(&googleapi.Error{
 15949  			Code:   res.StatusCode,
 15950  			Header: res.Header,
 15951  		})
 15952  	}
 15953  	if err != nil {
 15954  		return nil, err
 15955  	}
 15956  	defer googleapi.CloseBody(res)
 15957  	if err := googleapi.CheckResponse(res); err != nil {
 15958  		return nil, gensupport.WrapError(err)
 15959  	}
 15960  	ret := &Empty{
 15961  		ServerResponse: googleapi.ServerResponse{
 15962  			Header:         res.Header,
 15963  			HTTPStatusCode: res.StatusCode,
 15964  		},
 15965  	}
 15966  	target := &ret
 15967  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15968  		return nil, err
 15969  	}
 15970  	return ret, nil
 15971  }
 15972  
 15973  type FoldersSinksGetCall struct {
 15974  	s            *Service
 15975  	sinkName     string
 15976  	urlParams_   gensupport.URLParams
 15977  	ifNoneMatch_ string
 15978  	ctx_         context.Context
 15979  	header_      http.Header
 15980  }
 15981  
 15982  // Get: Gets a sink.
 15983  //
 15984  //   - sinkName: The resource name of the sink:
 15985  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 15986  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 15987  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 15988  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 15989  //     example:"projects/my-project/sinks/my-sink".
 15990  func (r *FoldersSinksService) Get(sinkName string) *FoldersSinksGetCall {
 15991  	c := &FoldersSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15992  	c.sinkName = sinkName
 15993  	return c
 15994  }
 15995  
 15996  // Fields allows partial responses to be retrieved. See
 15997  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15998  // details.
 15999  func (c *FoldersSinksGetCall) Fields(s ...googleapi.Field) *FoldersSinksGetCall {
 16000  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16001  	return c
 16002  }
 16003  
 16004  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 16005  // object's ETag matches the given value. This is useful for getting updates
 16006  // only after the object has changed since the last request.
 16007  func (c *FoldersSinksGetCall) IfNoneMatch(entityTag string) *FoldersSinksGetCall {
 16008  	c.ifNoneMatch_ = entityTag
 16009  	return c
 16010  }
 16011  
 16012  // Context sets the context to be used in this call's Do method.
 16013  func (c *FoldersSinksGetCall) Context(ctx context.Context) *FoldersSinksGetCall {
 16014  	c.ctx_ = ctx
 16015  	return c
 16016  }
 16017  
 16018  // Header returns a http.Header that can be modified by the caller to add
 16019  // headers to the request.
 16020  func (c *FoldersSinksGetCall) Header() http.Header {
 16021  	if c.header_ == nil {
 16022  		c.header_ = make(http.Header)
 16023  	}
 16024  	return c.header_
 16025  }
 16026  
 16027  func (c *FoldersSinksGetCall) doRequest(alt string) (*http.Response, error) {
 16028  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 16029  	if c.ifNoneMatch_ != "" {
 16030  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 16031  	}
 16032  	var body io.Reader = nil
 16033  	c.urlParams_.Set("alt", alt)
 16034  	c.urlParams_.Set("prettyPrint", "false")
 16035  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 16036  	urls += "?" + c.urlParams_.Encode()
 16037  	req, err := http.NewRequest("GET", urls, body)
 16038  	if err != nil {
 16039  		return nil, err
 16040  	}
 16041  	req.Header = reqHeaders
 16042  	googleapi.Expand(req.URL, map[string]string{
 16043  		"sinkName": c.sinkName,
 16044  	})
 16045  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16046  }
 16047  
 16048  // Do executes the "logging.folders.sinks.get" call.
 16049  // Any non-2xx status code is an error. Response headers are in either
 16050  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 16051  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 16052  // whether the returned error was because http.StatusNotModified was returned.
 16053  func (c *FoldersSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 16054  	gensupport.SetOptions(c.urlParams_, opts...)
 16055  	res, err := c.doRequest("json")
 16056  	if res != nil && res.StatusCode == http.StatusNotModified {
 16057  		if res.Body != nil {
 16058  			res.Body.Close()
 16059  		}
 16060  		return nil, gensupport.WrapError(&googleapi.Error{
 16061  			Code:   res.StatusCode,
 16062  			Header: res.Header,
 16063  		})
 16064  	}
 16065  	if err != nil {
 16066  		return nil, err
 16067  	}
 16068  	defer googleapi.CloseBody(res)
 16069  	if err := googleapi.CheckResponse(res); err != nil {
 16070  		return nil, gensupport.WrapError(err)
 16071  	}
 16072  	ret := &LogSink{
 16073  		ServerResponse: googleapi.ServerResponse{
 16074  			Header:         res.Header,
 16075  			HTTPStatusCode: res.StatusCode,
 16076  		},
 16077  	}
 16078  	target := &ret
 16079  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16080  		return nil, err
 16081  	}
 16082  	return ret, nil
 16083  }
 16084  
 16085  type FoldersSinksListCall struct {
 16086  	s            *Service
 16087  	parent       string
 16088  	urlParams_   gensupport.URLParams
 16089  	ifNoneMatch_ string
 16090  	ctx_         context.Context
 16091  	header_      http.Header
 16092  }
 16093  
 16094  // List: Lists sinks.
 16095  //
 16096  //   - parent: The parent resource whose sinks are to be listed:
 16097  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 16098  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
 16099  func (r *FoldersSinksService) List(parent string) *FoldersSinksListCall {
 16100  	c := &FoldersSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16101  	c.parent = parent
 16102  	return c
 16103  }
 16104  
 16105  // Filter sets the optional parameter "filter": A filter expression to
 16106  // constrain the sinks returned. Today, this only supports the following
 16107  // strings: ” 'in_scope("ALL")', 'in_scope("ANCESTOR")',
 16108  // 'in_scope("DEFAULT")'.Description of scopes below. ALL: Includes all of the
 16109  // sinks which can be returned in any other scope. ANCESTOR: Includes
 16110  // intercepting sinks owned by ancestor resources. DEFAULT: Includes sinks
 16111  // owned by parent.When the empty string is provided, then the filter
 16112  // 'in_scope("DEFAULT")' is applied.
 16113  func (c *FoldersSinksListCall) Filter(filter string) *FoldersSinksListCall {
 16114  	c.urlParams_.Set("filter", filter)
 16115  	return c
 16116  }
 16117  
 16118  // PageSize sets the optional parameter "pageSize": The maximum number of
 16119  // results to return from this request. Non-positive values are ignored. The
 16120  // presence of nextPageToken in the response indicates that more results might
 16121  // be available.
 16122  func (c *FoldersSinksListCall) PageSize(pageSize int64) *FoldersSinksListCall {
 16123  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 16124  	return c
 16125  }
 16126  
 16127  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 16128  // the next batch of results from the preceding call to this method. pageToken
 16129  // must be the value of nextPageToken from the previous response. The values of
 16130  // other method parameters should be identical to those in the previous call.
 16131  func (c *FoldersSinksListCall) PageToken(pageToken string) *FoldersSinksListCall {
 16132  	c.urlParams_.Set("pageToken", pageToken)
 16133  	return c
 16134  }
 16135  
 16136  // Fields allows partial responses to be retrieved. See
 16137  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16138  // details.
 16139  func (c *FoldersSinksListCall) Fields(s ...googleapi.Field) *FoldersSinksListCall {
 16140  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16141  	return c
 16142  }
 16143  
 16144  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 16145  // object's ETag matches the given value. This is useful for getting updates
 16146  // only after the object has changed since the last request.
 16147  func (c *FoldersSinksListCall) IfNoneMatch(entityTag string) *FoldersSinksListCall {
 16148  	c.ifNoneMatch_ = entityTag
 16149  	return c
 16150  }
 16151  
 16152  // Context sets the context to be used in this call's Do method.
 16153  func (c *FoldersSinksListCall) Context(ctx context.Context) *FoldersSinksListCall {
 16154  	c.ctx_ = ctx
 16155  	return c
 16156  }
 16157  
 16158  // Header returns a http.Header that can be modified by the caller to add
 16159  // headers to the request.
 16160  func (c *FoldersSinksListCall) Header() http.Header {
 16161  	if c.header_ == nil {
 16162  		c.header_ = make(http.Header)
 16163  	}
 16164  	return c.header_
 16165  }
 16166  
 16167  func (c *FoldersSinksListCall) doRequest(alt string) (*http.Response, error) {
 16168  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 16169  	if c.ifNoneMatch_ != "" {
 16170  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 16171  	}
 16172  	var body io.Reader = nil
 16173  	c.urlParams_.Set("alt", alt)
 16174  	c.urlParams_.Set("prettyPrint", "false")
 16175  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
 16176  	urls += "?" + c.urlParams_.Encode()
 16177  	req, err := http.NewRequest("GET", urls, body)
 16178  	if err != nil {
 16179  		return nil, err
 16180  	}
 16181  	req.Header = reqHeaders
 16182  	googleapi.Expand(req.URL, map[string]string{
 16183  		"parent": c.parent,
 16184  	})
 16185  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16186  }
 16187  
 16188  // Do executes the "logging.folders.sinks.list" call.
 16189  // Any non-2xx status code is an error. Response headers are in either
 16190  // *ListSinksResponse.ServerResponse.Header or (if a response was returned at
 16191  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 16192  // check whether the returned error was because http.StatusNotModified was
 16193  // returned.
 16194  func (c *FoldersSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
 16195  	gensupport.SetOptions(c.urlParams_, opts...)
 16196  	res, err := c.doRequest("json")
 16197  	if res != nil && res.StatusCode == http.StatusNotModified {
 16198  		if res.Body != nil {
 16199  			res.Body.Close()
 16200  		}
 16201  		return nil, gensupport.WrapError(&googleapi.Error{
 16202  			Code:   res.StatusCode,
 16203  			Header: res.Header,
 16204  		})
 16205  	}
 16206  	if err != nil {
 16207  		return nil, err
 16208  	}
 16209  	defer googleapi.CloseBody(res)
 16210  	if err := googleapi.CheckResponse(res); err != nil {
 16211  		return nil, gensupport.WrapError(err)
 16212  	}
 16213  	ret := &ListSinksResponse{
 16214  		ServerResponse: googleapi.ServerResponse{
 16215  			Header:         res.Header,
 16216  			HTTPStatusCode: res.StatusCode,
 16217  		},
 16218  	}
 16219  	target := &ret
 16220  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16221  		return nil, err
 16222  	}
 16223  	return ret, nil
 16224  }
 16225  
 16226  // Pages invokes f for each page of results.
 16227  // A non-nil error returned from f will halt the iteration.
 16228  // The provided context supersedes any context provided to the Context method.
 16229  func (c *FoldersSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
 16230  	c.ctx_ = ctx
 16231  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 16232  	for {
 16233  		x, err := c.Do()
 16234  		if err != nil {
 16235  			return err
 16236  		}
 16237  		if err := f(x); err != nil {
 16238  			return err
 16239  		}
 16240  		if x.NextPageToken == "" {
 16241  			return nil
 16242  		}
 16243  		c.PageToken(x.NextPageToken)
 16244  	}
 16245  }
 16246  
 16247  type FoldersSinksPatchCall struct {
 16248  	s          *Service
 16249  	sinkNameid string
 16250  	logsink    *LogSink
 16251  	urlParams_ gensupport.URLParams
 16252  	ctx_       context.Context
 16253  	header_    http.Header
 16254  }
 16255  
 16256  // Patch: Updates a sink. This method replaces the values of the destination
 16257  // and filter fields of the existing sink with the corresponding values from
 16258  // the new sink.The updated sink might also have a new writer_identity; see the
 16259  // unique_writer_identity field.
 16260  //
 16261  //   - sinkName: The full resource name of the sink to update, including the
 16262  //     parent resource and the sink identifier:
 16263  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 16264  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 16265  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 16266  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 16267  //     example:"projects/my-project/sinks/my-sink".
 16268  func (r *FoldersSinksService) Patch(sinkNameid string, logsink *LogSink) *FoldersSinksPatchCall {
 16269  	c := &FoldersSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16270  	c.sinkNameid = sinkNameid
 16271  	c.logsink = logsink
 16272  	return c
 16273  }
 16274  
 16275  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 16276  // service account provided by the caller that will be used to write the log
 16277  // entries. The format must be serviceAccount:some@email. This field can only
 16278  // be specified if you are routing logs to a destination outside this sink's
 16279  // project. If not specified, a Logging service account will automatically be
 16280  // generated.
 16281  func (c *FoldersSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksPatchCall {
 16282  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 16283  	return c
 16284  }
 16285  
 16286  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See
 16287  // sinks.create for a description of this field. When updating a sink, the
 16288  // effect of this field on the value of writer_identity in the updated sink
 16289  // depends on both the old and new values of this field: If the old and new
 16290  // values of this field are both false or both true, then there is no change to
 16291  // the sink's writer_identity. If the old value is false and the new value is
 16292  // true, then writer_identity is changed to a service agent
 16293  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 16294  // owned by Cloud Logging. It is an error if the old value is true and the new
 16295  // value is set to false or defaulted to false.
 16296  func (c *FoldersSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksPatchCall {
 16297  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 16298  	return c
 16299  }
 16300  
 16301  // UpdateMask sets the optional parameter "updateMask": Field mask that
 16302  // specifies the fields in sink that need an update. A sink field will be
 16303  // overwritten if, and only if, it is in the update mask. name and output only
 16304  // fields cannot be updated.An empty updateMask is temporarily treated as using
 16305  // the following mask for backwards compatibility
 16306  // purposes:destination,filter,includeChildrenAt some point in the future,
 16307  // behavior will be removed and specifying an empty updateMask will be an
 16308  // error.For a detailed FieldMask definition, see
 16309  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 16310  // example: updateMask=filter
 16311  func (c *FoldersSinksPatchCall) UpdateMask(updateMask string) *FoldersSinksPatchCall {
 16312  	c.urlParams_.Set("updateMask", updateMask)
 16313  	return c
 16314  }
 16315  
 16316  // Fields allows partial responses to be retrieved. See
 16317  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16318  // details.
 16319  func (c *FoldersSinksPatchCall) Fields(s ...googleapi.Field) *FoldersSinksPatchCall {
 16320  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16321  	return c
 16322  }
 16323  
 16324  // Context sets the context to be used in this call's Do method.
 16325  func (c *FoldersSinksPatchCall) Context(ctx context.Context) *FoldersSinksPatchCall {
 16326  	c.ctx_ = ctx
 16327  	return c
 16328  }
 16329  
 16330  // Header returns a http.Header that can be modified by the caller to add
 16331  // headers to the request.
 16332  func (c *FoldersSinksPatchCall) Header() http.Header {
 16333  	if c.header_ == nil {
 16334  		c.header_ = make(http.Header)
 16335  	}
 16336  	return c.header_
 16337  }
 16338  
 16339  func (c *FoldersSinksPatchCall) doRequest(alt string) (*http.Response, error) {
 16340  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 16341  	var body io.Reader = nil
 16342  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 16343  	if err != nil {
 16344  		return nil, err
 16345  	}
 16346  	c.urlParams_.Set("alt", alt)
 16347  	c.urlParams_.Set("prettyPrint", "false")
 16348  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 16349  	urls += "?" + c.urlParams_.Encode()
 16350  	req, err := http.NewRequest("PATCH", urls, body)
 16351  	if err != nil {
 16352  		return nil, err
 16353  	}
 16354  	req.Header = reqHeaders
 16355  	googleapi.Expand(req.URL, map[string]string{
 16356  		"sinkName": c.sinkNameid,
 16357  	})
 16358  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16359  }
 16360  
 16361  // Do executes the "logging.folders.sinks.patch" call.
 16362  // Any non-2xx status code is an error. Response headers are in either
 16363  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 16364  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 16365  // whether the returned error was because http.StatusNotModified was returned.
 16366  func (c *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 16367  	gensupport.SetOptions(c.urlParams_, opts...)
 16368  	res, err := c.doRequest("json")
 16369  	if res != nil && res.StatusCode == http.StatusNotModified {
 16370  		if res.Body != nil {
 16371  			res.Body.Close()
 16372  		}
 16373  		return nil, gensupport.WrapError(&googleapi.Error{
 16374  			Code:   res.StatusCode,
 16375  			Header: res.Header,
 16376  		})
 16377  	}
 16378  	if err != nil {
 16379  		return nil, err
 16380  	}
 16381  	defer googleapi.CloseBody(res)
 16382  	if err := googleapi.CheckResponse(res); err != nil {
 16383  		return nil, gensupport.WrapError(err)
 16384  	}
 16385  	ret := &LogSink{
 16386  		ServerResponse: googleapi.ServerResponse{
 16387  			Header:         res.Header,
 16388  			HTTPStatusCode: res.StatusCode,
 16389  		},
 16390  	}
 16391  	target := &ret
 16392  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16393  		return nil, err
 16394  	}
 16395  	return ret, nil
 16396  }
 16397  
 16398  type FoldersSinksUpdateCall struct {
 16399  	s          *Service
 16400  	sinkNameid string
 16401  	logsink    *LogSink
 16402  	urlParams_ gensupport.URLParams
 16403  	ctx_       context.Context
 16404  	header_    http.Header
 16405  }
 16406  
 16407  // Update: Updates a sink. This method replaces the values of the destination
 16408  // and filter fields of the existing sink with the corresponding values from
 16409  // the new sink.The updated sink might also have a new writer_identity; see the
 16410  // unique_writer_identity field.
 16411  //
 16412  //   - sinkName: The full resource name of the sink to update, including the
 16413  //     parent resource and the sink identifier:
 16414  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 16415  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 16416  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 16417  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 16418  //     example:"projects/my-project/sinks/my-sink".
 16419  func (r *FoldersSinksService) Update(sinkNameid string, logsink *LogSink) *FoldersSinksUpdateCall {
 16420  	c := &FoldersSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16421  	c.sinkNameid = sinkNameid
 16422  	c.logsink = logsink
 16423  	return c
 16424  }
 16425  
 16426  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 16427  // service account provided by the caller that will be used to write the log
 16428  // entries. The format must be serviceAccount:some@email. This field can only
 16429  // be specified if you are routing logs to a destination outside this sink's
 16430  // project. If not specified, a Logging service account will automatically be
 16431  // generated.
 16432  func (c *FoldersSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksUpdateCall {
 16433  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 16434  	return c
 16435  }
 16436  
 16437  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See
 16438  // sinks.create for a description of this field. When updating a sink, the
 16439  // effect of this field on the value of writer_identity in the updated sink
 16440  // depends on both the old and new values of this field: If the old and new
 16441  // values of this field are both false or both true, then there is no change to
 16442  // the sink's writer_identity. If the old value is false and the new value is
 16443  // true, then writer_identity is changed to a service agent
 16444  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 16445  // owned by Cloud Logging. It is an error if the old value is true and the new
 16446  // value is set to false or defaulted to false.
 16447  func (c *FoldersSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksUpdateCall {
 16448  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 16449  	return c
 16450  }
 16451  
 16452  // UpdateMask sets the optional parameter "updateMask": Field mask that
 16453  // specifies the fields in sink that need an update. A sink field will be
 16454  // overwritten if, and only if, it is in the update mask. name and output only
 16455  // fields cannot be updated.An empty updateMask is temporarily treated as using
 16456  // the following mask for backwards compatibility
 16457  // purposes:destination,filter,includeChildrenAt some point in the future,
 16458  // behavior will be removed and specifying an empty updateMask will be an
 16459  // error.For a detailed FieldMask definition, see
 16460  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 16461  // example: updateMask=filter
 16462  func (c *FoldersSinksUpdateCall) UpdateMask(updateMask string) *FoldersSinksUpdateCall {
 16463  	c.urlParams_.Set("updateMask", updateMask)
 16464  	return c
 16465  }
 16466  
 16467  // Fields allows partial responses to be retrieved. See
 16468  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16469  // details.
 16470  func (c *FoldersSinksUpdateCall) Fields(s ...googleapi.Field) *FoldersSinksUpdateCall {
 16471  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16472  	return c
 16473  }
 16474  
 16475  // Context sets the context to be used in this call's Do method.
 16476  func (c *FoldersSinksUpdateCall) Context(ctx context.Context) *FoldersSinksUpdateCall {
 16477  	c.ctx_ = ctx
 16478  	return c
 16479  }
 16480  
 16481  // Header returns a http.Header that can be modified by the caller to add
 16482  // headers to the request.
 16483  func (c *FoldersSinksUpdateCall) Header() http.Header {
 16484  	if c.header_ == nil {
 16485  		c.header_ = make(http.Header)
 16486  	}
 16487  	return c.header_
 16488  }
 16489  
 16490  func (c *FoldersSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
 16491  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 16492  	var body io.Reader = nil
 16493  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 16494  	if err != nil {
 16495  		return nil, err
 16496  	}
 16497  	c.urlParams_.Set("alt", alt)
 16498  	c.urlParams_.Set("prettyPrint", "false")
 16499  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 16500  	urls += "?" + c.urlParams_.Encode()
 16501  	req, err := http.NewRequest("PUT", urls, body)
 16502  	if err != nil {
 16503  		return nil, err
 16504  	}
 16505  	req.Header = reqHeaders
 16506  	googleapi.Expand(req.URL, map[string]string{
 16507  		"sinkName": c.sinkNameid,
 16508  	})
 16509  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16510  }
 16511  
 16512  // Do executes the "logging.folders.sinks.update" call.
 16513  // Any non-2xx status code is an error. Response headers are in either
 16514  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 16515  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 16516  // whether the returned error was because http.StatusNotModified was returned.
 16517  func (c *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 16518  	gensupport.SetOptions(c.urlParams_, opts...)
 16519  	res, err := c.doRequest("json")
 16520  	if res != nil && res.StatusCode == http.StatusNotModified {
 16521  		if res.Body != nil {
 16522  			res.Body.Close()
 16523  		}
 16524  		return nil, gensupport.WrapError(&googleapi.Error{
 16525  			Code:   res.StatusCode,
 16526  			Header: res.Header,
 16527  		})
 16528  	}
 16529  	if err != nil {
 16530  		return nil, err
 16531  	}
 16532  	defer googleapi.CloseBody(res)
 16533  	if err := googleapi.CheckResponse(res); err != nil {
 16534  		return nil, gensupport.WrapError(err)
 16535  	}
 16536  	ret := &LogSink{
 16537  		ServerResponse: googleapi.ServerResponse{
 16538  			Header:         res.Header,
 16539  			HTTPStatusCode: res.StatusCode,
 16540  		},
 16541  	}
 16542  	target := &ret
 16543  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16544  		return nil, err
 16545  	}
 16546  	return ret, nil
 16547  }
 16548  
 16549  type LocationsGetCall struct {
 16550  	s            *Service
 16551  	name         string
 16552  	urlParams_   gensupport.URLParams
 16553  	ifNoneMatch_ string
 16554  	ctx_         context.Context
 16555  	header_      http.Header
 16556  }
 16557  
 16558  // Get: Gets information about a location.
 16559  //
 16560  // - name: Resource name for the location.
 16561  func (r *LocationsService) Get(name string) *LocationsGetCall {
 16562  	c := &LocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16563  	c.name = name
 16564  	return c
 16565  }
 16566  
 16567  // Fields allows partial responses to be retrieved. See
 16568  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16569  // details.
 16570  func (c *LocationsGetCall) Fields(s ...googleapi.Field) *LocationsGetCall {
 16571  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16572  	return c
 16573  }
 16574  
 16575  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 16576  // object's ETag matches the given value. This is useful for getting updates
 16577  // only after the object has changed since the last request.
 16578  func (c *LocationsGetCall) IfNoneMatch(entityTag string) *LocationsGetCall {
 16579  	c.ifNoneMatch_ = entityTag
 16580  	return c
 16581  }
 16582  
 16583  // Context sets the context to be used in this call's Do method.
 16584  func (c *LocationsGetCall) Context(ctx context.Context) *LocationsGetCall {
 16585  	c.ctx_ = ctx
 16586  	return c
 16587  }
 16588  
 16589  // Header returns a http.Header that can be modified by the caller to add
 16590  // headers to the request.
 16591  func (c *LocationsGetCall) Header() http.Header {
 16592  	if c.header_ == nil {
 16593  		c.header_ = make(http.Header)
 16594  	}
 16595  	return c.header_
 16596  }
 16597  
 16598  func (c *LocationsGetCall) doRequest(alt string) (*http.Response, error) {
 16599  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 16600  	if c.ifNoneMatch_ != "" {
 16601  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 16602  	}
 16603  	var body io.Reader = nil
 16604  	c.urlParams_.Set("alt", alt)
 16605  	c.urlParams_.Set("prettyPrint", "false")
 16606  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 16607  	urls += "?" + c.urlParams_.Encode()
 16608  	req, err := http.NewRequest("GET", urls, body)
 16609  	if err != nil {
 16610  		return nil, err
 16611  	}
 16612  	req.Header = reqHeaders
 16613  	googleapi.Expand(req.URL, map[string]string{
 16614  		"name": c.name,
 16615  	})
 16616  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16617  }
 16618  
 16619  // Do executes the "logging.locations.get" call.
 16620  // Any non-2xx status code is an error. Response headers are in either
 16621  // *Location.ServerResponse.Header or (if a response was returned at all) in
 16622  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 16623  // whether the returned error was because http.StatusNotModified was returned.
 16624  func (c *LocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
 16625  	gensupport.SetOptions(c.urlParams_, opts...)
 16626  	res, err := c.doRequest("json")
 16627  	if res != nil && res.StatusCode == http.StatusNotModified {
 16628  		if res.Body != nil {
 16629  			res.Body.Close()
 16630  		}
 16631  		return nil, gensupport.WrapError(&googleapi.Error{
 16632  			Code:   res.StatusCode,
 16633  			Header: res.Header,
 16634  		})
 16635  	}
 16636  	if err != nil {
 16637  		return nil, err
 16638  	}
 16639  	defer googleapi.CloseBody(res)
 16640  	if err := googleapi.CheckResponse(res); err != nil {
 16641  		return nil, gensupport.WrapError(err)
 16642  	}
 16643  	ret := &Location{
 16644  		ServerResponse: googleapi.ServerResponse{
 16645  			Header:         res.Header,
 16646  			HTTPStatusCode: res.StatusCode,
 16647  		},
 16648  	}
 16649  	target := &ret
 16650  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16651  		return nil, err
 16652  	}
 16653  	return ret, nil
 16654  }
 16655  
 16656  type LocationsListCall struct {
 16657  	s            *Service
 16658  	name         string
 16659  	urlParams_   gensupport.URLParams
 16660  	ifNoneMatch_ string
 16661  	ctx_         context.Context
 16662  	header_      http.Header
 16663  }
 16664  
 16665  // List: Lists information about the supported locations for this service.
 16666  //
 16667  // - name: The resource that owns the locations collection, if applicable.
 16668  func (r *LocationsService) List(name string) *LocationsListCall {
 16669  	c := &LocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16670  	c.name = name
 16671  	return c
 16672  }
 16673  
 16674  // Filter sets the optional parameter "filter": A filter to narrow down results
 16675  // to a preferred subset. The filtering language accepts strings like
 16676  // "displayName=tokyo", and is documented in more detail in AIP-160
 16677  // (https://google.aip.dev/160).
 16678  func (c *LocationsListCall) Filter(filter string) *LocationsListCall {
 16679  	c.urlParams_.Set("filter", filter)
 16680  	return c
 16681  }
 16682  
 16683  // PageSize sets the optional parameter "pageSize": The maximum number of
 16684  // results to return. If not set, the service selects a default.
 16685  func (c *LocationsListCall) PageSize(pageSize int64) *LocationsListCall {
 16686  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 16687  	return c
 16688  }
 16689  
 16690  // PageToken sets the optional parameter "pageToken": A page token received
 16691  // from the next_page_token field in the response. Send that page token to
 16692  // receive the subsequent page.
 16693  func (c *LocationsListCall) PageToken(pageToken string) *LocationsListCall {
 16694  	c.urlParams_.Set("pageToken", pageToken)
 16695  	return c
 16696  }
 16697  
 16698  // Fields allows partial responses to be retrieved. See
 16699  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16700  // details.
 16701  func (c *LocationsListCall) Fields(s ...googleapi.Field) *LocationsListCall {
 16702  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16703  	return c
 16704  }
 16705  
 16706  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 16707  // object's ETag matches the given value. This is useful for getting updates
 16708  // only after the object has changed since the last request.
 16709  func (c *LocationsListCall) IfNoneMatch(entityTag string) *LocationsListCall {
 16710  	c.ifNoneMatch_ = entityTag
 16711  	return c
 16712  }
 16713  
 16714  // Context sets the context to be used in this call's Do method.
 16715  func (c *LocationsListCall) Context(ctx context.Context) *LocationsListCall {
 16716  	c.ctx_ = ctx
 16717  	return c
 16718  }
 16719  
 16720  // Header returns a http.Header that can be modified by the caller to add
 16721  // headers to the request.
 16722  func (c *LocationsListCall) Header() http.Header {
 16723  	if c.header_ == nil {
 16724  		c.header_ = make(http.Header)
 16725  	}
 16726  	return c.header_
 16727  }
 16728  
 16729  func (c *LocationsListCall) doRequest(alt string) (*http.Response, error) {
 16730  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 16731  	if c.ifNoneMatch_ != "" {
 16732  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 16733  	}
 16734  	var body io.Reader = nil
 16735  	c.urlParams_.Set("alt", alt)
 16736  	c.urlParams_.Set("prettyPrint", "false")
 16737  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
 16738  	urls += "?" + c.urlParams_.Encode()
 16739  	req, err := http.NewRequest("GET", urls, body)
 16740  	if err != nil {
 16741  		return nil, err
 16742  	}
 16743  	req.Header = reqHeaders
 16744  	googleapi.Expand(req.URL, map[string]string{
 16745  		"name": c.name,
 16746  	})
 16747  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16748  }
 16749  
 16750  // Do executes the "logging.locations.list" call.
 16751  // Any non-2xx status code is an error. Response headers are in either
 16752  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
 16753  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 16754  // check whether the returned error was because http.StatusNotModified was
 16755  // returned.
 16756  func (c *LocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
 16757  	gensupport.SetOptions(c.urlParams_, opts...)
 16758  	res, err := c.doRequest("json")
 16759  	if res != nil && res.StatusCode == http.StatusNotModified {
 16760  		if res.Body != nil {
 16761  			res.Body.Close()
 16762  		}
 16763  		return nil, gensupport.WrapError(&googleapi.Error{
 16764  			Code:   res.StatusCode,
 16765  			Header: res.Header,
 16766  		})
 16767  	}
 16768  	if err != nil {
 16769  		return nil, err
 16770  	}
 16771  	defer googleapi.CloseBody(res)
 16772  	if err := googleapi.CheckResponse(res); err != nil {
 16773  		return nil, gensupport.WrapError(err)
 16774  	}
 16775  	ret := &ListLocationsResponse{
 16776  		ServerResponse: googleapi.ServerResponse{
 16777  			Header:         res.Header,
 16778  			HTTPStatusCode: res.StatusCode,
 16779  		},
 16780  	}
 16781  	target := &ret
 16782  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16783  		return nil, err
 16784  	}
 16785  	return ret, nil
 16786  }
 16787  
 16788  // Pages invokes f for each page of results.
 16789  // A non-nil error returned from f will halt the iteration.
 16790  // The provided context supersedes any context provided to the Context method.
 16791  func (c *LocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
 16792  	c.ctx_ = ctx
 16793  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 16794  	for {
 16795  		x, err := c.Do()
 16796  		if err != nil {
 16797  			return err
 16798  		}
 16799  		if err := f(x); err != nil {
 16800  			return err
 16801  		}
 16802  		if x.NextPageToken == "" {
 16803  			return nil
 16804  		}
 16805  		c.PageToken(x.NextPageToken)
 16806  	}
 16807  }
 16808  
 16809  type LocationsBucketsCreateCall struct {
 16810  	s          *Service
 16811  	parent     string
 16812  	logbucket  *LogBucket
 16813  	urlParams_ gensupport.URLParams
 16814  	ctx_       context.Context
 16815  	header_    http.Header
 16816  }
 16817  
 16818  // Create: Creates a log bucket that can be used to store log entries. After a
 16819  // bucket has been created, the bucket's location cannot be changed.
 16820  //
 16821  //   - parent: The resource in which to create the log bucket:
 16822  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
 16823  //     example:"projects/my-project/locations/global".
 16824  func (r *LocationsBucketsService) Create(parent string, logbucket *LogBucket) *LocationsBucketsCreateCall {
 16825  	c := &LocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16826  	c.parent = parent
 16827  	c.logbucket = logbucket
 16828  	return c
 16829  }
 16830  
 16831  // BucketId sets the optional parameter "bucketId": Required. A client-assigned
 16832  // identifier such as "my-bucket". Identifiers are limited to 100 characters
 16833  // and can include only letters, digits, underscores, hyphens, and periods.
 16834  // Bucket identifiers must start with an alphanumeric character.
 16835  func (c *LocationsBucketsCreateCall) BucketId(bucketId string) *LocationsBucketsCreateCall {
 16836  	c.urlParams_.Set("bucketId", bucketId)
 16837  	return c
 16838  }
 16839  
 16840  // Fields allows partial responses to be retrieved. See
 16841  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16842  // details.
 16843  func (c *LocationsBucketsCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsCreateCall {
 16844  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16845  	return c
 16846  }
 16847  
 16848  // Context sets the context to be used in this call's Do method.
 16849  func (c *LocationsBucketsCreateCall) Context(ctx context.Context) *LocationsBucketsCreateCall {
 16850  	c.ctx_ = ctx
 16851  	return c
 16852  }
 16853  
 16854  // Header returns a http.Header that can be modified by the caller to add
 16855  // headers to the request.
 16856  func (c *LocationsBucketsCreateCall) Header() http.Header {
 16857  	if c.header_ == nil {
 16858  		c.header_ = make(http.Header)
 16859  	}
 16860  	return c.header_
 16861  }
 16862  
 16863  func (c *LocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
 16864  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 16865  	var body io.Reader = nil
 16866  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 16867  	if err != nil {
 16868  		return nil, err
 16869  	}
 16870  	c.urlParams_.Set("alt", alt)
 16871  	c.urlParams_.Set("prettyPrint", "false")
 16872  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
 16873  	urls += "?" + c.urlParams_.Encode()
 16874  	req, err := http.NewRequest("POST", urls, body)
 16875  	if err != nil {
 16876  		return nil, err
 16877  	}
 16878  	req.Header = reqHeaders
 16879  	googleapi.Expand(req.URL, map[string]string{
 16880  		"parent": c.parent,
 16881  	})
 16882  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16883  }
 16884  
 16885  // Do executes the "logging.locations.buckets.create" call.
 16886  // Any non-2xx status code is an error. Response headers are in either
 16887  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 16888  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 16889  // whether the returned error was because http.StatusNotModified was returned.
 16890  func (c *LocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 16891  	gensupport.SetOptions(c.urlParams_, opts...)
 16892  	res, err := c.doRequest("json")
 16893  	if res != nil && res.StatusCode == http.StatusNotModified {
 16894  		if res.Body != nil {
 16895  			res.Body.Close()
 16896  		}
 16897  		return nil, gensupport.WrapError(&googleapi.Error{
 16898  			Code:   res.StatusCode,
 16899  			Header: res.Header,
 16900  		})
 16901  	}
 16902  	if err != nil {
 16903  		return nil, err
 16904  	}
 16905  	defer googleapi.CloseBody(res)
 16906  	if err := googleapi.CheckResponse(res); err != nil {
 16907  		return nil, gensupport.WrapError(err)
 16908  	}
 16909  	ret := &LogBucket{
 16910  		ServerResponse: googleapi.ServerResponse{
 16911  			Header:         res.Header,
 16912  			HTTPStatusCode: res.StatusCode,
 16913  		},
 16914  	}
 16915  	target := &ret
 16916  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16917  		return nil, err
 16918  	}
 16919  	return ret, nil
 16920  }
 16921  
 16922  type LocationsBucketsCreateAsyncCall struct {
 16923  	s          *Service
 16924  	parent     string
 16925  	logbucket  *LogBucket
 16926  	urlParams_ gensupport.URLParams
 16927  	ctx_       context.Context
 16928  	header_    http.Header
 16929  }
 16930  
 16931  // CreateAsync: Creates a log bucket asynchronously that can be used to store
 16932  // log entries.After a bucket has been created, the bucket's location cannot be
 16933  // changed.
 16934  //
 16935  //   - parent: The resource in which to create the log bucket:
 16936  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
 16937  //     example:"projects/my-project/locations/global".
 16938  func (r *LocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *LocationsBucketsCreateAsyncCall {
 16939  	c := &LocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16940  	c.parent = parent
 16941  	c.logbucket = logbucket
 16942  	return c
 16943  }
 16944  
 16945  // BucketId sets the optional parameter "bucketId": Required. A client-assigned
 16946  // identifier such as "my-bucket". Identifiers are limited to 100 characters
 16947  // and can include only letters, digits, underscores, hyphens, and periods.
 16948  // Bucket identifiers must start with an alphanumeric character.
 16949  func (c *LocationsBucketsCreateAsyncCall) BucketId(bucketId string) *LocationsBucketsCreateAsyncCall {
 16950  	c.urlParams_.Set("bucketId", bucketId)
 16951  	return c
 16952  }
 16953  
 16954  // Fields allows partial responses to be retrieved. See
 16955  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16956  // details.
 16957  func (c *LocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *LocationsBucketsCreateAsyncCall {
 16958  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16959  	return c
 16960  }
 16961  
 16962  // Context sets the context to be used in this call's Do method.
 16963  func (c *LocationsBucketsCreateAsyncCall) Context(ctx context.Context) *LocationsBucketsCreateAsyncCall {
 16964  	c.ctx_ = ctx
 16965  	return c
 16966  }
 16967  
 16968  // Header returns a http.Header that can be modified by the caller to add
 16969  // headers to the request.
 16970  func (c *LocationsBucketsCreateAsyncCall) Header() http.Header {
 16971  	if c.header_ == nil {
 16972  		c.header_ = make(http.Header)
 16973  	}
 16974  	return c.header_
 16975  }
 16976  
 16977  func (c *LocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) {
 16978  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 16979  	var body io.Reader = nil
 16980  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 16981  	if err != nil {
 16982  		return nil, err
 16983  	}
 16984  	c.urlParams_.Set("alt", alt)
 16985  	c.urlParams_.Set("prettyPrint", "false")
 16986  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync")
 16987  	urls += "?" + c.urlParams_.Encode()
 16988  	req, err := http.NewRequest("POST", urls, body)
 16989  	if err != nil {
 16990  		return nil, err
 16991  	}
 16992  	req.Header = reqHeaders
 16993  	googleapi.Expand(req.URL, map[string]string{
 16994  		"parent": c.parent,
 16995  	})
 16996  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16997  }
 16998  
 16999  // Do executes the "logging.locations.buckets.createAsync" call.
 17000  // Any non-2xx status code is an error. Response headers are in either
 17001  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 17002  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17003  // whether the returned error was because http.StatusNotModified was returned.
 17004  func (c *LocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 17005  	gensupport.SetOptions(c.urlParams_, opts...)
 17006  	res, err := c.doRequest("json")
 17007  	if res != nil && res.StatusCode == http.StatusNotModified {
 17008  		if res.Body != nil {
 17009  			res.Body.Close()
 17010  		}
 17011  		return nil, gensupport.WrapError(&googleapi.Error{
 17012  			Code:   res.StatusCode,
 17013  			Header: res.Header,
 17014  		})
 17015  	}
 17016  	if err != nil {
 17017  		return nil, err
 17018  	}
 17019  	defer googleapi.CloseBody(res)
 17020  	if err := googleapi.CheckResponse(res); err != nil {
 17021  		return nil, gensupport.WrapError(err)
 17022  	}
 17023  	ret := &Operation{
 17024  		ServerResponse: googleapi.ServerResponse{
 17025  			Header:         res.Header,
 17026  			HTTPStatusCode: res.StatusCode,
 17027  		},
 17028  	}
 17029  	target := &ret
 17030  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17031  		return nil, err
 17032  	}
 17033  	return ret, nil
 17034  }
 17035  
 17036  type LocationsBucketsDeleteCall struct {
 17037  	s          *Service
 17038  	name       string
 17039  	urlParams_ gensupport.URLParams
 17040  	ctx_       context.Context
 17041  	header_    http.Header
 17042  }
 17043  
 17044  // Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the
 17045  // DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log
 17046  // entries in the bucket will be permanently deleted.
 17047  //
 17048  //   - name: The full resource name of the bucket to delete.
 17049  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17050  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 17051  //     ]"
 17052  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 17053  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17054  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 17055  func (r *LocationsBucketsService) Delete(name string) *LocationsBucketsDeleteCall {
 17056  	c := &LocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17057  	c.name = name
 17058  	return c
 17059  }
 17060  
 17061  // Fields allows partial responses to be retrieved. See
 17062  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17063  // details.
 17064  func (c *LocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsDeleteCall {
 17065  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17066  	return c
 17067  }
 17068  
 17069  // Context sets the context to be used in this call's Do method.
 17070  func (c *LocationsBucketsDeleteCall) Context(ctx context.Context) *LocationsBucketsDeleteCall {
 17071  	c.ctx_ = ctx
 17072  	return c
 17073  }
 17074  
 17075  // Header returns a http.Header that can be modified by the caller to add
 17076  // headers to the request.
 17077  func (c *LocationsBucketsDeleteCall) Header() http.Header {
 17078  	if c.header_ == nil {
 17079  		c.header_ = make(http.Header)
 17080  	}
 17081  	return c.header_
 17082  }
 17083  
 17084  func (c *LocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
 17085  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 17086  	var body io.Reader = nil
 17087  	c.urlParams_.Set("alt", alt)
 17088  	c.urlParams_.Set("prettyPrint", "false")
 17089  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 17090  	urls += "?" + c.urlParams_.Encode()
 17091  	req, err := http.NewRequest("DELETE", urls, body)
 17092  	if err != nil {
 17093  		return nil, err
 17094  	}
 17095  	req.Header = reqHeaders
 17096  	googleapi.Expand(req.URL, map[string]string{
 17097  		"name": c.name,
 17098  	})
 17099  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17100  }
 17101  
 17102  // Do executes the "logging.locations.buckets.delete" call.
 17103  // Any non-2xx status code is an error. Response headers are in either
 17104  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 17105  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17106  // whether the returned error was because http.StatusNotModified was returned.
 17107  func (c *LocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 17108  	gensupport.SetOptions(c.urlParams_, opts...)
 17109  	res, err := c.doRequest("json")
 17110  	if res != nil && res.StatusCode == http.StatusNotModified {
 17111  		if res.Body != nil {
 17112  			res.Body.Close()
 17113  		}
 17114  		return nil, gensupport.WrapError(&googleapi.Error{
 17115  			Code:   res.StatusCode,
 17116  			Header: res.Header,
 17117  		})
 17118  	}
 17119  	if err != nil {
 17120  		return nil, err
 17121  	}
 17122  	defer googleapi.CloseBody(res)
 17123  	if err := googleapi.CheckResponse(res); err != nil {
 17124  		return nil, gensupport.WrapError(err)
 17125  	}
 17126  	ret := &Empty{
 17127  		ServerResponse: googleapi.ServerResponse{
 17128  			Header:         res.Header,
 17129  			HTTPStatusCode: res.StatusCode,
 17130  		},
 17131  	}
 17132  	target := &ret
 17133  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17134  		return nil, err
 17135  	}
 17136  	return ret, nil
 17137  }
 17138  
 17139  type LocationsBucketsGetCall struct {
 17140  	s            *Service
 17141  	name         string
 17142  	urlParams_   gensupport.URLParams
 17143  	ifNoneMatch_ string
 17144  	ctx_         context.Context
 17145  	header_      http.Header
 17146  }
 17147  
 17148  // Get: Gets a log bucket.
 17149  //
 17150  //   - name: The resource name of the bucket:
 17151  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17152  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 17153  //     ]"
 17154  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 17155  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17156  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 17157  func (r *LocationsBucketsService) Get(name string) *LocationsBucketsGetCall {
 17158  	c := &LocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17159  	c.name = name
 17160  	return c
 17161  }
 17162  
 17163  // Fields allows partial responses to be retrieved. See
 17164  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17165  // details.
 17166  func (c *LocationsBucketsGetCall) Fields(s ...googleapi.Field) *LocationsBucketsGetCall {
 17167  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17168  	return c
 17169  }
 17170  
 17171  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 17172  // object's ETag matches the given value. This is useful for getting updates
 17173  // only after the object has changed since the last request.
 17174  func (c *LocationsBucketsGetCall) IfNoneMatch(entityTag string) *LocationsBucketsGetCall {
 17175  	c.ifNoneMatch_ = entityTag
 17176  	return c
 17177  }
 17178  
 17179  // Context sets the context to be used in this call's Do method.
 17180  func (c *LocationsBucketsGetCall) Context(ctx context.Context) *LocationsBucketsGetCall {
 17181  	c.ctx_ = ctx
 17182  	return c
 17183  }
 17184  
 17185  // Header returns a http.Header that can be modified by the caller to add
 17186  // headers to the request.
 17187  func (c *LocationsBucketsGetCall) Header() http.Header {
 17188  	if c.header_ == nil {
 17189  		c.header_ = make(http.Header)
 17190  	}
 17191  	return c.header_
 17192  }
 17193  
 17194  func (c *LocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
 17195  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 17196  	if c.ifNoneMatch_ != "" {
 17197  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 17198  	}
 17199  	var body io.Reader = nil
 17200  	c.urlParams_.Set("alt", alt)
 17201  	c.urlParams_.Set("prettyPrint", "false")
 17202  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 17203  	urls += "?" + c.urlParams_.Encode()
 17204  	req, err := http.NewRequest("GET", urls, body)
 17205  	if err != nil {
 17206  		return nil, err
 17207  	}
 17208  	req.Header = reqHeaders
 17209  	googleapi.Expand(req.URL, map[string]string{
 17210  		"name": c.name,
 17211  	})
 17212  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17213  }
 17214  
 17215  // Do executes the "logging.locations.buckets.get" call.
 17216  // Any non-2xx status code is an error. Response headers are in either
 17217  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 17218  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17219  // whether the returned error was because http.StatusNotModified was returned.
 17220  func (c *LocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 17221  	gensupport.SetOptions(c.urlParams_, opts...)
 17222  	res, err := c.doRequest("json")
 17223  	if res != nil && res.StatusCode == http.StatusNotModified {
 17224  		if res.Body != nil {
 17225  			res.Body.Close()
 17226  		}
 17227  		return nil, gensupport.WrapError(&googleapi.Error{
 17228  			Code:   res.StatusCode,
 17229  			Header: res.Header,
 17230  		})
 17231  	}
 17232  	if err != nil {
 17233  		return nil, err
 17234  	}
 17235  	defer googleapi.CloseBody(res)
 17236  	if err := googleapi.CheckResponse(res); err != nil {
 17237  		return nil, gensupport.WrapError(err)
 17238  	}
 17239  	ret := &LogBucket{
 17240  		ServerResponse: googleapi.ServerResponse{
 17241  			Header:         res.Header,
 17242  			HTTPStatusCode: res.StatusCode,
 17243  		},
 17244  	}
 17245  	target := &ret
 17246  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17247  		return nil, err
 17248  	}
 17249  	return ret, nil
 17250  }
 17251  
 17252  type LocationsBucketsListCall struct {
 17253  	s            *Service
 17254  	parent       string
 17255  	urlParams_   gensupport.URLParams
 17256  	ifNoneMatch_ string
 17257  	ctx_         context.Context
 17258  	header_      http.Header
 17259  }
 17260  
 17261  // List: Lists log buckets.
 17262  //
 17263  //   - parent: The parent resource whose buckets are to be listed:
 17264  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 17265  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 17266  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 17267  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion
 17268  //     of the resource must be specified, but supplying the character - in place
 17269  //     of LOCATION_ID will return all buckets.
 17270  func (r *LocationsBucketsService) List(parent string) *LocationsBucketsListCall {
 17271  	c := &LocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17272  	c.parent = parent
 17273  	return c
 17274  }
 17275  
 17276  // PageSize sets the optional parameter "pageSize": The maximum number of
 17277  // results to return from this request. Non-positive values are ignored. The
 17278  // presence of nextPageToken in the response indicates that more results might
 17279  // be available.
 17280  func (c *LocationsBucketsListCall) PageSize(pageSize int64) *LocationsBucketsListCall {
 17281  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 17282  	return c
 17283  }
 17284  
 17285  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 17286  // the next batch of results from the preceding call to this method. pageToken
 17287  // must be the value of nextPageToken from the previous response. The values of
 17288  // other method parameters should be identical to those in the previous call.
 17289  func (c *LocationsBucketsListCall) PageToken(pageToken string) *LocationsBucketsListCall {
 17290  	c.urlParams_.Set("pageToken", pageToken)
 17291  	return c
 17292  }
 17293  
 17294  // Fields allows partial responses to be retrieved. See
 17295  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17296  // details.
 17297  func (c *LocationsBucketsListCall) Fields(s ...googleapi.Field) *LocationsBucketsListCall {
 17298  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17299  	return c
 17300  }
 17301  
 17302  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 17303  // object's ETag matches the given value. This is useful for getting updates
 17304  // only after the object has changed since the last request.
 17305  func (c *LocationsBucketsListCall) IfNoneMatch(entityTag string) *LocationsBucketsListCall {
 17306  	c.ifNoneMatch_ = entityTag
 17307  	return c
 17308  }
 17309  
 17310  // Context sets the context to be used in this call's Do method.
 17311  func (c *LocationsBucketsListCall) Context(ctx context.Context) *LocationsBucketsListCall {
 17312  	c.ctx_ = ctx
 17313  	return c
 17314  }
 17315  
 17316  // Header returns a http.Header that can be modified by the caller to add
 17317  // headers to the request.
 17318  func (c *LocationsBucketsListCall) Header() http.Header {
 17319  	if c.header_ == nil {
 17320  		c.header_ = make(http.Header)
 17321  	}
 17322  	return c.header_
 17323  }
 17324  
 17325  func (c *LocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
 17326  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 17327  	if c.ifNoneMatch_ != "" {
 17328  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 17329  	}
 17330  	var body io.Reader = nil
 17331  	c.urlParams_.Set("alt", alt)
 17332  	c.urlParams_.Set("prettyPrint", "false")
 17333  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
 17334  	urls += "?" + c.urlParams_.Encode()
 17335  	req, err := http.NewRequest("GET", urls, body)
 17336  	if err != nil {
 17337  		return nil, err
 17338  	}
 17339  	req.Header = reqHeaders
 17340  	googleapi.Expand(req.URL, map[string]string{
 17341  		"parent": c.parent,
 17342  	})
 17343  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17344  }
 17345  
 17346  // Do executes the "logging.locations.buckets.list" call.
 17347  // Any non-2xx status code is an error. Response headers are in either
 17348  // *ListBucketsResponse.ServerResponse.Header or (if a response was returned at
 17349  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 17350  // check whether the returned error was because http.StatusNotModified was
 17351  // returned.
 17352  func (c *LocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
 17353  	gensupport.SetOptions(c.urlParams_, opts...)
 17354  	res, err := c.doRequest("json")
 17355  	if res != nil && res.StatusCode == http.StatusNotModified {
 17356  		if res.Body != nil {
 17357  			res.Body.Close()
 17358  		}
 17359  		return nil, gensupport.WrapError(&googleapi.Error{
 17360  			Code:   res.StatusCode,
 17361  			Header: res.Header,
 17362  		})
 17363  	}
 17364  	if err != nil {
 17365  		return nil, err
 17366  	}
 17367  	defer googleapi.CloseBody(res)
 17368  	if err := googleapi.CheckResponse(res); err != nil {
 17369  		return nil, gensupport.WrapError(err)
 17370  	}
 17371  	ret := &ListBucketsResponse{
 17372  		ServerResponse: googleapi.ServerResponse{
 17373  			Header:         res.Header,
 17374  			HTTPStatusCode: res.StatusCode,
 17375  		},
 17376  	}
 17377  	target := &ret
 17378  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17379  		return nil, err
 17380  	}
 17381  	return ret, nil
 17382  }
 17383  
 17384  // Pages invokes f for each page of results.
 17385  // A non-nil error returned from f will halt the iteration.
 17386  // The provided context supersedes any context provided to the Context method.
 17387  func (c *LocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
 17388  	c.ctx_ = ctx
 17389  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 17390  	for {
 17391  		x, err := c.Do()
 17392  		if err != nil {
 17393  			return err
 17394  		}
 17395  		if err := f(x); err != nil {
 17396  			return err
 17397  		}
 17398  		if x.NextPageToken == "" {
 17399  			return nil
 17400  		}
 17401  		c.PageToken(x.NextPageToken)
 17402  	}
 17403  }
 17404  
 17405  type LocationsBucketsPatchCall struct {
 17406  	s          *Service
 17407  	name       string
 17408  	logbucket  *LogBucket
 17409  	urlParams_ gensupport.URLParams
 17410  	ctx_       context.Context
 17411  	header_    http.Header
 17412  }
 17413  
 17414  // Patch: Updates a log bucket.If the bucket has a lifecycle_state of
 17415  // DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket
 17416  // has been created, the bucket's location cannot be changed.
 17417  //
 17418  //   - name: The full resource name of the bucket to update.
 17419  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17420  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 17421  //     ]"
 17422  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 17423  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17424  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 17425  func (r *LocationsBucketsService) Patch(name string, logbucket *LogBucket) *LocationsBucketsPatchCall {
 17426  	c := &LocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17427  	c.name = name
 17428  	c.logbucket = logbucket
 17429  	return c
 17430  }
 17431  
 17432  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
 17433  // that specifies the fields in bucket that need an update. A bucket field will
 17434  // be overwritten if, and only if, it is in the update mask. name and output
 17435  // only fields cannot be updated.For a detailed FieldMask definition, see:
 17436  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 17437  // example: updateMask=retention_days
 17438  func (c *LocationsBucketsPatchCall) UpdateMask(updateMask string) *LocationsBucketsPatchCall {
 17439  	c.urlParams_.Set("updateMask", updateMask)
 17440  	return c
 17441  }
 17442  
 17443  // Fields allows partial responses to be retrieved. See
 17444  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17445  // details.
 17446  func (c *LocationsBucketsPatchCall) Fields(s ...googleapi.Field) *LocationsBucketsPatchCall {
 17447  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17448  	return c
 17449  }
 17450  
 17451  // Context sets the context to be used in this call's Do method.
 17452  func (c *LocationsBucketsPatchCall) Context(ctx context.Context) *LocationsBucketsPatchCall {
 17453  	c.ctx_ = ctx
 17454  	return c
 17455  }
 17456  
 17457  // Header returns a http.Header that can be modified by the caller to add
 17458  // headers to the request.
 17459  func (c *LocationsBucketsPatchCall) Header() http.Header {
 17460  	if c.header_ == nil {
 17461  		c.header_ = make(http.Header)
 17462  	}
 17463  	return c.header_
 17464  }
 17465  
 17466  func (c *LocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
 17467  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 17468  	var body io.Reader = nil
 17469  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 17470  	if err != nil {
 17471  		return nil, err
 17472  	}
 17473  	c.urlParams_.Set("alt", alt)
 17474  	c.urlParams_.Set("prettyPrint", "false")
 17475  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 17476  	urls += "?" + c.urlParams_.Encode()
 17477  	req, err := http.NewRequest("PATCH", urls, body)
 17478  	if err != nil {
 17479  		return nil, err
 17480  	}
 17481  	req.Header = reqHeaders
 17482  	googleapi.Expand(req.URL, map[string]string{
 17483  		"name": c.name,
 17484  	})
 17485  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17486  }
 17487  
 17488  // Do executes the "logging.locations.buckets.patch" call.
 17489  // Any non-2xx status code is an error. Response headers are in either
 17490  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 17491  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17492  // whether the returned error was because http.StatusNotModified was returned.
 17493  func (c *LocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 17494  	gensupport.SetOptions(c.urlParams_, opts...)
 17495  	res, err := c.doRequest("json")
 17496  	if res != nil && res.StatusCode == http.StatusNotModified {
 17497  		if res.Body != nil {
 17498  			res.Body.Close()
 17499  		}
 17500  		return nil, gensupport.WrapError(&googleapi.Error{
 17501  			Code:   res.StatusCode,
 17502  			Header: res.Header,
 17503  		})
 17504  	}
 17505  	if err != nil {
 17506  		return nil, err
 17507  	}
 17508  	defer googleapi.CloseBody(res)
 17509  	if err := googleapi.CheckResponse(res); err != nil {
 17510  		return nil, gensupport.WrapError(err)
 17511  	}
 17512  	ret := &LogBucket{
 17513  		ServerResponse: googleapi.ServerResponse{
 17514  			Header:         res.Header,
 17515  			HTTPStatusCode: res.StatusCode,
 17516  		},
 17517  	}
 17518  	target := &ret
 17519  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17520  		return nil, err
 17521  	}
 17522  	return ret, nil
 17523  }
 17524  
 17525  type LocationsBucketsUndeleteCall struct {
 17526  	s                     *Service
 17527  	name                  string
 17528  	undeletebucketrequest *UndeleteBucketRequest
 17529  	urlParams_            gensupport.URLParams
 17530  	ctx_                  context.Context
 17531  	header_               http.Header
 17532  }
 17533  
 17534  // Undelete: Undeletes a log bucket. A bucket that has been deleted can be
 17535  // undeleted within the grace period of 7 days.
 17536  //
 17537  //   - name: The full resource name of the bucket to undelete.
 17538  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17539  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 17540  //     ]"
 17541  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 17542  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17543  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 17544  func (r *LocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *LocationsBucketsUndeleteCall {
 17545  	c := &LocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17546  	c.name = name
 17547  	c.undeletebucketrequest = undeletebucketrequest
 17548  	return c
 17549  }
 17550  
 17551  // Fields allows partial responses to be retrieved. See
 17552  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17553  // details.
 17554  func (c *LocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsUndeleteCall {
 17555  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17556  	return c
 17557  }
 17558  
 17559  // Context sets the context to be used in this call's Do method.
 17560  func (c *LocationsBucketsUndeleteCall) Context(ctx context.Context) *LocationsBucketsUndeleteCall {
 17561  	c.ctx_ = ctx
 17562  	return c
 17563  }
 17564  
 17565  // Header returns a http.Header that can be modified by the caller to add
 17566  // headers to the request.
 17567  func (c *LocationsBucketsUndeleteCall) Header() http.Header {
 17568  	if c.header_ == nil {
 17569  		c.header_ = make(http.Header)
 17570  	}
 17571  	return c.header_
 17572  }
 17573  
 17574  func (c *LocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
 17575  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 17576  	var body io.Reader = nil
 17577  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
 17578  	if err != nil {
 17579  		return nil, err
 17580  	}
 17581  	c.urlParams_.Set("alt", alt)
 17582  	c.urlParams_.Set("prettyPrint", "false")
 17583  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
 17584  	urls += "?" + c.urlParams_.Encode()
 17585  	req, err := http.NewRequest("POST", urls, body)
 17586  	if err != nil {
 17587  		return nil, err
 17588  	}
 17589  	req.Header = reqHeaders
 17590  	googleapi.Expand(req.URL, map[string]string{
 17591  		"name": c.name,
 17592  	})
 17593  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17594  }
 17595  
 17596  // Do executes the "logging.locations.buckets.undelete" call.
 17597  // Any non-2xx status code is an error. Response headers are in either
 17598  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 17599  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17600  // whether the returned error was because http.StatusNotModified was returned.
 17601  func (c *LocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 17602  	gensupport.SetOptions(c.urlParams_, opts...)
 17603  	res, err := c.doRequest("json")
 17604  	if res != nil && res.StatusCode == http.StatusNotModified {
 17605  		if res.Body != nil {
 17606  			res.Body.Close()
 17607  		}
 17608  		return nil, gensupport.WrapError(&googleapi.Error{
 17609  			Code:   res.StatusCode,
 17610  			Header: res.Header,
 17611  		})
 17612  	}
 17613  	if err != nil {
 17614  		return nil, err
 17615  	}
 17616  	defer googleapi.CloseBody(res)
 17617  	if err := googleapi.CheckResponse(res); err != nil {
 17618  		return nil, gensupport.WrapError(err)
 17619  	}
 17620  	ret := &Empty{
 17621  		ServerResponse: googleapi.ServerResponse{
 17622  			Header:         res.Header,
 17623  			HTTPStatusCode: res.StatusCode,
 17624  		},
 17625  	}
 17626  	target := &ret
 17627  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17628  		return nil, err
 17629  	}
 17630  	return ret, nil
 17631  }
 17632  
 17633  type LocationsBucketsUpdateAsyncCall struct {
 17634  	s          *Service
 17635  	name       string
 17636  	logbucket  *LogBucket
 17637  	urlParams_ gensupport.URLParams
 17638  	ctx_       context.Context
 17639  	header_    http.Header
 17640  }
 17641  
 17642  // UpdateAsync: Updates a log bucket asynchronously.If the bucket has a
 17643  // lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be
 17644  // returned.After a bucket has been created, the bucket's location cannot be
 17645  // changed.
 17646  //
 17647  //   - name: The full resource name of the bucket to update.
 17648  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17649  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 17650  //     ]"
 17651  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 17652  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17653  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 17654  func (r *LocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *LocationsBucketsUpdateAsyncCall {
 17655  	c := &LocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17656  	c.name = name
 17657  	c.logbucket = logbucket
 17658  	return c
 17659  }
 17660  
 17661  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
 17662  // that specifies the fields in bucket that need an update. A bucket field will
 17663  // be overwritten if, and only if, it is in the update mask. name and output
 17664  // only fields cannot be updated.For a detailed FieldMask definition, see:
 17665  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 17666  // example: updateMask=retention_days
 17667  func (c *LocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *LocationsBucketsUpdateAsyncCall {
 17668  	c.urlParams_.Set("updateMask", updateMask)
 17669  	return c
 17670  }
 17671  
 17672  // Fields allows partial responses to be retrieved. See
 17673  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17674  // details.
 17675  func (c *LocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *LocationsBucketsUpdateAsyncCall {
 17676  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17677  	return c
 17678  }
 17679  
 17680  // Context sets the context to be used in this call's Do method.
 17681  func (c *LocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *LocationsBucketsUpdateAsyncCall {
 17682  	c.ctx_ = ctx
 17683  	return c
 17684  }
 17685  
 17686  // Header returns a http.Header that can be modified by the caller to add
 17687  // headers to the request.
 17688  func (c *LocationsBucketsUpdateAsyncCall) Header() http.Header {
 17689  	if c.header_ == nil {
 17690  		c.header_ = make(http.Header)
 17691  	}
 17692  	return c.header_
 17693  }
 17694  
 17695  func (c *LocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) {
 17696  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 17697  	var body io.Reader = nil
 17698  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 17699  	if err != nil {
 17700  		return nil, err
 17701  	}
 17702  	c.urlParams_.Set("alt", alt)
 17703  	c.urlParams_.Set("prettyPrint", "false")
 17704  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync")
 17705  	urls += "?" + c.urlParams_.Encode()
 17706  	req, err := http.NewRequest("POST", urls, body)
 17707  	if err != nil {
 17708  		return nil, err
 17709  	}
 17710  	req.Header = reqHeaders
 17711  	googleapi.Expand(req.URL, map[string]string{
 17712  		"name": c.name,
 17713  	})
 17714  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17715  }
 17716  
 17717  // Do executes the "logging.locations.buckets.updateAsync" call.
 17718  // Any non-2xx status code is an error. Response headers are in either
 17719  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 17720  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17721  // whether the returned error was because http.StatusNotModified was returned.
 17722  func (c *LocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 17723  	gensupport.SetOptions(c.urlParams_, opts...)
 17724  	res, err := c.doRequest("json")
 17725  	if res != nil && res.StatusCode == http.StatusNotModified {
 17726  		if res.Body != nil {
 17727  			res.Body.Close()
 17728  		}
 17729  		return nil, gensupport.WrapError(&googleapi.Error{
 17730  			Code:   res.StatusCode,
 17731  			Header: res.Header,
 17732  		})
 17733  	}
 17734  	if err != nil {
 17735  		return nil, err
 17736  	}
 17737  	defer googleapi.CloseBody(res)
 17738  	if err := googleapi.CheckResponse(res); err != nil {
 17739  		return nil, gensupport.WrapError(err)
 17740  	}
 17741  	ret := &Operation{
 17742  		ServerResponse: googleapi.ServerResponse{
 17743  			Header:         res.Header,
 17744  			HTTPStatusCode: res.StatusCode,
 17745  		},
 17746  	}
 17747  	target := &ret
 17748  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17749  		return nil, err
 17750  	}
 17751  	return ret, nil
 17752  }
 17753  
 17754  type LocationsBucketsLinksCreateCall struct {
 17755  	s          *Service
 17756  	parent     string
 17757  	link       *Link
 17758  	urlParams_ gensupport.URLParams
 17759  	ctx_       context.Context
 17760  	header_    http.Header
 17761  }
 17762  
 17763  // Create: Asynchronously creates a linked dataset in BigQuery which makes it
 17764  // possible to use BigQuery to read the logs stored in the log bucket. A log
 17765  // bucket may currently only contain one link.
 17766  //
 17767  //   - parent: The full resource name of the bucket to create a link for.
 17768  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 17769  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 17770  //     ]"
 17771  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 17772  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 17773  func (r *LocationsBucketsLinksService) Create(parent string, link *Link) *LocationsBucketsLinksCreateCall {
 17774  	c := &LocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17775  	c.parent = parent
 17776  	c.link = link
 17777  	return c
 17778  }
 17779  
 17780  // LinkId sets the optional parameter "linkId": Required. The ID to use for the
 17781  // link. The link_id can have up to 100 characters. A valid link_id must only
 17782  // have alphanumeric characters and underscores within it.
 17783  func (c *LocationsBucketsLinksCreateCall) LinkId(linkId string) *LocationsBucketsLinksCreateCall {
 17784  	c.urlParams_.Set("linkId", linkId)
 17785  	return c
 17786  }
 17787  
 17788  // Fields allows partial responses to be retrieved. See
 17789  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17790  // details.
 17791  func (c *LocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksCreateCall {
 17792  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17793  	return c
 17794  }
 17795  
 17796  // Context sets the context to be used in this call's Do method.
 17797  func (c *LocationsBucketsLinksCreateCall) Context(ctx context.Context) *LocationsBucketsLinksCreateCall {
 17798  	c.ctx_ = ctx
 17799  	return c
 17800  }
 17801  
 17802  // Header returns a http.Header that can be modified by the caller to add
 17803  // headers to the request.
 17804  func (c *LocationsBucketsLinksCreateCall) Header() http.Header {
 17805  	if c.header_ == nil {
 17806  		c.header_ = make(http.Header)
 17807  	}
 17808  	return c.header_
 17809  }
 17810  
 17811  func (c *LocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
 17812  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 17813  	var body io.Reader = nil
 17814  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
 17815  	if err != nil {
 17816  		return nil, err
 17817  	}
 17818  	c.urlParams_.Set("alt", alt)
 17819  	c.urlParams_.Set("prettyPrint", "false")
 17820  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
 17821  	urls += "?" + c.urlParams_.Encode()
 17822  	req, err := http.NewRequest("POST", urls, body)
 17823  	if err != nil {
 17824  		return nil, err
 17825  	}
 17826  	req.Header = reqHeaders
 17827  	googleapi.Expand(req.URL, map[string]string{
 17828  		"parent": c.parent,
 17829  	})
 17830  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17831  }
 17832  
 17833  // Do executes the "logging.locations.buckets.links.create" call.
 17834  // Any non-2xx status code is an error. Response headers are in either
 17835  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 17836  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17837  // whether the returned error was because http.StatusNotModified was returned.
 17838  func (c *LocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 17839  	gensupport.SetOptions(c.urlParams_, opts...)
 17840  	res, err := c.doRequest("json")
 17841  	if res != nil && res.StatusCode == http.StatusNotModified {
 17842  		if res.Body != nil {
 17843  			res.Body.Close()
 17844  		}
 17845  		return nil, gensupport.WrapError(&googleapi.Error{
 17846  			Code:   res.StatusCode,
 17847  			Header: res.Header,
 17848  		})
 17849  	}
 17850  	if err != nil {
 17851  		return nil, err
 17852  	}
 17853  	defer googleapi.CloseBody(res)
 17854  	if err := googleapi.CheckResponse(res); err != nil {
 17855  		return nil, gensupport.WrapError(err)
 17856  	}
 17857  	ret := &Operation{
 17858  		ServerResponse: googleapi.ServerResponse{
 17859  			Header:         res.Header,
 17860  			HTTPStatusCode: res.StatusCode,
 17861  		},
 17862  	}
 17863  	target := &ret
 17864  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17865  		return nil, err
 17866  	}
 17867  	return ret, nil
 17868  }
 17869  
 17870  type LocationsBucketsLinksDeleteCall struct {
 17871  	s          *Service
 17872  	name       string
 17873  	urlParams_ gensupport.URLParams
 17874  	ctx_       context.Context
 17875  	header_    http.Header
 17876  }
 17877  
 17878  // Delete: Deletes a link. This will also delete the corresponding BigQuery
 17879  // linked dataset.
 17880  //
 17881  //   - name: The full resource name of the link to delete.
 17882  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L
 17883  //     INK_ID]"
 17884  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 17885  //     ]/links/[LINK_ID]"
 17886  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 17887  //     ET_ID]/links/[LINK_ID]"
 17888  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
 17889  //     K_ID]".
 17890  func (r *LocationsBucketsLinksService) Delete(name string) *LocationsBucketsLinksDeleteCall {
 17891  	c := &LocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17892  	c.name = name
 17893  	return c
 17894  }
 17895  
 17896  // Fields allows partial responses to be retrieved. See
 17897  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 17898  // details.
 17899  func (c *LocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksDeleteCall {
 17900  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 17901  	return c
 17902  }
 17903  
 17904  // Context sets the context to be used in this call's Do method.
 17905  func (c *LocationsBucketsLinksDeleteCall) Context(ctx context.Context) *LocationsBucketsLinksDeleteCall {
 17906  	c.ctx_ = ctx
 17907  	return c
 17908  }
 17909  
 17910  // Header returns a http.Header that can be modified by the caller to add
 17911  // headers to the request.
 17912  func (c *LocationsBucketsLinksDeleteCall) Header() http.Header {
 17913  	if c.header_ == nil {
 17914  		c.header_ = make(http.Header)
 17915  	}
 17916  	return c.header_
 17917  }
 17918  
 17919  func (c *LocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 17920  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 17921  	var body io.Reader = nil
 17922  	c.urlParams_.Set("alt", alt)
 17923  	c.urlParams_.Set("prettyPrint", "false")
 17924  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 17925  	urls += "?" + c.urlParams_.Encode()
 17926  	req, err := http.NewRequest("DELETE", urls, body)
 17927  	if err != nil {
 17928  		return nil, err
 17929  	}
 17930  	req.Header = reqHeaders
 17931  	googleapi.Expand(req.URL, map[string]string{
 17932  		"name": c.name,
 17933  	})
 17934  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 17935  }
 17936  
 17937  // Do executes the "logging.locations.buckets.links.delete" call.
 17938  // Any non-2xx status code is an error. Response headers are in either
 17939  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 17940  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 17941  // whether the returned error was because http.StatusNotModified was returned.
 17942  func (c *LocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 17943  	gensupport.SetOptions(c.urlParams_, opts...)
 17944  	res, err := c.doRequest("json")
 17945  	if res != nil && res.StatusCode == http.StatusNotModified {
 17946  		if res.Body != nil {
 17947  			res.Body.Close()
 17948  		}
 17949  		return nil, gensupport.WrapError(&googleapi.Error{
 17950  			Code:   res.StatusCode,
 17951  			Header: res.Header,
 17952  		})
 17953  	}
 17954  	if err != nil {
 17955  		return nil, err
 17956  	}
 17957  	defer googleapi.CloseBody(res)
 17958  	if err := googleapi.CheckResponse(res); err != nil {
 17959  		return nil, gensupport.WrapError(err)
 17960  	}
 17961  	ret := &Operation{
 17962  		ServerResponse: googleapi.ServerResponse{
 17963  			Header:         res.Header,
 17964  			HTTPStatusCode: res.StatusCode,
 17965  		},
 17966  	}
 17967  	target := &ret
 17968  	if err := gensupport.DecodeResponse(target, res); err != nil {
 17969  		return nil, err
 17970  	}
 17971  	return ret, nil
 17972  }
 17973  
 17974  type LocationsBucketsLinksGetCall struct {
 17975  	s            *Service
 17976  	name         string
 17977  	urlParams_   gensupport.URLParams
 17978  	ifNoneMatch_ string
 17979  	ctx_         context.Context
 17980  	header_      http.Header
 17981  }
 17982  
 17983  // Get: Gets a link.
 17984  //
 17985  //   - name: The resource name of the link:
 17986  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L
 17987  //     INK_ID]"
 17988  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 17989  //     ]/links/[LINK_ID]"
 17990  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 17991  //     ET_ID]/links/[LINK_ID]"
 17992  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
 17993  //     K_ID]".
 17994  func (r *LocationsBucketsLinksService) Get(name string) *LocationsBucketsLinksGetCall {
 17995  	c := &LocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 17996  	c.name = name
 17997  	return c
 17998  }
 17999  
 18000  // Fields allows partial responses to be retrieved. See
 18001  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18002  // details.
 18003  func (c *LocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksGetCall {
 18004  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18005  	return c
 18006  }
 18007  
 18008  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 18009  // object's ETag matches the given value. This is useful for getting updates
 18010  // only after the object has changed since the last request.
 18011  func (c *LocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *LocationsBucketsLinksGetCall {
 18012  	c.ifNoneMatch_ = entityTag
 18013  	return c
 18014  }
 18015  
 18016  // Context sets the context to be used in this call's Do method.
 18017  func (c *LocationsBucketsLinksGetCall) Context(ctx context.Context) *LocationsBucketsLinksGetCall {
 18018  	c.ctx_ = ctx
 18019  	return c
 18020  }
 18021  
 18022  // Header returns a http.Header that can be modified by the caller to add
 18023  // headers to the request.
 18024  func (c *LocationsBucketsLinksGetCall) Header() http.Header {
 18025  	if c.header_ == nil {
 18026  		c.header_ = make(http.Header)
 18027  	}
 18028  	return c.header_
 18029  }
 18030  
 18031  func (c *LocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) {
 18032  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 18033  	if c.ifNoneMatch_ != "" {
 18034  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 18035  	}
 18036  	var body io.Reader = nil
 18037  	c.urlParams_.Set("alt", alt)
 18038  	c.urlParams_.Set("prettyPrint", "false")
 18039  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 18040  	urls += "?" + c.urlParams_.Encode()
 18041  	req, err := http.NewRequest("GET", urls, body)
 18042  	if err != nil {
 18043  		return nil, err
 18044  	}
 18045  	req.Header = reqHeaders
 18046  	googleapi.Expand(req.URL, map[string]string{
 18047  		"name": c.name,
 18048  	})
 18049  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18050  }
 18051  
 18052  // Do executes the "logging.locations.buckets.links.get" call.
 18053  // Any non-2xx status code is an error. Response headers are in either
 18054  // *Link.ServerResponse.Header or (if a response was returned at all) in
 18055  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 18056  // whether the returned error was because http.StatusNotModified was returned.
 18057  func (c *LocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) {
 18058  	gensupport.SetOptions(c.urlParams_, opts...)
 18059  	res, err := c.doRequest("json")
 18060  	if res != nil && res.StatusCode == http.StatusNotModified {
 18061  		if res.Body != nil {
 18062  			res.Body.Close()
 18063  		}
 18064  		return nil, gensupport.WrapError(&googleapi.Error{
 18065  			Code:   res.StatusCode,
 18066  			Header: res.Header,
 18067  		})
 18068  	}
 18069  	if err != nil {
 18070  		return nil, err
 18071  	}
 18072  	defer googleapi.CloseBody(res)
 18073  	if err := googleapi.CheckResponse(res); err != nil {
 18074  		return nil, gensupport.WrapError(err)
 18075  	}
 18076  	ret := &Link{
 18077  		ServerResponse: googleapi.ServerResponse{
 18078  			Header:         res.Header,
 18079  			HTTPStatusCode: res.StatusCode,
 18080  		},
 18081  	}
 18082  	target := &ret
 18083  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18084  		return nil, err
 18085  	}
 18086  	return ret, nil
 18087  }
 18088  
 18089  type LocationsBucketsLinksListCall struct {
 18090  	s            *Service
 18091  	parent       string
 18092  	urlParams_   gensupport.URLParams
 18093  	ifNoneMatch_ string
 18094  	ctx_         context.Context
 18095  	header_      http.Header
 18096  }
 18097  
 18098  // List: Lists links.
 18099  //
 18100  //   - parent: The parent resource whose links are to be listed:
 18101  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 18102  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 18103  //     ]"
 18104  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 18105  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 18106  func (r *LocationsBucketsLinksService) List(parent string) *LocationsBucketsLinksListCall {
 18107  	c := &LocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18108  	c.parent = parent
 18109  	return c
 18110  }
 18111  
 18112  // PageSize sets the optional parameter "pageSize": The maximum number of
 18113  // results to return from this request.
 18114  func (c *LocationsBucketsLinksListCall) PageSize(pageSize int64) *LocationsBucketsLinksListCall {
 18115  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 18116  	return c
 18117  }
 18118  
 18119  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 18120  // the next batch of results from the preceding call to this method. pageToken
 18121  // must be the value of nextPageToken from the previous response.
 18122  func (c *LocationsBucketsLinksListCall) PageToken(pageToken string) *LocationsBucketsLinksListCall {
 18123  	c.urlParams_.Set("pageToken", pageToken)
 18124  	return c
 18125  }
 18126  
 18127  // Fields allows partial responses to be retrieved. See
 18128  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18129  // details.
 18130  func (c *LocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksListCall {
 18131  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18132  	return c
 18133  }
 18134  
 18135  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 18136  // object's ETag matches the given value. This is useful for getting updates
 18137  // only after the object has changed since the last request.
 18138  func (c *LocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *LocationsBucketsLinksListCall {
 18139  	c.ifNoneMatch_ = entityTag
 18140  	return c
 18141  }
 18142  
 18143  // Context sets the context to be used in this call's Do method.
 18144  func (c *LocationsBucketsLinksListCall) Context(ctx context.Context) *LocationsBucketsLinksListCall {
 18145  	c.ctx_ = ctx
 18146  	return c
 18147  }
 18148  
 18149  // Header returns a http.Header that can be modified by the caller to add
 18150  // headers to the request.
 18151  func (c *LocationsBucketsLinksListCall) Header() http.Header {
 18152  	if c.header_ == nil {
 18153  		c.header_ = make(http.Header)
 18154  	}
 18155  	return c.header_
 18156  }
 18157  
 18158  func (c *LocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) {
 18159  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 18160  	if c.ifNoneMatch_ != "" {
 18161  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 18162  	}
 18163  	var body io.Reader = nil
 18164  	c.urlParams_.Set("alt", alt)
 18165  	c.urlParams_.Set("prettyPrint", "false")
 18166  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
 18167  	urls += "?" + c.urlParams_.Encode()
 18168  	req, err := http.NewRequest("GET", urls, body)
 18169  	if err != nil {
 18170  		return nil, err
 18171  	}
 18172  	req.Header = reqHeaders
 18173  	googleapi.Expand(req.URL, map[string]string{
 18174  		"parent": c.parent,
 18175  	})
 18176  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18177  }
 18178  
 18179  // Do executes the "logging.locations.buckets.links.list" call.
 18180  // Any non-2xx status code is an error. Response headers are in either
 18181  // *ListLinksResponse.ServerResponse.Header or (if a response was returned at
 18182  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 18183  // check whether the returned error was because http.StatusNotModified was
 18184  // returned.
 18185  func (c *LocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) {
 18186  	gensupport.SetOptions(c.urlParams_, opts...)
 18187  	res, err := c.doRequest("json")
 18188  	if res != nil && res.StatusCode == http.StatusNotModified {
 18189  		if res.Body != nil {
 18190  			res.Body.Close()
 18191  		}
 18192  		return nil, gensupport.WrapError(&googleapi.Error{
 18193  			Code:   res.StatusCode,
 18194  			Header: res.Header,
 18195  		})
 18196  	}
 18197  	if err != nil {
 18198  		return nil, err
 18199  	}
 18200  	defer googleapi.CloseBody(res)
 18201  	if err := googleapi.CheckResponse(res); err != nil {
 18202  		return nil, gensupport.WrapError(err)
 18203  	}
 18204  	ret := &ListLinksResponse{
 18205  		ServerResponse: googleapi.ServerResponse{
 18206  			Header:         res.Header,
 18207  			HTTPStatusCode: res.StatusCode,
 18208  		},
 18209  	}
 18210  	target := &ret
 18211  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18212  		return nil, err
 18213  	}
 18214  	return ret, nil
 18215  }
 18216  
 18217  // Pages invokes f for each page of results.
 18218  // A non-nil error returned from f will halt the iteration.
 18219  // The provided context supersedes any context provided to the Context method.
 18220  func (c *LocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error {
 18221  	c.ctx_ = ctx
 18222  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 18223  	for {
 18224  		x, err := c.Do()
 18225  		if err != nil {
 18226  			return err
 18227  		}
 18228  		if err := f(x); err != nil {
 18229  			return err
 18230  		}
 18231  		if x.NextPageToken == "" {
 18232  			return nil
 18233  		}
 18234  		c.PageToken(x.NextPageToken)
 18235  	}
 18236  }
 18237  
 18238  type LocationsBucketsViewsCreateCall struct {
 18239  	s          *Service
 18240  	parent     string
 18241  	logview    *LogView
 18242  	urlParams_ gensupport.URLParams
 18243  	ctx_       context.Context
 18244  	header_    http.Header
 18245  }
 18246  
 18247  // Create: Creates a view over log entries in a log bucket. A bucket may
 18248  // contain a maximum of 30 views.
 18249  //
 18250  //   - parent: The bucket in which to create the view
 18251  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For
 18252  //     example:"projects/my-project/locations/global/buckets/my-bucket".
 18253  func (r *LocationsBucketsViewsService) Create(parent string, logview *LogView) *LocationsBucketsViewsCreateCall {
 18254  	c := &LocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18255  	c.parent = parent
 18256  	c.logview = logview
 18257  	return c
 18258  }
 18259  
 18260  // ViewId sets the optional parameter "viewId": Required. A client-assigned
 18261  // identifier such as "my-view". Identifiers are limited to 100 characters and
 18262  // can include only letters, digits, underscores, hyphens, and periods.
 18263  func (c *LocationsBucketsViewsCreateCall) ViewId(viewId string) *LocationsBucketsViewsCreateCall {
 18264  	c.urlParams_.Set("viewId", viewId)
 18265  	return c
 18266  }
 18267  
 18268  // Fields allows partial responses to be retrieved. See
 18269  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18270  // details.
 18271  func (c *LocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsCreateCall {
 18272  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18273  	return c
 18274  }
 18275  
 18276  // Context sets the context to be used in this call's Do method.
 18277  func (c *LocationsBucketsViewsCreateCall) Context(ctx context.Context) *LocationsBucketsViewsCreateCall {
 18278  	c.ctx_ = ctx
 18279  	return c
 18280  }
 18281  
 18282  // Header returns a http.Header that can be modified by the caller to add
 18283  // headers to the request.
 18284  func (c *LocationsBucketsViewsCreateCall) Header() http.Header {
 18285  	if c.header_ == nil {
 18286  		c.header_ = make(http.Header)
 18287  	}
 18288  	return c.header_
 18289  }
 18290  
 18291  func (c *LocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
 18292  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 18293  	var body io.Reader = nil
 18294  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
 18295  	if err != nil {
 18296  		return nil, err
 18297  	}
 18298  	c.urlParams_.Set("alt", alt)
 18299  	c.urlParams_.Set("prettyPrint", "false")
 18300  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
 18301  	urls += "?" + c.urlParams_.Encode()
 18302  	req, err := http.NewRequest("POST", urls, body)
 18303  	if err != nil {
 18304  		return nil, err
 18305  	}
 18306  	req.Header = reqHeaders
 18307  	googleapi.Expand(req.URL, map[string]string{
 18308  		"parent": c.parent,
 18309  	})
 18310  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18311  }
 18312  
 18313  // Do executes the "logging.locations.buckets.views.create" call.
 18314  // Any non-2xx status code is an error. Response headers are in either
 18315  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 18316  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 18317  // whether the returned error was because http.StatusNotModified was returned.
 18318  func (c *LocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 18319  	gensupport.SetOptions(c.urlParams_, opts...)
 18320  	res, err := c.doRequest("json")
 18321  	if res != nil && res.StatusCode == http.StatusNotModified {
 18322  		if res.Body != nil {
 18323  			res.Body.Close()
 18324  		}
 18325  		return nil, gensupport.WrapError(&googleapi.Error{
 18326  			Code:   res.StatusCode,
 18327  			Header: res.Header,
 18328  		})
 18329  	}
 18330  	if err != nil {
 18331  		return nil, err
 18332  	}
 18333  	defer googleapi.CloseBody(res)
 18334  	if err := googleapi.CheckResponse(res); err != nil {
 18335  		return nil, gensupport.WrapError(err)
 18336  	}
 18337  	ret := &LogView{
 18338  		ServerResponse: googleapi.ServerResponse{
 18339  			Header:         res.Header,
 18340  			HTTPStatusCode: res.StatusCode,
 18341  		},
 18342  	}
 18343  	target := &ret
 18344  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18345  		return nil, err
 18346  	}
 18347  	return ret, nil
 18348  }
 18349  
 18350  type LocationsBucketsViewsDeleteCall struct {
 18351  	s          *Service
 18352  	name       string
 18353  	urlParams_ gensupport.URLParams
 18354  	ctx_       context.Context
 18355  	header_    http.Header
 18356  }
 18357  
 18358  // Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned,
 18359  // this indicates that system is not in a state where it can delete the view.
 18360  // If this occurs, please try again in a few minutes.
 18361  //
 18362  //   - name: The full resource name of the view to delete:
 18363  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 18364  //     IEW_ID]" For
 18365  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 18366  //     ew".
 18367  func (r *LocationsBucketsViewsService) Delete(name string) *LocationsBucketsViewsDeleteCall {
 18368  	c := &LocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18369  	c.name = name
 18370  	return c
 18371  }
 18372  
 18373  // Fields allows partial responses to be retrieved. See
 18374  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18375  // details.
 18376  func (c *LocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsDeleteCall {
 18377  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18378  	return c
 18379  }
 18380  
 18381  // Context sets the context to be used in this call's Do method.
 18382  func (c *LocationsBucketsViewsDeleteCall) Context(ctx context.Context) *LocationsBucketsViewsDeleteCall {
 18383  	c.ctx_ = ctx
 18384  	return c
 18385  }
 18386  
 18387  // Header returns a http.Header that can be modified by the caller to add
 18388  // headers to the request.
 18389  func (c *LocationsBucketsViewsDeleteCall) Header() http.Header {
 18390  	if c.header_ == nil {
 18391  		c.header_ = make(http.Header)
 18392  	}
 18393  	return c.header_
 18394  }
 18395  
 18396  func (c *LocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
 18397  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 18398  	var body io.Reader = nil
 18399  	c.urlParams_.Set("alt", alt)
 18400  	c.urlParams_.Set("prettyPrint", "false")
 18401  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 18402  	urls += "?" + c.urlParams_.Encode()
 18403  	req, err := http.NewRequest("DELETE", urls, body)
 18404  	if err != nil {
 18405  		return nil, err
 18406  	}
 18407  	req.Header = reqHeaders
 18408  	googleapi.Expand(req.URL, map[string]string{
 18409  		"name": c.name,
 18410  	})
 18411  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18412  }
 18413  
 18414  // Do executes the "logging.locations.buckets.views.delete" call.
 18415  // Any non-2xx status code is an error. Response headers are in either
 18416  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 18417  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 18418  // whether the returned error was because http.StatusNotModified was returned.
 18419  func (c *LocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 18420  	gensupport.SetOptions(c.urlParams_, opts...)
 18421  	res, err := c.doRequest("json")
 18422  	if res != nil && res.StatusCode == http.StatusNotModified {
 18423  		if res.Body != nil {
 18424  			res.Body.Close()
 18425  		}
 18426  		return nil, gensupport.WrapError(&googleapi.Error{
 18427  			Code:   res.StatusCode,
 18428  			Header: res.Header,
 18429  		})
 18430  	}
 18431  	if err != nil {
 18432  		return nil, err
 18433  	}
 18434  	defer googleapi.CloseBody(res)
 18435  	if err := googleapi.CheckResponse(res); err != nil {
 18436  		return nil, gensupport.WrapError(err)
 18437  	}
 18438  	ret := &Empty{
 18439  		ServerResponse: googleapi.ServerResponse{
 18440  			Header:         res.Header,
 18441  			HTTPStatusCode: res.StatusCode,
 18442  		},
 18443  	}
 18444  	target := &ret
 18445  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18446  		return nil, err
 18447  	}
 18448  	return ret, nil
 18449  }
 18450  
 18451  type LocationsBucketsViewsGetCall struct {
 18452  	s            *Service
 18453  	name         string
 18454  	urlParams_   gensupport.URLParams
 18455  	ifNoneMatch_ string
 18456  	ctx_         context.Context
 18457  	header_      http.Header
 18458  }
 18459  
 18460  // Get: Gets a view on a log bucket.
 18461  //
 18462  //   - name: The resource name of the policy:
 18463  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 18464  //     IEW_ID]" For
 18465  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 18466  //     ew".
 18467  func (r *LocationsBucketsViewsService) Get(name string) *LocationsBucketsViewsGetCall {
 18468  	c := &LocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18469  	c.name = name
 18470  	return c
 18471  }
 18472  
 18473  // Fields allows partial responses to be retrieved. See
 18474  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18475  // details.
 18476  func (c *LocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsGetCall {
 18477  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18478  	return c
 18479  }
 18480  
 18481  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 18482  // object's ETag matches the given value. This is useful for getting updates
 18483  // only after the object has changed since the last request.
 18484  func (c *LocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *LocationsBucketsViewsGetCall {
 18485  	c.ifNoneMatch_ = entityTag
 18486  	return c
 18487  }
 18488  
 18489  // Context sets the context to be used in this call's Do method.
 18490  func (c *LocationsBucketsViewsGetCall) Context(ctx context.Context) *LocationsBucketsViewsGetCall {
 18491  	c.ctx_ = ctx
 18492  	return c
 18493  }
 18494  
 18495  // Header returns a http.Header that can be modified by the caller to add
 18496  // headers to the request.
 18497  func (c *LocationsBucketsViewsGetCall) Header() http.Header {
 18498  	if c.header_ == nil {
 18499  		c.header_ = make(http.Header)
 18500  	}
 18501  	return c.header_
 18502  }
 18503  
 18504  func (c *LocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
 18505  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 18506  	if c.ifNoneMatch_ != "" {
 18507  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 18508  	}
 18509  	var body io.Reader = nil
 18510  	c.urlParams_.Set("alt", alt)
 18511  	c.urlParams_.Set("prettyPrint", "false")
 18512  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 18513  	urls += "?" + c.urlParams_.Encode()
 18514  	req, err := http.NewRequest("GET", urls, body)
 18515  	if err != nil {
 18516  		return nil, err
 18517  	}
 18518  	req.Header = reqHeaders
 18519  	googleapi.Expand(req.URL, map[string]string{
 18520  		"name": c.name,
 18521  	})
 18522  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18523  }
 18524  
 18525  // Do executes the "logging.locations.buckets.views.get" call.
 18526  // Any non-2xx status code is an error. Response headers are in either
 18527  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 18528  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 18529  // whether the returned error was because http.StatusNotModified was returned.
 18530  func (c *LocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 18531  	gensupport.SetOptions(c.urlParams_, opts...)
 18532  	res, err := c.doRequest("json")
 18533  	if res != nil && res.StatusCode == http.StatusNotModified {
 18534  		if res.Body != nil {
 18535  			res.Body.Close()
 18536  		}
 18537  		return nil, gensupport.WrapError(&googleapi.Error{
 18538  			Code:   res.StatusCode,
 18539  			Header: res.Header,
 18540  		})
 18541  	}
 18542  	if err != nil {
 18543  		return nil, err
 18544  	}
 18545  	defer googleapi.CloseBody(res)
 18546  	if err := googleapi.CheckResponse(res); err != nil {
 18547  		return nil, gensupport.WrapError(err)
 18548  	}
 18549  	ret := &LogView{
 18550  		ServerResponse: googleapi.ServerResponse{
 18551  			Header:         res.Header,
 18552  			HTTPStatusCode: res.StatusCode,
 18553  		},
 18554  	}
 18555  	target := &ret
 18556  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18557  		return nil, err
 18558  	}
 18559  	return ret, nil
 18560  }
 18561  
 18562  type LocationsBucketsViewsGetIamPolicyCall struct {
 18563  	s                   *Service
 18564  	resource            string
 18565  	getiampolicyrequest *GetIamPolicyRequest
 18566  	urlParams_          gensupport.URLParams
 18567  	ctx_                context.Context
 18568  	header_             http.Header
 18569  }
 18570  
 18571  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 18572  // empty policy if the resource exists and does not have a policy set.
 18573  //
 18574  //   - resource: REQUIRED: The resource for which the policy is being requested.
 18575  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 18576  //     for the appropriate value for this field.
 18577  func (r *LocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *LocationsBucketsViewsGetIamPolicyCall {
 18578  	c := &LocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18579  	c.resource = resource
 18580  	c.getiampolicyrequest = getiampolicyrequest
 18581  	return c
 18582  }
 18583  
 18584  // Fields allows partial responses to be retrieved. See
 18585  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18586  // details.
 18587  func (c *LocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsGetIamPolicyCall {
 18588  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18589  	return c
 18590  }
 18591  
 18592  // Context sets the context to be used in this call's Do method.
 18593  func (c *LocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *LocationsBucketsViewsGetIamPolicyCall {
 18594  	c.ctx_ = ctx
 18595  	return c
 18596  }
 18597  
 18598  // Header returns a http.Header that can be modified by the caller to add
 18599  // headers to the request.
 18600  func (c *LocationsBucketsViewsGetIamPolicyCall) Header() http.Header {
 18601  	if c.header_ == nil {
 18602  		c.header_ = make(http.Header)
 18603  	}
 18604  	return c.header_
 18605  }
 18606  
 18607  func (c *LocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 18608  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 18609  	var body io.Reader = nil
 18610  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
 18611  	if err != nil {
 18612  		return nil, err
 18613  	}
 18614  	c.urlParams_.Set("alt", alt)
 18615  	c.urlParams_.Set("prettyPrint", "false")
 18616  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
 18617  	urls += "?" + c.urlParams_.Encode()
 18618  	req, err := http.NewRequest("POST", urls, body)
 18619  	if err != nil {
 18620  		return nil, err
 18621  	}
 18622  	req.Header = reqHeaders
 18623  	googleapi.Expand(req.URL, map[string]string{
 18624  		"resource": c.resource,
 18625  	})
 18626  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18627  }
 18628  
 18629  // Do executes the "logging.locations.buckets.views.getIamPolicy" call.
 18630  // Any non-2xx status code is an error. Response headers are in either
 18631  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 18632  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 18633  // whether the returned error was because http.StatusNotModified was returned.
 18634  func (c *LocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 18635  	gensupport.SetOptions(c.urlParams_, opts...)
 18636  	res, err := c.doRequest("json")
 18637  	if res != nil && res.StatusCode == http.StatusNotModified {
 18638  		if res.Body != nil {
 18639  			res.Body.Close()
 18640  		}
 18641  		return nil, gensupport.WrapError(&googleapi.Error{
 18642  			Code:   res.StatusCode,
 18643  			Header: res.Header,
 18644  		})
 18645  	}
 18646  	if err != nil {
 18647  		return nil, err
 18648  	}
 18649  	defer googleapi.CloseBody(res)
 18650  	if err := googleapi.CheckResponse(res); err != nil {
 18651  		return nil, gensupport.WrapError(err)
 18652  	}
 18653  	ret := &Policy{
 18654  		ServerResponse: googleapi.ServerResponse{
 18655  			Header:         res.Header,
 18656  			HTTPStatusCode: res.StatusCode,
 18657  		},
 18658  	}
 18659  	target := &ret
 18660  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18661  		return nil, err
 18662  	}
 18663  	return ret, nil
 18664  }
 18665  
 18666  type LocationsBucketsViewsListCall struct {
 18667  	s            *Service
 18668  	parent       string
 18669  	urlParams_   gensupport.URLParams
 18670  	ifNoneMatch_ string
 18671  	ctx_         context.Context
 18672  	header_      http.Header
 18673  }
 18674  
 18675  // List: Lists views on a log bucket.
 18676  //
 18677  //   - parent: The bucket whose views are to be listed:
 18678  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 18679  func (r *LocationsBucketsViewsService) List(parent string) *LocationsBucketsViewsListCall {
 18680  	c := &LocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18681  	c.parent = parent
 18682  	return c
 18683  }
 18684  
 18685  // PageSize sets the optional parameter "pageSize": The maximum number of
 18686  // results to return from this request.Non-positive values are ignored. The
 18687  // presence of nextPageToken in the response indicates that more results might
 18688  // be available.
 18689  func (c *LocationsBucketsViewsListCall) PageSize(pageSize int64) *LocationsBucketsViewsListCall {
 18690  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 18691  	return c
 18692  }
 18693  
 18694  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 18695  // the next batch of results from the preceding call to this method. pageToken
 18696  // must be the value of nextPageToken from the previous response. The values of
 18697  // other method parameters should be identical to those in the previous call.
 18698  func (c *LocationsBucketsViewsListCall) PageToken(pageToken string) *LocationsBucketsViewsListCall {
 18699  	c.urlParams_.Set("pageToken", pageToken)
 18700  	return c
 18701  }
 18702  
 18703  // Fields allows partial responses to be retrieved. See
 18704  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18705  // details.
 18706  func (c *LocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsListCall {
 18707  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18708  	return c
 18709  }
 18710  
 18711  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 18712  // object's ETag matches the given value. This is useful for getting updates
 18713  // only after the object has changed since the last request.
 18714  func (c *LocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *LocationsBucketsViewsListCall {
 18715  	c.ifNoneMatch_ = entityTag
 18716  	return c
 18717  }
 18718  
 18719  // Context sets the context to be used in this call's Do method.
 18720  func (c *LocationsBucketsViewsListCall) Context(ctx context.Context) *LocationsBucketsViewsListCall {
 18721  	c.ctx_ = ctx
 18722  	return c
 18723  }
 18724  
 18725  // Header returns a http.Header that can be modified by the caller to add
 18726  // headers to the request.
 18727  func (c *LocationsBucketsViewsListCall) Header() http.Header {
 18728  	if c.header_ == nil {
 18729  		c.header_ = make(http.Header)
 18730  	}
 18731  	return c.header_
 18732  }
 18733  
 18734  func (c *LocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
 18735  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 18736  	if c.ifNoneMatch_ != "" {
 18737  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 18738  	}
 18739  	var body io.Reader = nil
 18740  	c.urlParams_.Set("alt", alt)
 18741  	c.urlParams_.Set("prettyPrint", "false")
 18742  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
 18743  	urls += "?" + c.urlParams_.Encode()
 18744  	req, err := http.NewRequest("GET", urls, body)
 18745  	if err != nil {
 18746  		return nil, err
 18747  	}
 18748  	req.Header = reqHeaders
 18749  	googleapi.Expand(req.URL, map[string]string{
 18750  		"parent": c.parent,
 18751  	})
 18752  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18753  }
 18754  
 18755  // Do executes the "logging.locations.buckets.views.list" call.
 18756  // Any non-2xx status code is an error. Response headers are in either
 18757  // *ListViewsResponse.ServerResponse.Header or (if a response was returned at
 18758  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 18759  // check whether the returned error was because http.StatusNotModified was
 18760  // returned.
 18761  func (c *LocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
 18762  	gensupport.SetOptions(c.urlParams_, opts...)
 18763  	res, err := c.doRequest("json")
 18764  	if res != nil && res.StatusCode == http.StatusNotModified {
 18765  		if res.Body != nil {
 18766  			res.Body.Close()
 18767  		}
 18768  		return nil, gensupport.WrapError(&googleapi.Error{
 18769  			Code:   res.StatusCode,
 18770  			Header: res.Header,
 18771  		})
 18772  	}
 18773  	if err != nil {
 18774  		return nil, err
 18775  	}
 18776  	defer googleapi.CloseBody(res)
 18777  	if err := googleapi.CheckResponse(res); err != nil {
 18778  		return nil, gensupport.WrapError(err)
 18779  	}
 18780  	ret := &ListViewsResponse{
 18781  		ServerResponse: googleapi.ServerResponse{
 18782  			Header:         res.Header,
 18783  			HTTPStatusCode: res.StatusCode,
 18784  		},
 18785  	}
 18786  	target := &ret
 18787  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18788  		return nil, err
 18789  	}
 18790  	return ret, nil
 18791  }
 18792  
 18793  // Pages invokes f for each page of results.
 18794  // A non-nil error returned from f will halt the iteration.
 18795  // The provided context supersedes any context provided to the Context method.
 18796  func (c *LocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
 18797  	c.ctx_ = ctx
 18798  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 18799  	for {
 18800  		x, err := c.Do()
 18801  		if err != nil {
 18802  			return err
 18803  		}
 18804  		if err := f(x); err != nil {
 18805  			return err
 18806  		}
 18807  		if x.NextPageToken == "" {
 18808  			return nil
 18809  		}
 18810  		c.PageToken(x.NextPageToken)
 18811  	}
 18812  }
 18813  
 18814  type LocationsBucketsViewsPatchCall struct {
 18815  	s          *Service
 18816  	name       string
 18817  	logview    *LogView
 18818  	urlParams_ gensupport.URLParams
 18819  	ctx_       context.Context
 18820  	header_    http.Header
 18821  }
 18822  
 18823  // Patch: Updates a view on a log bucket. This method replaces the value of the
 18824  // filter field from the existing view with the corresponding value from the
 18825  // new view. If an UNAVAILABLE error is returned, this indicates that system is
 18826  // not in a state where it can update the view. If this occurs, please try
 18827  // again in a few minutes.
 18828  //
 18829  //   - name: The full resource name of the view to update
 18830  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 18831  //     IEW_ID]" For
 18832  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 18833  //     ew".
 18834  func (r *LocationsBucketsViewsService) Patch(name string, logview *LogView) *LocationsBucketsViewsPatchCall {
 18835  	c := &LocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18836  	c.name = name
 18837  	c.logview = logview
 18838  	return c
 18839  }
 18840  
 18841  // UpdateMask sets the optional parameter "updateMask": Field mask that
 18842  // specifies the fields in view that need an update. A field will be
 18843  // overwritten if, and only if, it is in the update mask. name and output only
 18844  // fields cannot be updated.For a detailed FieldMask definition, see
 18845  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 18846  // example: updateMask=filter
 18847  func (c *LocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *LocationsBucketsViewsPatchCall {
 18848  	c.urlParams_.Set("updateMask", updateMask)
 18849  	return c
 18850  }
 18851  
 18852  // Fields allows partial responses to be retrieved. See
 18853  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18854  // details.
 18855  func (c *LocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsPatchCall {
 18856  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18857  	return c
 18858  }
 18859  
 18860  // Context sets the context to be used in this call's Do method.
 18861  func (c *LocationsBucketsViewsPatchCall) Context(ctx context.Context) *LocationsBucketsViewsPatchCall {
 18862  	c.ctx_ = ctx
 18863  	return c
 18864  }
 18865  
 18866  // Header returns a http.Header that can be modified by the caller to add
 18867  // headers to the request.
 18868  func (c *LocationsBucketsViewsPatchCall) Header() http.Header {
 18869  	if c.header_ == nil {
 18870  		c.header_ = make(http.Header)
 18871  	}
 18872  	return c.header_
 18873  }
 18874  
 18875  func (c *LocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
 18876  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 18877  	var body io.Reader = nil
 18878  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
 18879  	if err != nil {
 18880  		return nil, err
 18881  	}
 18882  	c.urlParams_.Set("alt", alt)
 18883  	c.urlParams_.Set("prettyPrint", "false")
 18884  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 18885  	urls += "?" + c.urlParams_.Encode()
 18886  	req, err := http.NewRequest("PATCH", urls, body)
 18887  	if err != nil {
 18888  		return nil, err
 18889  	}
 18890  	req.Header = reqHeaders
 18891  	googleapi.Expand(req.URL, map[string]string{
 18892  		"name": c.name,
 18893  	})
 18894  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 18895  }
 18896  
 18897  // Do executes the "logging.locations.buckets.views.patch" call.
 18898  // Any non-2xx status code is an error. Response headers are in either
 18899  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 18900  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 18901  // whether the returned error was because http.StatusNotModified was returned.
 18902  func (c *LocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 18903  	gensupport.SetOptions(c.urlParams_, opts...)
 18904  	res, err := c.doRequest("json")
 18905  	if res != nil && res.StatusCode == http.StatusNotModified {
 18906  		if res.Body != nil {
 18907  			res.Body.Close()
 18908  		}
 18909  		return nil, gensupport.WrapError(&googleapi.Error{
 18910  			Code:   res.StatusCode,
 18911  			Header: res.Header,
 18912  		})
 18913  	}
 18914  	if err != nil {
 18915  		return nil, err
 18916  	}
 18917  	defer googleapi.CloseBody(res)
 18918  	if err := googleapi.CheckResponse(res); err != nil {
 18919  		return nil, gensupport.WrapError(err)
 18920  	}
 18921  	ret := &LogView{
 18922  		ServerResponse: googleapi.ServerResponse{
 18923  			Header:         res.Header,
 18924  			HTTPStatusCode: res.StatusCode,
 18925  		},
 18926  	}
 18927  	target := &ret
 18928  	if err := gensupport.DecodeResponse(target, res); err != nil {
 18929  		return nil, err
 18930  	}
 18931  	return ret, nil
 18932  }
 18933  
 18934  type LocationsBucketsViewsSetIamPolicyCall struct {
 18935  	s                   *Service
 18936  	resource            string
 18937  	setiampolicyrequest *SetIamPolicyRequest
 18938  	urlParams_          gensupport.URLParams
 18939  	ctx_                context.Context
 18940  	header_             http.Header
 18941  }
 18942  
 18943  // SetIamPolicy: Sets the access control policy on the specified resource.
 18944  // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
 18945  // PERMISSION_DENIED errors.
 18946  //
 18947  //   - resource: REQUIRED: The resource for which the policy is being specified.
 18948  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 18949  //     for the appropriate value for this field.
 18950  func (r *LocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *LocationsBucketsViewsSetIamPolicyCall {
 18951  	c := &LocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 18952  	c.resource = resource
 18953  	c.setiampolicyrequest = setiampolicyrequest
 18954  	return c
 18955  }
 18956  
 18957  // Fields allows partial responses to be retrieved. See
 18958  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 18959  // details.
 18960  func (c *LocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsSetIamPolicyCall {
 18961  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 18962  	return c
 18963  }
 18964  
 18965  // Context sets the context to be used in this call's Do method.
 18966  func (c *LocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *LocationsBucketsViewsSetIamPolicyCall {
 18967  	c.ctx_ = ctx
 18968  	return c
 18969  }
 18970  
 18971  // Header returns a http.Header that can be modified by the caller to add
 18972  // headers to the request.
 18973  func (c *LocationsBucketsViewsSetIamPolicyCall) Header() http.Header {
 18974  	if c.header_ == nil {
 18975  		c.header_ = make(http.Header)
 18976  	}
 18977  	return c.header_
 18978  }
 18979  
 18980  func (c *LocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 18981  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 18982  	var body io.Reader = nil
 18983  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 18984  	if err != nil {
 18985  		return nil, err
 18986  	}
 18987  	c.urlParams_.Set("alt", alt)
 18988  	c.urlParams_.Set("prettyPrint", "false")
 18989  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
 18990  	urls += "?" + c.urlParams_.Encode()
 18991  	req, err := http.NewRequest("POST", urls, body)
 18992  	if err != nil {
 18993  		return nil, err
 18994  	}
 18995  	req.Header = reqHeaders
 18996  	googleapi.Expand(req.URL, map[string]string{
 18997  		"resource": c.resource,
 18998  	})
 18999  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19000  }
 19001  
 19002  // Do executes the "logging.locations.buckets.views.setIamPolicy" call.
 19003  // Any non-2xx status code is an error. Response headers are in either
 19004  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 19005  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 19006  // whether the returned error was because http.StatusNotModified was returned.
 19007  func (c *LocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 19008  	gensupport.SetOptions(c.urlParams_, opts...)
 19009  	res, err := c.doRequest("json")
 19010  	if res != nil && res.StatusCode == http.StatusNotModified {
 19011  		if res.Body != nil {
 19012  			res.Body.Close()
 19013  		}
 19014  		return nil, gensupport.WrapError(&googleapi.Error{
 19015  			Code:   res.StatusCode,
 19016  			Header: res.Header,
 19017  		})
 19018  	}
 19019  	if err != nil {
 19020  		return nil, err
 19021  	}
 19022  	defer googleapi.CloseBody(res)
 19023  	if err := googleapi.CheckResponse(res); err != nil {
 19024  		return nil, gensupport.WrapError(err)
 19025  	}
 19026  	ret := &Policy{
 19027  		ServerResponse: googleapi.ServerResponse{
 19028  			Header:         res.Header,
 19029  			HTTPStatusCode: res.StatusCode,
 19030  		},
 19031  	}
 19032  	target := &ret
 19033  	if err := gensupport.DecodeResponse(target, res); err != nil {
 19034  		return nil, err
 19035  	}
 19036  	return ret, nil
 19037  }
 19038  
 19039  type LocationsBucketsViewsTestIamPermissionsCall struct {
 19040  	s                         *Service
 19041  	resource                  string
 19042  	testiampermissionsrequest *TestIamPermissionsRequest
 19043  	urlParams_                gensupport.URLParams
 19044  	ctx_                      context.Context
 19045  	header_                   http.Header
 19046  }
 19047  
 19048  // TestIamPermissions: Returns permissions that a caller has on the specified
 19049  // resource. If the resource does not exist, this will return an empty set of
 19050  // permissions, not a NOT_FOUND error.Note: This operation is designed to be
 19051  // used for building permission-aware UIs and command-line tools, not for
 19052  // authorization checking. This operation may "fail open" without warning.
 19053  //
 19054  //   - resource: REQUIRED: The resource for which the policy detail is being
 19055  //     requested. See Resource names
 19056  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 19057  //     value for this field.
 19058  func (r *LocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *LocationsBucketsViewsTestIamPermissionsCall {
 19059  	c := &LocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19060  	c.resource = resource
 19061  	c.testiampermissionsrequest = testiampermissionsrequest
 19062  	return c
 19063  }
 19064  
 19065  // Fields allows partial responses to be retrieved. See
 19066  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19067  // details.
 19068  func (c *LocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsTestIamPermissionsCall {
 19069  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19070  	return c
 19071  }
 19072  
 19073  // Context sets the context to be used in this call's Do method.
 19074  func (c *LocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *LocationsBucketsViewsTestIamPermissionsCall {
 19075  	c.ctx_ = ctx
 19076  	return c
 19077  }
 19078  
 19079  // Header returns a http.Header that can be modified by the caller to add
 19080  // headers to the request.
 19081  func (c *LocationsBucketsViewsTestIamPermissionsCall) Header() http.Header {
 19082  	if c.header_ == nil {
 19083  		c.header_ = make(http.Header)
 19084  	}
 19085  	return c.header_
 19086  }
 19087  
 19088  func (c *LocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 19089  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 19090  	var body io.Reader = nil
 19091  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 19092  	if err != nil {
 19093  		return nil, err
 19094  	}
 19095  	c.urlParams_.Set("alt", alt)
 19096  	c.urlParams_.Set("prettyPrint", "false")
 19097  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
 19098  	urls += "?" + c.urlParams_.Encode()
 19099  	req, err := http.NewRequest("POST", urls, body)
 19100  	if err != nil {
 19101  		return nil, err
 19102  	}
 19103  	req.Header = reqHeaders
 19104  	googleapi.Expand(req.URL, map[string]string{
 19105  		"resource": c.resource,
 19106  	})
 19107  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19108  }
 19109  
 19110  // Do executes the "logging.locations.buckets.views.testIamPermissions" call.
 19111  // Any non-2xx status code is an error. Response headers are in either
 19112  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 19113  // returned at all) in error.(*googleapi.Error).Header. Use
 19114  // googleapi.IsNotModified to check whether the returned error was because
 19115  // http.StatusNotModified was returned.
 19116  func (c *LocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 19117  	gensupport.SetOptions(c.urlParams_, opts...)
 19118  	res, err := c.doRequest("json")
 19119  	if res != nil && res.StatusCode == http.StatusNotModified {
 19120  		if res.Body != nil {
 19121  			res.Body.Close()
 19122  		}
 19123  		return nil, gensupport.WrapError(&googleapi.Error{
 19124  			Code:   res.StatusCode,
 19125  			Header: res.Header,
 19126  		})
 19127  	}
 19128  	if err != nil {
 19129  		return nil, err
 19130  	}
 19131  	defer googleapi.CloseBody(res)
 19132  	if err := googleapi.CheckResponse(res); err != nil {
 19133  		return nil, gensupport.WrapError(err)
 19134  	}
 19135  	ret := &TestIamPermissionsResponse{
 19136  		ServerResponse: googleapi.ServerResponse{
 19137  			Header:         res.Header,
 19138  			HTTPStatusCode: res.StatusCode,
 19139  		},
 19140  	}
 19141  	target := &ret
 19142  	if err := gensupport.DecodeResponse(target, res); err != nil {
 19143  		return nil, err
 19144  	}
 19145  	return ret, nil
 19146  }
 19147  
 19148  type LocationsOperationsCancelCall struct {
 19149  	s                      *Service
 19150  	name                   string
 19151  	canceloperationrequest *CancelOperationRequest
 19152  	urlParams_             gensupport.URLParams
 19153  	ctx_                   context.Context
 19154  	header_                http.Header
 19155  }
 19156  
 19157  // Cancel: Starts asynchronous cancellation on a long-running operation. The
 19158  // server makes a best effort to cancel the operation, but success is not
 19159  // guaranteed. If the server doesn't support this method, it returns
 19160  // google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or
 19161  // other methods to check whether the cancellation succeeded or whether the
 19162  // operation completed despite cancellation. On successful cancellation, the
 19163  // operation is not deleted; instead, it becomes an operation with an
 19164  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
 19165  // Code.CANCELLED.
 19166  //
 19167  // - name: The name of the operation resource to be cancelled.
 19168  func (r *LocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *LocationsOperationsCancelCall {
 19169  	c := &LocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19170  	c.name = name
 19171  	c.canceloperationrequest = canceloperationrequest
 19172  	return c
 19173  }
 19174  
 19175  // Fields allows partial responses to be retrieved. See
 19176  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19177  // details.
 19178  func (c *LocationsOperationsCancelCall) Fields(s ...googleapi.Field) *LocationsOperationsCancelCall {
 19179  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19180  	return c
 19181  }
 19182  
 19183  // Context sets the context to be used in this call's Do method.
 19184  func (c *LocationsOperationsCancelCall) Context(ctx context.Context) *LocationsOperationsCancelCall {
 19185  	c.ctx_ = ctx
 19186  	return c
 19187  }
 19188  
 19189  // Header returns a http.Header that can be modified by the caller to add
 19190  // headers to the request.
 19191  func (c *LocationsOperationsCancelCall) Header() http.Header {
 19192  	if c.header_ == nil {
 19193  		c.header_ = make(http.Header)
 19194  	}
 19195  	return c.header_
 19196  }
 19197  
 19198  func (c *LocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
 19199  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 19200  	var body io.Reader = nil
 19201  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
 19202  	if err != nil {
 19203  		return nil, err
 19204  	}
 19205  	c.urlParams_.Set("alt", alt)
 19206  	c.urlParams_.Set("prettyPrint", "false")
 19207  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
 19208  	urls += "?" + c.urlParams_.Encode()
 19209  	req, err := http.NewRequest("POST", urls, body)
 19210  	if err != nil {
 19211  		return nil, err
 19212  	}
 19213  	req.Header = reqHeaders
 19214  	googleapi.Expand(req.URL, map[string]string{
 19215  		"name": c.name,
 19216  	})
 19217  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19218  }
 19219  
 19220  // Do executes the "logging.locations.operations.cancel" call.
 19221  // Any non-2xx status code is an error. Response headers are in either
 19222  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 19223  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 19224  // whether the returned error was because http.StatusNotModified was returned.
 19225  func (c *LocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 19226  	gensupport.SetOptions(c.urlParams_, opts...)
 19227  	res, err := c.doRequest("json")
 19228  	if res != nil && res.StatusCode == http.StatusNotModified {
 19229  		if res.Body != nil {
 19230  			res.Body.Close()
 19231  		}
 19232  		return nil, gensupport.WrapError(&googleapi.Error{
 19233  			Code:   res.StatusCode,
 19234  			Header: res.Header,
 19235  		})
 19236  	}
 19237  	if err != nil {
 19238  		return nil, err
 19239  	}
 19240  	defer googleapi.CloseBody(res)
 19241  	if err := googleapi.CheckResponse(res); err != nil {
 19242  		return nil, gensupport.WrapError(err)
 19243  	}
 19244  	ret := &Empty{
 19245  		ServerResponse: googleapi.ServerResponse{
 19246  			Header:         res.Header,
 19247  			HTTPStatusCode: res.StatusCode,
 19248  		},
 19249  	}
 19250  	target := &ret
 19251  	if err := gensupport.DecodeResponse(target, res); err != nil {
 19252  		return nil, err
 19253  	}
 19254  	return ret, nil
 19255  }
 19256  
 19257  type LocationsOperationsGetCall struct {
 19258  	s            *Service
 19259  	name         string
 19260  	urlParams_   gensupport.URLParams
 19261  	ifNoneMatch_ string
 19262  	ctx_         context.Context
 19263  	header_      http.Header
 19264  }
 19265  
 19266  // Get: Gets the latest state of a long-running operation. Clients can use this
 19267  // method to poll the operation result at intervals as recommended by the API
 19268  // service.
 19269  //
 19270  // - name: The name of the operation resource.
 19271  func (r *LocationsOperationsService) Get(name string) *LocationsOperationsGetCall {
 19272  	c := &LocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19273  	c.name = name
 19274  	return c
 19275  }
 19276  
 19277  // Fields allows partial responses to be retrieved. See
 19278  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19279  // details.
 19280  func (c *LocationsOperationsGetCall) Fields(s ...googleapi.Field) *LocationsOperationsGetCall {
 19281  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19282  	return c
 19283  }
 19284  
 19285  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 19286  // object's ETag matches the given value. This is useful for getting updates
 19287  // only after the object has changed since the last request.
 19288  func (c *LocationsOperationsGetCall) IfNoneMatch(entityTag string) *LocationsOperationsGetCall {
 19289  	c.ifNoneMatch_ = entityTag
 19290  	return c
 19291  }
 19292  
 19293  // Context sets the context to be used in this call's Do method.
 19294  func (c *LocationsOperationsGetCall) Context(ctx context.Context) *LocationsOperationsGetCall {
 19295  	c.ctx_ = ctx
 19296  	return c
 19297  }
 19298  
 19299  // Header returns a http.Header that can be modified by the caller to add
 19300  // headers to the request.
 19301  func (c *LocationsOperationsGetCall) Header() http.Header {
 19302  	if c.header_ == nil {
 19303  		c.header_ = make(http.Header)
 19304  	}
 19305  	return c.header_
 19306  }
 19307  
 19308  func (c *LocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 19309  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 19310  	if c.ifNoneMatch_ != "" {
 19311  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 19312  	}
 19313  	var body io.Reader = nil
 19314  	c.urlParams_.Set("alt", alt)
 19315  	c.urlParams_.Set("prettyPrint", "false")
 19316  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 19317  	urls += "?" + c.urlParams_.Encode()
 19318  	req, err := http.NewRequest("GET", urls, body)
 19319  	if err != nil {
 19320  		return nil, err
 19321  	}
 19322  	req.Header = reqHeaders
 19323  	googleapi.Expand(req.URL, map[string]string{
 19324  		"name": c.name,
 19325  	})
 19326  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19327  }
 19328  
 19329  // Do executes the "logging.locations.operations.get" call.
 19330  // Any non-2xx status code is an error. Response headers are in either
 19331  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 19332  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 19333  // whether the returned error was because http.StatusNotModified was returned.
 19334  func (c *LocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 19335  	gensupport.SetOptions(c.urlParams_, opts...)
 19336  	res, err := c.doRequest("json")
 19337  	if res != nil && res.StatusCode == http.StatusNotModified {
 19338  		if res.Body != nil {
 19339  			res.Body.Close()
 19340  		}
 19341  		return nil, gensupport.WrapError(&googleapi.Error{
 19342  			Code:   res.StatusCode,
 19343  			Header: res.Header,
 19344  		})
 19345  	}
 19346  	if err != nil {
 19347  		return nil, err
 19348  	}
 19349  	defer googleapi.CloseBody(res)
 19350  	if err := googleapi.CheckResponse(res); err != nil {
 19351  		return nil, gensupport.WrapError(err)
 19352  	}
 19353  	ret := &Operation{
 19354  		ServerResponse: googleapi.ServerResponse{
 19355  			Header:         res.Header,
 19356  			HTTPStatusCode: res.StatusCode,
 19357  		},
 19358  	}
 19359  	target := &ret
 19360  	if err := gensupport.DecodeResponse(target, res); err != nil {
 19361  		return nil, err
 19362  	}
 19363  	return ret, nil
 19364  }
 19365  
 19366  type LocationsOperationsListCall struct {
 19367  	s            *Service
 19368  	name         string
 19369  	urlParams_   gensupport.URLParams
 19370  	ifNoneMatch_ string
 19371  	ctx_         context.Context
 19372  	header_      http.Header
 19373  }
 19374  
 19375  // List: Lists operations that match the specified filter in the request. If
 19376  // the server doesn't support this method, it returns UNIMPLEMENTED.
 19377  //
 19378  // - name: The name of the operation's parent resource.
 19379  func (r *LocationsOperationsService) List(name string) *LocationsOperationsListCall {
 19380  	c := &LocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19381  	c.name = name
 19382  	return c
 19383  }
 19384  
 19385  // Filter sets the optional parameter "filter": The standard list filter.
 19386  func (c *LocationsOperationsListCall) Filter(filter string) *LocationsOperationsListCall {
 19387  	c.urlParams_.Set("filter", filter)
 19388  	return c
 19389  }
 19390  
 19391  // PageSize sets the optional parameter "pageSize": The standard list page
 19392  // size.
 19393  func (c *LocationsOperationsListCall) PageSize(pageSize int64) *LocationsOperationsListCall {
 19394  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 19395  	return c
 19396  }
 19397  
 19398  // PageToken sets the optional parameter "pageToken": The standard list page
 19399  // token.
 19400  func (c *LocationsOperationsListCall) PageToken(pageToken string) *LocationsOperationsListCall {
 19401  	c.urlParams_.Set("pageToken", pageToken)
 19402  	return c
 19403  }
 19404  
 19405  // Fields allows partial responses to be retrieved. See
 19406  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19407  // details.
 19408  func (c *LocationsOperationsListCall) Fields(s ...googleapi.Field) *LocationsOperationsListCall {
 19409  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19410  	return c
 19411  }
 19412  
 19413  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 19414  // object's ETag matches the given value. This is useful for getting updates
 19415  // only after the object has changed since the last request.
 19416  func (c *LocationsOperationsListCall) IfNoneMatch(entityTag string) *LocationsOperationsListCall {
 19417  	c.ifNoneMatch_ = entityTag
 19418  	return c
 19419  }
 19420  
 19421  // Context sets the context to be used in this call's Do method.
 19422  func (c *LocationsOperationsListCall) Context(ctx context.Context) *LocationsOperationsListCall {
 19423  	c.ctx_ = ctx
 19424  	return c
 19425  }
 19426  
 19427  // Header returns a http.Header that can be modified by the caller to add
 19428  // headers to the request.
 19429  func (c *LocationsOperationsListCall) Header() http.Header {
 19430  	if c.header_ == nil {
 19431  		c.header_ = make(http.Header)
 19432  	}
 19433  	return c.header_
 19434  }
 19435  
 19436  func (c *LocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 19437  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 19438  	if c.ifNoneMatch_ != "" {
 19439  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 19440  	}
 19441  	var body io.Reader = nil
 19442  	c.urlParams_.Set("alt", alt)
 19443  	c.urlParams_.Set("prettyPrint", "false")
 19444  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
 19445  	urls += "?" + c.urlParams_.Encode()
 19446  	req, err := http.NewRequest("GET", urls, body)
 19447  	if err != nil {
 19448  		return nil, err
 19449  	}
 19450  	req.Header = reqHeaders
 19451  	googleapi.Expand(req.URL, map[string]string{
 19452  		"name": c.name,
 19453  	})
 19454  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19455  }
 19456  
 19457  // Do executes the "logging.locations.operations.list" call.
 19458  // Any non-2xx status code is an error. Response headers are in either
 19459  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
 19460  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 19461  // check whether the returned error was because http.StatusNotModified was
 19462  // returned.
 19463  func (c *LocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
 19464  	gensupport.SetOptions(c.urlParams_, opts...)
 19465  	res, err := c.doRequest("json")
 19466  	if res != nil && res.StatusCode == http.StatusNotModified {
 19467  		if res.Body != nil {
 19468  			res.Body.Close()
 19469  		}
 19470  		return nil, gensupport.WrapError(&googleapi.Error{
 19471  			Code:   res.StatusCode,
 19472  			Header: res.Header,
 19473  		})
 19474  	}
 19475  	if err != nil {
 19476  		return nil, err
 19477  	}
 19478  	defer googleapi.CloseBody(res)
 19479  	if err := googleapi.CheckResponse(res); err != nil {
 19480  		return nil, gensupport.WrapError(err)
 19481  	}
 19482  	ret := &ListOperationsResponse{
 19483  		ServerResponse: googleapi.ServerResponse{
 19484  			Header:         res.Header,
 19485  			HTTPStatusCode: res.StatusCode,
 19486  		},
 19487  	}
 19488  	target := &ret
 19489  	if err := gensupport.DecodeResponse(target, res); err != nil {
 19490  		return nil, err
 19491  	}
 19492  	return ret, nil
 19493  }
 19494  
 19495  // Pages invokes f for each page of results.
 19496  // A non-nil error returned from f will halt the iteration.
 19497  // The provided context supersedes any context provided to the Context method.
 19498  func (c *LocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
 19499  	c.ctx_ = ctx
 19500  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 19501  	for {
 19502  		x, err := c.Do()
 19503  		if err != nil {
 19504  			return err
 19505  		}
 19506  		if err := f(x); err != nil {
 19507  			return err
 19508  		}
 19509  		if x.NextPageToken == "" {
 19510  			return nil
 19511  		}
 19512  		c.PageToken(x.NextPageToken)
 19513  	}
 19514  }
 19515  
 19516  type LogsDeleteCall struct {
 19517  	s          *Service
 19518  	logName    string
 19519  	urlParams_ gensupport.URLParams
 19520  	ctx_       context.Context
 19521  	header_    http.Header
 19522  }
 19523  
 19524  // Delete: Deletes all the log entries in a log for the _Default Log Bucket.
 19525  // The log reappears if it receives new entries. Log entries written shortly
 19526  // before the delete operation might not be deleted. Entries received after the
 19527  // delete operation with a timestamp before the operation will be deleted.
 19528  //
 19529  //   - logName: The resource name of the log to delete:
 19530  //     projects/[PROJECT_ID]/logs/[LOG_ID]
 19531  //     organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
 19532  //     billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
 19533  //     folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
 19534  //     example, "projects/my-project-id/logs/syslog",
 19535  //     "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more
 19536  //     information about log names, see LogEntry.
 19537  func (r *LogsService) Delete(logName string) *LogsDeleteCall {
 19538  	c := &LogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19539  	c.logName = logName
 19540  	return c
 19541  }
 19542  
 19543  // Fields allows partial responses to be retrieved. See
 19544  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19545  // details.
 19546  func (c *LogsDeleteCall) Fields(s ...googleapi.Field) *LogsDeleteCall {
 19547  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19548  	return c
 19549  }
 19550  
 19551  // Context sets the context to be used in this call's Do method.
 19552  func (c *LogsDeleteCall) Context(ctx context.Context) *LogsDeleteCall {
 19553  	c.ctx_ = ctx
 19554  	return c
 19555  }
 19556  
 19557  // Header returns a http.Header that can be modified by the caller to add
 19558  // headers to the request.
 19559  func (c *LogsDeleteCall) Header() http.Header {
 19560  	if c.header_ == nil {
 19561  		c.header_ = make(http.Header)
 19562  	}
 19563  	return c.header_
 19564  }
 19565  
 19566  func (c *LogsDeleteCall) doRequest(alt string) (*http.Response, error) {
 19567  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 19568  	var body io.Reader = nil
 19569  	c.urlParams_.Set("alt", alt)
 19570  	c.urlParams_.Set("prettyPrint", "false")
 19571  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
 19572  	urls += "?" + c.urlParams_.Encode()
 19573  	req, err := http.NewRequest("DELETE", urls, body)
 19574  	if err != nil {
 19575  		return nil, err
 19576  	}
 19577  	req.Header = reqHeaders
 19578  	googleapi.Expand(req.URL, map[string]string{
 19579  		"logName": c.logName,
 19580  	})
 19581  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19582  }
 19583  
 19584  // Do executes the "logging.logs.delete" call.
 19585  // Any non-2xx status code is an error. Response headers are in either
 19586  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 19587  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 19588  // whether the returned error was because http.StatusNotModified was returned.
 19589  func (c *LogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 19590  	gensupport.SetOptions(c.urlParams_, opts...)
 19591  	res, err := c.doRequest("json")
 19592  	if res != nil && res.StatusCode == http.StatusNotModified {
 19593  		if res.Body != nil {
 19594  			res.Body.Close()
 19595  		}
 19596  		return nil, gensupport.WrapError(&googleapi.Error{
 19597  			Code:   res.StatusCode,
 19598  			Header: res.Header,
 19599  		})
 19600  	}
 19601  	if err != nil {
 19602  		return nil, err
 19603  	}
 19604  	defer googleapi.CloseBody(res)
 19605  	if err := googleapi.CheckResponse(res); err != nil {
 19606  		return nil, gensupport.WrapError(err)
 19607  	}
 19608  	ret := &Empty{
 19609  		ServerResponse: googleapi.ServerResponse{
 19610  			Header:         res.Header,
 19611  			HTTPStatusCode: res.StatusCode,
 19612  		},
 19613  	}
 19614  	target := &ret
 19615  	if err := gensupport.DecodeResponse(target, res); err != nil {
 19616  		return nil, err
 19617  	}
 19618  	return ret, nil
 19619  }
 19620  
 19621  type LogsListCall struct {
 19622  	s            *Service
 19623  	parent       string
 19624  	urlParams_   gensupport.URLParams
 19625  	ifNoneMatch_ string
 19626  	ctx_         context.Context
 19627  	header_      http.Header
 19628  }
 19629  
 19630  // List: Lists the logs in projects, organizations, folders, or billing
 19631  // accounts. Only logs that have entries are listed.
 19632  //
 19633  //   - parent: The resource name to list logs for: projects/[PROJECT_ID]
 19634  //     organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 19635  //     folders/[FOLDER_ID].
 19636  func (r *LogsService) List(parent string) *LogsListCall {
 19637  	c := &LogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19638  	c.parent = parent
 19639  	return c
 19640  }
 19641  
 19642  // PageSize sets the optional parameter "pageSize": The maximum number of
 19643  // results to return from this request. Non-positive values are ignored. The
 19644  // presence of nextPageToken in the response indicates that more results might
 19645  // be available.
 19646  func (c *LogsListCall) PageSize(pageSize int64) *LogsListCall {
 19647  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 19648  	return c
 19649  }
 19650  
 19651  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 19652  // the next batch of results from the preceding call to this method. pageToken
 19653  // must be the value of nextPageToken from the previous response. The values of
 19654  // other method parameters should be identical to those in the previous call.
 19655  func (c *LogsListCall) PageToken(pageToken string) *LogsListCall {
 19656  	c.urlParams_.Set("pageToken", pageToken)
 19657  	return c
 19658  }
 19659  
 19660  // ResourceNames sets the optional parameter "resourceNames": List of resource
 19661  // names to list logs for:
 19662  // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
 19663  // _ID]
 19664  // organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
 19665  // iews/[VIEW_ID]
 19666  // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
 19667  // ID]/views/[VIEW_ID]
 19668  // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
 19669  // D]To support legacy queries, it could also be: projects/[PROJECT_ID]
 19670  // organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 19671  // folders/[FOLDER_ID]The resource name in the parent field is added to this
 19672  // list.
 19673  func (c *LogsListCall) ResourceNames(resourceNames ...string) *LogsListCall {
 19674  	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
 19675  	return c
 19676  }
 19677  
 19678  // Fields allows partial responses to be retrieved. See
 19679  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19680  // details.
 19681  func (c *LogsListCall) Fields(s ...googleapi.Field) *LogsListCall {
 19682  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19683  	return c
 19684  }
 19685  
 19686  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 19687  // object's ETag matches the given value. This is useful for getting updates
 19688  // only after the object has changed since the last request.
 19689  func (c *LogsListCall) IfNoneMatch(entityTag string) *LogsListCall {
 19690  	c.ifNoneMatch_ = entityTag
 19691  	return c
 19692  }
 19693  
 19694  // Context sets the context to be used in this call's Do method.
 19695  func (c *LogsListCall) Context(ctx context.Context) *LogsListCall {
 19696  	c.ctx_ = ctx
 19697  	return c
 19698  }
 19699  
 19700  // Header returns a http.Header that can be modified by the caller to add
 19701  // headers to the request.
 19702  func (c *LogsListCall) Header() http.Header {
 19703  	if c.header_ == nil {
 19704  		c.header_ = make(http.Header)
 19705  	}
 19706  	return c.header_
 19707  }
 19708  
 19709  func (c *LogsListCall) doRequest(alt string) (*http.Response, error) {
 19710  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 19711  	if c.ifNoneMatch_ != "" {
 19712  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 19713  	}
 19714  	var body io.Reader = nil
 19715  	c.urlParams_.Set("alt", alt)
 19716  	c.urlParams_.Set("prettyPrint", "false")
 19717  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
 19718  	urls += "?" + c.urlParams_.Encode()
 19719  	req, err := http.NewRequest("GET", urls, body)
 19720  	if err != nil {
 19721  		return nil, err
 19722  	}
 19723  	req.Header = reqHeaders
 19724  	googleapi.Expand(req.URL, map[string]string{
 19725  		"parent": c.parent,
 19726  	})
 19727  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19728  }
 19729  
 19730  // Do executes the "logging.logs.list" call.
 19731  // Any non-2xx status code is an error. Response headers are in either
 19732  // *ListLogsResponse.ServerResponse.Header or (if a response was returned at
 19733  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 19734  // check whether the returned error was because http.StatusNotModified was
 19735  // returned.
 19736  func (c *LogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
 19737  	gensupport.SetOptions(c.urlParams_, opts...)
 19738  	res, err := c.doRequest("json")
 19739  	if res != nil && res.StatusCode == http.StatusNotModified {
 19740  		if res.Body != nil {
 19741  			res.Body.Close()
 19742  		}
 19743  		return nil, gensupport.WrapError(&googleapi.Error{
 19744  			Code:   res.StatusCode,
 19745  			Header: res.Header,
 19746  		})
 19747  	}
 19748  	if err != nil {
 19749  		return nil, err
 19750  	}
 19751  	defer googleapi.CloseBody(res)
 19752  	if err := googleapi.CheckResponse(res); err != nil {
 19753  		return nil, gensupport.WrapError(err)
 19754  	}
 19755  	ret := &ListLogsResponse{
 19756  		ServerResponse: googleapi.ServerResponse{
 19757  			Header:         res.Header,
 19758  			HTTPStatusCode: res.StatusCode,
 19759  		},
 19760  	}
 19761  	target := &ret
 19762  	if err := gensupport.DecodeResponse(target, res); err != nil {
 19763  		return nil, err
 19764  	}
 19765  	return ret, nil
 19766  }
 19767  
 19768  // Pages invokes f for each page of results.
 19769  // A non-nil error returned from f will halt the iteration.
 19770  // The provided context supersedes any context provided to the Context method.
 19771  func (c *LogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
 19772  	c.ctx_ = ctx
 19773  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 19774  	for {
 19775  		x, err := c.Do()
 19776  		if err != nil {
 19777  			return err
 19778  		}
 19779  		if err := f(x); err != nil {
 19780  			return err
 19781  		}
 19782  		if x.NextPageToken == "" {
 19783  			return nil
 19784  		}
 19785  		c.PageToken(x.NextPageToken)
 19786  	}
 19787  }
 19788  
 19789  type MonitoredResourceDescriptorsListCall struct {
 19790  	s            *Service
 19791  	urlParams_   gensupport.URLParams
 19792  	ifNoneMatch_ string
 19793  	ctx_         context.Context
 19794  	header_      http.Header
 19795  }
 19796  
 19797  // List: Lists the descriptors for monitored resource types used by Logging.
 19798  func (r *MonitoredResourceDescriptorsService) List() *MonitoredResourceDescriptorsListCall {
 19799  	c := &MonitoredResourceDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19800  	return c
 19801  }
 19802  
 19803  // PageSize sets the optional parameter "pageSize": The maximum number of
 19804  // results to return from this request. Non-positive values are ignored. The
 19805  // presence of nextPageToken in the response indicates that more results might
 19806  // be available.
 19807  func (c *MonitoredResourceDescriptorsListCall) PageSize(pageSize int64) *MonitoredResourceDescriptorsListCall {
 19808  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 19809  	return c
 19810  }
 19811  
 19812  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 19813  // the next batch of results from the preceding call to this method. pageToken
 19814  // must be the value of nextPageToken from the previous response. The values of
 19815  // other method parameters should be identical to those in the previous call.
 19816  func (c *MonitoredResourceDescriptorsListCall) PageToken(pageToken string) *MonitoredResourceDescriptorsListCall {
 19817  	c.urlParams_.Set("pageToken", pageToken)
 19818  	return c
 19819  }
 19820  
 19821  // Fields allows partial responses to be retrieved. See
 19822  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19823  // details.
 19824  func (c *MonitoredResourceDescriptorsListCall) Fields(s ...googleapi.Field) *MonitoredResourceDescriptorsListCall {
 19825  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19826  	return c
 19827  }
 19828  
 19829  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 19830  // object's ETag matches the given value. This is useful for getting updates
 19831  // only after the object has changed since the last request.
 19832  func (c *MonitoredResourceDescriptorsListCall) IfNoneMatch(entityTag string) *MonitoredResourceDescriptorsListCall {
 19833  	c.ifNoneMatch_ = entityTag
 19834  	return c
 19835  }
 19836  
 19837  // Context sets the context to be used in this call's Do method.
 19838  func (c *MonitoredResourceDescriptorsListCall) Context(ctx context.Context) *MonitoredResourceDescriptorsListCall {
 19839  	c.ctx_ = ctx
 19840  	return c
 19841  }
 19842  
 19843  // Header returns a http.Header that can be modified by the caller to add
 19844  // headers to the request.
 19845  func (c *MonitoredResourceDescriptorsListCall) Header() http.Header {
 19846  	if c.header_ == nil {
 19847  		c.header_ = make(http.Header)
 19848  	}
 19849  	return c.header_
 19850  }
 19851  
 19852  func (c *MonitoredResourceDescriptorsListCall) doRequest(alt string) (*http.Response, error) {
 19853  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 19854  	if c.ifNoneMatch_ != "" {
 19855  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 19856  	}
 19857  	var body io.Reader = nil
 19858  	c.urlParams_.Set("alt", alt)
 19859  	c.urlParams_.Set("prettyPrint", "false")
 19860  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/monitoredResourceDescriptors")
 19861  	urls += "?" + c.urlParams_.Encode()
 19862  	req, err := http.NewRequest("GET", urls, body)
 19863  	if err != nil {
 19864  		return nil, err
 19865  	}
 19866  	req.Header = reqHeaders
 19867  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 19868  }
 19869  
 19870  // Do executes the "logging.monitoredResourceDescriptors.list" call.
 19871  // Any non-2xx status code is an error. Response headers are in either
 19872  // *ListMonitoredResourceDescriptorsResponse.ServerResponse.Header or (if a
 19873  // response was returned at all) in error.(*googleapi.Error).Header. Use
 19874  // googleapi.IsNotModified to check whether the returned error was because
 19875  // http.StatusNotModified was returned.
 19876  func (c *MonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) {
 19877  	gensupport.SetOptions(c.urlParams_, opts...)
 19878  	res, err := c.doRequest("json")
 19879  	if res != nil && res.StatusCode == http.StatusNotModified {
 19880  		if res.Body != nil {
 19881  			res.Body.Close()
 19882  		}
 19883  		return nil, gensupport.WrapError(&googleapi.Error{
 19884  			Code:   res.StatusCode,
 19885  			Header: res.Header,
 19886  		})
 19887  	}
 19888  	if err != nil {
 19889  		return nil, err
 19890  	}
 19891  	defer googleapi.CloseBody(res)
 19892  	if err := googleapi.CheckResponse(res); err != nil {
 19893  		return nil, gensupport.WrapError(err)
 19894  	}
 19895  	ret := &ListMonitoredResourceDescriptorsResponse{
 19896  		ServerResponse: googleapi.ServerResponse{
 19897  			Header:         res.Header,
 19898  			HTTPStatusCode: res.StatusCode,
 19899  		},
 19900  	}
 19901  	target := &ret
 19902  	if err := gensupport.DecodeResponse(target, res); err != nil {
 19903  		return nil, err
 19904  	}
 19905  	return ret, nil
 19906  }
 19907  
 19908  // Pages invokes f for each page of results.
 19909  // A non-nil error returned from f will halt the iteration.
 19910  // The provided context supersedes any context provided to the Context method.
 19911  func (c *MonitoredResourceDescriptorsListCall) Pages(ctx context.Context, f func(*ListMonitoredResourceDescriptorsResponse) error) error {
 19912  	c.ctx_ = ctx
 19913  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 19914  	for {
 19915  		x, err := c.Do()
 19916  		if err != nil {
 19917  			return err
 19918  		}
 19919  		if err := f(x); err != nil {
 19920  			return err
 19921  		}
 19922  		if x.NextPageToken == "" {
 19923  			return nil
 19924  		}
 19925  		c.PageToken(x.NextPageToken)
 19926  	}
 19927  }
 19928  
 19929  type OrganizationsGetCmekSettingsCall struct {
 19930  	s            *Service
 19931  	name         string
 19932  	urlParams_   gensupport.URLParams
 19933  	ifNoneMatch_ string
 19934  	ctx_         context.Context
 19935  	header_      http.Header
 19936  }
 19937  
 19938  // GetCmekSettings: Gets the Logging CMEK settings for the given resource.Note:
 19939  // CMEK for the Log Router can be configured for Google Cloud projects,
 19940  // folders, organizations, and billing accounts. Once configured for an
 19941  // organization, it applies to all projects and folders in the Google Cloud
 19942  // organization.See Enabling CMEK for Log Router
 19943  // (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
 19944  // information.
 19945  //
 19946  //   - name: The resource for which to retrieve CMEK settings.
 19947  //     "projects/[PROJECT_ID]/cmekSettings"
 19948  //     "organizations/[ORGANIZATION_ID]/cmekSettings"
 19949  //     "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
 19950  //     "folders/[FOLDER_ID]/cmekSettings" For
 19951  //     example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router
 19952  //     can be configured for Google Cloud projects, folders, organizations, and
 19953  //     billing accounts. Once configured for an organization, it applies to all
 19954  //     projects and folders in the Google Cloud organization.
 19955  func (r *OrganizationsService) GetCmekSettings(name string) *OrganizationsGetCmekSettingsCall {
 19956  	c := &OrganizationsGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 19957  	c.name = name
 19958  	return c
 19959  }
 19960  
 19961  // Fields allows partial responses to be retrieved. See
 19962  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 19963  // details.
 19964  func (c *OrganizationsGetCmekSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetCmekSettingsCall {
 19965  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 19966  	return c
 19967  }
 19968  
 19969  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 19970  // object's ETag matches the given value. This is useful for getting updates
 19971  // only after the object has changed since the last request.
 19972  func (c *OrganizationsGetCmekSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetCmekSettingsCall {
 19973  	c.ifNoneMatch_ = entityTag
 19974  	return c
 19975  }
 19976  
 19977  // Context sets the context to be used in this call's Do method.
 19978  func (c *OrganizationsGetCmekSettingsCall) Context(ctx context.Context) *OrganizationsGetCmekSettingsCall {
 19979  	c.ctx_ = ctx
 19980  	return c
 19981  }
 19982  
 19983  // Header returns a http.Header that can be modified by the caller to add
 19984  // headers to the request.
 19985  func (c *OrganizationsGetCmekSettingsCall) Header() http.Header {
 19986  	if c.header_ == nil {
 19987  		c.header_ = make(http.Header)
 19988  	}
 19989  	return c.header_
 19990  }
 19991  
 19992  func (c *OrganizationsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
 19993  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 19994  	if c.ifNoneMatch_ != "" {
 19995  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 19996  	}
 19997  	var body io.Reader = nil
 19998  	c.urlParams_.Set("alt", alt)
 19999  	c.urlParams_.Set("prettyPrint", "false")
 20000  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
 20001  	urls += "?" + c.urlParams_.Encode()
 20002  	req, err := http.NewRequest("GET", urls, body)
 20003  	if err != nil {
 20004  		return nil, err
 20005  	}
 20006  	req.Header = reqHeaders
 20007  	googleapi.Expand(req.URL, map[string]string{
 20008  		"name": c.name,
 20009  	})
 20010  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 20011  }
 20012  
 20013  // Do executes the "logging.organizations.getCmekSettings" call.
 20014  // Any non-2xx status code is an error. Response headers are in either
 20015  // *CmekSettings.ServerResponse.Header or (if a response was returned at all)
 20016  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 20017  // whether the returned error was because http.StatusNotModified was returned.
 20018  func (c *OrganizationsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
 20019  	gensupport.SetOptions(c.urlParams_, opts...)
 20020  	res, err := c.doRequest("json")
 20021  	if res != nil && res.StatusCode == http.StatusNotModified {
 20022  		if res.Body != nil {
 20023  			res.Body.Close()
 20024  		}
 20025  		return nil, gensupport.WrapError(&googleapi.Error{
 20026  			Code:   res.StatusCode,
 20027  			Header: res.Header,
 20028  		})
 20029  	}
 20030  	if err != nil {
 20031  		return nil, err
 20032  	}
 20033  	defer googleapi.CloseBody(res)
 20034  	if err := googleapi.CheckResponse(res); err != nil {
 20035  		return nil, gensupport.WrapError(err)
 20036  	}
 20037  	ret := &CmekSettings{
 20038  		ServerResponse: googleapi.ServerResponse{
 20039  			Header:         res.Header,
 20040  			HTTPStatusCode: res.StatusCode,
 20041  		},
 20042  	}
 20043  	target := &ret
 20044  	if err := gensupport.DecodeResponse(target, res); err != nil {
 20045  		return nil, err
 20046  	}
 20047  	return ret, nil
 20048  }
 20049  
 20050  type OrganizationsGetSettingsCall struct {
 20051  	s            *Service
 20052  	name         string
 20053  	urlParams_   gensupport.URLParams
 20054  	ifNoneMatch_ string
 20055  	ctx_         context.Context
 20056  	header_      http.Header
 20057  }
 20058  
 20059  // GetSettings: Gets the settings for the given resource.Note: Settings can be
 20060  // retrieved for Google Cloud projects, folders, organizations, and billing
 20061  // accounts.See View default resource settings for Logging
 20062  // (https://cloud.google.com/logging/docs/default-settings#view-org-settings)
 20063  // for more information.
 20064  //
 20065  //   - name: The resource for which to retrieve settings.
 20066  //     "projects/[PROJECT_ID]/settings"
 20067  //     "organizations/[ORGANIZATION_ID]/settings"
 20068  //     "billingAccounts/[BILLING_ACCOUNT_ID]/settings"
 20069  //     "folders/[FOLDER_ID]/settings" For
 20070  //     example:"organizations/12345/settings"Note: Settings can be retrieved for
 20071  //     Google Cloud projects, folders, organizations, and billing accounts.
 20072  func (r *OrganizationsService) GetSettings(name string) *OrganizationsGetSettingsCall {
 20073  	c := &OrganizationsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 20074  	c.name = name
 20075  	return c
 20076  }
 20077  
 20078  // Fields allows partial responses to be retrieved. See
 20079  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 20080  // details.
 20081  func (c *OrganizationsGetSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetSettingsCall {
 20082  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 20083  	return c
 20084  }
 20085  
 20086  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 20087  // object's ETag matches the given value. This is useful for getting updates
 20088  // only after the object has changed since the last request.
 20089  func (c *OrganizationsGetSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetSettingsCall {
 20090  	c.ifNoneMatch_ = entityTag
 20091  	return c
 20092  }
 20093  
 20094  // Context sets the context to be used in this call's Do method.
 20095  func (c *OrganizationsGetSettingsCall) Context(ctx context.Context) *OrganizationsGetSettingsCall {
 20096  	c.ctx_ = ctx
 20097  	return c
 20098  }
 20099  
 20100  // Header returns a http.Header that can be modified by the caller to add
 20101  // headers to the request.
 20102  func (c *OrganizationsGetSettingsCall) Header() http.Header {
 20103  	if c.header_ == nil {
 20104  		c.header_ = make(http.Header)
 20105  	}
 20106  	return c.header_
 20107  }
 20108  
 20109  func (c *OrganizationsGetSettingsCall) doRequest(alt string) (*http.Response, error) {
 20110  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 20111  	if c.ifNoneMatch_ != "" {
 20112  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 20113  	}
 20114  	var body io.Reader = nil
 20115  	c.urlParams_.Set("alt", alt)
 20116  	c.urlParams_.Set("prettyPrint", "false")
 20117  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
 20118  	urls += "?" + c.urlParams_.Encode()
 20119  	req, err := http.NewRequest("GET", urls, body)
 20120  	if err != nil {
 20121  		return nil, err
 20122  	}
 20123  	req.Header = reqHeaders
 20124  	googleapi.Expand(req.URL, map[string]string{
 20125  		"name": c.name,
 20126  	})
 20127  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 20128  }
 20129  
 20130  // Do executes the "logging.organizations.getSettings" call.
 20131  // Any non-2xx status code is an error. Response headers are in either
 20132  // *Settings.ServerResponse.Header or (if a response was returned at all) in
 20133  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 20134  // whether the returned error was because http.StatusNotModified was returned.
 20135  func (c *OrganizationsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
 20136  	gensupport.SetOptions(c.urlParams_, opts...)
 20137  	res, err := c.doRequest("json")
 20138  	if res != nil && res.StatusCode == http.StatusNotModified {
 20139  		if res.Body != nil {
 20140  			res.Body.Close()
 20141  		}
 20142  		return nil, gensupport.WrapError(&googleapi.Error{
 20143  			Code:   res.StatusCode,
 20144  			Header: res.Header,
 20145  		})
 20146  	}
 20147  	if err != nil {
 20148  		return nil, err
 20149  	}
 20150  	defer googleapi.CloseBody(res)
 20151  	if err := googleapi.CheckResponse(res); err != nil {
 20152  		return nil, gensupport.WrapError(err)
 20153  	}
 20154  	ret := &Settings{
 20155  		ServerResponse: googleapi.ServerResponse{
 20156  			Header:         res.Header,
 20157  			HTTPStatusCode: res.StatusCode,
 20158  		},
 20159  	}
 20160  	target := &ret
 20161  	if err := gensupport.DecodeResponse(target, res); err != nil {
 20162  		return nil, err
 20163  	}
 20164  	return ret, nil
 20165  }
 20166  
 20167  type OrganizationsUpdateCmekSettingsCall struct {
 20168  	s            *Service
 20169  	name         string
 20170  	cmeksettings *CmekSettings
 20171  	urlParams_   gensupport.URLParams
 20172  	ctx_         context.Context
 20173  	header_      http.Header
 20174  }
 20175  
 20176  // UpdateCmekSettings: Updates the Log Router CMEK settings for the given
 20177  // resource.Note: CMEK for the Log Router can currently only be configured for
 20178  // Google Cloud organizations. Once configured, it applies to all projects and
 20179  // folders in the Google Cloud organization.UpdateCmekSettings fails when any
 20180  // of the following are true: The value of kms_key_name is invalid. The
 20181  // associated service account doesn't have the required
 20182  // roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access
 20183  // to the key is disabled.See Enabling CMEK for Log Router
 20184  // (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
 20185  // information.
 20186  //
 20187  //   - name: The resource name for the CMEK settings to update.
 20188  //     "projects/[PROJECT_ID]/cmekSettings"
 20189  //     "organizations/[ORGANIZATION_ID]/cmekSettings"
 20190  //     "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
 20191  //     "folders/[FOLDER_ID]/cmekSettings" For
 20192  //     example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router
 20193  //     can currently only be configured for Google Cloud organizations. Once
 20194  //     configured, it applies to all projects and folders in the Google Cloud
 20195  //     organization.
 20196  func (r *OrganizationsService) UpdateCmekSettings(name string, cmeksettings *CmekSettings) *OrganizationsUpdateCmekSettingsCall {
 20197  	c := &OrganizationsUpdateCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 20198  	c.name = name
 20199  	c.cmeksettings = cmeksettings
 20200  	return c
 20201  }
 20202  
 20203  // UpdateMask sets the optional parameter "updateMask": Field mask identifying
 20204  // which fields from cmek_settings should be updated. A field will be
 20205  // overwritten if and only if it is in the update mask. Output only fields
 20206  // cannot be updated.See FieldMask for more information.For example:
 20207  // "updateMask=kmsKeyName"
 20208  func (c *OrganizationsUpdateCmekSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateCmekSettingsCall {
 20209  	c.urlParams_.Set("updateMask", updateMask)
 20210  	return c
 20211  }
 20212  
 20213  // Fields allows partial responses to be retrieved. See
 20214  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 20215  // details.
 20216  func (c *OrganizationsUpdateCmekSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateCmekSettingsCall {
 20217  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 20218  	return c
 20219  }
 20220  
 20221  // Context sets the context to be used in this call's Do method.
 20222  func (c *OrganizationsUpdateCmekSettingsCall) Context(ctx context.Context) *OrganizationsUpdateCmekSettingsCall {
 20223  	c.ctx_ = ctx
 20224  	return c
 20225  }
 20226  
 20227  // Header returns a http.Header that can be modified by the caller to add
 20228  // headers to the request.
 20229  func (c *OrganizationsUpdateCmekSettingsCall) Header() http.Header {
 20230  	if c.header_ == nil {
 20231  		c.header_ = make(http.Header)
 20232  	}
 20233  	return c.header_
 20234  }
 20235  
 20236  func (c *OrganizationsUpdateCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
 20237  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 20238  	var body io.Reader = nil
 20239  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cmeksettings)
 20240  	if err != nil {
 20241  		return nil, err
 20242  	}
 20243  	c.urlParams_.Set("alt", alt)
 20244  	c.urlParams_.Set("prettyPrint", "false")
 20245  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
 20246  	urls += "?" + c.urlParams_.Encode()
 20247  	req, err := http.NewRequest("PATCH", urls, body)
 20248  	if err != nil {
 20249  		return nil, err
 20250  	}
 20251  	req.Header = reqHeaders
 20252  	googleapi.Expand(req.URL, map[string]string{
 20253  		"name": c.name,
 20254  	})
 20255  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 20256  }
 20257  
 20258  // Do executes the "logging.organizations.updateCmekSettings" call.
 20259  // Any non-2xx status code is an error. Response headers are in either
 20260  // *CmekSettings.ServerResponse.Header or (if a response was returned at all)
 20261  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 20262  // whether the returned error was because http.StatusNotModified was returned.
 20263  func (c *OrganizationsUpdateCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
 20264  	gensupport.SetOptions(c.urlParams_, opts...)
 20265  	res, err := c.doRequest("json")
 20266  	if res != nil && res.StatusCode == http.StatusNotModified {
 20267  		if res.Body != nil {
 20268  			res.Body.Close()
 20269  		}
 20270  		return nil, gensupport.WrapError(&googleapi.Error{
 20271  			Code:   res.StatusCode,
 20272  			Header: res.Header,
 20273  		})
 20274  	}
 20275  	if err != nil {
 20276  		return nil, err
 20277  	}
 20278  	defer googleapi.CloseBody(res)
 20279  	if err := googleapi.CheckResponse(res); err != nil {
 20280  		return nil, gensupport.WrapError(err)
 20281  	}
 20282  	ret := &CmekSettings{
 20283  		ServerResponse: googleapi.ServerResponse{
 20284  			Header:         res.Header,
 20285  			HTTPStatusCode: res.StatusCode,
 20286  		},
 20287  	}
 20288  	target := &ret
 20289  	if err := gensupport.DecodeResponse(target, res); err != nil {
 20290  		return nil, err
 20291  	}
 20292  	return ret, nil
 20293  }
 20294  
 20295  type OrganizationsUpdateSettingsCall struct {
 20296  	s          *Service
 20297  	name       string
 20298  	settings   *Settings
 20299  	urlParams_ gensupport.URLParams
 20300  	ctx_       context.Context
 20301  	header_    http.Header
 20302  }
 20303  
 20304  // UpdateSettings: Updates the settings for the given resource. This method
 20305  // applies to all feature configurations for organization and
 20306  // folders.UpdateSettings fails when any of the following are true: The value
 20307  // of storage_location either isn't supported by Logging or violates the
 20308  // location OrgPolicy. The default_sink_config field is set, but it has an
 20309  // unspecified filter write mode. The value of kms_key_name is invalid. The
 20310  // associated service account doesn't have the required
 20311  // roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access
 20312  // to the key is disabled.See Configure default settings for organizations and
 20313  // folders (https://cloud.google.com/logging/docs/default-settings) for more
 20314  // information.
 20315  //
 20316  //   - name: The resource name for the settings to update.
 20317  //     "organizations/[ORGANIZATION_ID]/settings" For
 20318  //     example:"organizations/12345/settings".
 20319  func (r *OrganizationsService) UpdateSettings(name string, settings *Settings) *OrganizationsUpdateSettingsCall {
 20320  	c := &OrganizationsUpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 20321  	c.name = name
 20322  	c.settings = settings
 20323  	return c
 20324  }
 20325  
 20326  // UpdateMask sets the optional parameter "updateMask": Field mask identifying
 20327  // which fields from settings should be updated. A field will be overwritten if
 20328  // and only if it is in the update mask. Output only fields cannot be
 20329  // updated.See FieldMask for more information.For example:
 20330  // "updateMask=kmsKeyName"
 20331  func (c *OrganizationsUpdateSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateSettingsCall {
 20332  	c.urlParams_.Set("updateMask", updateMask)
 20333  	return c
 20334  }
 20335  
 20336  // Fields allows partial responses to be retrieved. See
 20337  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 20338  // details.
 20339  func (c *OrganizationsUpdateSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateSettingsCall {
 20340  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 20341  	return c
 20342  }
 20343  
 20344  // Context sets the context to be used in this call's Do method.
 20345  func (c *OrganizationsUpdateSettingsCall) Context(ctx context.Context) *OrganizationsUpdateSettingsCall {
 20346  	c.ctx_ = ctx
 20347  	return c
 20348  }
 20349  
 20350  // Header returns a http.Header that can be modified by the caller to add
 20351  // headers to the request.
 20352  func (c *OrganizationsUpdateSettingsCall) Header() http.Header {
 20353  	if c.header_ == nil {
 20354  		c.header_ = make(http.Header)
 20355  	}
 20356  	return c.header_
 20357  }
 20358  
 20359  func (c *OrganizationsUpdateSettingsCall) doRequest(alt string) (*http.Response, error) {
 20360  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 20361  	var body io.Reader = nil
 20362  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.settings)
 20363  	if err != nil {
 20364  		return nil, err
 20365  	}
 20366  	c.urlParams_.Set("alt", alt)
 20367  	c.urlParams_.Set("prettyPrint", "false")
 20368  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
 20369  	urls += "?" + c.urlParams_.Encode()
 20370  	req, err := http.NewRequest("PATCH", urls, body)
 20371  	if err != nil {
 20372  		return nil, err
 20373  	}
 20374  	req.Header = reqHeaders
 20375  	googleapi.Expand(req.URL, map[string]string{
 20376  		"name": c.name,
 20377  	})
 20378  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 20379  }
 20380  
 20381  // Do executes the "logging.organizations.updateSettings" call.
 20382  // Any non-2xx status code is an error. Response headers are in either
 20383  // *Settings.ServerResponse.Header or (if a response was returned at all) in
 20384  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 20385  // whether the returned error was because http.StatusNotModified was returned.
 20386  func (c *OrganizationsUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
 20387  	gensupport.SetOptions(c.urlParams_, opts...)
 20388  	res, err := c.doRequest("json")
 20389  	if res != nil && res.StatusCode == http.StatusNotModified {
 20390  		if res.Body != nil {
 20391  			res.Body.Close()
 20392  		}
 20393  		return nil, gensupport.WrapError(&googleapi.Error{
 20394  			Code:   res.StatusCode,
 20395  			Header: res.Header,
 20396  		})
 20397  	}
 20398  	if err != nil {
 20399  		return nil, err
 20400  	}
 20401  	defer googleapi.CloseBody(res)
 20402  	if err := googleapi.CheckResponse(res); err != nil {
 20403  		return nil, gensupport.WrapError(err)
 20404  	}
 20405  	ret := &Settings{
 20406  		ServerResponse: googleapi.ServerResponse{
 20407  			Header:         res.Header,
 20408  			HTTPStatusCode: res.StatusCode,
 20409  		},
 20410  	}
 20411  	target := &ret
 20412  	if err := gensupport.DecodeResponse(target, res); err != nil {
 20413  		return nil, err
 20414  	}
 20415  	return ret, nil
 20416  }
 20417  
 20418  type OrganizationsExclusionsCreateCall struct {
 20419  	s            *Service
 20420  	parent       string
 20421  	logexclusion *LogExclusion
 20422  	urlParams_   gensupport.URLParams
 20423  	ctx_         context.Context
 20424  	header_      http.Header
 20425  }
 20426  
 20427  // Create: Creates a new exclusion in the _Default sink in a specified parent
 20428  // resource. Only log entries belonging to that resource can be excluded. You
 20429  // can have up to 10 exclusions in a resource.
 20430  //
 20431  //   - parent: The parent resource in which to create the exclusion:
 20432  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 20433  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
 20434  //     examples:"projects/my-logging-project" "organizations/123456789".
 20435  func (r *OrganizationsExclusionsService) Create(parent string, logexclusion *LogExclusion) *OrganizationsExclusionsCreateCall {
 20436  	c := &OrganizationsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 20437  	c.parent = parent
 20438  	c.logexclusion = logexclusion
 20439  	return c
 20440  }
 20441  
 20442  // Fields allows partial responses to be retrieved. See
 20443  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 20444  // details.
 20445  func (c *OrganizationsExclusionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsCreateCall {
 20446  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 20447  	return c
 20448  }
 20449  
 20450  // Context sets the context to be used in this call's Do method.
 20451  func (c *OrganizationsExclusionsCreateCall) Context(ctx context.Context) *OrganizationsExclusionsCreateCall {
 20452  	c.ctx_ = ctx
 20453  	return c
 20454  }
 20455  
 20456  // Header returns a http.Header that can be modified by the caller to add
 20457  // headers to the request.
 20458  func (c *OrganizationsExclusionsCreateCall) Header() http.Header {
 20459  	if c.header_ == nil {
 20460  		c.header_ = make(http.Header)
 20461  	}
 20462  	return c.header_
 20463  }
 20464  
 20465  func (c *OrganizationsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
 20466  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 20467  	var body io.Reader = nil
 20468  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
 20469  	if err != nil {
 20470  		return nil, err
 20471  	}
 20472  	c.urlParams_.Set("alt", alt)
 20473  	c.urlParams_.Set("prettyPrint", "false")
 20474  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
 20475  	urls += "?" + c.urlParams_.Encode()
 20476  	req, err := http.NewRequest("POST", urls, body)
 20477  	if err != nil {
 20478  		return nil, err
 20479  	}
 20480  	req.Header = reqHeaders
 20481  	googleapi.Expand(req.URL, map[string]string{
 20482  		"parent": c.parent,
 20483  	})
 20484  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 20485  }
 20486  
 20487  // Do executes the "logging.organizations.exclusions.create" call.
 20488  // Any non-2xx status code is an error. Response headers are in either
 20489  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 20490  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 20491  // whether the returned error was because http.StatusNotModified was returned.
 20492  func (c *OrganizationsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 20493  	gensupport.SetOptions(c.urlParams_, opts...)
 20494  	res, err := c.doRequest("json")
 20495  	if res != nil && res.StatusCode == http.StatusNotModified {
 20496  		if res.Body != nil {
 20497  			res.Body.Close()
 20498  		}
 20499  		return nil, gensupport.WrapError(&googleapi.Error{
 20500  			Code:   res.StatusCode,
 20501  			Header: res.Header,
 20502  		})
 20503  	}
 20504  	if err != nil {
 20505  		return nil, err
 20506  	}
 20507  	defer googleapi.CloseBody(res)
 20508  	if err := googleapi.CheckResponse(res); err != nil {
 20509  		return nil, gensupport.WrapError(err)
 20510  	}
 20511  	ret := &LogExclusion{
 20512  		ServerResponse: googleapi.ServerResponse{
 20513  			Header:         res.Header,
 20514  			HTTPStatusCode: res.StatusCode,
 20515  		},
 20516  	}
 20517  	target := &ret
 20518  	if err := gensupport.DecodeResponse(target, res); err != nil {
 20519  		return nil, err
 20520  	}
 20521  	return ret, nil
 20522  }
 20523  
 20524  type OrganizationsExclusionsDeleteCall struct {
 20525  	s          *Service
 20526  	name       string
 20527  	urlParams_ gensupport.URLParams
 20528  	ctx_       context.Context
 20529  	header_    http.Header
 20530  }
 20531  
 20532  // Delete: Deletes an exclusion in the _Default sink.
 20533  //
 20534  //   - name: The resource name of an existing exclusion to delete:
 20535  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 20536  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 20537  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 20538  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 20539  //     example:"projects/my-project/exclusions/my-exclusion".
 20540  func (r *OrganizationsExclusionsService) Delete(name string) *OrganizationsExclusionsDeleteCall {
 20541  	c := &OrganizationsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 20542  	c.name = name
 20543  	return c
 20544  }
 20545  
 20546  // Fields allows partial responses to be retrieved. See
 20547  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 20548  // details.
 20549  func (c *OrganizationsExclusionsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsDeleteCall {
 20550  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 20551  	return c
 20552  }
 20553  
 20554  // Context sets the context to be used in this call's Do method.
 20555  func (c *OrganizationsExclusionsDeleteCall) Context(ctx context.Context) *OrganizationsExclusionsDeleteCall {
 20556  	c.ctx_ = ctx
 20557  	return c
 20558  }
 20559  
 20560  // Header returns a http.Header that can be modified by the caller to add
 20561  // headers to the request.
 20562  func (c *OrganizationsExclusionsDeleteCall) Header() http.Header {
 20563  	if c.header_ == nil {
 20564  		c.header_ = make(http.Header)
 20565  	}
 20566  	return c.header_
 20567  }
 20568  
 20569  func (c *OrganizationsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
 20570  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 20571  	var body io.Reader = nil
 20572  	c.urlParams_.Set("alt", alt)
 20573  	c.urlParams_.Set("prettyPrint", "false")
 20574  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 20575  	urls += "?" + c.urlParams_.Encode()
 20576  	req, err := http.NewRequest("DELETE", urls, body)
 20577  	if err != nil {
 20578  		return nil, err
 20579  	}
 20580  	req.Header = reqHeaders
 20581  	googleapi.Expand(req.URL, map[string]string{
 20582  		"name": c.name,
 20583  	})
 20584  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 20585  }
 20586  
 20587  // Do executes the "logging.organizations.exclusions.delete" call.
 20588  // Any non-2xx status code is an error. Response headers are in either
 20589  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 20590  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 20591  // whether the returned error was because http.StatusNotModified was returned.
 20592  func (c *OrganizationsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 20593  	gensupport.SetOptions(c.urlParams_, opts...)
 20594  	res, err := c.doRequest("json")
 20595  	if res != nil && res.StatusCode == http.StatusNotModified {
 20596  		if res.Body != nil {
 20597  			res.Body.Close()
 20598  		}
 20599  		return nil, gensupport.WrapError(&googleapi.Error{
 20600  			Code:   res.StatusCode,
 20601  			Header: res.Header,
 20602  		})
 20603  	}
 20604  	if err != nil {
 20605  		return nil, err
 20606  	}
 20607  	defer googleapi.CloseBody(res)
 20608  	if err := googleapi.CheckResponse(res); err != nil {
 20609  		return nil, gensupport.WrapError(err)
 20610  	}
 20611  	ret := &Empty{
 20612  		ServerResponse: googleapi.ServerResponse{
 20613  			Header:         res.Header,
 20614  			HTTPStatusCode: res.StatusCode,
 20615  		},
 20616  	}
 20617  	target := &ret
 20618  	if err := gensupport.DecodeResponse(target, res); err != nil {
 20619  		return nil, err
 20620  	}
 20621  	return ret, nil
 20622  }
 20623  
 20624  type OrganizationsExclusionsGetCall struct {
 20625  	s            *Service
 20626  	name         string
 20627  	urlParams_   gensupport.URLParams
 20628  	ifNoneMatch_ string
 20629  	ctx_         context.Context
 20630  	header_      http.Header
 20631  }
 20632  
 20633  // Get: Gets the description of an exclusion in the _Default sink.
 20634  //
 20635  //   - name: The resource name of an existing exclusion:
 20636  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 20637  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 20638  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 20639  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 20640  //     example:"projects/my-project/exclusions/my-exclusion".
 20641  func (r *OrganizationsExclusionsService) Get(name string) *OrganizationsExclusionsGetCall {
 20642  	c := &OrganizationsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 20643  	c.name = name
 20644  	return c
 20645  }
 20646  
 20647  // Fields allows partial responses to be retrieved. See
 20648  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 20649  // details.
 20650  func (c *OrganizationsExclusionsGetCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsGetCall {
 20651  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 20652  	return c
 20653  }
 20654  
 20655  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 20656  // object's ETag matches the given value. This is useful for getting updates
 20657  // only after the object has changed since the last request.
 20658  func (c *OrganizationsExclusionsGetCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsGetCall {
 20659  	c.ifNoneMatch_ = entityTag
 20660  	return c
 20661  }
 20662  
 20663  // Context sets the context to be used in this call's Do method.
 20664  func (c *OrganizationsExclusionsGetCall) Context(ctx context.Context) *OrganizationsExclusionsGetCall {
 20665  	c.ctx_ = ctx
 20666  	return c
 20667  }
 20668  
 20669  // Header returns a http.Header that can be modified by the caller to add
 20670  // headers to the request.
 20671  func (c *OrganizationsExclusionsGetCall) Header() http.Header {
 20672  	if c.header_ == nil {
 20673  		c.header_ = make(http.Header)
 20674  	}
 20675  	return c.header_
 20676  }
 20677  
 20678  func (c *OrganizationsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
 20679  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 20680  	if c.ifNoneMatch_ != "" {
 20681  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 20682  	}
 20683  	var body io.Reader = nil
 20684  	c.urlParams_.Set("alt", alt)
 20685  	c.urlParams_.Set("prettyPrint", "false")
 20686  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 20687  	urls += "?" + c.urlParams_.Encode()
 20688  	req, err := http.NewRequest("GET", urls, body)
 20689  	if err != nil {
 20690  		return nil, err
 20691  	}
 20692  	req.Header = reqHeaders
 20693  	googleapi.Expand(req.URL, map[string]string{
 20694  		"name": c.name,
 20695  	})
 20696  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 20697  }
 20698  
 20699  // Do executes the "logging.organizations.exclusions.get" call.
 20700  // Any non-2xx status code is an error. Response headers are in either
 20701  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 20702  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 20703  // whether the returned error was because http.StatusNotModified was returned.
 20704  func (c *OrganizationsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 20705  	gensupport.SetOptions(c.urlParams_, opts...)
 20706  	res, err := c.doRequest("json")
 20707  	if res != nil && res.StatusCode == http.StatusNotModified {
 20708  		if res.Body != nil {
 20709  			res.Body.Close()
 20710  		}
 20711  		return nil, gensupport.WrapError(&googleapi.Error{
 20712  			Code:   res.StatusCode,
 20713  			Header: res.Header,
 20714  		})
 20715  	}
 20716  	if err != nil {
 20717  		return nil, err
 20718  	}
 20719  	defer googleapi.CloseBody(res)
 20720  	if err := googleapi.CheckResponse(res); err != nil {
 20721  		return nil, gensupport.WrapError(err)
 20722  	}
 20723  	ret := &LogExclusion{
 20724  		ServerResponse: googleapi.ServerResponse{
 20725  			Header:         res.Header,
 20726  			HTTPStatusCode: res.StatusCode,
 20727  		},
 20728  	}
 20729  	target := &ret
 20730  	if err := gensupport.DecodeResponse(target, res); err != nil {
 20731  		return nil, err
 20732  	}
 20733  	return ret, nil
 20734  }
 20735  
 20736  type OrganizationsExclusionsListCall struct {
 20737  	s            *Service
 20738  	parent       string
 20739  	urlParams_   gensupport.URLParams
 20740  	ifNoneMatch_ string
 20741  	ctx_         context.Context
 20742  	header_      http.Header
 20743  }
 20744  
 20745  // List: Lists all the exclusions on the _Default sink in a parent resource.
 20746  //
 20747  //   - parent: The parent resource whose exclusions are to be listed.
 20748  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 20749  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
 20750  func (r *OrganizationsExclusionsService) List(parent string) *OrganizationsExclusionsListCall {
 20751  	c := &OrganizationsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 20752  	c.parent = parent
 20753  	return c
 20754  }
 20755  
 20756  // PageSize sets the optional parameter "pageSize": The maximum number of
 20757  // results to return from this request. Non-positive values are ignored. The
 20758  // presence of nextPageToken in the response indicates that more results might
 20759  // be available.
 20760  func (c *OrganizationsExclusionsListCall) PageSize(pageSize int64) *OrganizationsExclusionsListCall {
 20761  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 20762  	return c
 20763  }
 20764  
 20765  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 20766  // the next batch of results from the preceding call to this method. pageToken
 20767  // must be the value of nextPageToken from the previous response. The values of
 20768  // other method parameters should be identical to those in the previous call.
 20769  func (c *OrganizationsExclusionsListCall) PageToken(pageToken string) *OrganizationsExclusionsListCall {
 20770  	c.urlParams_.Set("pageToken", pageToken)
 20771  	return c
 20772  }
 20773  
 20774  // Fields allows partial responses to be retrieved. See
 20775  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 20776  // details.
 20777  func (c *OrganizationsExclusionsListCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsListCall {
 20778  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 20779  	return c
 20780  }
 20781  
 20782  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 20783  // object's ETag matches the given value. This is useful for getting updates
 20784  // only after the object has changed since the last request.
 20785  func (c *OrganizationsExclusionsListCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsListCall {
 20786  	c.ifNoneMatch_ = entityTag
 20787  	return c
 20788  }
 20789  
 20790  // Context sets the context to be used in this call's Do method.
 20791  func (c *OrganizationsExclusionsListCall) Context(ctx context.Context) *OrganizationsExclusionsListCall {
 20792  	c.ctx_ = ctx
 20793  	return c
 20794  }
 20795  
 20796  // Header returns a http.Header that can be modified by the caller to add
 20797  // headers to the request.
 20798  func (c *OrganizationsExclusionsListCall) Header() http.Header {
 20799  	if c.header_ == nil {
 20800  		c.header_ = make(http.Header)
 20801  	}
 20802  	return c.header_
 20803  }
 20804  
 20805  func (c *OrganizationsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
 20806  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 20807  	if c.ifNoneMatch_ != "" {
 20808  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 20809  	}
 20810  	var body io.Reader = nil
 20811  	c.urlParams_.Set("alt", alt)
 20812  	c.urlParams_.Set("prettyPrint", "false")
 20813  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
 20814  	urls += "?" + c.urlParams_.Encode()
 20815  	req, err := http.NewRequest("GET", urls, body)
 20816  	if err != nil {
 20817  		return nil, err
 20818  	}
 20819  	req.Header = reqHeaders
 20820  	googleapi.Expand(req.URL, map[string]string{
 20821  		"parent": c.parent,
 20822  	})
 20823  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 20824  }
 20825  
 20826  // Do executes the "logging.organizations.exclusions.list" call.
 20827  // Any non-2xx status code is an error. Response headers are in either
 20828  // *ListExclusionsResponse.ServerResponse.Header or (if a response was returned
 20829  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 20830  // check whether the returned error was because http.StatusNotModified was
 20831  // returned.
 20832  func (c *OrganizationsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
 20833  	gensupport.SetOptions(c.urlParams_, opts...)
 20834  	res, err := c.doRequest("json")
 20835  	if res != nil && res.StatusCode == http.StatusNotModified {
 20836  		if res.Body != nil {
 20837  			res.Body.Close()
 20838  		}
 20839  		return nil, gensupport.WrapError(&googleapi.Error{
 20840  			Code:   res.StatusCode,
 20841  			Header: res.Header,
 20842  		})
 20843  	}
 20844  	if err != nil {
 20845  		return nil, err
 20846  	}
 20847  	defer googleapi.CloseBody(res)
 20848  	if err := googleapi.CheckResponse(res); err != nil {
 20849  		return nil, gensupport.WrapError(err)
 20850  	}
 20851  	ret := &ListExclusionsResponse{
 20852  		ServerResponse: googleapi.ServerResponse{
 20853  			Header:         res.Header,
 20854  			HTTPStatusCode: res.StatusCode,
 20855  		},
 20856  	}
 20857  	target := &ret
 20858  	if err := gensupport.DecodeResponse(target, res); err != nil {
 20859  		return nil, err
 20860  	}
 20861  	return ret, nil
 20862  }
 20863  
 20864  // Pages invokes f for each page of results.
 20865  // A non-nil error returned from f will halt the iteration.
 20866  // The provided context supersedes any context provided to the Context method.
 20867  func (c *OrganizationsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
 20868  	c.ctx_ = ctx
 20869  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 20870  	for {
 20871  		x, err := c.Do()
 20872  		if err != nil {
 20873  			return err
 20874  		}
 20875  		if err := f(x); err != nil {
 20876  			return err
 20877  		}
 20878  		if x.NextPageToken == "" {
 20879  			return nil
 20880  		}
 20881  		c.PageToken(x.NextPageToken)
 20882  	}
 20883  }
 20884  
 20885  type OrganizationsExclusionsPatchCall struct {
 20886  	s            *Service
 20887  	name         string
 20888  	logexclusion *LogExclusion
 20889  	urlParams_   gensupport.URLParams
 20890  	ctx_         context.Context
 20891  	header_      http.Header
 20892  }
 20893  
 20894  // Patch: Changes one or more properties of an existing exclusion in the
 20895  // _Default sink.
 20896  //
 20897  //   - name: The resource name of the exclusion to update:
 20898  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 20899  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 20900  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 20901  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 20902  //     example:"projects/my-project/exclusions/my-exclusion".
 20903  func (r *OrganizationsExclusionsService) Patch(name string, logexclusion *LogExclusion) *OrganizationsExclusionsPatchCall {
 20904  	c := &OrganizationsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 20905  	c.name = name
 20906  	c.logexclusion = logexclusion
 20907  	return c
 20908  }
 20909  
 20910  // UpdateMask sets the optional parameter "updateMask": Required. A non-empty
 20911  // list of fields to change in the existing exclusion. New values for the
 20912  // fields are taken from the corresponding fields in the LogExclusion included
 20913  // in this request. Fields not mentioned in update_mask are not changed and are
 20914  // ignored in the request.For example, to change the filter and description of
 20915  // an exclusion, specify an update_mask of "filter,description".
 20916  func (c *OrganizationsExclusionsPatchCall) UpdateMask(updateMask string) *OrganizationsExclusionsPatchCall {
 20917  	c.urlParams_.Set("updateMask", updateMask)
 20918  	return c
 20919  }
 20920  
 20921  // Fields allows partial responses to be retrieved. See
 20922  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 20923  // details.
 20924  func (c *OrganizationsExclusionsPatchCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsPatchCall {
 20925  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 20926  	return c
 20927  }
 20928  
 20929  // Context sets the context to be used in this call's Do method.
 20930  func (c *OrganizationsExclusionsPatchCall) Context(ctx context.Context) *OrganizationsExclusionsPatchCall {
 20931  	c.ctx_ = ctx
 20932  	return c
 20933  }
 20934  
 20935  // Header returns a http.Header that can be modified by the caller to add
 20936  // headers to the request.
 20937  func (c *OrganizationsExclusionsPatchCall) Header() http.Header {
 20938  	if c.header_ == nil {
 20939  		c.header_ = make(http.Header)
 20940  	}
 20941  	return c.header_
 20942  }
 20943  
 20944  func (c *OrganizationsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
 20945  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 20946  	var body io.Reader = nil
 20947  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
 20948  	if err != nil {
 20949  		return nil, err
 20950  	}
 20951  	c.urlParams_.Set("alt", alt)
 20952  	c.urlParams_.Set("prettyPrint", "false")
 20953  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 20954  	urls += "?" + c.urlParams_.Encode()
 20955  	req, err := http.NewRequest("PATCH", urls, body)
 20956  	if err != nil {
 20957  		return nil, err
 20958  	}
 20959  	req.Header = reqHeaders
 20960  	googleapi.Expand(req.URL, map[string]string{
 20961  		"name": c.name,
 20962  	})
 20963  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 20964  }
 20965  
 20966  // Do executes the "logging.organizations.exclusions.patch" call.
 20967  // Any non-2xx status code is an error. Response headers are in either
 20968  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 20969  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 20970  // whether the returned error was because http.StatusNotModified was returned.
 20971  func (c *OrganizationsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 20972  	gensupport.SetOptions(c.urlParams_, opts...)
 20973  	res, err := c.doRequest("json")
 20974  	if res != nil && res.StatusCode == http.StatusNotModified {
 20975  		if res.Body != nil {
 20976  			res.Body.Close()
 20977  		}
 20978  		return nil, gensupport.WrapError(&googleapi.Error{
 20979  			Code:   res.StatusCode,
 20980  			Header: res.Header,
 20981  		})
 20982  	}
 20983  	if err != nil {
 20984  		return nil, err
 20985  	}
 20986  	defer googleapi.CloseBody(res)
 20987  	if err := googleapi.CheckResponse(res); err != nil {
 20988  		return nil, gensupport.WrapError(err)
 20989  	}
 20990  	ret := &LogExclusion{
 20991  		ServerResponse: googleapi.ServerResponse{
 20992  			Header:         res.Header,
 20993  			HTTPStatusCode: res.StatusCode,
 20994  		},
 20995  	}
 20996  	target := &ret
 20997  	if err := gensupport.DecodeResponse(target, res); err != nil {
 20998  		return nil, err
 20999  	}
 21000  	return ret, nil
 21001  }
 21002  
 21003  type OrganizationsLocationsGetCall struct {
 21004  	s            *Service
 21005  	name         string
 21006  	urlParams_   gensupport.URLParams
 21007  	ifNoneMatch_ string
 21008  	ctx_         context.Context
 21009  	header_      http.Header
 21010  }
 21011  
 21012  // Get: Gets information about a location.
 21013  //
 21014  // - name: Resource name for the location.
 21015  func (r *OrganizationsLocationsService) Get(name string) *OrganizationsLocationsGetCall {
 21016  	c := &OrganizationsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 21017  	c.name = name
 21018  	return c
 21019  }
 21020  
 21021  // Fields allows partial responses to be retrieved. See
 21022  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 21023  // details.
 21024  func (c *OrganizationsLocationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGetCall {
 21025  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 21026  	return c
 21027  }
 21028  
 21029  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 21030  // object's ETag matches the given value. This is useful for getting updates
 21031  // only after the object has changed since the last request.
 21032  func (c *OrganizationsLocationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGetCall {
 21033  	c.ifNoneMatch_ = entityTag
 21034  	return c
 21035  }
 21036  
 21037  // Context sets the context to be used in this call's Do method.
 21038  func (c *OrganizationsLocationsGetCall) Context(ctx context.Context) *OrganizationsLocationsGetCall {
 21039  	c.ctx_ = ctx
 21040  	return c
 21041  }
 21042  
 21043  // Header returns a http.Header that can be modified by the caller to add
 21044  // headers to the request.
 21045  func (c *OrganizationsLocationsGetCall) Header() http.Header {
 21046  	if c.header_ == nil {
 21047  		c.header_ = make(http.Header)
 21048  	}
 21049  	return c.header_
 21050  }
 21051  
 21052  func (c *OrganizationsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
 21053  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 21054  	if c.ifNoneMatch_ != "" {
 21055  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 21056  	}
 21057  	var body io.Reader = nil
 21058  	c.urlParams_.Set("alt", alt)
 21059  	c.urlParams_.Set("prettyPrint", "false")
 21060  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 21061  	urls += "?" + c.urlParams_.Encode()
 21062  	req, err := http.NewRequest("GET", urls, body)
 21063  	if err != nil {
 21064  		return nil, err
 21065  	}
 21066  	req.Header = reqHeaders
 21067  	googleapi.Expand(req.URL, map[string]string{
 21068  		"name": c.name,
 21069  	})
 21070  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 21071  }
 21072  
 21073  // Do executes the "logging.organizations.locations.get" call.
 21074  // Any non-2xx status code is an error. Response headers are in either
 21075  // *Location.ServerResponse.Header or (if a response was returned at all) in
 21076  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 21077  // whether the returned error was because http.StatusNotModified was returned.
 21078  func (c *OrganizationsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
 21079  	gensupport.SetOptions(c.urlParams_, opts...)
 21080  	res, err := c.doRequest("json")
 21081  	if res != nil && res.StatusCode == http.StatusNotModified {
 21082  		if res.Body != nil {
 21083  			res.Body.Close()
 21084  		}
 21085  		return nil, gensupport.WrapError(&googleapi.Error{
 21086  			Code:   res.StatusCode,
 21087  			Header: res.Header,
 21088  		})
 21089  	}
 21090  	if err != nil {
 21091  		return nil, err
 21092  	}
 21093  	defer googleapi.CloseBody(res)
 21094  	if err := googleapi.CheckResponse(res); err != nil {
 21095  		return nil, gensupport.WrapError(err)
 21096  	}
 21097  	ret := &Location{
 21098  		ServerResponse: googleapi.ServerResponse{
 21099  			Header:         res.Header,
 21100  			HTTPStatusCode: res.StatusCode,
 21101  		},
 21102  	}
 21103  	target := &ret
 21104  	if err := gensupport.DecodeResponse(target, res); err != nil {
 21105  		return nil, err
 21106  	}
 21107  	return ret, nil
 21108  }
 21109  
 21110  type OrganizationsLocationsListCall struct {
 21111  	s            *Service
 21112  	name         string
 21113  	urlParams_   gensupport.URLParams
 21114  	ifNoneMatch_ string
 21115  	ctx_         context.Context
 21116  	header_      http.Header
 21117  }
 21118  
 21119  // List: Lists information about the supported locations for this service.
 21120  //
 21121  // - name: The resource that owns the locations collection, if applicable.
 21122  func (r *OrganizationsLocationsService) List(name string) *OrganizationsLocationsListCall {
 21123  	c := &OrganizationsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 21124  	c.name = name
 21125  	return c
 21126  }
 21127  
 21128  // Filter sets the optional parameter "filter": A filter to narrow down results
 21129  // to a preferred subset. The filtering language accepts strings like
 21130  // "displayName=tokyo", and is documented in more detail in AIP-160
 21131  // (https://google.aip.dev/160).
 21132  func (c *OrganizationsLocationsListCall) Filter(filter string) *OrganizationsLocationsListCall {
 21133  	c.urlParams_.Set("filter", filter)
 21134  	return c
 21135  }
 21136  
 21137  // PageSize sets the optional parameter "pageSize": The maximum number of
 21138  // results to return. If not set, the service selects a default.
 21139  func (c *OrganizationsLocationsListCall) PageSize(pageSize int64) *OrganizationsLocationsListCall {
 21140  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 21141  	return c
 21142  }
 21143  
 21144  // PageToken sets the optional parameter "pageToken": A page token received
 21145  // from the next_page_token field in the response. Send that page token to
 21146  // receive the subsequent page.
 21147  func (c *OrganizationsLocationsListCall) PageToken(pageToken string) *OrganizationsLocationsListCall {
 21148  	c.urlParams_.Set("pageToken", pageToken)
 21149  	return c
 21150  }
 21151  
 21152  // Fields allows partial responses to be retrieved. See
 21153  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 21154  // details.
 21155  func (c *OrganizationsLocationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsListCall {
 21156  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 21157  	return c
 21158  }
 21159  
 21160  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 21161  // object's ETag matches the given value. This is useful for getting updates
 21162  // only after the object has changed since the last request.
 21163  func (c *OrganizationsLocationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsListCall {
 21164  	c.ifNoneMatch_ = entityTag
 21165  	return c
 21166  }
 21167  
 21168  // Context sets the context to be used in this call's Do method.
 21169  func (c *OrganizationsLocationsListCall) Context(ctx context.Context) *OrganizationsLocationsListCall {
 21170  	c.ctx_ = ctx
 21171  	return c
 21172  }
 21173  
 21174  // Header returns a http.Header that can be modified by the caller to add
 21175  // headers to the request.
 21176  func (c *OrganizationsLocationsListCall) Header() http.Header {
 21177  	if c.header_ == nil {
 21178  		c.header_ = make(http.Header)
 21179  	}
 21180  	return c.header_
 21181  }
 21182  
 21183  func (c *OrganizationsLocationsListCall) doRequest(alt string) (*http.Response, error) {
 21184  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 21185  	if c.ifNoneMatch_ != "" {
 21186  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 21187  	}
 21188  	var body io.Reader = nil
 21189  	c.urlParams_.Set("alt", alt)
 21190  	c.urlParams_.Set("prettyPrint", "false")
 21191  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
 21192  	urls += "?" + c.urlParams_.Encode()
 21193  	req, err := http.NewRequest("GET", urls, body)
 21194  	if err != nil {
 21195  		return nil, err
 21196  	}
 21197  	req.Header = reqHeaders
 21198  	googleapi.Expand(req.URL, map[string]string{
 21199  		"name": c.name,
 21200  	})
 21201  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 21202  }
 21203  
 21204  // Do executes the "logging.organizations.locations.list" call.
 21205  // Any non-2xx status code is an error. Response headers are in either
 21206  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
 21207  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 21208  // check whether the returned error was because http.StatusNotModified was
 21209  // returned.
 21210  func (c *OrganizationsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
 21211  	gensupport.SetOptions(c.urlParams_, opts...)
 21212  	res, err := c.doRequest("json")
 21213  	if res != nil && res.StatusCode == http.StatusNotModified {
 21214  		if res.Body != nil {
 21215  			res.Body.Close()
 21216  		}
 21217  		return nil, gensupport.WrapError(&googleapi.Error{
 21218  			Code:   res.StatusCode,
 21219  			Header: res.Header,
 21220  		})
 21221  	}
 21222  	if err != nil {
 21223  		return nil, err
 21224  	}
 21225  	defer googleapi.CloseBody(res)
 21226  	if err := googleapi.CheckResponse(res); err != nil {
 21227  		return nil, gensupport.WrapError(err)
 21228  	}
 21229  	ret := &ListLocationsResponse{
 21230  		ServerResponse: googleapi.ServerResponse{
 21231  			Header:         res.Header,
 21232  			HTTPStatusCode: res.StatusCode,
 21233  		},
 21234  	}
 21235  	target := &ret
 21236  	if err := gensupport.DecodeResponse(target, res); err != nil {
 21237  		return nil, err
 21238  	}
 21239  	return ret, nil
 21240  }
 21241  
 21242  // Pages invokes f for each page of results.
 21243  // A non-nil error returned from f will halt the iteration.
 21244  // The provided context supersedes any context provided to the Context method.
 21245  func (c *OrganizationsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
 21246  	c.ctx_ = ctx
 21247  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 21248  	for {
 21249  		x, err := c.Do()
 21250  		if err != nil {
 21251  			return err
 21252  		}
 21253  		if err := f(x); err != nil {
 21254  			return err
 21255  		}
 21256  		if x.NextPageToken == "" {
 21257  			return nil
 21258  		}
 21259  		c.PageToken(x.NextPageToken)
 21260  	}
 21261  }
 21262  
 21263  type OrganizationsLocationsBucketsCreateCall struct {
 21264  	s          *Service
 21265  	parent     string
 21266  	logbucket  *LogBucket
 21267  	urlParams_ gensupport.URLParams
 21268  	ctx_       context.Context
 21269  	header_    http.Header
 21270  }
 21271  
 21272  // Create: Creates a log bucket that can be used to store log entries. After a
 21273  // bucket has been created, the bucket's location cannot be changed.
 21274  //
 21275  //   - parent: The resource in which to create the log bucket:
 21276  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
 21277  //     example:"projects/my-project/locations/global".
 21278  func (r *OrganizationsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *OrganizationsLocationsBucketsCreateCall {
 21279  	c := &OrganizationsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 21280  	c.parent = parent
 21281  	c.logbucket = logbucket
 21282  	return c
 21283  }
 21284  
 21285  // BucketId sets the optional parameter "bucketId": Required. A client-assigned
 21286  // identifier such as "my-bucket". Identifiers are limited to 100 characters
 21287  // and can include only letters, digits, underscores, hyphens, and periods.
 21288  // Bucket identifiers must start with an alphanumeric character.
 21289  func (c *OrganizationsLocationsBucketsCreateCall) BucketId(bucketId string) *OrganizationsLocationsBucketsCreateCall {
 21290  	c.urlParams_.Set("bucketId", bucketId)
 21291  	return c
 21292  }
 21293  
 21294  // Fields allows partial responses to be retrieved. See
 21295  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 21296  // details.
 21297  func (c *OrganizationsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsCreateCall {
 21298  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 21299  	return c
 21300  }
 21301  
 21302  // Context sets the context to be used in this call's Do method.
 21303  func (c *OrganizationsLocationsBucketsCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsCreateCall {
 21304  	c.ctx_ = ctx
 21305  	return c
 21306  }
 21307  
 21308  // Header returns a http.Header that can be modified by the caller to add
 21309  // headers to the request.
 21310  func (c *OrganizationsLocationsBucketsCreateCall) Header() http.Header {
 21311  	if c.header_ == nil {
 21312  		c.header_ = make(http.Header)
 21313  	}
 21314  	return c.header_
 21315  }
 21316  
 21317  func (c *OrganizationsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
 21318  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 21319  	var body io.Reader = nil
 21320  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 21321  	if err != nil {
 21322  		return nil, err
 21323  	}
 21324  	c.urlParams_.Set("alt", alt)
 21325  	c.urlParams_.Set("prettyPrint", "false")
 21326  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
 21327  	urls += "?" + c.urlParams_.Encode()
 21328  	req, err := http.NewRequest("POST", urls, body)
 21329  	if err != nil {
 21330  		return nil, err
 21331  	}
 21332  	req.Header = reqHeaders
 21333  	googleapi.Expand(req.URL, map[string]string{
 21334  		"parent": c.parent,
 21335  	})
 21336  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 21337  }
 21338  
 21339  // Do executes the "logging.organizations.locations.buckets.create" call.
 21340  // Any non-2xx status code is an error. Response headers are in either
 21341  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 21342  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 21343  // whether the returned error was because http.StatusNotModified was returned.
 21344  func (c *OrganizationsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 21345  	gensupport.SetOptions(c.urlParams_, opts...)
 21346  	res, err := c.doRequest("json")
 21347  	if res != nil && res.StatusCode == http.StatusNotModified {
 21348  		if res.Body != nil {
 21349  			res.Body.Close()
 21350  		}
 21351  		return nil, gensupport.WrapError(&googleapi.Error{
 21352  			Code:   res.StatusCode,
 21353  			Header: res.Header,
 21354  		})
 21355  	}
 21356  	if err != nil {
 21357  		return nil, err
 21358  	}
 21359  	defer googleapi.CloseBody(res)
 21360  	if err := googleapi.CheckResponse(res); err != nil {
 21361  		return nil, gensupport.WrapError(err)
 21362  	}
 21363  	ret := &LogBucket{
 21364  		ServerResponse: googleapi.ServerResponse{
 21365  			Header:         res.Header,
 21366  			HTTPStatusCode: res.StatusCode,
 21367  		},
 21368  	}
 21369  	target := &ret
 21370  	if err := gensupport.DecodeResponse(target, res); err != nil {
 21371  		return nil, err
 21372  	}
 21373  	return ret, nil
 21374  }
 21375  
 21376  type OrganizationsLocationsBucketsCreateAsyncCall struct {
 21377  	s          *Service
 21378  	parent     string
 21379  	logbucket  *LogBucket
 21380  	urlParams_ gensupport.URLParams
 21381  	ctx_       context.Context
 21382  	header_    http.Header
 21383  }
 21384  
 21385  // CreateAsync: Creates a log bucket asynchronously that can be used to store
 21386  // log entries.After a bucket has been created, the bucket's location cannot be
 21387  // changed.
 21388  //
 21389  //   - parent: The resource in which to create the log bucket:
 21390  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
 21391  //     example:"projects/my-project/locations/global".
 21392  func (r *OrganizationsLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *OrganizationsLocationsBucketsCreateAsyncCall {
 21393  	c := &OrganizationsLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 21394  	c.parent = parent
 21395  	c.logbucket = logbucket
 21396  	return c
 21397  }
 21398  
 21399  // BucketId sets the optional parameter "bucketId": Required. A client-assigned
 21400  // identifier such as "my-bucket". Identifiers are limited to 100 characters
 21401  // and can include only letters, digits, underscores, hyphens, and periods.
 21402  // Bucket identifiers must start with an alphanumeric character.
 21403  func (c *OrganizationsLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *OrganizationsLocationsBucketsCreateAsyncCall {
 21404  	c.urlParams_.Set("bucketId", bucketId)
 21405  	return c
 21406  }
 21407  
 21408  // Fields allows partial responses to be retrieved. See
 21409  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 21410  // details.
 21411  func (c *OrganizationsLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsCreateAsyncCall {
 21412  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 21413  	return c
 21414  }
 21415  
 21416  // Context sets the context to be used in this call's Do method.
 21417  func (c *OrganizationsLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *OrganizationsLocationsBucketsCreateAsyncCall {
 21418  	c.ctx_ = ctx
 21419  	return c
 21420  }
 21421  
 21422  // Header returns a http.Header that can be modified by the caller to add
 21423  // headers to the request.
 21424  func (c *OrganizationsLocationsBucketsCreateAsyncCall) Header() http.Header {
 21425  	if c.header_ == nil {
 21426  		c.header_ = make(http.Header)
 21427  	}
 21428  	return c.header_
 21429  }
 21430  
 21431  func (c *OrganizationsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) {
 21432  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 21433  	var body io.Reader = nil
 21434  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 21435  	if err != nil {
 21436  		return nil, err
 21437  	}
 21438  	c.urlParams_.Set("alt", alt)
 21439  	c.urlParams_.Set("prettyPrint", "false")
 21440  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync")
 21441  	urls += "?" + c.urlParams_.Encode()
 21442  	req, err := http.NewRequest("POST", urls, body)
 21443  	if err != nil {
 21444  		return nil, err
 21445  	}
 21446  	req.Header = reqHeaders
 21447  	googleapi.Expand(req.URL, map[string]string{
 21448  		"parent": c.parent,
 21449  	})
 21450  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 21451  }
 21452  
 21453  // Do executes the "logging.organizations.locations.buckets.createAsync" call.
 21454  // Any non-2xx status code is an error. Response headers are in either
 21455  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 21456  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 21457  // whether the returned error was because http.StatusNotModified was returned.
 21458  func (c *OrganizationsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 21459  	gensupport.SetOptions(c.urlParams_, opts...)
 21460  	res, err := c.doRequest("json")
 21461  	if res != nil && res.StatusCode == http.StatusNotModified {
 21462  		if res.Body != nil {
 21463  			res.Body.Close()
 21464  		}
 21465  		return nil, gensupport.WrapError(&googleapi.Error{
 21466  			Code:   res.StatusCode,
 21467  			Header: res.Header,
 21468  		})
 21469  	}
 21470  	if err != nil {
 21471  		return nil, err
 21472  	}
 21473  	defer googleapi.CloseBody(res)
 21474  	if err := googleapi.CheckResponse(res); err != nil {
 21475  		return nil, gensupport.WrapError(err)
 21476  	}
 21477  	ret := &Operation{
 21478  		ServerResponse: googleapi.ServerResponse{
 21479  			Header:         res.Header,
 21480  			HTTPStatusCode: res.StatusCode,
 21481  		},
 21482  	}
 21483  	target := &ret
 21484  	if err := gensupport.DecodeResponse(target, res); err != nil {
 21485  		return nil, err
 21486  	}
 21487  	return ret, nil
 21488  }
 21489  
 21490  type OrganizationsLocationsBucketsDeleteCall struct {
 21491  	s          *Service
 21492  	name       string
 21493  	urlParams_ gensupport.URLParams
 21494  	ctx_       context.Context
 21495  	header_    http.Header
 21496  }
 21497  
 21498  // Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the
 21499  // DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log
 21500  // entries in the bucket will be permanently deleted.
 21501  //
 21502  //   - name: The full resource name of the bucket to delete.
 21503  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 21504  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 21505  //     ]"
 21506  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 21507  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 21508  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 21509  func (r *OrganizationsLocationsBucketsService) Delete(name string) *OrganizationsLocationsBucketsDeleteCall {
 21510  	c := &OrganizationsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 21511  	c.name = name
 21512  	return c
 21513  }
 21514  
 21515  // Fields allows partial responses to be retrieved. See
 21516  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 21517  // details.
 21518  func (c *OrganizationsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsDeleteCall {
 21519  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 21520  	return c
 21521  }
 21522  
 21523  // Context sets the context to be used in this call's Do method.
 21524  func (c *OrganizationsLocationsBucketsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsDeleteCall {
 21525  	c.ctx_ = ctx
 21526  	return c
 21527  }
 21528  
 21529  // Header returns a http.Header that can be modified by the caller to add
 21530  // headers to the request.
 21531  func (c *OrganizationsLocationsBucketsDeleteCall) Header() http.Header {
 21532  	if c.header_ == nil {
 21533  		c.header_ = make(http.Header)
 21534  	}
 21535  	return c.header_
 21536  }
 21537  
 21538  func (c *OrganizationsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
 21539  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 21540  	var body io.Reader = nil
 21541  	c.urlParams_.Set("alt", alt)
 21542  	c.urlParams_.Set("prettyPrint", "false")
 21543  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 21544  	urls += "?" + c.urlParams_.Encode()
 21545  	req, err := http.NewRequest("DELETE", urls, body)
 21546  	if err != nil {
 21547  		return nil, err
 21548  	}
 21549  	req.Header = reqHeaders
 21550  	googleapi.Expand(req.URL, map[string]string{
 21551  		"name": c.name,
 21552  	})
 21553  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 21554  }
 21555  
 21556  // Do executes the "logging.organizations.locations.buckets.delete" call.
 21557  // Any non-2xx status code is an error. Response headers are in either
 21558  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 21559  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 21560  // whether the returned error was because http.StatusNotModified was returned.
 21561  func (c *OrganizationsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 21562  	gensupport.SetOptions(c.urlParams_, opts...)
 21563  	res, err := c.doRequest("json")
 21564  	if res != nil && res.StatusCode == http.StatusNotModified {
 21565  		if res.Body != nil {
 21566  			res.Body.Close()
 21567  		}
 21568  		return nil, gensupport.WrapError(&googleapi.Error{
 21569  			Code:   res.StatusCode,
 21570  			Header: res.Header,
 21571  		})
 21572  	}
 21573  	if err != nil {
 21574  		return nil, err
 21575  	}
 21576  	defer googleapi.CloseBody(res)
 21577  	if err := googleapi.CheckResponse(res); err != nil {
 21578  		return nil, gensupport.WrapError(err)
 21579  	}
 21580  	ret := &Empty{
 21581  		ServerResponse: googleapi.ServerResponse{
 21582  			Header:         res.Header,
 21583  			HTTPStatusCode: res.StatusCode,
 21584  		},
 21585  	}
 21586  	target := &ret
 21587  	if err := gensupport.DecodeResponse(target, res); err != nil {
 21588  		return nil, err
 21589  	}
 21590  	return ret, nil
 21591  }
 21592  
 21593  type OrganizationsLocationsBucketsGetCall struct {
 21594  	s            *Service
 21595  	name         string
 21596  	urlParams_   gensupport.URLParams
 21597  	ifNoneMatch_ string
 21598  	ctx_         context.Context
 21599  	header_      http.Header
 21600  }
 21601  
 21602  // Get: Gets a log bucket.
 21603  //
 21604  //   - name: The resource name of the bucket:
 21605  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 21606  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 21607  //     ]"
 21608  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 21609  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 21610  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 21611  func (r *OrganizationsLocationsBucketsService) Get(name string) *OrganizationsLocationsBucketsGetCall {
 21612  	c := &OrganizationsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 21613  	c.name = name
 21614  	return c
 21615  }
 21616  
 21617  // Fields allows partial responses to be retrieved. See
 21618  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 21619  // details.
 21620  func (c *OrganizationsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsGetCall {
 21621  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 21622  	return c
 21623  }
 21624  
 21625  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 21626  // object's ETag matches the given value. This is useful for getting updates
 21627  // only after the object has changed since the last request.
 21628  func (c *OrganizationsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsGetCall {
 21629  	c.ifNoneMatch_ = entityTag
 21630  	return c
 21631  }
 21632  
 21633  // Context sets the context to be used in this call's Do method.
 21634  func (c *OrganizationsLocationsBucketsGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsGetCall {
 21635  	c.ctx_ = ctx
 21636  	return c
 21637  }
 21638  
 21639  // Header returns a http.Header that can be modified by the caller to add
 21640  // headers to the request.
 21641  func (c *OrganizationsLocationsBucketsGetCall) Header() http.Header {
 21642  	if c.header_ == nil {
 21643  		c.header_ = make(http.Header)
 21644  	}
 21645  	return c.header_
 21646  }
 21647  
 21648  func (c *OrganizationsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
 21649  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 21650  	if c.ifNoneMatch_ != "" {
 21651  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 21652  	}
 21653  	var body io.Reader = nil
 21654  	c.urlParams_.Set("alt", alt)
 21655  	c.urlParams_.Set("prettyPrint", "false")
 21656  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 21657  	urls += "?" + c.urlParams_.Encode()
 21658  	req, err := http.NewRequest("GET", urls, body)
 21659  	if err != nil {
 21660  		return nil, err
 21661  	}
 21662  	req.Header = reqHeaders
 21663  	googleapi.Expand(req.URL, map[string]string{
 21664  		"name": c.name,
 21665  	})
 21666  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 21667  }
 21668  
 21669  // Do executes the "logging.organizations.locations.buckets.get" call.
 21670  // Any non-2xx status code is an error. Response headers are in either
 21671  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 21672  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 21673  // whether the returned error was because http.StatusNotModified was returned.
 21674  func (c *OrganizationsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 21675  	gensupport.SetOptions(c.urlParams_, opts...)
 21676  	res, err := c.doRequest("json")
 21677  	if res != nil && res.StatusCode == http.StatusNotModified {
 21678  		if res.Body != nil {
 21679  			res.Body.Close()
 21680  		}
 21681  		return nil, gensupport.WrapError(&googleapi.Error{
 21682  			Code:   res.StatusCode,
 21683  			Header: res.Header,
 21684  		})
 21685  	}
 21686  	if err != nil {
 21687  		return nil, err
 21688  	}
 21689  	defer googleapi.CloseBody(res)
 21690  	if err := googleapi.CheckResponse(res); err != nil {
 21691  		return nil, gensupport.WrapError(err)
 21692  	}
 21693  	ret := &LogBucket{
 21694  		ServerResponse: googleapi.ServerResponse{
 21695  			Header:         res.Header,
 21696  			HTTPStatusCode: res.StatusCode,
 21697  		},
 21698  	}
 21699  	target := &ret
 21700  	if err := gensupport.DecodeResponse(target, res); err != nil {
 21701  		return nil, err
 21702  	}
 21703  	return ret, nil
 21704  }
 21705  
 21706  type OrganizationsLocationsBucketsListCall struct {
 21707  	s            *Service
 21708  	parent       string
 21709  	urlParams_   gensupport.URLParams
 21710  	ifNoneMatch_ string
 21711  	ctx_         context.Context
 21712  	header_      http.Header
 21713  }
 21714  
 21715  // List: Lists log buckets.
 21716  //
 21717  //   - parent: The parent resource whose buckets are to be listed:
 21718  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 21719  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 21720  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 21721  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion
 21722  //     of the resource must be specified, but supplying the character - in place
 21723  //     of LOCATION_ID will return all buckets.
 21724  func (r *OrganizationsLocationsBucketsService) List(parent string) *OrganizationsLocationsBucketsListCall {
 21725  	c := &OrganizationsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 21726  	c.parent = parent
 21727  	return c
 21728  }
 21729  
 21730  // PageSize sets the optional parameter "pageSize": The maximum number of
 21731  // results to return from this request. Non-positive values are ignored. The
 21732  // presence of nextPageToken in the response indicates that more results might
 21733  // be available.
 21734  func (c *OrganizationsLocationsBucketsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsListCall {
 21735  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 21736  	return c
 21737  }
 21738  
 21739  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 21740  // the next batch of results from the preceding call to this method. pageToken
 21741  // must be the value of nextPageToken from the previous response. The values of
 21742  // other method parameters should be identical to those in the previous call.
 21743  func (c *OrganizationsLocationsBucketsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsListCall {
 21744  	c.urlParams_.Set("pageToken", pageToken)
 21745  	return c
 21746  }
 21747  
 21748  // Fields allows partial responses to be retrieved. See
 21749  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 21750  // details.
 21751  func (c *OrganizationsLocationsBucketsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsListCall {
 21752  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 21753  	return c
 21754  }
 21755  
 21756  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 21757  // object's ETag matches the given value. This is useful for getting updates
 21758  // only after the object has changed since the last request.
 21759  func (c *OrganizationsLocationsBucketsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsListCall {
 21760  	c.ifNoneMatch_ = entityTag
 21761  	return c
 21762  }
 21763  
 21764  // Context sets the context to be used in this call's Do method.
 21765  func (c *OrganizationsLocationsBucketsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsListCall {
 21766  	c.ctx_ = ctx
 21767  	return c
 21768  }
 21769  
 21770  // Header returns a http.Header that can be modified by the caller to add
 21771  // headers to the request.
 21772  func (c *OrganizationsLocationsBucketsListCall) Header() http.Header {
 21773  	if c.header_ == nil {
 21774  		c.header_ = make(http.Header)
 21775  	}
 21776  	return c.header_
 21777  }
 21778  
 21779  func (c *OrganizationsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
 21780  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 21781  	if c.ifNoneMatch_ != "" {
 21782  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 21783  	}
 21784  	var body io.Reader = nil
 21785  	c.urlParams_.Set("alt", alt)
 21786  	c.urlParams_.Set("prettyPrint", "false")
 21787  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
 21788  	urls += "?" + c.urlParams_.Encode()
 21789  	req, err := http.NewRequest("GET", urls, body)
 21790  	if err != nil {
 21791  		return nil, err
 21792  	}
 21793  	req.Header = reqHeaders
 21794  	googleapi.Expand(req.URL, map[string]string{
 21795  		"parent": c.parent,
 21796  	})
 21797  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 21798  }
 21799  
 21800  // Do executes the "logging.organizations.locations.buckets.list" call.
 21801  // Any non-2xx status code is an error. Response headers are in either
 21802  // *ListBucketsResponse.ServerResponse.Header or (if a response was returned at
 21803  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 21804  // check whether the returned error was because http.StatusNotModified was
 21805  // returned.
 21806  func (c *OrganizationsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
 21807  	gensupport.SetOptions(c.urlParams_, opts...)
 21808  	res, err := c.doRequest("json")
 21809  	if res != nil && res.StatusCode == http.StatusNotModified {
 21810  		if res.Body != nil {
 21811  			res.Body.Close()
 21812  		}
 21813  		return nil, gensupport.WrapError(&googleapi.Error{
 21814  			Code:   res.StatusCode,
 21815  			Header: res.Header,
 21816  		})
 21817  	}
 21818  	if err != nil {
 21819  		return nil, err
 21820  	}
 21821  	defer googleapi.CloseBody(res)
 21822  	if err := googleapi.CheckResponse(res); err != nil {
 21823  		return nil, gensupport.WrapError(err)
 21824  	}
 21825  	ret := &ListBucketsResponse{
 21826  		ServerResponse: googleapi.ServerResponse{
 21827  			Header:         res.Header,
 21828  			HTTPStatusCode: res.StatusCode,
 21829  		},
 21830  	}
 21831  	target := &ret
 21832  	if err := gensupport.DecodeResponse(target, res); err != nil {
 21833  		return nil, err
 21834  	}
 21835  	return ret, nil
 21836  }
 21837  
 21838  // Pages invokes f for each page of results.
 21839  // A non-nil error returned from f will halt the iteration.
 21840  // The provided context supersedes any context provided to the Context method.
 21841  func (c *OrganizationsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
 21842  	c.ctx_ = ctx
 21843  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 21844  	for {
 21845  		x, err := c.Do()
 21846  		if err != nil {
 21847  			return err
 21848  		}
 21849  		if err := f(x); err != nil {
 21850  			return err
 21851  		}
 21852  		if x.NextPageToken == "" {
 21853  			return nil
 21854  		}
 21855  		c.PageToken(x.NextPageToken)
 21856  	}
 21857  }
 21858  
 21859  type OrganizationsLocationsBucketsPatchCall struct {
 21860  	s          *Service
 21861  	name       string
 21862  	logbucket  *LogBucket
 21863  	urlParams_ gensupport.URLParams
 21864  	ctx_       context.Context
 21865  	header_    http.Header
 21866  }
 21867  
 21868  // Patch: Updates a log bucket.If the bucket has a lifecycle_state of
 21869  // DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket
 21870  // has been created, the bucket's location cannot be changed.
 21871  //
 21872  //   - name: The full resource name of the bucket to update.
 21873  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 21874  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 21875  //     ]"
 21876  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 21877  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 21878  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 21879  func (r *OrganizationsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *OrganizationsLocationsBucketsPatchCall {
 21880  	c := &OrganizationsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 21881  	c.name = name
 21882  	c.logbucket = logbucket
 21883  	return c
 21884  }
 21885  
 21886  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
 21887  // that specifies the fields in bucket that need an update. A bucket field will
 21888  // be overwritten if, and only if, it is in the update mask. name and output
 21889  // only fields cannot be updated.For a detailed FieldMask definition, see:
 21890  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 21891  // example: updateMask=retention_days
 21892  func (c *OrganizationsLocationsBucketsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsPatchCall {
 21893  	c.urlParams_.Set("updateMask", updateMask)
 21894  	return c
 21895  }
 21896  
 21897  // Fields allows partial responses to be retrieved. See
 21898  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 21899  // details.
 21900  func (c *OrganizationsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsPatchCall {
 21901  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 21902  	return c
 21903  }
 21904  
 21905  // Context sets the context to be used in this call's Do method.
 21906  func (c *OrganizationsLocationsBucketsPatchCall) Context(ctx context.Context) *OrganizationsLocationsBucketsPatchCall {
 21907  	c.ctx_ = ctx
 21908  	return c
 21909  }
 21910  
 21911  // Header returns a http.Header that can be modified by the caller to add
 21912  // headers to the request.
 21913  func (c *OrganizationsLocationsBucketsPatchCall) Header() http.Header {
 21914  	if c.header_ == nil {
 21915  		c.header_ = make(http.Header)
 21916  	}
 21917  	return c.header_
 21918  }
 21919  
 21920  func (c *OrganizationsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
 21921  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 21922  	var body io.Reader = nil
 21923  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 21924  	if err != nil {
 21925  		return nil, err
 21926  	}
 21927  	c.urlParams_.Set("alt", alt)
 21928  	c.urlParams_.Set("prettyPrint", "false")
 21929  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 21930  	urls += "?" + c.urlParams_.Encode()
 21931  	req, err := http.NewRequest("PATCH", urls, body)
 21932  	if err != nil {
 21933  		return nil, err
 21934  	}
 21935  	req.Header = reqHeaders
 21936  	googleapi.Expand(req.URL, map[string]string{
 21937  		"name": c.name,
 21938  	})
 21939  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 21940  }
 21941  
 21942  // Do executes the "logging.organizations.locations.buckets.patch" call.
 21943  // Any non-2xx status code is an error. Response headers are in either
 21944  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 21945  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 21946  // whether the returned error was because http.StatusNotModified was returned.
 21947  func (c *OrganizationsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 21948  	gensupport.SetOptions(c.urlParams_, opts...)
 21949  	res, err := c.doRequest("json")
 21950  	if res != nil && res.StatusCode == http.StatusNotModified {
 21951  		if res.Body != nil {
 21952  			res.Body.Close()
 21953  		}
 21954  		return nil, gensupport.WrapError(&googleapi.Error{
 21955  			Code:   res.StatusCode,
 21956  			Header: res.Header,
 21957  		})
 21958  	}
 21959  	if err != nil {
 21960  		return nil, err
 21961  	}
 21962  	defer googleapi.CloseBody(res)
 21963  	if err := googleapi.CheckResponse(res); err != nil {
 21964  		return nil, gensupport.WrapError(err)
 21965  	}
 21966  	ret := &LogBucket{
 21967  		ServerResponse: googleapi.ServerResponse{
 21968  			Header:         res.Header,
 21969  			HTTPStatusCode: res.StatusCode,
 21970  		},
 21971  	}
 21972  	target := &ret
 21973  	if err := gensupport.DecodeResponse(target, res); err != nil {
 21974  		return nil, err
 21975  	}
 21976  	return ret, nil
 21977  }
 21978  
 21979  type OrganizationsLocationsBucketsUndeleteCall struct {
 21980  	s                     *Service
 21981  	name                  string
 21982  	undeletebucketrequest *UndeleteBucketRequest
 21983  	urlParams_            gensupport.URLParams
 21984  	ctx_                  context.Context
 21985  	header_               http.Header
 21986  }
 21987  
 21988  // Undelete: Undeletes a log bucket. A bucket that has been deleted can be
 21989  // undeleted within the grace period of 7 days.
 21990  //
 21991  //   - name: The full resource name of the bucket to undelete.
 21992  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 21993  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 21994  //     ]"
 21995  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 21996  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 21997  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 21998  func (r *OrganizationsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *OrganizationsLocationsBucketsUndeleteCall {
 21999  	c := &OrganizationsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 22000  	c.name = name
 22001  	c.undeletebucketrequest = undeletebucketrequest
 22002  	return c
 22003  }
 22004  
 22005  // Fields allows partial responses to be retrieved. See
 22006  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 22007  // details.
 22008  func (c *OrganizationsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsUndeleteCall {
 22009  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 22010  	return c
 22011  }
 22012  
 22013  // Context sets the context to be used in this call's Do method.
 22014  func (c *OrganizationsLocationsBucketsUndeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsUndeleteCall {
 22015  	c.ctx_ = ctx
 22016  	return c
 22017  }
 22018  
 22019  // Header returns a http.Header that can be modified by the caller to add
 22020  // headers to the request.
 22021  func (c *OrganizationsLocationsBucketsUndeleteCall) Header() http.Header {
 22022  	if c.header_ == nil {
 22023  		c.header_ = make(http.Header)
 22024  	}
 22025  	return c.header_
 22026  }
 22027  
 22028  func (c *OrganizationsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
 22029  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 22030  	var body io.Reader = nil
 22031  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
 22032  	if err != nil {
 22033  		return nil, err
 22034  	}
 22035  	c.urlParams_.Set("alt", alt)
 22036  	c.urlParams_.Set("prettyPrint", "false")
 22037  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
 22038  	urls += "?" + c.urlParams_.Encode()
 22039  	req, err := http.NewRequest("POST", urls, body)
 22040  	if err != nil {
 22041  		return nil, err
 22042  	}
 22043  	req.Header = reqHeaders
 22044  	googleapi.Expand(req.URL, map[string]string{
 22045  		"name": c.name,
 22046  	})
 22047  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 22048  }
 22049  
 22050  // Do executes the "logging.organizations.locations.buckets.undelete" call.
 22051  // Any non-2xx status code is an error. Response headers are in either
 22052  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 22053  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 22054  // whether the returned error was because http.StatusNotModified was returned.
 22055  func (c *OrganizationsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 22056  	gensupport.SetOptions(c.urlParams_, opts...)
 22057  	res, err := c.doRequest("json")
 22058  	if res != nil && res.StatusCode == http.StatusNotModified {
 22059  		if res.Body != nil {
 22060  			res.Body.Close()
 22061  		}
 22062  		return nil, gensupport.WrapError(&googleapi.Error{
 22063  			Code:   res.StatusCode,
 22064  			Header: res.Header,
 22065  		})
 22066  	}
 22067  	if err != nil {
 22068  		return nil, err
 22069  	}
 22070  	defer googleapi.CloseBody(res)
 22071  	if err := googleapi.CheckResponse(res); err != nil {
 22072  		return nil, gensupport.WrapError(err)
 22073  	}
 22074  	ret := &Empty{
 22075  		ServerResponse: googleapi.ServerResponse{
 22076  			Header:         res.Header,
 22077  			HTTPStatusCode: res.StatusCode,
 22078  		},
 22079  	}
 22080  	target := &ret
 22081  	if err := gensupport.DecodeResponse(target, res); err != nil {
 22082  		return nil, err
 22083  	}
 22084  	return ret, nil
 22085  }
 22086  
 22087  type OrganizationsLocationsBucketsUpdateAsyncCall struct {
 22088  	s          *Service
 22089  	name       string
 22090  	logbucket  *LogBucket
 22091  	urlParams_ gensupport.URLParams
 22092  	ctx_       context.Context
 22093  	header_    http.Header
 22094  }
 22095  
 22096  // UpdateAsync: Updates a log bucket asynchronously.If the bucket has a
 22097  // lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be
 22098  // returned.After a bucket has been created, the bucket's location cannot be
 22099  // changed.
 22100  //
 22101  //   - name: The full resource name of the bucket to update.
 22102  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 22103  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 22104  //     ]"
 22105  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 22106  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 22107  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 22108  func (r *OrganizationsLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *OrganizationsLocationsBucketsUpdateAsyncCall {
 22109  	c := &OrganizationsLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 22110  	c.name = name
 22111  	c.logbucket = logbucket
 22112  	return c
 22113  }
 22114  
 22115  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
 22116  // that specifies the fields in bucket that need an update. A bucket field will
 22117  // be overwritten if, and only if, it is in the update mask. name and output
 22118  // only fields cannot be updated.For a detailed FieldMask definition, see:
 22119  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 22120  // example: updateMask=retention_days
 22121  func (c *OrganizationsLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsUpdateAsyncCall {
 22122  	c.urlParams_.Set("updateMask", updateMask)
 22123  	return c
 22124  }
 22125  
 22126  // Fields allows partial responses to be retrieved. See
 22127  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 22128  // details.
 22129  func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsUpdateAsyncCall {
 22130  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 22131  	return c
 22132  }
 22133  
 22134  // Context sets the context to be used in this call's Do method.
 22135  func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *OrganizationsLocationsBucketsUpdateAsyncCall {
 22136  	c.ctx_ = ctx
 22137  	return c
 22138  }
 22139  
 22140  // Header returns a http.Header that can be modified by the caller to add
 22141  // headers to the request.
 22142  func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Header() http.Header {
 22143  	if c.header_ == nil {
 22144  		c.header_ = make(http.Header)
 22145  	}
 22146  	return c.header_
 22147  }
 22148  
 22149  func (c *OrganizationsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) {
 22150  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 22151  	var body io.Reader = nil
 22152  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 22153  	if err != nil {
 22154  		return nil, err
 22155  	}
 22156  	c.urlParams_.Set("alt", alt)
 22157  	c.urlParams_.Set("prettyPrint", "false")
 22158  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync")
 22159  	urls += "?" + c.urlParams_.Encode()
 22160  	req, err := http.NewRequest("POST", urls, body)
 22161  	if err != nil {
 22162  		return nil, err
 22163  	}
 22164  	req.Header = reqHeaders
 22165  	googleapi.Expand(req.URL, map[string]string{
 22166  		"name": c.name,
 22167  	})
 22168  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 22169  }
 22170  
 22171  // Do executes the "logging.organizations.locations.buckets.updateAsync" call.
 22172  // Any non-2xx status code is an error. Response headers are in either
 22173  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 22174  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 22175  // whether the returned error was because http.StatusNotModified was returned.
 22176  func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 22177  	gensupport.SetOptions(c.urlParams_, opts...)
 22178  	res, err := c.doRequest("json")
 22179  	if res != nil && res.StatusCode == http.StatusNotModified {
 22180  		if res.Body != nil {
 22181  			res.Body.Close()
 22182  		}
 22183  		return nil, gensupport.WrapError(&googleapi.Error{
 22184  			Code:   res.StatusCode,
 22185  			Header: res.Header,
 22186  		})
 22187  	}
 22188  	if err != nil {
 22189  		return nil, err
 22190  	}
 22191  	defer googleapi.CloseBody(res)
 22192  	if err := googleapi.CheckResponse(res); err != nil {
 22193  		return nil, gensupport.WrapError(err)
 22194  	}
 22195  	ret := &Operation{
 22196  		ServerResponse: googleapi.ServerResponse{
 22197  			Header:         res.Header,
 22198  			HTTPStatusCode: res.StatusCode,
 22199  		},
 22200  	}
 22201  	target := &ret
 22202  	if err := gensupport.DecodeResponse(target, res); err != nil {
 22203  		return nil, err
 22204  	}
 22205  	return ret, nil
 22206  }
 22207  
 22208  type OrganizationsLocationsBucketsLinksCreateCall struct {
 22209  	s          *Service
 22210  	parent     string
 22211  	link       *Link
 22212  	urlParams_ gensupport.URLParams
 22213  	ctx_       context.Context
 22214  	header_    http.Header
 22215  }
 22216  
 22217  // Create: Asynchronously creates a linked dataset in BigQuery which makes it
 22218  // possible to use BigQuery to read the logs stored in the log bucket. A log
 22219  // bucket may currently only contain one link.
 22220  //
 22221  //   - parent: The full resource name of the bucket to create a link for.
 22222  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 22223  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 22224  //     ]"
 22225  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 22226  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 22227  func (r *OrganizationsLocationsBucketsLinksService) Create(parent string, link *Link) *OrganizationsLocationsBucketsLinksCreateCall {
 22228  	c := &OrganizationsLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 22229  	c.parent = parent
 22230  	c.link = link
 22231  	return c
 22232  }
 22233  
 22234  // LinkId sets the optional parameter "linkId": Required. The ID to use for the
 22235  // link. The link_id can have up to 100 characters. A valid link_id must only
 22236  // have alphanumeric characters and underscores within it.
 22237  func (c *OrganizationsLocationsBucketsLinksCreateCall) LinkId(linkId string) *OrganizationsLocationsBucketsLinksCreateCall {
 22238  	c.urlParams_.Set("linkId", linkId)
 22239  	return c
 22240  }
 22241  
 22242  // Fields allows partial responses to be retrieved. See
 22243  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 22244  // details.
 22245  func (c *OrganizationsLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksCreateCall {
 22246  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 22247  	return c
 22248  }
 22249  
 22250  // Context sets the context to be used in this call's Do method.
 22251  func (c *OrganizationsLocationsBucketsLinksCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksCreateCall {
 22252  	c.ctx_ = ctx
 22253  	return c
 22254  }
 22255  
 22256  // Header returns a http.Header that can be modified by the caller to add
 22257  // headers to the request.
 22258  func (c *OrganizationsLocationsBucketsLinksCreateCall) Header() http.Header {
 22259  	if c.header_ == nil {
 22260  		c.header_ = make(http.Header)
 22261  	}
 22262  	return c.header_
 22263  }
 22264  
 22265  func (c *OrganizationsLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
 22266  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 22267  	var body io.Reader = nil
 22268  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
 22269  	if err != nil {
 22270  		return nil, err
 22271  	}
 22272  	c.urlParams_.Set("alt", alt)
 22273  	c.urlParams_.Set("prettyPrint", "false")
 22274  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
 22275  	urls += "?" + c.urlParams_.Encode()
 22276  	req, err := http.NewRequest("POST", urls, body)
 22277  	if err != nil {
 22278  		return nil, err
 22279  	}
 22280  	req.Header = reqHeaders
 22281  	googleapi.Expand(req.URL, map[string]string{
 22282  		"parent": c.parent,
 22283  	})
 22284  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 22285  }
 22286  
 22287  // Do executes the "logging.organizations.locations.buckets.links.create" call.
 22288  // Any non-2xx status code is an error. Response headers are in either
 22289  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 22290  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 22291  // whether the returned error was because http.StatusNotModified was returned.
 22292  func (c *OrganizationsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 22293  	gensupport.SetOptions(c.urlParams_, opts...)
 22294  	res, err := c.doRequest("json")
 22295  	if res != nil && res.StatusCode == http.StatusNotModified {
 22296  		if res.Body != nil {
 22297  			res.Body.Close()
 22298  		}
 22299  		return nil, gensupport.WrapError(&googleapi.Error{
 22300  			Code:   res.StatusCode,
 22301  			Header: res.Header,
 22302  		})
 22303  	}
 22304  	if err != nil {
 22305  		return nil, err
 22306  	}
 22307  	defer googleapi.CloseBody(res)
 22308  	if err := googleapi.CheckResponse(res); err != nil {
 22309  		return nil, gensupport.WrapError(err)
 22310  	}
 22311  	ret := &Operation{
 22312  		ServerResponse: googleapi.ServerResponse{
 22313  			Header:         res.Header,
 22314  			HTTPStatusCode: res.StatusCode,
 22315  		},
 22316  	}
 22317  	target := &ret
 22318  	if err := gensupport.DecodeResponse(target, res); err != nil {
 22319  		return nil, err
 22320  	}
 22321  	return ret, nil
 22322  }
 22323  
 22324  type OrganizationsLocationsBucketsLinksDeleteCall struct {
 22325  	s          *Service
 22326  	name       string
 22327  	urlParams_ gensupport.URLParams
 22328  	ctx_       context.Context
 22329  	header_    http.Header
 22330  }
 22331  
 22332  // Delete: Deletes a link. This will also delete the corresponding BigQuery
 22333  // linked dataset.
 22334  //
 22335  //   - name: The full resource name of the link to delete.
 22336  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L
 22337  //     INK_ID]"
 22338  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 22339  //     ]/links/[LINK_ID]"
 22340  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 22341  //     ET_ID]/links/[LINK_ID]"
 22342  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
 22343  //     K_ID]".
 22344  func (r *OrganizationsLocationsBucketsLinksService) Delete(name string) *OrganizationsLocationsBucketsLinksDeleteCall {
 22345  	c := &OrganizationsLocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 22346  	c.name = name
 22347  	return c
 22348  }
 22349  
 22350  // Fields allows partial responses to be retrieved. See
 22351  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 22352  // details.
 22353  func (c *OrganizationsLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksDeleteCall {
 22354  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 22355  	return c
 22356  }
 22357  
 22358  // Context sets the context to be used in this call's Do method.
 22359  func (c *OrganizationsLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksDeleteCall {
 22360  	c.ctx_ = ctx
 22361  	return c
 22362  }
 22363  
 22364  // Header returns a http.Header that can be modified by the caller to add
 22365  // headers to the request.
 22366  func (c *OrganizationsLocationsBucketsLinksDeleteCall) Header() http.Header {
 22367  	if c.header_ == nil {
 22368  		c.header_ = make(http.Header)
 22369  	}
 22370  	return c.header_
 22371  }
 22372  
 22373  func (c *OrganizationsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 22374  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 22375  	var body io.Reader = nil
 22376  	c.urlParams_.Set("alt", alt)
 22377  	c.urlParams_.Set("prettyPrint", "false")
 22378  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 22379  	urls += "?" + c.urlParams_.Encode()
 22380  	req, err := http.NewRequest("DELETE", urls, body)
 22381  	if err != nil {
 22382  		return nil, err
 22383  	}
 22384  	req.Header = reqHeaders
 22385  	googleapi.Expand(req.URL, map[string]string{
 22386  		"name": c.name,
 22387  	})
 22388  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 22389  }
 22390  
 22391  // Do executes the "logging.organizations.locations.buckets.links.delete" call.
 22392  // Any non-2xx status code is an error. Response headers are in either
 22393  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 22394  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 22395  // whether the returned error was because http.StatusNotModified was returned.
 22396  func (c *OrganizationsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 22397  	gensupport.SetOptions(c.urlParams_, opts...)
 22398  	res, err := c.doRequest("json")
 22399  	if res != nil && res.StatusCode == http.StatusNotModified {
 22400  		if res.Body != nil {
 22401  			res.Body.Close()
 22402  		}
 22403  		return nil, gensupport.WrapError(&googleapi.Error{
 22404  			Code:   res.StatusCode,
 22405  			Header: res.Header,
 22406  		})
 22407  	}
 22408  	if err != nil {
 22409  		return nil, err
 22410  	}
 22411  	defer googleapi.CloseBody(res)
 22412  	if err := googleapi.CheckResponse(res); err != nil {
 22413  		return nil, gensupport.WrapError(err)
 22414  	}
 22415  	ret := &Operation{
 22416  		ServerResponse: googleapi.ServerResponse{
 22417  			Header:         res.Header,
 22418  			HTTPStatusCode: res.StatusCode,
 22419  		},
 22420  	}
 22421  	target := &ret
 22422  	if err := gensupport.DecodeResponse(target, res); err != nil {
 22423  		return nil, err
 22424  	}
 22425  	return ret, nil
 22426  }
 22427  
 22428  type OrganizationsLocationsBucketsLinksGetCall struct {
 22429  	s            *Service
 22430  	name         string
 22431  	urlParams_   gensupport.URLParams
 22432  	ifNoneMatch_ string
 22433  	ctx_         context.Context
 22434  	header_      http.Header
 22435  }
 22436  
 22437  // Get: Gets a link.
 22438  //
 22439  //   - name: The resource name of the link:
 22440  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L
 22441  //     INK_ID]"
 22442  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 22443  //     ]/links/[LINK_ID]"
 22444  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 22445  //     ET_ID]/links/[LINK_ID]"
 22446  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
 22447  //     K_ID]".
 22448  func (r *OrganizationsLocationsBucketsLinksService) Get(name string) *OrganizationsLocationsBucketsLinksGetCall {
 22449  	c := &OrganizationsLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 22450  	c.name = name
 22451  	return c
 22452  }
 22453  
 22454  // Fields allows partial responses to be retrieved. See
 22455  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 22456  // details.
 22457  func (c *OrganizationsLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksGetCall {
 22458  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 22459  	return c
 22460  }
 22461  
 22462  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 22463  // object's ETag matches the given value. This is useful for getting updates
 22464  // only after the object has changed since the last request.
 22465  func (c *OrganizationsLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsLinksGetCall {
 22466  	c.ifNoneMatch_ = entityTag
 22467  	return c
 22468  }
 22469  
 22470  // Context sets the context to be used in this call's Do method.
 22471  func (c *OrganizationsLocationsBucketsLinksGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksGetCall {
 22472  	c.ctx_ = ctx
 22473  	return c
 22474  }
 22475  
 22476  // Header returns a http.Header that can be modified by the caller to add
 22477  // headers to the request.
 22478  func (c *OrganizationsLocationsBucketsLinksGetCall) Header() http.Header {
 22479  	if c.header_ == nil {
 22480  		c.header_ = make(http.Header)
 22481  	}
 22482  	return c.header_
 22483  }
 22484  
 22485  func (c *OrganizationsLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) {
 22486  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 22487  	if c.ifNoneMatch_ != "" {
 22488  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 22489  	}
 22490  	var body io.Reader = nil
 22491  	c.urlParams_.Set("alt", alt)
 22492  	c.urlParams_.Set("prettyPrint", "false")
 22493  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 22494  	urls += "?" + c.urlParams_.Encode()
 22495  	req, err := http.NewRequest("GET", urls, body)
 22496  	if err != nil {
 22497  		return nil, err
 22498  	}
 22499  	req.Header = reqHeaders
 22500  	googleapi.Expand(req.URL, map[string]string{
 22501  		"name": c.name,
 22502  	})
 22503  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 22504  }
 22505  
 22506  // Do executes the "logging.organizations.locations.buckets.links.get" call.
 22507  // Any non-2xx status code is an error. Response headers are in either
 22508  // *Link.ServerResponse.Header or (if a response was returned at all) in
 22509  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 22510  // whether the returned error was because http.StatusNotModified was returned.
 22511  func (c *OrganizationsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) {
 22512  	gensupport.SetOptions(c.urlParams_, opts...)
 22513  	res, err := c.doRequest("json")
 22514  	if res != nil && res.StatusCode == http.StatusNotModified {
 22515  		if res.Body != nil {
 22516  			res.Body.Close()
 22517  		}
 22518  		return nil, gensupport.WrapError(&googleapi.Error{
 22519  			Code:   res.StatusCode,
 22520  			Header: res.Header,
 22521  		})
 22522  	}
 22523  	if err != nil {
 22524  		return nil, err
 22525  	}
 22526  	defer googleapi.CloseBody(res)
 22527  	if err := googleapi.CheckResponse(res); err != nil {
 22528  		return nil, gensupport.WrapError(err)
 22529  	}
 22530  	ret := &Link{
 22531  		ServerResponse: googleapi.ServerResponse{
 22532  			Header:         res.Header,
 22533  			HTTPStatusCode: res.StatusCode,
 22534  		},
 22535  	}
 22536  	target := &ret
 22537  	if err := gensupport.DecodeResponse(target, res); err != nil {
 22538  		return nil, err
 22539  	}
 22540  	return ret, nil
 22541  }
 22542  
 22543  type OrganizationsLocationsBucketsLinksListCall struct {
 22544  	s            *Service
 22545  	parent       string
 22546  	urlParams_   gensupport.URLParams
 22547  	ifNoneMatch_ string
 22548  	ctx_         context.Context
 22549  	header_      http.Header
 22550  }
 22551  
 22552  // List: Lists links.
 22553  //
 22554  //   - parent: The parent resource whose links are to be listed:
 22555  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 22556  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 22557  //     ]"
 22558  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 22559  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 22560  func (r *OrganizationsLocationsBucketsLinksService) List(parent string) *OrganizationsLocationsBucketsLinksListCall {
 22561  	c := &OrganizationsLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 22562  	c.parent = parent
 22563  	return c
 22564  }
 22565  
 22566  // PageSize sets the optional parameter "pageSize": The maximum number of
 22567  // results to return from this request.
 22568  func (c *OrganizationsLocationsBucketsLinksListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsLinksListCall {
 22569  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 22570  	return c
 22571  }
 22572  
 22573  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 22574  // the next batch of results from the preceding call to this method. pageToken
 22575  // must be the value of nextPageToken from the previous response.
 22576  func (c *OrganizationsLocationsBucketsLinksListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsLinksListCall {
 22577  	c.urlParams_.Set("pageToken", pageToken)
 22578  	return c
 22579  }
 22580  
 22581  // Fields allows partial responses to be retrieved. See
 22582  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 22583  // details.
 22584  func (c *OrganizationsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksListCall {
 22585  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 22586  	return c
 22587  }
 22588  
 22589  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 22590  // object's ETag matches the given value. This is useful for getting updates
 22591  // only after the object has changed since the last request.
 22592  func (c *OrganizationsLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsLinksListCall {
 22593  	c.ifNoneMatch_ = entityTag
 22594  	return c
 22595  }
 22596  
 22597  // Context sets the context to be used in this call's Do method.
 22598  func (c *OrganizationsLocationsBucketsLinksListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksListCall {
 22599  	c.ctx_ = ctx
 22600  	return c
 22601  }
 22602  
 22603  // Header returns a http.Header that can be modified by the caller to add
 22604  // headers to the request.
 22605  func (c *OrganizationsLocationsBucketsLinksListCall) Header() http.Header {
 22606  	if c.header_ == nil {
 22607  		c.header_ = make(http.Header)
 22608  	}
 22609  	return c.header_
 22610  }
 22611  
 22612  func (c *OrganizationsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) {
 22613  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 22614  	if c.ifNoneMatch_ != "" {
 22615  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 22616  	}
 22617  	var body io.Reader = nil
 22618  	c.urlParams_.Set("alt", alt)
 22619  	c.urlParams_.Set("prettyPrint", "false")
 22620  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
 22621  	urls += "?" + c.urlParams_.Encode()
 22622  	req, err := http.NewRequest("GET", urls, body)
 22623  	if err != nil {
 22624  		return nil, err
 22625  	}
 22626  	req.Header = reqHeaders
 22627  	googleapi.Expand(req.URL, map[string]string{
 22628  		"parent": c.parent,
 22629  	})
 22630  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 22631  }
 22632  
 22633  // Do executes the "logging.organizations.locations.buckets.links.list" call.
 22634  // Any non-2xx status code is an error. Response headers are in either
 22635  // *ListLinksResponse.ServerResponse.Header or (if a response was returned at
 22636  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 22637  // check whether the returned error was because http.StatusNotModified was
 22638  // returned.
 22639  func (c *OrganizationsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) {
 22640  	gensupport.SetOptions(c.urlParams_, opts...)
 22641  	res, err := c.doRequest("json")
 22642  	if res != nil && res.StatusCode == http.StatusNotModified {
 22643  		if res.Body != nil {
 22644  			res.Body.Close()
 22645  		}
 22646  		return nil, gensupport.WrapError(&googleapi.Error{
 22647  			Code:   res.StatusCode,
 22648  			Header: res.Header,
 22649  		})
 22650  	}
 22651  	if err != nil {
 22652  		return nil, err
 22653  	}
 22654  	defer googleapi.CloseBody(res)
 22655  	if err := googleapi.CheckResponse(res); err != nil {
 22656  		return nil, gensupport.WrapError(err)
 22657  	}
 22658  	ret := &ListLinksResponse{
 22659  		ServerResponse: googleapi.ServerResponse{
 22660  			Header:         res.Header,
 22661  			HTTPStatusCode: res.StatusCode,
 22662  		},
 22663  	}
 22664  	target := &ret
 22665  	if err := gensupport.DecodeResponse(target, res); err != nil {
 22666  		return nil, err
 22667  	}
 22668  	return ret, nil
 22669  }
 22670  
 22671  // Pages invokes f for each page of results.
 22672  // A non-nil error returned from f will halt the iteration.
 22673  // The provided context supersedes any context provided to the Context method.
 22674  func (c *OrganizationsLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error {
 22675  	c.ctx_ = ctx
 22676  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 22677  	for {
 22678  		x, err := c.Do()
 22679  		if err != nil {
 22680  			return err
 22681  		}
 22682  		if err := f(x); err != nil {
 22683  			return err
 22684  		}
 22685  		if x.NextPageToken == "" {
 22686  			return nil
 22687  		}
 22688  		c.PageToken(x.NextPageToken)
 22689  	}
 22690  }
 22691  
 22692  type OrganizationsLocationsBucketsViewsCreateCall struct {
 22693  	s          *Service
 22694  	parent     string
 22695  	logview    *LogView
 22696  	urlParams_ gensupport.URLParams
 22697  	ctx_       context.Context
 22698  	header_    http.Header
 22699  }
 22700  
 22701  // Create: Creates a view over log entries in a log bucket. A bucket may
 22702  // contain a maximum of 30 views.
 22703  //
 22704  //   - parent: The bucket in which to create the view
 22705  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For
 22706  //     example:"projects/my-project/locations/global/buckets/my-bucket".
 22707  func (r *OrganizationsLocationsBucketsViewsService) Create(parent string, logview *LogView) *OrganizationsLocationsBucketsViewsCreateCall {
 22708  	c := &OrganizationsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 22709  	c.parent = parent
 22710  	c.logview = logview
 22711  	return c
 22712  }
 22713  
 22714  // ViewId sets the optional parameter "viewId": Required. A client-assigned
 22715  // identifier such as "my-view". Identifiers are limited to 100 characters and
 22716  // can include only letters, digits, underscores, hyphens, and periods.
 22717  func (c *OrganizationsLocationsBucketsViewsCreateCall) ViewId(viewId string) *OrganizationsLocationsBucketsViewsCreateCall {
 22718  	c.urlParams_.Set("viewId", viewId)
 22719  	return c
 22720  }
 22721  
 22722  // Fields allows partial responses to be retrieved. See
 22723  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 22724  // details.
 22725  func (c *OrganizationsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsCreateCall {
 22726  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 22727  	return c
 22728  }
 22729  
 22730  // Context sets the context to be used in this call's Do method.
 22731  func (c *OrganizationsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsCreateCall {
 22732  	c.ctx_ = ctx
 22733  	return c
 22734  }
 22735  
 22736  // Header returns a http.Header that can be modified by the caller to add
 22737  // headers to the request.
 22738  func (c *OrganizationsLocationsBucketsViewsCreateCall) Header() http.Header {
 22739  	if c.header_ == nil {
 22740  		c.header_ = make(http.Header)
 22741  	}
 22742  	return c.header_
 22743  }
 22744  
 22745  func (c *OrganizationsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
 22746  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 22747  	var body io.Reader = nil
 22748  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
 22749  	if err != nil {
 22750  		return nil, err
 22751  	}
 22752  	c.urlParams_.Set("alt", alt)
 22753  	c.urlParams_.Set("prettyPrint", "false")
 22754  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
 22755  	urls += "?" + c.urlParams_.Encode()
 22756  	req, err := http.NewRequest("POST", urls, body)
 22757  	if err != nil {
 22758  		return nil, err
 22759  	}
 22760  	req.Header = reqHeaders
 22761  	googleapi.Expand(req.URL, map[string]string{
 22762  		"parent": c.parent,
 22763  	})
 22764  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 22765  }
 22766  
 22767  // Do executes the "logging.organizations.locations.buckets.views.create" call.
 22768  // Any non-2xx status code is an error. Response headers are in either
 22769  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 22770  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 22771  // whether the returned error was because http.StatusNotModified was returned.
 22772  func (c *OrganizationsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 22773  	gensupport.SetOptions(c.urlParams_, opts...)
 22774  	res, err := c.doRequest("json")
 22775  	if res != nil && res.StatusCode == http.StatusNotModified {
 22776  		if res.Body != nil {
 22777  			res.Body.Close()
 22778  		}
 22779  		return nil, gensupport.WrapError(&googleapi.Error{
 22780  			Code:   res.StatusCode,
 22781  			Header: res.Header,
 22782  		})
 22783  	}
 22784  	if err != nil {
 22785  		return nil, err
 22786  	}
 22787  	defer googleapi.CloseBody(res)
 22788  	if err := googleapi.CheckResponse(res); err != nil {
 22789  		return nil, gensupport.WrapError(err)
 22790  	}
 22791  	ret := &LogView{
 22792  		ServerResponse: googleapi.ServerResponse{
 22793  			Header:         res.Header,
 22794  			HTTPStatusCode: res.StatusCode,
 22795  		},
 22796  	}
 22797  	target := &ret
 22798  	if err := gensupport.DecodeResponse(target, res); err != nil {
 22799  		return nil, err
 22800  	}
 22801  	return ret, nil
 22802  }
 22803  
 22804  type OrganizationsLocationsBucketsViewsDeleteCall struct {
 22805  	s          *Service
 22806  	name       string
 22807  	urlParams_ gensupport.URLParams
 22808  	ctx_       context.Context
 22809  	header_    http.Header
 22810  }
 22811  
 22812  // Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned,
 22813  // this indicates that system is not in a state where it can delete the view.
 22814  // If this occurs, please try again in a few minutes.
 22815  //
 22816  //   - name: The full resource name of the view to delete:
 22817  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 22818  //     IEW_ID]" For
 22819  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 22820  //     ew".
 22821  func (r *OrganizationsLocationsBucketsViewsService) Delete(name string) *OrganizationsLocationsBucketsViewsDeleteCall {
 22822  	c := &OrganizationsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 22823  	c.name = name
 22824  	return c
 22825  }
 22826  
 22827  // Fields allows partial responses to be retrieved. See
 22828  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 22829  // details.
 22830  func (c *OrganizationsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsDeleteCall {
 22831  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 22832  	return c
 22833  }
 22834  
 22835  // Context sets the context to be used in this call's Do method.
 22836  func (c *OrganizationsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsDeleteCall {
 22837  	c.ctx_ = ctx
 22838  	return c
 22839  }
 22840  
 22841  // Header returns a http.Header that can be modified by the caller to add
 22842  // headers to the request.
 22843  func (c *OrganizationsLocationsBucketsViewsDeleteCall) Header() http.Header {
 22844  	if c.header_ == nil {
 22845  		c.header_ = make(http.Header)
 22846  	}
 22847  	return c.header_
 22848  }
 22849  
 22850  func (c *OrganizationsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
 22851  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 22852  	var body io.Reader = nil
 22853  	c.urlParams_.Set("alt", alt)
 22854  	c.urlParams_.Set("prettyPrint", "false")
 22855  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 22856  	urls += "?" + c.urlParams_.Encode()
 22857  	req, err := http.NewRequest("DELETE", urls, body)
 22858  	if err != nil {
 22859  		return nil, err
 22860  	}
 22861  	req.Header = reqHeaders
 22862  	googleapi.Expand(req.URL, map[string]string{
 22863  		"name": c.name,
 22864  	})
 22865  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 22866  }
 22867  
 22868  // Do executes the "logging.organizations.locations.buckets.views.delete" call.
 22869  // Any non-2xx status code is an error. Response headers are in either
 22870  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 22871  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 22872  // whether the returned error was because http.StatusNotModified was returned.
 22873  func (c *OrganizationsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 22874  	gensupport.SetOptions(c.urlParams_, opts...)
 22875  	res, err := c.doRequest("json")
 22876  	if res != nil && res.StatusCode == http.StatusNotModified {
 22877  		if res.Body != nil {
 22878  			res.Body.Close()
 22879  		}
 22880  		return nil, gensupport.WrapError(&googleapi.Error{
 22881  			Code:   res.StatusCode,
 22882  			Header: res.Header,
 22883  		})
 22884  	}
 22885  	if err != nil {
 22886  		return nil, err
 22887  	}
 22888  	defer googleapi.CloseBody(res)
 22889  	if err := googleapi.CheckResponse(res); err != nil {
 22890  		return nil, gensupport.WrapError(err)
 22891  	}
 22892  	ret := &Empty{
 22893  		ServerResponse: googleapi.ServerResponse{
 22894  			Header:         res.Header,
 22895  			HTTPStatusCode: res.StatusCode,
 22896  		},
 22897  	}
 22898  	target := &ret
 22899  	if err := gensupport.DecodeResponse(target, res); err != nil {
 22900  		return nil, err
 22901  	}
 22902  	return ret, nil
 22903  }
 22904  
 22905  type OrganizationsLocationsBucketsViewsGetCall struct {
 22906  	s            *Service
 22907  	name         string
 22908  	urlParams_   gensupport.URLParams
 22909  	ifNoneMatch_ string
 22910  	ctx_         context.Context
 22911  	header_      http.Header
 22912  }
 22913  
 22914  // Get: Gets a view on a log bucket.
 22915  //
 22916  //   - name: The resource name of the policy:
 22917  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 22918  //     IEW_ID]" For
 22919  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 22920  //     ew".
 22921  func (r *OrganizationsLocationsBucketsViewsService) Get(name string) *OrganizationsLocationsBucketsViewsGetCall {
 22922  	c := &OrganizationsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 22923  	c.name = name
 22924  	return c
 22925  }
 22926  
 22927  // Fields allows partial responses to be retrieved. See
 22928  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 22929  // details.
 22930  func (c *OrganizationsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsGetCall {
 22931  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 22932  	return c
 22933  }
 22934  
 22935  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 22936  // object's ETag matches the given value. This is useful for getting updates
 22937  // only after the object has changed since the last request.
 22938  func (c *OrganizationsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsGetCall {
 22939  	c.ifNoneMatch_ = entityTag
 22940  	return c
 22941  }
 22942  
 22943  // Context sets the context to be used in this call's Do method.
 22944  func (c *OrganizationsLocationsBucketsViewsGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsGetCall {
 22945  	c.ctx_ = ctx
 22946  	return c
 22947  }
 22948  
 22949  // Header returns a http.Header that can be modified by the caller to add
 22950  // headers to the request.
 22951  func (c *OrganizationsLocationsBucketsViewsGetCall) Header() http.Header {
 22952  	if c.header_ == nil {
 22953  		c.header_ = make(http.Header)
 22954  	}
 22955  	return c.header_
 22956  }
 22957  
 22958  func (c *OrganizationsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
 22959  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 22960  	if c.ifNoneMatch_ != "" {
 22961  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 22962  	}
 22963  	var body io.Reader = nil
 22964  	c.urlParams_.Set("alt", alt)
 22965  	c.urlParams_.Set("prettyPrint", "false")
 22966  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 22967  	urls += "?" + c.urlParams_.Encode()
 22968  	req, err := http.NewRequest("GET", urls, body)
 22969  	if err != nil {
 22970  		return nil, err
 22971  	}
 22972  	req.Header = reqHeaders
 22973  	googleapi.Expand(req.URL, map[string]string{
 22974  		"name": c.name,
 22975  	})
 22976  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 22977  }
 22978  
 22979  // Do executes the "logging.organizations.locations.buckets.views.get" call.
 22980  // Any non-2xx status code is an error. Response headers are in either
 22981  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 22982  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 22983  // whether the returned error was because http.StatusNotModified was returned.
 22984  func (c *OrganizationsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 22985  	gensupport.SetOptions(c.urlParams_, opts...)
 22986  	res, err := c.doRequest("json")
 22987  	if res != nil && res.StatusCode == http.StatusNotModified {
 22988  		if res.Body != nil {
 22989  			res.Body.Close()
 22990  		}
 22991  		return nil, gensupport.WrapError(&googleapi.Error{
 22992  			Code:   res.StatusCode,
 22993  			Header: res.Header,
 22994  		})
 22995  	}
 22996  	if err != nil {
 22997  		return nil, err
 22998  	}
 22999  	defer googleapi.CloseBody(res)
 23000  	if err := googleapi.CheckResponse(res); err != nil {
 23001  		return nil, gensupport.WrapError(err)
 23002  	}
 23003  	ret := &LogView{
 23004  		ServerResponse: googleapi.ServerResponse{
 23005  			Header:         res.Header,
 23006  			HTTPStatusCode: res.StatusCode,
 23007  		},
 23008  	}
 23009  	target := &ret
 23010  	if err := gensupport.DecodeResponse(target, res); err != nil {
 23011  		return nil, err
 23012  	}
 23013  	return ret, nil
 23014  }
 23015  
 23016  type OrganizationsLocationsBucketsViewsGetIamPolicyCall struct {
 23017  	s                   *Service
 23018  	resource            string
 23019  	getiampolicyrequest *GetIamPolicyRequest
 23020  	urlParams_          gensupport.URLParams
 23021  	ctx_                context.Context
 23022  	header_             http.Header
 23023  }
 23024  
 23025  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 23026  // empty policy if the resource exists and does not have a policy set.
 23027  //
 23028  //   - resource: REQUIRED: The resource for which the policy is being requested.
 23029  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 23030  //     for the appropriate value for this field.
 23031  func (r *OrganizationsLocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *OrganizationsLocationsBucketsViewsGetIamPolicyCall {
 23032  	c := &OrganizationsLocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 23033  	c.resource = resource
 23034  	c.getiampolicyrequest = getiampolicyrequest
 23035  	return c
 23036  }
 23037  
 23038  // Fields allows partial responses to be retrieved. See
 23039  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 23040  // details.
 23041  func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsGetIamPolicyCall {
 23042  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 23043  	return c
 23044  }
 23045  
 23046  // Context sets the context to be used in this call's Do method.
 23047  func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsGetIamPolicyCall {
 23048  	c.ctx_ = ctx
 23049  	return c
 23050  }
 23051  
 23052  // Header returns a http.Header that can be modified by the caller to add
 23053  // headers to the request.
 23054  func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Header() http.Header {
 23055  	if c.header_ == nil {
 23056  		c.header_ = make(http.Header)
 23057  	}
 23058  	return c.header_
 23059  }
 23060  
 23061  func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 23062  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 23063  	var body io.Reader = nil
 23064  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
 23065  	if err != nil {
 23066  		return nil, err
 23067  	}
 23068  	c.urlParams_.Set("alt", alt)
 23069  	c.urlParams_.Set("prettyPrint", "false")
 23070  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
 23071  	urls += "?" + c.urlParams_.Encode()
 23072  	req, err := http.NewRequest("POST", urls, body)
 23073  	if err != nil {
 23074  		return nil, err
 23075  	}
 23076  	req.Header = reqHeaders
 23077  	googleapi.Expand(req.URL, map[string]string{
 23078  		"resource": c.resource,
 23079  	})
 23080  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 23081  }
 23082  
 23083  // Do executes the "logging.organizations.locations.buckets.views.getIamPolicy" call.
 23084  // Any non-2xx status code is an error. Response headers are in either
 23085  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 23086  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 23087  // whether the returned error was because http.StatusNotModified was returned.
 23088  func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 23089  	gensupport.SetOptions(c.urlParams_, opts...)
 23090  	res, err := c.doRequest("json")
 23091  	if res != nil && res.StatusCode == http.StatusNotModified {
 23092  		if res.Body != nil {
 23093  			res.Body.Close()
 23094  		}
 23095  		return nil, gensupport.WrapError(&googleapi.Error{
 23096  			Code:   res.StatusCode,
 23097  			Header: res.Header,
 23098  		})
 23099  	}
 23100  	if err != nil {
 23101  		return nil, err
 23102  	}
 23103  	defer googleapi.CloseBody(res)
 23104  	if err := googleapi.CheckResponse(res); err != nil {
 23105  		return nil, gensupport.WrapError(err)
 23106  	}
 23107  	ret := &Policy{
 23108  		ServerResponse: googleapi.ServerResponse{
 23109  			Header:         res.Header,
 23110  			HTTPStatusCode: res.StatusCode,
 23111  		},
 23112  	}
 23113  	target := &ret
 23114  	if err := gensupport.DecodeResponse(target, res); err != nil {
 23115  		return nil, err
 23116  	}
 23117  	return ret, nil
 23118  }
 23119  
 23120  type OrganizationsLocationsBucketsViewsListCall struct {
 23121  	s            *Service
 23122  	parent       string
 23123  	urlParams_   gensupport.URLParams
 23124  	ifNoneMatch_ string
 23125  	ctx_         context.Context
 23126  	header_      http.Header
 23127  }
 23128  
 23129  // List: Lists views on a log bucket.
 23130  //
 23131  //   - parent: The bucket whose views are to be listed:
 23132  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 23133  func (r *OrganizationsLocationsBucketsViewsService) List(parent string) *OrganizationsLocationsBucketsViewsListCall {
 23134  	c := &OrganizationsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 23135  	c.parent = parent
 23136  	return c
 23137  }
 23138  
 23139  // PageSize sets the optional parameter "pageSize": The maximum number of
 23140  // results to return from this request.Non-positive values are ignored. The
 23141  // presence of nextPageToken in the response indicates that more results might
 23142  // be available.
 23143  func (c *OrganizationsLocationsBucketsViewsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsViewsListCall {
 23144  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 23145  	return c
 23146  }
 23147  
 23148  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 23149  // the next batch of results from the preceding call to this method. pageToken
 23150  // must be the value of nextPageToken from the previous response. The values of
 23151  // other method parameters should be identical to those in the previous call.
 23152  func (c *OrganizationsLocationsBucketsViewsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsViewsListCall {
 23153  	c.urlParams_.Set("pageToken", pageToken)
 23154  	return c
 23155  }
 23156  
 23157  // Fields allows partial responses to be retrieved. See
 23158  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 23159  // details.
 23160  func (c *OrganizationsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsListCall {
 23161  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 23162  	return c
 23163  }
 23164  
 23165  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 23166  // object's ETag matches the given value. This is useful for getting updates
 23167  // only after the object has changed since the last request.
 23168  func (c *OrganizationsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsListCall {
 23169  	c.ifNoneMatch_ = entityTag
 23170  	return c
 23171  }
 23172  
 23173  // Context sets the context to be used in this call's Do method.
 23174  func (c *OrganizationsLocationsBucketsViewsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsListCall {
 23175  	c.ctx_ = ctx
 23176  	return c
 23177  }
 23178  
 23179  // Header returns a http.Header that can be modified by the caller to add
 23180  // headers to the request.
 23181  func (c *OrganizationsLocationsBucketsViewsListCall) Header() http.Header {
 23182  	if c.header_ == nil {
 23183  		c.header_ = make(http.Header)
 23184  	}
 23185  	return c.header_
 23186  }
 23187  
 23188  func (c *OrganizationsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
 23189  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 23190  	if c.ifNoneMatch_ != "" {
 23191  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 23192  	}
 23193  	var body io.Reader = nil
 23194  	c.urlParams_.Set("alt", alt)
 23195  	c.urlParams_.Set("prettyPrint", "false")
 23196  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
 23197  	urls += "?" + c.urlParams_.Encode()
 23198  	req, err := http.NewRequest("GET", urls, body)
 23199  	if err != nil {
 23200  		return nil, err
 23201  	}
 23202  	req.Header = reqHeaders
 23203  	googleapi.Expand(req.URL, map[string]string{
 23204  		"parent": c.parent,
 23205  	})
 23206  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 23207  }
 23208  
 23209  // Do executes the "logging.organizations.locations.buckets.views.list" call.
 23210  // Any non-2xx status code is an error. Response headers are in either
 23211  // *ListViewsResponse.ServerResponse.Header or (if a response was returned at
 23212  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 23213  // check whether the returned error was because http.StatusNotModified was
 23214  // returned.
 23215  func (c *OrganizationsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
 23216  	gensupport.SetOptions(c.urlParams_, opts...)
 23217  	res, err := c.doRequest("json")
 23218  	if res != nil && res.StatusCode == http.StatusNotModified {
 23219  		if res.Body != nil {
 23220  			res.Body.Close()
 23221  		}
 23222  		return nil, gensupport.WrapError(&googleapi.Error{
 23223  			Code:   res.StatusCode,
 23224  			Header: res.Header,
 23225  		})
 23226  	}
 23227  	if err != nil {
 23228  		return nil, err
 23229  	}
 23230  	defer googleapi.CloseBody(res)
 23231  	if err := googleapi.CheckResponse(res); err != nil {
 23232  		return nil, gensupport.WrapError(err)
 23233  	}
 23234  	ret := &ListViewsResponse{
 23235  		ServerResponse: googleapi.ServerResponse{
 23236  			Header:         res.Header,
 23237  			HTTPStatusCode: res.StatusCode,
 23238  		},
 23239  	}
 23240  	target := &ret
 23241  	if err := gensupport.DecodeResponse(target, res); err != nil {
 23242  		return nil, err
 23243  	}
 23244  	return ret, nil
 23245  }
 23246  
 23247  // Pages invokes f for each page of results.
 23248  // A non-nil error returned from f will halt the iteration.
 23249  // The provided context supersedes any context provided to the Context method.
 23250  func (c *OrganizationsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
 23251  	c.ctx_ = ctx
 23252  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 23253  	for {
 23254  		x, err := c.Do()
 23255  		if err != nil {
 23256  			return err
 23257  		}
 23258  		if err := f(x); err != nil {
 23259  			return err
 23260  		}
 23261  		if x.NextPageToken == "" {
 23262  			return nil
 23263  		}
 23264  		c.PageToken(x.NextPageToken)
 23265  	}
 23266  }
 23267  
 23268  type OrganizationsLocationsBucketsViewsPatchCall struct {
 23269  	s          *Service
 23270  	name       string
 23271  	logview    *LogView
 23272  	urlParams_ gensupport.URLParams
 23273  	ctx_       context.Context
 23274  	header_    http.Header
 23275  }
 23276  
 23277  // Patch: Updates a view on a log bucket. This method replaces the value of the
 23278  // filter field from the existing view with the corresponding value from the
 23279  // new view. If an UNAVAILABLE error is returned, this indicates that system is
 23280  // not in a state where it can update the view. If this occurs, please try
 23281  // again in a few minutes.
 23282  //
 23283  //   - name: The full resource name of the view to update
 23284  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 23285  //     IEW_ID]" For
 23286  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 23287  //     ew".
 23288  func (r *OrganizationsLocationsBucketsViewsService) Patch(name string, logview *LogView) *OrganizationsLocationsBucketsViewsPatchCall {
 23289  	c := &OrganizationsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 23290  	c.name = name
 23291  	c.logview = logview
 23292  	return c
 23293  }
 23294  
 23295  // UpdateMask sets the optional parameter "updateMask": Field mask that
 23296  // specifies the fields in view that need an update. A field will be
 23297  // overwritten if, and only if, it is in the update mask. name and output only
 23298  // fields cannot be updated.For a detailed FieldMask definition, see
 23299  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 23300  // example: updateMask=filter
 23301  func (c *OrganizationsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsViewsPatchCall {
 23302  	c.urlParams_.Set("updateMask", updateMask)
 23303  	return c
 23304  }
 23305  
 23306  // Fields allows partial responses to be retrieved. See
 23307  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 23308  // details.
 23309  func (c *OrganizationsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsPatchCall {
 23310  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 23311  	return c
 23312  }
 23313  
 23314  // Context sets the context to be used in this call's Do method.
 23315  func (c *OrganizationsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsPatchCall {
 23316  	c.ctx_ = ctx
 23317  	return c
 23318  }
 23319  
 23320  // Header returns a http.Header that can be modified by the caller to add
 23321  // headers to the request.
 23322  func (c *OrganizationsLocationsBucketsViewsPatchCall) Header() http.Header {
 23323  	if c.header_ == nil {
 23324  		c.header_ = make(http.Header)
 23325  	}
 23326  	return c.header_
 23327  }
 23328  
 23329  func (c *OrganizationsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
 23330  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 23331  	var body io.Reader = nil
 23332  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
 23333  	if err != nil {
 23334  		return nil, err
 23335  	}
 23336  	c.urlParams_.Set("alt", alt)
 23337  	c.urlParams_.Set("prettyPrint", "false")
 23338  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 23339  	urls += "?" + c.urlParams_.Encode()
 23340  	req, err := http.NewRequest("PATCH", urls, body)
 23341  	if err != nil {
 23342  		return nil, err
 23343  	}
 23344  	req.Header = reqHeaders
 23345  	googleapi.Expand(req.URL, map[string]string{
 23346  		"name": c.name,
 23347  	})
 23348  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 23349  }
 23350  
 23351  // Do executes the "logging.organizations.locations.buckets.views.patch" call.
 23352  // Any non-2xx status code is an error. Response headers are in either
 23353  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 23354  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 23355  // whether the returned error was because http.StatusNotModified was returned.
 23356  func (c *OrganizationsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 23357  	gensupport.SetOptions(c.urlParams_, opts...)
 23358  	res, err := c.doRequest("json")
 23359  	if res != nil && res.StatusCode == http.StatusNotModified {
 23360  		if res.Body != nil {
 23361  			res.Body.Close()
 23362  		}
 23363  		return nil, gensupport.WrapError(&googleapi.Error{
 23364  			Code:   res.StatusCode,
 23365  			Header: res.Header,
 23366  		})
 23367  	}
 23368  	if err != nil {
 23369  		return nil, err
 23370  	}
 23371  	defer googleapi.CloseBody(res)
 23372  	if err := googleapi.CheckResponse(res); err != nil {
 23373  		return nil, gensupport.WrapError(err)
 23374  	}
 23375  	ret := &LogView{
 23376  		ServerResponse: googleapi.ServerResponse{
 23377  			Header:         res.Header,
 23378  			HTTPStatusCode: res.StatusCode,
 23379  		},
 23380  	}
 23381  	target := &ret
 23382  	if err := gensupport.DecodeResponse(target, res); err != nil {
 23383  		return nil, err
 23384  	}
 23385  	return ret, nil
 23386  }
 23387  
 23388  type OrganizationsLocationsBucketsViewsSetIamPolicyCall struct {
 23389  	s                   *Service
 23390  	resource            string
 23391  	setiampolicyrequest *SetIamPolicyRequest
 23392  	urlParams_          gensupport.URLParams
 23393  	ctx_                context.Context
 23394  	header_             http.Header
 23395  }
 23396  
 23397  // SetIamPolicy: Sets the access control policy on the specified resource.
 23398  // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
 23399  // PERMISSION_DENIED errors.
 23400  //
 23401  //   - resource: REQUIRED: The resource for which the policy is being specified.
 23402  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 23403  //     for the appropriate value for this field.
 23404  func (r *OrganizationsLocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *OrganizationsLocationsBucketsViewsSetIamPolicyCall {
 23405  	c := &OrganizationsLocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 23406  	c.resource = resource
 23407  	c.setiampolicyrequest = setiampolicyrequest
 23408  	return c
 23409  }
 23410  
 23411  // Fields allows partial responses to be retrieved. See
 23412  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 23413  // details.
 23414  func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsSetIamPolicyCall {
 23415  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 23416  	return c
 23417  }
 23418  
 23419  // Context sets the context to be used in this call's Do method.
 23420  func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsSetIamPolicyCall {
 23421  	c.ctx_ = ctx
 23422  	return c
 23423  }
 23424  
 23425  // Header returns a http.Header that can be modified by the caller to add
 23426  // headers to the request.
 23427  func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Header() http.Header {
 23428  	if c.header_ == nil {
 23429  		c.header_ = make(http.Header)
 23430  	}
 23431  	return c.header_
 23432  }
 23433  
 23434  func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 23435  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 23436  	var body io.Reader = nil
 23437  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 23438  	if err != nil {
 23439  		return nil, err
 23440  	}
 23441  	c.urlParams_.Set("alt", alt)
 23442  	c.urlParams_.Set("prettyPrint", "false")
 23443  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
 23444  	urls += "?" + c.urlParams_.Encode()
 23445  	req, err := http.NewRequest("POST", urls, body)
 23446  	if err != nil {
 23447  		return nil, err
 23448  	}
 23449  	req.Header = reqHeaders
 23450  	googleapi.Expand(req.URL, map[string]string{
 23451  		"resource": c.resource,
 23452  	})
 23453  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 23454  }
 23455  
 23456  // Do executes the "logging.organizations.locations.buckets.views.setIamPolicy" call.
 23457  // Any non-2xx status code is an error. Response headers are in either
 23458  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 23459  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 23460  // whether the returned error was because http.StatusNotModified was returned.
 23461  func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 23462  	gensupport.SetOptions(c.urlParams_, opts...)
 23463  	res, err := c.doRequest("json")
 23464  	if res != nil && res.StatusCode == http.StatusNotModified {
 23465  		if res.Body != nil {
 23466  			res.Body.Close()
 23467  		}
 23468  		return nil, gensupport.WrapError(&googleapi.Error{
 23469  			Code:   res.StatusCode,
 23470  			Header: res.Header,
 23471  		})
 23472  	}
 23473  	if err != nil {
 23474  		return nil, err
 23475  	}
 23476  	defer googleapi.CloseBody(res)
 23477  	if err := googleapi.CheckResponse(res); err != nil {
 23478  		return nil, gensupport.WrapError(err)
 23479  	}
 23480  	ret := &Policy{
 23481  		ServerResponse: googleapi.ServerResponse{
 23482  			Header:         res.Header,
 23483  			HTTPStatusCode: res.StatusCode,
 23484  		},
 23485  	}
 23486  	target := &ret
 23487  	if err := gensupport.DecodeResponse(target, res); err != nil {
 23488  		return nil, err
 23489  	}
 23490  	return ret, nil
 23491  }
 23492  
 23493  type OrganizationsLocationsBucketsViewsTestIamPermissionsCall struct {
 23494  	s                         *Service
 23495  	resource                  string
 23496  	testiampermissionsrequest *TestIamPermissionsRequest
 23497  	urlParams_                gensupport.URLParams
 23498  	ctx_                      context.Context
 23499  	header_                   http.Header
 23500  }
 23501  
 23502  // TestIamPermissions: Returns permissions that a caller has on the specified
 23503  // resource. If the resource does not exist, this will return an empty set of
 23504  // permissions, not a NOT_FOUND error.Note: This operation is designed to be
 23505  // used for building permission-aware UIs and command-line tools, not for
 23506  // authorization checking. This operation may "fail open" without warning.
 23507  //
 23508  //   - resource: REQUIRED: The resource for which the policy detail is being
 23509  //     requested. See Resource names
 23510  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 23511  //     value for this field.
 23512  func (r *OrganizationsLocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall {
 23513  	c := &OrganizationsLocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 23514  	c.resource = resource
 23515  	c.testiampermissionsrequest = testiampermissionsrequest
 23516  	return c
 23517  }
 23518  
 23519  // Fields allows partial responses to be retrieved. See
 23520  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 23521  // details.
 23522  func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall {
 23523  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 23524  	return c
 23525  }
 23526  
 23527  // Context sets the context to be used in this call's Do method.
 23528  func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall {
 23529  	c.ctx_ = ctx
 23530  	return c
 23531  }
 23532  
 23533  // Header returns a http.Header that can be modified by the caller to add
 23534  // headers to the request.
 23535  func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Header() http.Header {
 23536  	if c.header_ == nil {
 23537  		c.header_ = make(http.Header)
 23538  	}
 23539  	return c.header_
 23540  }
 23541  
 23542  func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 23543  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 23544  	var body io.Reader = nil
 23545  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 23546  	if err != nil {
 23547  		return nil, err
 23548  	}
 23549  	c.urlParams_.Set("alt", alt)
 23550  	c.urlParams_.Set("prettyPrint", "false")
 23551  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
 23552  	urls += "?" + c.urlParams_.Encode()
 23553  	req, err := http.NewRequest("POST", urls, body)
 23554  	if err != nil {
 23555  		return nil, err
 23556  	}
 23557  	req.Header = reqHeaders
 23558  	googleapi.Expand(req.URL, map[string]string{
 23559  		"resource": c.resource,
 23560  	})
 23561  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 23562  }
 23563  
 23564  // Do executes the "logging.organizations.locations.buckets.views.testIamPermissions" call.
 23565  // Any non-2xx status code is an error. Response headers are in either
 23566  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 23567  // returned at all) in error.(*googleapi.Error).Header. Use
 23568  // googleapi.IsNotModified to check whether the returned error was because
 23569  // http.StatusNotModified was returned.
 23570  func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 23571  	gensupport.SetOptions(c.urlParams_, opts...)
 23572  	res, err := c.doRequest("json")
 23573  	if res != nil && res.StatusCode == http.StatusNotModified {
 23574  		if res.Body != nil {
 23575  			res.Body.Close()
 23576  		}
 23577  		return nil, gensupport.WrapError(&googleapi.Error{
 23578  			Code:   res.StatusCode,
 23579  			Header: res.Header,
 23580  		})
 23581  	}
 23582  	if err != nil {
 23583  		return nil, err
 23584  	}
 23585  	defer googleapi.CloseBody(res)
 23586  	if err := googleapi.CheckResponse(res); err != nil {
 23587  		return nil, gensupport.WrapError(err)
 23588  	}
 23589  	ret := &TestIamPermissionsResponse{
 23590  		ServerResponse: googleapi.ServerResponse{
 23591  			Header:         res.Header,
 23592  			HTTPStatusCode: res.StatusCode,
 23593  		},
 23594  	}
 23595  	target := &ret
 23596  	if err := gensupport.DecodeResponse(target, res); err != nil {
 23597  		return nil, err
 23598  	}
 23599  	return ret, nil
 23600  }
 23601  
 23602  type OrganizationsLocationsBucketsViewsLogsListCall struct {
 23603  	s            *Service
 23604  	parent       string
 23605  	urlParams_   gensupport.URLParams
 23606  	ifNoneMatch_ string
 23607  	ctx_         context.Context
 23608  	header_      http.Header
 23609  }
 23610  
 23611  // List: Lists the logs in projects, organizations, folders, or billing
 23612  // accounts. Only logs that have entries are listed.
 23613  //
 23614  //   - parent: The resource name to list logs for: projects/[PROJECT_ID]
 23615  //     organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 23616  //     folders/[FOLDER_ID].
 23617  func (r *OrganizationsLocationsBucketsViewsLogsService) List(parent string) *OrganizationsLocationsBucketsViewsLogsListCall {
 23618  	c := &OrganizationsLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 23619  	c.parent = parent
 23620  	return c
 23621  }
 23622  
 23623  // PageSize sets the optional parameter "pageSize": The maximum number of
 23624  // results to return from this request. Non-positive values are ignored. The
 23625  // presence of nextPageToken in the response indicates that more results might
 23626  // be available.
 23627  func (c *OrganizationsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsViewsLogsListCall {
 23628  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 23629  	return c
 23630  }
 23631  
 23632  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 23633  // the next batch of results from the preceding call to this method. pageToken
 23634  // must be the value of nextPageToken from the previous response. The values of
 23635  // other method parameters should be identical to those in the previous call.
 23636  func (c *OrganizationsLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsViewsLogsListCall {
 23637  	c.urlParams_.Set("pageToken", pageToken)
 23638  	return c
 23639  }
 23640  
 23641  // ResourceNames sets the optional parameter "resourceNames": List of resource
 23642  // names to list logs for:
 23643  // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
 23644  // _ID]
 23645  // organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
 23646  // iews/[VIEW_ID]
 23647  // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
 23648  // ID]/views/[VIEW_ID]
 23649  // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
 23650  // D]To support legacy queries, it could also be: projects/[PROJECT_ID]
 23651  // organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 23652  // folders/[FOLDER_ID]The resource name in the parent field is added to this
 23653  // list.
 23654  func (c *OrganizationsLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *OrganizationsLocationsBucketsViewsLogsListCall {
 23655  	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
 23656  	return c
 23657  }
 23658  
 23659  // Fields allows partial responses to be retrieved. See
 23660  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 23661  // details.
 23662  func (c *OrganizationsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsLogsListCall {
 23663  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 23664  	return c
 23665  }
 23666  
 23667  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 23668  // object's ETag matches the given value. This is useful for getting updates
 23669  // only after the object has changed since the last request.
 23670  func (c *OrganizationsLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsLogsListCall {
 23671  	c.ifNoneMatch_ = entityTag
 23672  	return c
 23673  }
 23674  
 23675  // Context sets the context to be used in this call's Do method.
 23676  func (c *OrganizationsLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsLogsListCall {
 23677  	c.ctx_ = ctx
 23678  	return c
 23679  }
 23680  
 23681  // Header returns a http.Header that can be modified by the caller to add
 23682  // headers to the request.
 23683  func (c *OrganizationsLocationsBucketsViewsLogsListCall) Header() http.Header {
 23684  	if c.header_ == nil {
 23685  		c.header_ = make(http.Header)
 23686  	}
 23687  	return c.header_
 23688  }
 23689  
 23690  func (c *OrganizationsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) {
 23691  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 23692  	if c.ifNoneMatch_ != "" {
 23693  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 23694  	}
 23695  	var body io.Reader = nil
 23696  	c.urlParams_.Set("alt", alt)
 23697  	c.urlParams_.Set("prettyPrint", "false")
 23698  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
 23699  	urls += "?" + c.urlParams_.Encode()
 23700  	req, err := http.NewRequest("GET", urls, body)
 23701  	if err != nil {
 23702  		return nil, err
 23703  	}
 23704  	req.Header = reqHeaders
 23705  	googleapi.Expand(req.URL, map[string]string{
 23706  		"parent": c.parent,
 23707  	})
 23708  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 23709  }
 23710  
 23711  // Do executes the "logging.organizations.locations.buckets.views.logs.list" call.
 23712  // Any non-2xx status code is an error. Response headers are in either
 23713  // *ListLogsResponse.ServerResponse.Header or (if a response was returned at
 23714  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 23715  // check whether the returned error was because http.StatusNotModified was
 23716  // returned.
 23717  func (c *OrganizationsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
 23718  	gensupport.SetOptions(c.urlParams_, opts...)
 23719  	res, err := c.doRequest("json")
 23720  	if res != nil && res.StatusCode == http.StatusNotModified {
 23721  		if res.Body != nil {
 23722  			res.Body.Close()
 23723  		}
 23724  		return nil, gensupport.WrapError(&googleapi.Error{
 23725  			Code:   res.StatusCode,
 23726  			Header: res.Header,
 23727  		})
 23728  	}
 23729  	if err != nil {
 23730  		return nil, err
 23731  	}
 23732  	defer googleapi.CloseBody(res)
 23733  	if err := googleapi.CheckResponse(res); err != nil {
 23734  		return nil, gensupport.WrapError(err)
 23735  	}
 23736  	ret := &ListLogsResponse{
 23737  		ServerResponse: googleapi.ServerResponse{
 23738  			Header:         res.Header,
 23739  			HTTPStatusCode: res.StatusCode,
 23740  		},
 23741  	}
 23742  	target := &ret
 23743  	if err := gensupport.DecodeResponse(target, res); err != nil {
 23744  		return nil, err
 23745  	}
 23746  	return ret, nil
 23747  }
 23748  
 23749  // Pages invokes f for each page of results.
 23750  // A non-nil error returned from f will halt the iteration.
 23751  // The provided context supersedes any context provided to the Context method.
 23752  func (c *OrganizationsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
 23753  	c.ctx_ = ctx
 23754  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 23755  	for {
 23756  		x, err := c.Do()
 23757  		if err != nil {
 23758  			return err
 23759  		}
 23760  		if err := f(x); err != nil {
 23761  			return err
 23762  		}
 23763  		if x.NextPageToken == "" {
 23764  			return nil
 23765  		}
 23766  		c.PageToken(x.NextPageToken)
 23767  	}
 23768  }
 23769  
 23770  type OrganizationsLocationsOperationsCancelCall struct {
 23771  	s                      *Service
 23772  	name                   string
 23773  	canceloperationrequest *CancelOperationRequest
 23774  	urlParams_             gensupport.URLParams
 23775  	ctx_                   context.Context
 23776  	header_                http.Header
 23777  }
 23778  
 23779  // Cancel: Starts asynchronous cancellation on a long-running operation. The
 23780  // server makes a best effort to cancel the operation, but success is not
 23781  // guaranteed. If the server doesn't support this method, it returns
 23782  // google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or
 23783  // other methods to check whether the cancellation succeeded or whether the
 23784  // operation completed despite cancellation. On successful cancellation, the
 23785  // operation is not deleted; instead, it becomes an operation with an
 23786  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
 23787  // Code.CANCELLED.
 23788  //
 23789  // - name: The name of the operation resource to be cancelled.
 23790  func (r *OrganizationsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OrganizationsLocationsOperationsCancelCall {
 23791  	c := &OrganizationsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 23792  	c.name = name
 23793  	c.canceloperationrequest = canceloperationrequest
 23794  	return c
 23795  }
 23796  
 23797  // Fields allows partial responses to be retrieved. See
 23798  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 23799  // details.
 23800  func (c *OrganizationsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsCancelCall {
 23801  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 23802  	return c
 23803  }
 23804  
 23805  // Context sets the context to be used in this call's Do method.
 23806  func (c *OrganizationsLocationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsLocationsOperationsCancelCall {
 23807  	c.ctx_ = ctx
 23808  	return c
 23809  }
 23810  
 23811  // Header returns a http.Header that can be modified by the caller to add
 23812  // headers to the request.
 23813  func (c *OrganizationsLocationsOperationsCancelCall) Header() http.Header {
 23814  	if c.header_ == nil {
 23815  		c.header_ = make(http.Header)
 23816  	}
 23817  	return c.header_
 23818  }
 23819  
 23820  func (c *OrganizationsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
 23821  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 23822  	var body io.Reader = nil
 23823  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
 23824  	if err != nil {
 23825  		return nil, err
 23826  	}
 23827  	c.urlParams_.Set("alt", alt)
 23828  	c.urlParams_.Set("prettyPrint", "false")
 23829  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
 23830  	urls += "?" + c.urlParams_.Encode()
 23831  	req, err := http.NewRequest("POST", urls, body)
 23832  	if err != nil {
 23833  		return nil, err
 23834  	}
 23835  	req.Header = reqHeaders
 23836  	googleapi.Expand(req.URL, map[string]string{
 23837  		"name": c.name,
 23838  	})
 23839  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 23840  }
 23841  
 23842  // Do executes the "logging.organizations.locations.operations.cancel" call.
 23843  // Any non-2xx status code is an error. Response headers are in either
 23844  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 23845  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 23846  // whether the returned error was because http.StatusNotModified was returned.
 23847  func (c *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 23848  	gensupport.SetOptions(c.urlParams_, opts...)
 23849  	res, err := c.doRequest("json")
 23850  	if res != nil && res.StatusCode == http.StatusNotModified {
 23851  		if res.Body != nil {
 23852  			res.Body.Close()
 23853  		}
 23854  		return nil, gensupport.WrapError(&googleapi.Error{
 23855  			Code:   res.StatusCode,
 23856  			Header: res.Header,
 23857  		})
 23858  	}
 23859  	if err != nil {
 23860  		return nil, err
 23861  	}
 23862  	defer googleapi.CloseBody(res)
 23863  	if err := googleapi.CheckResponse(res); err != nil {
 23864  		return nil, gensupport.WrapError(err)
 23865  	}
 23866  	ret := &Empty{
 23867  		ServerResponse: googleapi.ServerResponse{
 23868  			Header:         res.Header,
 23869  			HTTPStatusCode: res.StatusCode,
 23870  		},
 23871  	}
 23872  	target := &ret
 23873  	if err := gensupport.DecodeResponse(target, res); err != nil {
 23874  		return nil, err
 23875  	}
 23876  	return ret, nil
 23877  }
 23878  
 23879  type OrganizationsLocationsOperationsGetCall struct {
 23880  	s            *Service
 23881  	name         string
 23882  	urlParams_   gensupport.URLParams
 23883  	ifNoneMatch_ string
 23884  	ctx_         context.Context
 23885  	header_      http.Header
 23886  }
 23887  
 23888  // Get: Gets the latest state of a long-running operation. Clients can use this
 23889  // method to poll the operation result at intervals as recommended by the API
 23890  // service.
 23891  //
 23892  // - name: The name of the operation resource.
 23893  func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall {
 23894  	c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 23895  	c.name = name
 23896  	return c
 23897  }
 23898  
 23899  // Fields allows partial responses to be retrieved. See
 23900  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 23901  // details.
 23902  func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall {
 23903  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 23904  	return c
 23905  }
 23906  
 23907  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 23908  // object's ETag matches the given value. This is useful for getting updates
 23909  // only after the object has changed since the last request.
 23910  func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall {
 23911  	c.ifNoneMatch_ = entityTag
 23912  	return c
 23913  }
 23914  
 23915  // Context sets the context to be used in this call's Do method.
 23916  func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall {
 23917  	c.ctx_ = ctx
 23918  	return c
 23919  }
 23920  
 23921  // Header returns a http.Header that can be modified by the caller to add
 23922  // headers to the request.
 23923  func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header {
 23924  	if c.header_ == nil {
 23925  		c.header_ = make(http.Header)
 23926  	}
 23927  	return c.header_
 23928  }
 23929  
 23930  func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 23931  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 23932  	if c.ifNoneMatch_ != "" {
 23933  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 23934  	}
 23935  	var body io.Reader = nil
 23936  	c.urlParams_.Set("alt", alt)
 23937  	c.urlParams_.Set("prettyPrint", "false")
 23938  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 23939  	urls += "?" + c.urlParams_.Encode()
 23940  	req, err := http.NewRequest("GET", urls, body)
 23941  	if err != nil {
 23942  		return nil, err
 23943  	}
 23944  	req.Header = reqHeaders
 23945  	googleapi.Expand(req.URL, map[string]string{
 23946  		"name": c.name,
 23947  	})
 23948  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 23949  }
 23950  
 23951  // Do executes the "logging.organizations.locations.operations.get" call.
 23952  // Any non-2xx status code is an error. Response headers are in either
 23953  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 23954  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 23955  // whether the returned error was because http.StatusNotModified was returned.
 23956  func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 23957  	gensupport.SetOptions(c.urlParams_, opts...)
 23958  	res, err := c.doRequest("json")
 23959  	if res != nil && res.StatusCode == http.StatusNotModified {
 23960  		if res.Body != nil {
 23961  			res.Body.Close()
 23962  		}
 23963  		return nil, gensupport.WrapError(&googleapi.Error{
 23964  			Code:   res.StatusCode,
 23965  			Header: res.Header,
 23966  		})
 23967  	}
 23968  	if err != nil {
 23969  		return nil, err
 23970  	}
 23971  	defer googleapi.CloseBody(res)
 23972  	if err := googleapi.CheckResponse(res); err != nil {
 23973  		return nil, gensupport.WrapError(err)
 23974  	}
 23975  	ret := &Operation{
 23976  		ServerResponse: googleapi.ServerResponse{
 23977  			Header:         res.Header,
 23978  			HTTPStatusCode: res.StatusCode,
 23979  		},
 23980  	}
 23981  	target := &ret
 23982  	if err := gensupport.DecodeResponse(target, res); err != nil {
 23983  		return nil, err
 23984  	}
 23985  	return ret, nil
 23986  }
 23987  
 23988  type OrganizationsLocationsOperationsListCall struct {
 23989  	s            *Service
 23990  	name         string
 23991  	urlParams_   gensupport.URLParams
 23992  	ifNoneMatch_ string
 23993  	ctx_         context.Context
 23994  	header_      http.Header
 23995  }
 23996  
 23997  // List: Lists operations that match the specified filter in the request. If
 23998  // the server doesn't support this method, it returns UNIMPLEMENTED.
 23999  //
 24000  // - name: The name of the operation's parent resource.
 24001  func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall {
 24002  	c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 24003  	c.name = name
 24004  	return c
 24005  }
 24006  
 24007  // Filter sets the optional parameter "filter": The standard list filter.
 24008  func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall {
 24009  	c.urlParams_.Set("filter", filter)
 24010  	return c
 24011  }
 24012  
 24013  // PageSize sets the optional parameter "pageSize": The standard list page
 24014  // size.
 24015  func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall {
 24016  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 24017  	return c
 24018  }
 24019  
 24020  // PageToken sets the optional parameter "pageToken": The standard list page
 24021  // token.
 24022  func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall {
 24023  	c.urlParams_.Set("pageToken", pageToken)
 24024  	return c
 24025  }
 24026  
 24027  // Fields allows partial responses to be retrieved. See
 24028  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 24029  // details.
 24030  func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall {
 24031  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 24032  	return c
 24033  }
 24034  
 24035  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 24036  // object's ETag matches the given value. This is useful for getting updates
 24037  // only after the object has changed since the last request.
 24038  func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall {
 24039  	c.ifNoneMatch_ = entityTag
 24040  	return c
 24041  }
 24042  
 24043  // Context sets the context to be used in this call's Do method.
 24044  func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall {
 24045  	c.ctx_ = ctx
 24046  	return c
 24047  }
 24048  
 24049  // Header returns a http.Header that can be modified by the caller to add
 24050  // headers to the request.
 24051  func (c *OrganizationsLocationsOperationsListCall) Header() http.Header {
 24052  	if c.header_ == nil {
 24053  		c.header_ = make(http.Header)
 24054  	}
 24055  	return c.header_
 24056  }
 24057  
 24058  func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 24059  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 24060  	if c.ifNoneMatch_ != "" {
 24061  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 24062  	}
 24063  	var body io.Reader = nil
 24064  	c.urlParams_.Set("alt", alt)
 24065  	c.urlParams_.Set("prettyPrint", "false")
 24066  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
 24067  	urls += "?" + c.urlParams_.Encode()
 24068  	req, err := http.NewRequest("GET", urls, body)
 24069  	if err != nil {
 24070  		return nil, err
 24071  	}
 24072  	req.Header = reqHeaders
 24073  	googleapi.Expand(req.URL, map[string]string{
 24074  		"name": c.name,
 24075  	})
 24076  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 24077  }
 24078  
 24079  // Do executes the "logging.organizations.locations.operations.list" call.
 24080  // Any non-2xx status code is an error. Response headers are in either
 24081  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
 24082  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 24083  // check whether the returned error was because http.StatusNotModified was
 24084  // returned.
 24085  func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
 24086  	gensupport.SetOptions(c.urlParams_, opts...)
 24087  	res, err := c.doRequest("json")
 24088  	if res != nil && res.StatusCode == http.StatusNotModified {
 24089  		if res.Body != nil {
 24090  			res.Body.Close()
 24091  		}
 24092  		return nil, gensupport.WrapError(&googleapi.Error{
 24093  			Code:   res.StatusCode,
 24094  			Header: res.Header,
 24095  		})
 24096  	}
 24097  	if err != nil {
 24098  		return nil, err
 24099  	}
 24100  	defer googleapi.CloseBody(res)
 24101  	if err := googleapi.CheckResponse(res); err != nil {
 24102  		return nil, gensupport.WrapError(err)
 24103  	}
 24104  	ret := &ListOperationsResponse{
 24105  		ServerResponse: googleapi.ServerResponse{
 24106  			Header:         res.Header,
 24107  			HTTPStatusCode: res.StatusCode,
 24108  		},
 24109  	}
 24110  	target := &ret
 24111  	if err := gensupport.DecodeResponse(target, res); err != nil {
 24112  		return nil, err
 24113  	}
 24114  	return ret, nil
 24115  }
 24116  
 24117  // Pages invokes f for each page of results.
 24118  // A non-nil error returned from f will halt the iteration.
 24119  // The provided context supersedes any context provided to the Context method.
 24120  func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
 24121  	c.ctx_ = ctx
 24122  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 24123  	for {
 24124  		x, err := c.Do()
 24125  		if err != nil {
 24126  			return err
 24127  		}
 24128  		if err := f(x); err != nil {
 24129  			return err
 24130  		}
 24131  		if x.NextPageToken == "" {
 24132  			return nil
 24133  		}
 24134  		c.PageToken(x.NextPageToken)
 24135  	}
 24136  }
 24137  
 24138  type OrganizationsLocationsRecentQueriesListCall struct {
 24139  	s            *Service
 24140  	parent       string
 24141  	urlParams_   gensupport.URLParams
 24142  	ifNoneMatch_ string
 24143  	ctx_         context.Context
 24144  	header_      http.Header
 24145  }
 24146  
 24147  // List: Lists the RecentQueries that were created by the user making the
 24148  // request.
 24149  //
 24150  //   - parent: The resource to which the listed queries belong.
 24151  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 24152  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 24153  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 24154  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For
 24155  //     example:projects/my-project/locations/us-central1Note: The location
 24156  //     portion of the resource must be specified, but supplying the character -
 24157  //     in place of LOCATION_ID will return all recent queries.
 24158  func (r *OrganizationsLocationsRecentQueriesService) List(parent string) *OrganizationsLocationsRecentQueriesListCall {
 24159  	c := &OrganizationsLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 24160  	c.parent = parent
 24161  	return c
 24162  }
 24163  
 24164  // PageSize sets the optional parameter "pageSize": The maximum number of
 24165  // results to return from this request. Non-positive values are ignored. The
 24166  // presence of nextPageToken in the response indicates that more results might
 24167  // be available.
 24168  func (c *OrganizationsLocationsRecentQueriesListCall) PageSize(pageSize int64) *OrganizationsLocationsRecentQueriesListCall {
 24169  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 24170  	return c
 24171  }
 24172  
 24173  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 24174  // the next batch of results from the preceding call to this method. pageToken
 24175  // must be the value of nextPageToken from the previous response. The values of
 24176  // other method parameters should be identical to those in the previous call.
 24177  func (c *OrganizationsLocationsRecentQueriesListCall) PageToken(pageToken string) *OrganizationsLocationsRecentQueriesListCall {
 24178  	c.urlParams_.Set("pageToken", pageToken)
 24179  	return c
 24180  }
 24181  
 24182  // Fields allows partial responses to be retrieved. See
 24183  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 24184  // details.
 24185  func (c *OrganizationsLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsRecentQueriesListCall {
 24186  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 24187  	return c
 24188  }
 24189  
 24190  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 24191  // object's ETag matches the given value. This is useful for getting updates
 24192  // only after the object has changed since the last request.
 24193  func (c *OrganizationsLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsRecentQueriesListCall {
 24194  	c.ifNoneMatch_ = entityTag
 24195  	return c
 24196  }
 24197  
 24198  // Context sets the context to be used in this call's Do method.
 24199  func (c *OrganizationsLocationsRecentQueriesListCall) Context(ctx context.Context) *OrganizationsLocationsRecentQueriesListCall {
 24200  	c.ctx_ = ctx
 24201  	return c
 24202  }
 24203  
 24204  // Header returns a http.Header that can be modified by the caller to add
 24205  // headers to the request.
 24206  func (c *OrganizationsLocationsRecentQueriesListCall) Header() http.Header {
 24207  	if c.header_ == nil {
 24208  		c.header_ = make(http.Header)
 24209  	}
 24210  	return c.header_
 24211  }
 24212  
 24213  func (c *OrganizationsLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) {
 24214  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 24215  	if c.ifNoneMatch_ != "" {
 24216  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 24217  	}
 24218  	var body io.Reader = nil
 24219  	c.urlParams_.Set("alt", alt)
 24220  	c.urlParams_.Set("prettyPrint", "false")
 24221  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries")
 24222  	urls += "?" + c.urlParams_.Encode()
 24223  	req, err := http.NewRequest("GET", urls, body)
 24224  	if err != nil {
 24225  		return nil, err
 24226  	}
 24227  	req.Header = reqHeaders
 24228  	googleapi.Expand(req.URL, map[string]string{
 24229  		"parent": c.parent,
 24230  	})
 24231  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 24232  }
 24233  
 24234  // Do executes the "logging.organizations.locations.recentQueries.list" call.
 24235  // Any non-2xx status code is an error. Response headers are in either
 24236  // *ListRecentQueriesResponse.ServerResponse.Header or (if a response was
 24237  // returned at all) in error.(*googleapi.Error).Header. Use
 24238  // googleapi.IsNotModified to check whether the returned error was because
 24239  // http.StatusNotModified was returned.
 24240  func (c *OrganizationsLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) {
 24241  	gensupport.SetOptions(c.urlParams_, opts...)
 24242  	res, err := c.doRequest("json")
 24243  	if res != nil && res.StatusCode == http.StatusNotModified {
 24244  		if res.Body != nil {
 24245  			res.Body.Close()
 24246  		}
 24247  		return nil, gensupport.WrapError(&googleapi.Error{
 24248  			Code:   res.StatusCode,
 24249  			Header: res.Header,
 24250  		})
 24251  	}
 24252  	if err != nil {
 24253  		return nil, err
 24254  	}
 24255  	defer googleapi.CloseBody(res)
 24256  	if err := googleapi.CheckResponse(res); err != nil {
 24257  		return nil, gensupport.WrapError(err)
 24258  	}
 24259  	ret := &ListRecentQueriesResponse{
 24260  		ServerResponse: googleapi.ServerResponse{
 24261  			Header:         res.Header,
 24262  			HTTPStatusCode: res.StatusCode,
 24263  		},
 24264  	}
 24265  	target := &ret
 24266  	if err := gensupport.DecodeResponse(target, res); err != nil {
 24267  		return nil, err
 24268  	}
 24269  	return ret, nil
 24270  }
 24271  
 24272  // Pages invokes f for each page of results.
 24273  // A non-nil error returned from f will halt the iteration.
 24274  // The provided context supersedes any context provided to the Context method.
 24275  func (c *OrganizationsLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error {
 24276  	c.ctx_ = ctx
 24277  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 24278  	for {
 24279  		x, err := c.Do()
 24280  		if err != nil {
 24281  			return err
 24282  		}
 24283  		if err := f(x); err != nil {
 24284  			return err
 24285  		}
 24286  		if x.NextPageToken == "" {
 24287  			return nil
 24288  		}
 24289  		c.PageToken(x.NextPageToken)
 24290  	}
 24291  }
 24292  
 24293  type OrganizationsLocationsSavedQueriesCreateCall struct {
 24294  	s          *Service
 24295  	parent     string
 24296  	savedquery *SavedQuery
 24297  	urlParams_ gensupport.URLParams
 24298  	ctx_       context.Context
 24299  	header_    http.Header
 24300  }
 24301  
 24302  // Create: Creates a new SavedQuery for the user making the request.
 24303  //
 24304  //   - parent: The parent resource in which to create the saved query:
 24305  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 24306  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 24307  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 24308  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:
 24309  //     "projects/my-project/locations/global"
 24310  //     "organizations/123456789/locations/us-central1".
 24311  func (r *OrganizationsLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *OrganizationsLocationsSavedQueriesCreateCall {
 24312  	c := &OrganizationsLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 24313  	c.parent = parent
 24314  	c.savedquery = savedquery
 24315  	return c
 24316  }
 24317  
 24318  // SavedQueryId sets the optional parameter "savedQueryId": The ID to use for
 24319  // the saved query, which will become the final component of the saved query's
 24320  // resource name.If the saved_query_id is not provided, the system will
 24321  // generate an alphanumeric ID.The saved_query_id is limited to 100 characters
 24322  // and can include only the following characters: upper and lower-case
 24323  // alphanumeric characters, underscores, hyphens, periods.First character has
 24324  // to be alphanumeric.
 24325  func (c *OrganizationsLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *OrganizationsLocationsSavedQueriesCreateCall {
 24326  	c.urlParams_.Set("savedQueryId", savedQueryId)
 24327  	return c
 24328  }
 24329  
 24330  // Fields allows partial responses to be retrieved. See
 24331  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 24332  // details.
 24333  func (c *OrganizationsLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesCreateCall {
 24334  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 24335  	return c
 24336  }
 24337  
 24338  // Context sets the context to be used in this call's Do method.
 24339  func (c *OrganizationsLocationsSavedQueriesCreateCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesCreateCall {
 24340  	c.ctx_ = ctx
 24341  	return c
 24342  }
 24343  
 24344  // Header returns a http.Header that can be modified by the caller to add
 24345  // headers to the request.
 24346  func (c *OrganizationsLocationsSavedQueriesCreateCall) Header() http.Header {
 24347  	if c.header_ == nil {
 24348  		c.header_ = make(http.Header)
 24349  	}
 24350  	return c.header_
 24351  }
 24352  
 24353  func (c *OrganizationsLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) {
 24354  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 24355  	var body io.Reader = nil
 24356  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery)
 24357  	if err != nil {
 24358  		return nil, err
 24359  	}
 24360  	c.urlParams_.Set("alt", alt)
 24361  	c.urlParams_.Set("prettyPrint", "false")
 24362  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
 24363  	urls += "?" + c.urlParams_.Encode()
 24364  	req, err := http.NewRequest("POST", urls, body)
 24365  	if err != nil {
 24366  		return nil, err
 24367  	}
 24368  	req.Header = reqHeaders
 24369  	googleapi.Expand(req.URL, map[string]string{
 24370  		"parent": c.parent,
 24371  	})
 24372  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 24373  }
 24374  
 24375  // Do executes the "logging.organizations.locations.savedQueries.create" call.
 24376  // Any non-2xx status code is an error. Response headers are in either
 24377  // *SavedQuery.ServerResponse.Header or (if a response was returned at all) in
 24378  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 24379  // whether the returned error was because http.StatusNotModified was returned.
 24380  func (c *OrganizationsLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
 24381  	gensupport.SetOptions(c.urlParams_, opts...)
 24382  	res, err := c.doRequest("json")
 24383  	if res != nil && res.StatusCode == http.StatusNotModified {
 24384  		if res.Body != nil {
 24385  			res.Body.Close()
 24386  		}
 24387  		return nil, gensupport.WrapError(&googleapi.Error{
 24388  			Code:   res.StatusCode,
 24389  			Header: res.Header,
 24390  		})
 24391  	}
 24392  	if err != nil {
 24393  		return nil, err
 24394  	}
 24395  	defer googleapi.CloseBody(res)
 24396  	if err := googleapi.CheckResponse(res); err != nil {
 24397  		return nil, gensupport.WrapError(err)
 24398  	}
 24399  	ret := &SavedQuery{
 24400  		ServerResponse: googleapi.ServerResponse{
 24401  			Header:         res.Header,
 24402  			HTTPStatusCode: res.StatusCode,
 24403  		},
 24404  	}
 24405  	target := &ret
 24406  	if err := gensupport.DecodeResponse(target, res); err != nil {
 24407  		return nil, err
 24408  	}
 24409  	return ret, nil
 24410  }
 24411  
 24412  type OrganizationsLocationsSavedQueriesDeleteCall struct {
 24413  	s          *Service
 24414  	name       string
 24415  	urlParams_ gensupport.URLParams
 24416  	ctx_       context.Context
 24417  	header_    http.Header
 24418  }
 24419  
 24420  // Delete: Deletes an existing SavedQuery that was created by the user making
 24421  // the request.
 24422  //
 24423  //   - name: The full resource name of the saved query to delete.
 24424  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]"
 24425  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER
 24426  //     Y_ID]"
 24427  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/
 24428  //     [QUERY_ID]"
 24429  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For
 24430  //     example:
 24431  //     "projects/my-project/locations/global/savedQueries/my-saved-query".
 24432  func (r *OrganizationsLocationsSavedQueriesService) Delete(name string) *OrganizationsLocationsSavedQueriesDeleteCall {
 24433  	c := &OrganizationsLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 24434  	c.name = name
 24435  	return c
 24436  }
 24437  
 24438  // Fields allows partial responses to be retrieved. See
 24439  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 24440  // details.
 24441  func (c *OrganizationsLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesDeleteCall {
 24442  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 24443  	return c
 24444  }
 24445  
 24446  // Context sets the context to be used in this call's Do method.
 24447  func (c *OrganizationsLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesDeleteCall {
 24448  	c.ctx_ = ctx
 24449  	return c
 24450  }
 24451  
 24452  // Header returns a http.Header that can be modified by the caller to add
 24453  // headers to the request.
 24454  func (c *OrganizationsLocationsSavedQueriesDeleteCall) Header() http.Header {
 24455  	if c.header_ == nil {
 24456  		c.header_ = make(http.Header)
 24457  	}
 24458  	return c.header_
 24459  }
 24460  
 24461  func (c *OrganizationsLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) {
 24462  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 24463  	var body io.Reader = nil
 24464  	c.urlParams_.Set("alt", alt)
 24465  	c.urlParams_.Set("prettyPrint", "false")
 24466  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 24467  	urls += "?" + c.urlParams_.Encode()
 24468  	req, err := http.NewRequest("DELETE", urls, body)
 24469  	if err != nil {
 24470  		return nil, err
 24471  	}
 24472  	req.Header = reqHeaders
 24473  	googleapi.Expand(req.URL, map[string]string{
 24474  		"name": c.name,
 24475  	})
 24476  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 24477  }
 24478  
 24479  // Do executes the "logging.organizations.locations.savedQueries.delete" call.
 24480  // Any non-2xx status code is an error. Response headers are in either
 24481  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 24482  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 24483  // whether the returned error was because http.StatusNotModified was returned.
 24484  func (c *OrganizationsLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 24485  	gensupport.SetOptions(c.urlParams_, opts...)
 24486  	res, err := c.doRequest("json")
 24487  	if res != nil && res.StatusCode == http.StatusNotModified {
 24488  		if res.Body != nil {
 24489  			res.Body.Close()
 24490  		}
 24491  		return nil, gensupport.WrapError(&googleapi.Error{
 24492  			Code:   res.StatusCode,
 24493  			Header: res.Header,
 24494  		})
 24495  	}
 24496  	if err != nil {
 24497  		return nil, err
 24498  	}
 24499  	defer googleapi.CloseBody(res)
 24500  	if err := googleapi.CheckResponse(res); err != nil {
 24501  		return nil, gensupport.WrapError(err)
 24502  	}
 24503  	ret := &Empty{
 24504  		ServerResponse: googleapi.ServerResponse{
 24505  			Header:         res.Header,
 24506  			HTTPStatusCode: res.StatusCode,
 24507  		},
 24508  	}
 24509  	target := &ret
 24510  	if err := gensupport.DecodeResponse(target, res); err != nil {
 24511  		return nil, err
 24512  	}
 24513  	return ret, nil
 24514  }
 24515  
 24516  type OrganizationsLocationsSavedQueriesListCall struct {
 24517  	s            *Service
 24518  	parent       string
 24519  	urlParams_   gensupport.URLParams
 24520  	ifNoneMatch_ string
 24521  	ctx_         context.Context
 24522  	header_      http.Header
 24523  }
 24524  
 24525  // List: Lists the SavedQueries that were created by the user making the
 24526  // request.
 24527  //
 24528  //   - parent: The resource to which the listed queries belong.
 24529  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 24530  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 24531  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 24532  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:
 24533  //     "projects/my-project/locations/us-central1" Note: The locations portion of
 24534  //     the resource must be specified. To get a list of all saved queries, a
 24535  //     wildcard character - can be used for LOCATION_ID, for example:
 24536  //     "projects/my-project/locations/-".
 24537  func (r *OrganizationsLocationsSavedQueriesService) List(parent string) *OrganizationsLocationsSavedQueriesListCall {
 24538  	c := &OrganizationsLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 24539  	c.parent = parent
 24540  	return c
 24541  }
 24542  
 24543  // PageSize sets the optional parameter "pageSize": The maximum number of
 24544  // results to return from this request.Non-positive values are ignored. The
 24545  // presence of nextPageToken in the response indicates that more results might
 24546  // be available.
 24547  func (c *OrganizationsLocationsSavedQueriesListCall) PageSize(pageSize int64) *OrganizationsLocationsSavedQueriesListCall {
 24548  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 24549  	return c
 24550  }
 24551  
 24552  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 24553  // the next batch of results from the preceding call to this method. pageToken
 24554  // must be the value of nextPageToken from the previous response. The values of
 24555  // other method parameters should be identical to those in the previous call.
 24556  func (c *OrganizationsLocationsSavedQueriesListCall) PageToken(pageToken string) *OrganizationsLocationsSavedQueriesListCall {
 24557  	c.urlParams_.Set("pageToken", pageToken)
 24558  	return c
 24559  }
 24560  
 24561  // Fields allows partial responses to be retrieved. See
 24562  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 24563  // details.
 24564  func (c *OrganizationsLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesListCall {
 24565  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 24566  	return c
 24567  }
 24568  
 24569  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 24570  // object's ETag matches the given value. This is useful for getting updates
 24571  // only after the object has changed since the last request.
 24572  func (c *OrganizationsLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSavedQueriesListCall {
 24573  	c.ifNoneMatch_ = entityTag
 24574  	return c
 24575  }
 24576  
 24577  // Context sets the context to be used in this call's Do method.
 24578  func (c *OrganizationsLocationsSavedQueriesListCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesListCall {
 24579  	c.ctx_ = ctx
 24580  	return c
 24581  }
 24582  
 24583  // Header returns a http.Header that can be modified by the caller to add
 24584  // headers to the request.
 24585  func (c *OrganizationsLocationsSavedQueriesListCall) Header() http.Header {
 24586  	if c.header_ == nil {
 24587  		c.header_ = make(http.Header)
 24588  	}
 24589  	return c.header_
 24590  }
 24591  
 24592  func (c *OrganizationsLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) {
 24593  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 24594  	if c.ifNoneMatch_ != "" {
 24595  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 24596  	}
 24597  	var body io.Reader = nil
 24598  	c.urlParams_.Set("alt", alt)
 24599  	c.urlParams_.Set("prettyPrint", "false")
 24600  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
 24601  	urls += "?" + c.urlParams_.Encode()
 24602  	req, err := http.NewRequest("GET", urls, body)
 24603  	if err != nil {
 24604  		return nil, err
 24605  	}
 24606  	req.Header = reqHeaders
 24607  	googleapi.Expand(req.URL, map[string]string{
 24608  		"parent": c.parent,
 24609  	})
 24610  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 24611  }
 24612  
 24613  // Do executes the "logging.organizations.locations.savedQueries.list" call.
 24614  // Any non-2xx status code is an error. Response headers are in either
 24615  // *ListSavedQueriesResponse.ServerResponse.Header or (if a response was
 24616  // returned at all) in error.(*googleapi.Error).Header. Use
 24617  // googleapi.IsNotModified to check whether the returned error was because
 24618  // http.StatusNotModified was returned.
 24619  func (c *OrganizationsLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) {
 24620  	gensupport.SetOptions(c.urlParams_, opts...)
 24621  	res, err := c.doRequest("json")
 24622  	if res != nil && res.StatusCode == http.StatusNotModified {
 24623  		if res.Body != nil {
 24624  			res.Body.Close()
 24625  		}
 24626  		return nil, gensupport.WrapError(&googleapi.Error{
 24627  			Code:   res.StatusCode,
 24628  			Header: res.Header,
 24629  		})
 24630  	}
 24631  	if err != nil {
 24632  		return nil, err
 24633  	}
 24634  	defer googleapi.CloseBody(res)
 24635  	if err := googleapi.CheckResponse(res); err != nil {
 24636  		return nil, gensupport.WrapError(err)
 24637  	}
 24638  	ret := &ListSavedQueriesResponse{
 24639  		ServerResponse: googleapi.ServerResponse{
 24640  			Header:         res.Header,
 24641  			HTTPStatusCode: res.StatusCode,
 24642  		},
 24643  	}
 24644  	target := &ret
 24645  	if err := gensupport.DecodeResponse(target, res); err != nil {
 24646  		return nil, err
 24647  	}
 24648  	return ret, nil
 24649  }
 24650  
 24651  // Pages invokes f for each page of results.
 24652  // A non-nil error returned from f will halt the iteration.
 24653  // The provided context supersedes any context provided to the Context method.
 24654  func (c *OrganizationsLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error {
 24655  	c.ctx_ = ctx
 24656  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 24657  	for {
 24658  		x, err := c.Do()
 24659  		if err != nil {
 24660  			return err
 24661  		}
 24662  		if err := f(x); err != nil {
 24663  			return err
 24664  		}
 24665  		if x.NextPageToken == "" {
 24666  			return nil
 24667  		}
 24668  		c.PageToken(x.NextPageToken)
 24669  	}
 24670  }
 24671  
 24672  type OrganizationsLogsDeleteCall struct {
 24673  	s          *Service
 24674  	logName    string
 24675  	urlParams_ gensupport.URLParams
 24676  	ctx_       context.Context
 24677  	header_    http.Header
 24678  }
 24679  
 24680  // Delete: Deletes all the log entries in a log for the _Default Log Bucket.
 24681  // The log reappears if it receives new entries. Log entries written shortly
 24682  // before the delete operation might not be deleted. Entries received after the
 24683  // delete operation with a timestamp before the operation will be deleted.
 24684  //
 24685  //   - logName: The resource name of the log to delete:
 24686  //     projects/[PROJECT_ID]/logs/[LOG_ID]
 24687  //     organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
 24688  //     billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
 24689  //     folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
 24690  //     example, "projects/my-project-id/logs/syslog",
 24691  //     "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more
 24692  //     information about log names, see LogEntry.
 24693  func (r *OrganizationsLogsService) Delete(logName string) *OrganizationsLogsDeleteCall {
 24694  	c := &OrganizationsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 24695  	c.logName = logName
 24696  	return c
 24697  }
 24698  
 24699  // Fields allows partial responses to be retrieved. See
 24700  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 24701  // details.
 24702  func (c *OrganizationsLogsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLogsDeleteCall {
 24703  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 24704  	return c
 24705  }
 24706  
 24707  // Context sets the context to be used in this call's Do method.
 24708  func (c *OrganizationsLogsDeleteCall) Context(ctx context.Context) *OrganizationsLogsDeleteCall {
 24709  	c.ctx_ = ctx
 24710  	return c
 24711  }
 24712  
 24713  // Header returns a http.Header that can be modified by the caller to add
 24714  // headers to the request.
 24715  func (c *OrganizationsLogsDeleteCall) Header() http.Header {
 24716  	if c.header_ == nil {
 24717  		c.header_ = make(http.Header)
 24718  	}
 24719  	return c.header_
 24720  }
 24721  
 24722  func (c *OrganizationsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
 24723  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 24724  	var body io.Reader = nil
 24725  	c.urlParams_.Set("alt", alt)
 24726  	c.urlParams_.Set("prettyPrint", "false")
 24727  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
 24728  	urls += "?" + c.urlParams_.Encode()
 24729  	req, err := http.NewRequest("DELETE", urls, body)
 24730  	if err != nil {
 24731  		return nil, err
 24732  	}
 24733  	req.Header = reqHeaders
 24734  	googleapi.Expand(req.URL, map[string]string{
 24735  		"logName": c.logName,
 24736  	})
 24737  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 24738  }
 24739  
 24740  // Do executes the "logging.organizations.logs.delete" call.
 24741  // Any non-2xx status code is an error. Response headers are in either
 24742  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 24743  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 24744  // whether the returned error was because http.StatusNotModified was returned.
 24745  func (c *OrganizationsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 24746  	gensupport.SetOptions(c.urlParams_, opts...)
 24747  	res, err := c.doRequest("json")
 24748  	if res != nil && res.StatusCode == http.StatusNotModified {
 24749  		if res.Body != nil {
 24750  			res.Body.Close()
 24751  		}
 24752  		return nil, gensupport.WrapError(&googleapi.Error{
 24753  			Code:   res.StatusCode,
 24754  			Header: res.Header,
 24755  		})
 24756  	}
 24757  	if err != nil {
 24758  		return nil, err
 24759  	}
 24760  	defer googleapi.CloseBody(res)
 24761  	if err := googleapi.CheckResponse(res); err != nil {
 24762  		return nil, gensupport.WrapError(err)
 24763  	}
 24764  	ret := &Empty{
 24765  		ServerResponse: googleapi.ServerResponse{
 24766  			Header:         res.Header,
 24767  			HTTPStatusCode: res.StatusCode,
 24768  		},
 24769  	}
 24770  	target := &ret
 24771  	if err := gensupport.DecodeResponse(target, res); err != nil {
 24772  		return nil, err
 24773  	}
 24774  	return ret, nil
 24775  }
 24776  
 24777  type OrganizationsLogsListCall struct {
 24778  	s            *Service
 24779  	parent       string
 24780  	urlParams_   gensupport.URLParams
 24781  	ifNoneMatch_ string
 24782  	ctx_         context.Context
 24783  	header_      http.Header
 24784  }
 24785  
 24786  // List: Lists the logs in projects, organizations, folders, or billing
 24787  // accounts. Only logs that have entries are listed.
 24788  //
 24789  //   - parent: The resource name to list logs for: projects/[PROJECT_ID]
 24790  //     organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 24791  //     folders/[FOLDER_ID].
 24792  func (r *OrganizationsLogsService) List(parent string) *OrganizationsLogsListCall {
 24793  	c := &OrganizationsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 24794  	c.parent = parent
 24795  	return c
 24796  }
 24797  
 24798  // PageSize sets the optional parameter "pageSize": The maximum number of
 24799  // results to return from this request. Non-positive values are ignored. The
 24800  // presence of nextPageToken in the response indicates that more results might
 24801  // be available.
 24802  func (c *OrganizationsLogsListCall) PageSize(pageSize int64) *OrganizationsLogsListCall {
 24803  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 24804  	return c
 24805  }
 24806  
 24807  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 24808  // the next batch of results from the preceding call to this method. pageToken
 24809  // must be the value of nextPageToken from the previous response. The values of
 24810  // other method parameters should be identical to those in the previous call.
 24811  func (c *OrganizationsLogsListCall) PageToken(pageToken string) *OrganizationsLogsListCall {
 24812  	c.urlParams_.Set("pageToken", pageToken)
 24813  	return c
 24814  }
 24815  
 24816  // ResourceNames sets the optional parameter "resourceNames": List of resource
 24817  // names to list logs for:
 24818  // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
 24819  // _ID]
 24820  // organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
 24821  // iews/[VIEW_ID]
 24822  // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
 24823  // ID]/views/[VIEW_ID]
 24824  // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
 24825  // D]To support legacy queries, it could also be: projects/[PROJECT_ID]
 24826  // organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 24827  // folders/[FOLDER_ID]The resource name in the parent field is added to this
 24828  // list.
 24829  func (c *OrganizationsLogsListCall) ResourceNames(resourceNames ...string) *OrganizationsLogsListCall {
 24830  	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
 24831  	return c
 24832  }
 24833  
 24834  // Fields allows partial responses to be retrieved. See
 24835  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 24836  // details.
 24837  func (c *OrganizationsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsLogsListCall {
 24838  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 24839  	return c
 24840  }
 24841  
 24842  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 24843  // object's ETag matches the given value. This is useful for getting updates
 24844  // only after the object has changed since the last request.
 24845  func (c *OrganizationsLogsListCall) IfNoneMatch(entityTag string) *OrganizationsLogsListCall {
 24846  	c.ifNoneMatch_ = entityTag
 24847  	return c
 24848  }
 24849  
 24850  // Context sets the context to be used in this call's Do method.
 24851  func (c *OrganizationsLogsListCall) Context(ctx context.Context) *OrganizationsLogsListCall {
 24852  	c.ctx_ = ctx
 24853  	return c
 24854  }
 24855  
 24856  // Header returns a http.Header that can be modified by the caller to add
 24857  // headers to the request.
 24858  func (c *OrganizationsLogsListCall) Header() http.Header {
 24859  	if c.header_ == nil {
 24860  		c.header_ = make(http.Header)
 24861  	}
 24862  	return c.header_
 24863  }
 24864  
 24865  func (c *OrganizationsLogsListCall) doRequest(alt string) (*http.Response, error) {
 24866  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 24867  	if c.ifNoneMatch_ != "" {
 24868  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 24869  	}
 24870  	var body io.Reader = nil
 24871  	c.urlParams_.Set("alt", alt)
 24872  	c.urlParams_.Set("prettyPrint", "false")
 24873  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
 24874  	urls += "?" + c.urlParams_.Encode()
 24875  	req, err := http.NewRequest("GET", urls, body)
 24876  	if err != nil {
 24877  		return nil, err
 24878  	}
 24879  	req.Header = reqHeaders
 24880  	googleapi.Expand(req.URL, map[string]string{
 24881  		"parent": c.parent,
 24882  	})
 24883  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 24884  }
 24885  
 24886  // Do executes the "logging.organizations.logs.list" call.
 24887  // Any non-2xx status code is an error. Response headers are in either
 24888  // *ListLogsResponse.ServerResponse.Header or (if a response was returned at
 24889  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 24890  // check whether the returned error was because http.StatusNotModified was
 24891  // returned.
 24892  func (c *OrganizationsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
 24893  	gensupport.SetOptions(c.urlParams_, opts...)
 24894  	res, err := c.doRequest("json")
 24895  	if res != nil && res.StatusCode == http.StatusNotModified {
 24896  		if res.Body != nil {
 24897  			res.Body.Close()
 24898  		}
 24899  		return nil, gensupport.WrapError(&googleapi.Error{
 24900  			Code:   res.StatusCode,
 24901  			Header: res.Header,
 24902  		})
 24903  	}
 24904  	if err != nil {
 24905  		return nil, err
 24906  	}
 24907  	defer googleapi.CloseBody(res)
 24908  	if err := googleapi.CheckResponse(res); err != nil {
 24909  		return nil, gensupport.WrapError(err)
 24910  	}
 24911  	ret := &ListLogsResponse{
 24912  		ServerResponse: googleapi.ServerResponse{
 24913  			Header:         res.Header,
 24914  			HTTPStatusCode: res.StatusCode,
 24915  		},
 24916  	}
 24917  	target := &ret
 24918  	if err := gensupport.DecodeResponse(target, res); err != nil {
 24919  		return nil, err
 24920  	}
 24921  	return ret, nil
 24922  }
 24923  
 24924  // Pages invokes f for each page of results.
 24925  // A non-nil error returned from f will halt the iteration.
 24926  // The provided context supersedes any context provided to the Context method.
 24927  func (c *OrganizationsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
 24928  	c.ctx_ = ctx
 24929  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 24930  	for {
 24931  		x, err := c.Do()
 24932  		if err != nil {
 24933  			return err
 24934  		}
 24935  		if err := f(x); err != nil {
 24936  			return err
 24937  		}
 24938  		if x.NextPageToken == "" {
 24939  			return nil
 24940  		}
 24941  		c.PageToken(x.NextPageToken)
 24942  	}
 24943  }
 24944  
 24945  type OrganizationsSinksCreateCall struct {
 24946  	s          *Service
 24947  	parent     string
 24948  	logsink    *LogSink
 24949  	urlParams_ gensupport.URLParams
 24950  	ctx_       context.Context
 24951  	header_    http.Header
 24952  }
 24953  
 24954  // Create: Creates a sink that exports specified log entries to a destination.
 24955  // The export begins upon ingress, unless the sink's writer_identity is not
 24956  // permitted to write to the destination. A sink can export log entries only
 24957  // from the resource owning the sink.
 24958  //
 24959  //   - parent: The resource in which to create the sink: "projects/[PROJECT_ID]"
 24960  //     "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]"
 24961  //     "folders/[FOLDER_ID]" For examples:"projects/my-project"
 24962  //     "organizations/123456789".
 24963  func (r *OrganizationsSinksService) Create(parent string, logsink *LogSink) *OrganizationsSinksCreateCall {
 24964  	c := &OrganizationsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 24965  	c.parent = parent
 24966  	c.logsink = logsink
 24967  	return c
 24968  }
 24969  
 24970  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 24971  // service account provided by the caller that will be used to write the log
 24972  // entries. The format must be serviceAccount:some@email. This field can only
 24973  // be specified if you are routing logs to a destination outside this sink's
 24974  // project. If not specified, a Logging service account will automatically be
 24975  // generated.
 24976  func (c *OrganizationsSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksCreateCall {
 24977  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 24978  	return c
 24979  }
 24980  
 24981  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity":
 24982  // Determines the kind of IAM identity returned as writer_identity in the new
 24983  // sink. If this value is omitted or set to false, and if the sink's parent is
 24984  // a project, then the value returned as writer_identity is the same group or
 24985  // service account used by Cloud Logging before the addition of writer
 24986  // identities to this API. The sink's destination must be in the same project
 24987  // as the sink itself.If this field is set to true, or if the sink is owned by
 24988  // a non-project resource such as an organization, then the value of
 24989  // writer_identity will be a service agent
 24990  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 24991  // used by the sinks with the same parent. For more information, see
 24992  // writer_identity in LogSink.
 24993  func (c *OrganizationsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksCreateCall {
 24994  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 24995  	return c
 24996  }
 24997  
 24998  // Fields allows partial responses to be retrieved. See
 24999  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 25000  // details.
 25001  func (c *OrganizationsSinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsSinksCreateCall {
 25002  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 25003  	return c
 25004  }
 25005  
 25006  // Context sets the context to be used in this call's Do method.
 25007  func (c *OrganizationsSinksCreateCall) Context(ctx context.Context) *OrganizationsSinksCreateCall {
 25008  	c.ctx_ = ctx
 25009  	return c
 25010  }
 25011  
 25012  // Header returns a http.Header that can be modified by the caller to add
 25013  // headers to the request.
 25014  func (c *OrganizationsSinksCreateCall) Header() http.Header {
 25015  	if c.header_ == nil {
 25016  		c.header_ = make(http.Header)
 25017  	}
 25018  	return c.header_
 25019  }
 25020  
 25021  func (c *OrganizationsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
 25022  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 25023  	var body io.Reader = nil
 25024  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 25025  	if err != nil {
 25026  		return nil, err
 25027  	}
 25028  	c.urlParams_.Set("alt", alt)
 25029  	c.urlParams_.Set("prettyPrint", "false")
 25030  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
 25031  	urls += "?" + c.urlParams_.Encode()
 25032  	req, err := http.NewRequest("POST", urls, body)
 25033  	if err != nil {
 25034  		return nil, err
 25035  	}
 25036  	req.Header = reqHeaders
 25037  	googleapi.Expand(req.URL, map[string]string{
 25038  		"parent": c.parent,
 25039  	})
 25040  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 25041  }
 25042  
 25043  // Do executes the "logging.organizations.sinks.create" call.
 25044  // Any non-2xx status code is an error. Response headers are in either
 25045  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 25046  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 25047  // whether the returned error was because http.StatusNotModified was returned.
 25048  func (c *OrganizationsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 25049  	gensupport.SetOptions(c.urlParams_, opts...)
 25050  	res, err := c.doRequest("json")
 25051  	if res != nil && res.StatusCode == http.StatusNotModified {
 25052  		if res.Body != nil {
 25053  			res.Body.Close()
 25054  		}
 25055  		return nil, gensupport.WrapError(&googleapi.Error{
 25056  			Code:   res.StatusCode,
 25057  			Header: res.Header,
 25058  		})
 25059  	}
 25060  	if err != nil {
 25061  		return nil, err
 25062  	}
 25063  	defer googleapi.CloseBody(res)
 25064  	if err := googleapi.CheckResponse(res); err != nil {
 25065  		return nil, gensupport.WrapError(err)
 25066  	}
 25067  	ret := &LogSink{
 25068  		ServerResponse: googleapi.ServerResponse{
 25069  			Header:         res.Header,
 25070  			HTTPStatusCode: res.StatusCode,
 25071  		},
 25072  	}
 25073  	target := &ret
 25074  	if err := gensupport.DecodeResponse(target, res); err != nil {
 25075  		return nil, err
 25076  	}
 25077  	return ret, nil
 25078  }
 25079  
 25080  type OrganizationsSinksDeleteCall struct {
 25081  	s          *Service
 25082  	sinkNameid string
 25083  	urlParams_ gensupport.URLParams
 25084  	ctx_       context.Context
 25085  	header_    http.Header
 25086  }
 25087  
 25088  // Delete: Deletes a sink. If the sink has a unique writer_identity, then that
 25089  // service account is also deleted.
 25090  //
 25091  //   - sinkName: The full resource name of the sink to delete, including the
 25092  //     parent resource and the sink identifier:
 25093  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 25094  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 25095  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 25096  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 25097  //     example:"projects/my-project/sinks/my-sink".
 25098  func (r *OrganizationsSinksService) Delete(sinkNameid string) *OrganizationsSinksDeleteCall {
 25099  	c := &OrganizationsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 25100  	c.sinkNameid = sinkNameid
 25101  	return c
 25102  }
 25103  
 25104  // Fields allows partial responses to be retrieved. See
 25105  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 25106  // details.
 25107  func (c *OrganizationsSinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsSinksDeleteCall {
 25108  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 25109  	return c
 25110  }
 25111  
 25112  // Context sets the context to be used in this call's Do method.
 25113  func (c *OrganizationsSinksDeleteCall) Context(ctx context.Context) *OrganizationsSinksDeleteCall {
 25114  	c.ctx_ = ctx
 25115  	return c
 25116  }
 25117  
 25118  // Header returns a http.Header that can be modified by the caller to add
 25119  // headers to the request.
 25120  func (c *OrganizationsSinksDeleteCall) Header() http.Header {
 25121  	if c.header_ == nil {
 25122  		c.header_ = make(http.Header)
 25123  	}
 25124  	return c.header_
 25125  }
 25126  
 25127  func (c *OrganizationsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 25128  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 25129  	var body io.Reader = nil
 25130  	c.urlParams_.Set("alt", alt)
 25131  	c.urlParams_.Set("prettyPrint", "false")
 25132  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 25133  	urls += "?" + c.urlParams_.Encode()
 25134  	req, err := http.NewRequest("DELETE", urls, body)
 25135  	if err != nil {
 25136  		return nil, err
 25137  	}
 25138  	req.Header = reqHeaders
 25139  	googleapi.Expand(req.URL, map[string]string{
 25140  		"sinkName": c.sinkNameid,
 25141  	})
 25142  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 25143  }
 25144  
 25145  // Do executes the "logging.organizations.sinks.delete" call.
 25146  // Any non-2xx status code is an error. Response headers are in either
 25147  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 25148  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 25149  // whether the returned error was because http.StatusNotModified was returned.
 25150  func (c *OrganizationsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 25151  	gensupport.SetOptions(c.urlParams_, opts...)
 25152  	res, err := c.doRequest("json")
 25153  	if res != nil && res.StatusCode == http.StatusNotModified {
 25154  		if res.Body != nil {
 25155  			res.Body.Close()
 25156  		}
 25157  		return nil, gensupport.WrapError(&googleapi.Error{
 25158  			Code:   res.StatusCode,
 25159  			Header: res.Header,
 25160  		})
 25161  	}
 25162  	if err != nil {
 25163  		return nil, err
 25164  	}
 25165  	defer googleapi.CloseBody(res)
 25166  	if err := googleapi.CheckResponse(res); err != nil {
 25167  		return nil, gensupport.WrapError(err)
 25168  	}
 25169  	ret := &Empty{
 25170  		ServerResponse: googleapi.ServerResponse{
 25171  			Header:         res.Header,
 25172  			HTTPStatusCode: res.StatusCode,
 25173  		},
 25174  	}
 25175  	target := &ret
 25176  	if err := gensupport.DecodeResponse(target, res); err != nil {
 25177  		return nil, err
 25178  	}
 25179  	return ret, nil
 25180  }
 25181  
 25182  type OrganizationsSinksGetCall struct {
 25183  	s            *Service
 25184  	sinkName     string
 25185  	urlParams_   gensupport.URLParams
 25186  	ifNoneMatch_ string
 25187  	ctx_         context.Context
 25188  	header_      http.Header
 25189  }
 25190  
 25191  // Get: Gets a sink.
 25192  //
 25193  //   - sinkName: The resource name of the sink:
 25194  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 25195  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 25196  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 25197  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 25198  //     example:"projects/my-project/sinks/my-sink".
 25199  func (r *OrganizationsSinksService) Get(sinkName string) *OrganizationsSinksGetCall {
 25200  	c := &OrganizationsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 25201  	c.sinkName = sinkName
 25202  	return c
 25203  }
 25204  
 25205  // Fields allows partial responses to be retrieved. See
 25206  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 25207  // details.
 25208  func (c *OrganizationsSinksGetCall) Fields(s ...googleapi.Field) *OrganizationsSinksGetCall {
 25209  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 25210  	return c
 25211  }
 25212  
 25213  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 25214  // object's ETag matches the given value. This is useful for getting updates
 25215  // only after the object has changed since the last request.
 25216  func (c *OrganizationsSinksGetCall) IfNoneMatch(entityTag string) *OrganizationsSinksGetCall {
 25217  	c.ifNoneMatch_ = entityTag
 25218  	return c
 25219  }
 25220  
 25221  // Context sets the context to be used in this call's Do method.
 25222  func (c *OrganizationsSinksGetCall) Context(ctx context.Context) *OrganizationsSinksGetCall {
 25223  	c.ctx_ = ctx
 25224  	return c
 25225  }
 25226  
 25227  // Header returns a http.Header that can be modified by the caller to add
 25228  // headers to the request.
 25229  func (c *OrganizationsSinksGetCall) Header() http.Header {
 25230  	if c.header_ == nil {
 25231  		c.header_ = make(http.Header)
 25232  	}
 25233  	return c.header_
 25234  }
 25235  
 25236  func (c *OrganizationsSinksGetCall) doRequest(alt string) (*http.Response, error) {
 25237  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 25238  	if c.ifNoneMatch_ != "" {
 25239  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 25240  	}
 25241  	var body io.Reader = nil
 25242  	c.urlParams_.Set("alt", alt)
 25243  	c.urlParams_.Set("prettyPrint", "false")
 25244  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 25245  	urls += "?" + c.urlParams_.Encode()
 25246  	req, err := http.NewRequest("GET", urls, body)
 25247  	if err != nil {
 25248  		return nil, err
 25249  	}
 25250  	req.Header = reqHeaders
 25251  	googleapi.Expand(req.URL, map[string]string{
 25252  		"sinkName": c.sinkName,
 25253  	})
 25254  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 25255  }
 25256  
 25257  // Do executes the "logging.organizations.sinks.get" call.
 25258  // Any non-2xx status code is an error. Response headers are in either
 25259  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 25260  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 25261  // whether the returned error was because http.StatusNotModified was returned.
 25262  func (c *OrganizationsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 25263  	gensupport.SetOptions(c.urlParams_, opts...)
 25264  	res, err := c.doRequest("json")
 25265  	if res != nil && res.StatusCode == http.StatusNotModified {
 25266  		if res.Body != nil {
 25267  			res.Body.Close()
 25268  		}
 25269  		return nil, gensupport.WrapError(&googleapi.Error{
 25270  			Code:   res.StatusCode,
 25271  			Header: res.Header,
 25272  		})
 25273  	}
 25274  	if err != nil {
 25275  		return nil, err
 25276  	}
 25277  	defer googleapi.CloseBody(res)
 25278  	if err := googleapi.CheckResponse(res); err != nil {
 25279  		return nil, gensupport.WrapError(err)
 25280  	}
 25281  	ret := &LogSink{
 25282  		ServerResponse: googleapi.ServerResponse{
 25283  			Header:         res.Header,
 25284  			HTTPStatusCode: res.StatusCode,
 25285  		},
 25286  	}
 25287  	target := &ret
 25288  	if err := gensupport.DecodeResponse(target, res); err != nil {
 25289  		return nil, err
 25290  	}
 25291  	return ret, nil
 25292  }
 25293  
 25294  type OrganizationsSinksListCall struct {
 25295  	s            *Service
 25296  	parent       string
 25297  	urlParams_   gensupport.URLParams
 25298  	ifNoneMatch_ string
 25299  	ctx_         context.Context
 25300  	header_      http.Header
 25301  }
 25302  
 25303  // List: Lists sinks.
 25304  //
 25305  //   - parent: The parent resource whose sinks are to be listed:
 25306  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 25307  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
 25308  func (r *OrganizationsSinksService) List(parent string) *OrganizationsSinksListCall {
 25309  	c := &OrganizationsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 25310  	c.parent = parent
 25311  	return c
 25312  }
 25313  
 25314  // Filter sets the optional parameter "filter": A filter expression to
 25315  // constrain the sinks returned. Today, this only supports the following
 25316  // strings: ” 'in_scope("ALL")', 'in_scope("ANCESTOR")',
 25317  // 'in_scope("DEFAULT")'.Description of scopes below. ALL: Includes all of the
 25318  // sinks which can be returned in any other scope. ANCESTOR: Includes
 25319  // intercepting sinks owned by ancestor resources. DEFAULT: Includes sinks
 25320  // owned by parent.When the empty string is provided, then the filter
 25321  // 'in_scope("DEFAULT")' is applied.
 25322  func (c *OrganizationsSinksListCall) Filter(filter string) *OrganizationsSinksListCall {
 25323  	c.urlParams_.Set("filter", filter)
 25324  	return c
 25325  }
 25326  
 25327  // PageSize sets the optional parameter "pageSize": The maximum number of
 25328  // results to return from this request. Non-positive values are ignored. The
 25329  // presence of nextPageToken in the response indicates that more results might
 25330  // be available.
 25331  func (c *OrganizationsSinksListCall) PageSize(pageSize int64) *OrganizationsSinksListCall {
 25332  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 25333  	return c
 25334  }
 25335  
 25336  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 25337  // the next batch of results from the preceding call to this method. pageToken
 25338  // must be the value of nextPageToken from the previous response. The values of
 25339  // other method parameters should be identical to those in the previous call.
 25340  func (c *OrganizationsSinksListCall) PageToken(pageToken string) *OrganizationsSinksListCall {
 25341  	c.urlParams_.Set("pageToken", pageToken)
 25342  	return c
 25343  }
 25344  
 25345  // Fields allows partial responses to be retrieved. See
 25346  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 25347  // details.
 25348  func (c *OrganizationsSinksListCall) Fields(s ...googleapi.Field) *OrganizationsSinksListCall {
 25349  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 25350  	return c
 25351  }
 25352  
 25353  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 25354  // object's ETag matches the given value. This is useful for getting updates
 25355  // only after the object has changed since the last request.
 25356  func (c *OrganizationsSinksListCall) IfNoneMatch(entityTag string) *OrganizationsSinksListCall {
 25357  	c.ifNoneMatch_ = entityTag
 25358  	return c
 25359  }
 25360  
 25361  // Context sets the context to be used in this call's Do method.
 25362  func (c *OrganizationsSinksListCall) Context(ctx context.Context) *OrganizationsSinksListCall {
 25363  	c.ctx_ = ctx
 25364  	return c
 25365  }
 25366  
 25367  // Header returns a http.Header that can be modified by the caller to add
 25368  // headers to the request.
 25369  func (c *OrganizationsSinksListCall) Header() http.Header {
 25370  	if c.header_ == nil {
 25371  		c.header_ = make(http.Header)
 25372  	}
 25373  	return c.header_
 25374  }
 25375  
 25376  func (c *OrganizationsSinksListCall) doRequest(alt string) (*http.Response, error) {
 25377  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 25378  	if c.ifNoneMatch_ != "" {
 25379  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 25380  	}
 25381  	var body io.Reader = nil
 25382  	c.urlParams_.Set("alt", alt)
 25383  	c.urlParams_.Set("prettyPrint", "false")
 25384  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
 25385  	urls += "?" + c.urlParams_.Encode()
 25386  	req, err := http.NewRequest("GET", urls, body)
 25387  	if err != nil {
 25388  		return nil, err
 25389  	}
 25390  	req.Header = reqHeaders
 25391  	googleapi.Expand(req.URL, map[string]string{
 25392  		"parent": c.parent,
 25393  	})
 25394  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 25395  }
 25396  
 25397  // Do executes the "logging.organizations.sinks.list" call.
 25398  // Any non-2xx status code is an error. Response headers are in either
 25399  // *ListSinksResponse.ServerResponse.Header or (if a response was returned at
 25400  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 25401  // check whether the returned error was because http.StatusNotModified was
 25402  // returned.
 25403  func (c *OrganizationsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
 25404  	gensupport.SetOptions(c.urlParams_, opts...)
 25405  	res, err := c.doRequest("json")
 25406  	if res != nil && res.StatusCode == http.StatusNotModified {
 25407  		if res.Body != nil {
 25408  			res.Body.Close()
 25409  		}
 25410  		return nil, gensupport.WrapError(&googleapi.Error{
 25411  			Code:   res.StatusCode,
 25412  			Header: res.Header,
 25413  		})
 25414  	}
 25415  	if err != nil {
 25416  		return nil, err
 25417  	}
 25418  	defer googleapi.CloseBody(res)
 25419  	if err := googleapi.CheckResponse(res); err != nil {
 25420  		return nil, gensupport.WrapError(err)
 25421  	}
 25422  	ret := &ListSinksResponse{
 25423  		ServerResponse: googleapi.ServerResponse{
 25424  			Header:         res.Header,
 25425  			HTTPStatusCode: res.StatusCode,
 25426  		},
 25427  	}
 25428  	target := &ret
 25429  	if err := gensupport.DecodeResponse(target, res); err != nil {
 25430  		return nil, err
 25431  	}
 25432  	return ret, nil
 25433  }
 25434  
 25435  // Pages invokes f for each page of results.
 25436  // A non-nil error returned from f will halt the iteration.
 25437  // The provided context supersedes any context provided to the Context method.
 25438  func (c *OrganizationsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
 25439  	c.ctx_ = ctx
 25440  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 25441  	for {
 25442  		x, err := c.Do()
 25443  		if err != nil {
 25444  			return err
 25445  		}
 25446  		if err := f(x); err != nil {
 25447  			return err
 25448  		}
 25449  		if x.NextPageToken == "" {
 25450  			return nil
 25451  		}
 25452  		c.PageToken(x.NextPageToken)
 25453  	}
 25454  }
 25455  
 25456  type OrganizationsSinksPatchCall struct {
 25457  	s          *Service
 25458  	sinkNameid string
 25459  	logsink    *LogSink
 25460  	urlParams_ gensupport.URLParams
 25461  	ctx_       context.Context
 25462  	header_    http.Header
 25463  }
 25464  
 25465  // Patch: Updates a sink. This method replaces the values of the destination
 25466  // and filter fields of the existing sink with the corresponding values from
 25467  // the new sink.The updated sink might also have a new writer_identity; see the
 25468  // unique_writer_identity field.
 25469  //
 25470  //   - sinkName: The full resource name of the sink to update, including the
 25471  //     parent resource and the sink identifier:
 25472  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 25473  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 25474  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 25475  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 25476  //     example:"projects/my-project/sinks/my-sink".
 25477  func (r *OrganizationsSinksService) Patch(sinkNameid string, logsink *LogSink) *OrganizationsSinksPatchCall {
 25478  	c := &OrganizationsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 25479  	c.sinkNameid = sinkNameid
 25480  	c.logsink = logsink
 25481  	return c
 25482  }
 25483  
 25484  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 25485  // service account provided by the caller that will be used to write the log
 25486  // entries. The format must be serviceAccount:some@email. This field can only
 25487  // be specified if you are routing logs to a destination outside this sink's
 25488  // project. If not specified, a Logging service account will automatically be
 25489  // generated.
 25490  func (c *OrganizationsSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksPatchCall {
 25491  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 25492  	return c
 25493  }
 25494  
 25495  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See
 25496  // sinks.create for a description of this field. When updating a sink, the
 25497  // effect of this field on the value of writer_identity in the updated sink
 25498  // depends on both the old and new values of this field: If the old and new
 25499  // values of this field are both false or both true, then there is no change to
 25500  // the sink's writer_identity. If the old value is false and the new value is
 25501  // true, then writer_identity is changed to a service agent
 25502  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 25503  // owned by Cloud Logging. It is an error if the old value is true and the new
 25504  // value is set to false or defaulted to false.
 25505  func (c *OrganizationsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksPatchCall {
 25506  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 25507  	return c
 25508  }
 25509  
 25510  // UpdateMask sets the optional parameter "updateMask": Field mask that
 25511  // specifies the fields in sink that need an update. A sink field will be
 25512  // overwritten if, and only if, it is in the update mask. name and output only
 25513  // fields cannot be updated.An empty updateMask is temporarily treated as using
 25514  // the following mask for backwards compatibility
 25515  // purposes:destination,filter,includeChildrenAt some point in the future,
 25516  // behavior will be removed and specifying an empty updateMask will be an
 25517  // error.For a detailed FieldMask definition, see
 25518  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 25519  // example: updateMask=filter
 25520  func (c *OrganizationsSinksPatchCall) UpdateMask(updateMask string) *OrganizationsSinksPatchCall {
 25521  	c.urlParams_.Set("updateMask", updateMask)
 25522  	return c
 25523  }
 25524  
 25525  // Fields allows partial responses to be retrieved. See
 25526  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 25527  // details.
 25528  func (c *OrganizationsSinksPatchCall) Fields(s ...googleapi.Field) *OrganizationsSinksPatchCall {
 25529  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 25530  	return c
 25531  }
 25532  
 25533  // Context sets the context to be used in this call's Do method.
 25534  func (c *OrganizationsSinksPatchCall) Context(ctx context.Context) *OrganizationsSinksPatchCall {
 25535  	c.ctx_ = ctx
 25536  	return c
 25537  }
 25538  
 25539  // Header returns a http.Header that can be modified by the caller to add
 25540  // headers to the request.
 25541  func (c *OrganizationsSinksPatchCall) Header() http.Header {
 25542  	if c.header_ == nil {
 25543  		c.header_ = make(http.Header)
 25544  	}
 25545  	return c.header_
 25546  }
 25547  
 25548  func (c *OrganizationsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
 25549  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 25550  	var body io.Reader = nil
 25551  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 25552  	if err != nil {
 25553  		return nil, err
 25554  	}
 25555  	c.urlParams_.Set("alt", alt)
 25556  	c.urlParams_.Set("prettyPrint", "false")
 25557  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 25558  	urls += "?" + c.urlParams_.Encode()
 25559  	req, err := http.NewRequest("PATCH", urls, body)
 25560  	if err != nil {
 25561  		return nil, err
 25562  	}
 25563  	req.Header = reqHeaders
 25564  	googleapi.Expand(req.URL, map[string]string{
 25565  		"sinkName": c.sinkNameid,
 25566  	})
 25567  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 25568  }
 25569  
 25570  // Do executes the "logging.organizations.sinks.patch" call.
 25571  // Any non-2xx status code is an error. Response headers are in either
 25572  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 25573  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 25574  // whether the returned error was because http.StatusNotModified was returned.
 25575  func (c *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 25576  	gensupport.SetOptions(c.urlParams_, opts...)
 25577  	res, err := c.doRequest("json")
 25578  	if res != nil && res.StatusCode == http.StatusNotModified {
 25579  		if res.Body != nil {
 25580  			res.Body.Close()
 25581  		}
 25582  		return nil, gensupport.WrapError(&googleapi.Error{
 25583  			Code:   res.StatusCode,
 25584  			Header: res.Header,
 25585  		})
 25586  	}
 25587  	if err != nil {
 25588  		return nil, err
 25589  	}
 25590  	defer googleapi.CloseBody(res)
 25591  	if err := googleapi.CheckResponse(res); err != nil {
 25592  		return nil, gensupport.WrapError(err)
 25593  	}
 25594  	ret := &LogSink{
 25595  		ServerResponse: googleapi.ServerResponse{
 25596  			Header:         res.Header,
 25597  			HTTPStatusCode: res.StatusCode,
 25598  		},
 25599  	}
 25600  	target := &ret
 25601  	if err := gensupport.DecodeResponse(target, res); err != nil {
 25602  		return nil, err
 25603  	}
 25604  	return ret, nil
 25605  }
 25606  
 25607  type OrganizationsSinksUpdateCall struct {
 25608  	s          *Service
 25609  	sinkNameid string
 25610  	logsink    *LogSink
 25611  	urlParams_ gensupport.URLParams
 25612  	ctx_       context.Context
 25613  	header_    http.Header
 25614  }
 25615  
 25616  // Update: Updates a sink. This method replaces the values of the destination
 25617  // and filter fields of the existing sink with the corresponding values from
 25618  // the new sink.The updated sink might also have a new writer_identity; see the
 25619  // unique_writer_identity field.
 25620  //
 25621  //   - sinkName: The full resource name of the sink to update, including the
 25622  //     parent resource and the sink identifier:
 25623  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 25624  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 25625  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 25626  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 25627  //     example:"projects/my-project/sinks/my-sink".
 25628  func (r *OrganizationsSinksService) Update(sinkNameid string, logsink *LogSink) *OrganizationsSinksUpdateCall {
 25629  	c := &OrganizationsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 25630  	c.sinkNameid = sinkNameid
 25631  	c.logsink = logsink
 25632  	return c
 25633  }
 25634  
 25635  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 25636  // service account provided by the caller that will be used to write the log
 25637  // entries. The format must be serviceAccount:some@email. This field can only
 25638  // be specified if you are routing logs to a destination outside this sink's
 25639  // project. If not specified, a Logging service account will automatically be
 25640  // generated.
 25641  func (c *OrganizationsSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksUpdateCall {
 25642  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 25643  	return c
 25644  }
 25645  
 25646  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See
 25647  // sinks.create for a description of this field. When updating a sink, the
 25648  // effect of this field on the value of writer_identity in the updated sink
 25649  // depends on both the old and new values of this field: If the old and new
 25650  // values of this field are both false or both true, then there is no change to
 25651  // the sink's writer_identity. If the old value is false and the new value is
 25652  // true, then writer_identity is changed to a service agent
 25653  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 25654  // owned by Cloud Logging. It is an error if the old value is true and the new
 25655  // value is set to false or defaulted to false.
 25656  func (c *OrganizationsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksUpdateCall {
 25657  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 25658  	return c
 25659  }
 25660  
 25661  // UpdateMask sets the optional parameter "updateMask": Field mask that
 25662  // specifies the fields in sink that need an update. A sink field will be
 25663  // overwritten if, and only if, it is in the update mask. name and output only
 25664  // fields cannot be updated.An empty updateMask is temporarily treated as using
 25665  // the following mask for backwards compatibility
 25666  // purposes:destination,filter,includeChildrenAt some point in the future,
 25667  // behavior will be removed and specifying an empty updateMask will be an
 25668  // error.For a detailed FieldMask definition, see
 25669  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 25670  // example: updateMask=filter
 25671  func (c *OrganizationsSinksUpdateCall) UpdateMask(updateMask string) *OrganizationsSinksUpdateCall {
 25672  	c.urlParams_.Set("updateMask", updateMask)
 25673  	return c
 25674  }
 25675  
 25676  // Fields allows partial responses to be retrieved. See
 25677  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 25678  // details.
 25679  func (c *OrganizationsSinksUpdateCall) Fields(s ...googleapi.Field) *OrganizationsSinksUpdateCall {
 25680  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 25681  	return c
 25682  }
 25683  
 25684  // Context sets the context to be used in this call's Do method.
 25685  func (c *OrganizationsSinksUpdateCall) Context(ctx context.Context) *OrganizationsSinksUpdateCall {
 25686  	c.ctx_ = ctx
 25687  	return c
 25688  }
 25689  
 25690  // Header returns a http.Header that can be modified by the caller to add
 25691  // headers to the request.
 25692  func (c *OrganizationsSinksUpdateCall) Header() http.Header {
 25693  	if c.header_ == nil {
 25694  		c.header_ = make(http.Header)
 25695  	}
 25696  	return c.header_
 25697  }
 25698  
 25699  func (c *OrganizationsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
 25700  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 25701  	var body io.Reader = nil
 25702  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 25703  	if err != nil {
 25704  		return nil, err
 25705  	}
 25706  	c.urlParams_.Set("alt", alt)
 25707  	c.urlParams_.Set("prettyPrint", "false")
 25708  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 25709  	urls += "?" + c.urlParams_.Encode()
 25710  	req, err := http.NewRequest("PUT", urls, body)
 25711  	if err != nil {
 25712  		return nil, err
 25713  	}
 25714  	req.Header = reqHeaders
 25715  	googleapi.Expand(req.URL, map[string]string{
 25716  		"sinkName": c.sinkNameid,
 25717  	})
 25718  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 25719  }
 25720  
 25721  // Do executes the "logging.organizations.sinks.update" call.
 25722  // Any non-2xx status code is an error. Response headers are in either
 25723  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 25724  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 25725  // whether the returned error was because http.StatusNotModified was returned.
 25726  func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 25727  	gensupport.SetOptions(c.urlParams_, opts...)
 25728  	res, err := c.doRequest("json")
 25729  	if res != nil && res.StatusCode == http.StatusNotModified {
 25730  		if res.Body != nil {
 25731  			res.Body.Close()
 25732  		}
 25733  		return nil, gensupport.WrapError(&googleapi.Error{
 25734  			Code:   res.StatusCode,
 25735  			Header: res.Header,
 25736  		})
 25737  	}
 25738  	if err != nil {
 25739  		return nil, err
 25740  	}
 25741  	defer googleapi.CloseBody(res)
 25742  	if err := googleapi.CheckResponse(res); err != nil {
 25743  		return nil, gensupport.WrapError(err)
 25744  	}
 25745  	ret := &LogSink{
 25746  		ServerResponse: googleapi.ServerResponse{
 25747  			Header:         res.Header,
 25748  			HTTPStatusCode: res.StatusCode,
 25749  		},
 25750  	}
 25751  	target := &ret
 25752  	if err := gensupport.DecodeResponse(target, res); err != nil {
 25753  		return nil, err
 25754  	}
 25755  	return ret, nil
 25756  }
 25757  
 25758  type ProjectsGetCmekSettingsCall struct {
 25759  	s            *Service
 25760  	name         string
 25761  	urlParams_   gensupport.URLParams
 25762  	ifNoneMatch_ string
 25763  	ctx_         context.Context
 25764  	header_      http.Header
 25765  }
 25766  
 25767  // GetCmekSettings: Gets the Logging CMEK settings for the given resource.Note:
 25768  // CMEK for the Log Router can be configured for Google Cloud projects,
 25769  // folders, organizations, and billing accounts. Once configured for an
 25770  // organization, it applies to all projects and folders in the Google Cloud
 25771  // organization.See Enabling CMEK for Log Router
 25772  // (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
 25773  // information.
 25774  //
 25775  //   - name: The resource for which to retrieve CMEK settings.
 25776  //     "projects/[PROJECT_ID]/cmekSettings"
 25777  //     "organizations/[ORGANIZATION_ID]/cmekSettings"
 25778  //     "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
 25779  //     "folders/[FOLDER_ID]/cmekSettings" For
 25780  //     example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router
 25781  //     can be configured for Google Cloud projects, folders, organizations, and
 25782  //     billing accounts. Once configured for an organization, it applies to all
 25783  //     projects and folders in the Google Cloud organization.
 25784  func (r *ProjectsService) GetCmekSettings(name string) *ProjectsGetCmekSettingsCall {
 25785  	c := &ProjectsGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 25786  	c.name = name
 25787  	return c
 25788  }
 25789  
 25790  // Fields allows partial responses to be retrieved. See
 25791  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 25792  // details.
 25793  func (c *ProjectsGetCmekSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetCmekSettingsCall {
 25794  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 25795  	return c
 25796  }
 25797  
 25798  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 25799  // object's ETag matches the given value. This is useful for getting updates
 25800  // only after the object has changed since the last request.
 25801  func (c *ProjectsGetCmekSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetCmekSettingsCall {
 25802  	c.ifNoneMatch_ = entityTag
 25803  	return c
 25804  }
 25805  
 25806  // Context sets the context to be used in this call's Do method.
 25807  func (c *ProjectsGetCmekSettingsCall) Context(ctx context.Context) *ProjectsGetCmekSettingsCall {
 25808  	c.ctx_ = ctx
 25809  	return c
 25810  }
 25811  
 25812  // Header returns a http.Header that can be modified by the caller to add
 25813  // headers to the request.
 25814  func (c *ProjectsGetCmekSettingsCall) Header() http.Header {
 25815  	if c.header_ == nil {
 25816  		c.header_ = make(http.Header)
 25817  	}
 25818  	return c.header_
 25819  }
 25820  
 25821  func (c *ProjectsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
 25822  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 25823  	if c.ifNoneMatch_ != "" {
 25824  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 25825  	}
 25826  	var body io.Reader = nil
 25827  	c.urlParams_.Set("alt", alt)
 25828  	c.urlParams_.Set("prettyPrint", "false")
 25829  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
 25830  	urls += "?" + c.urlParams_.Encode()
 25831  	req, err := http.NewRequest("GET", urls, body)
 25832  	if err != nil {
 25833  		return nil, err
 25834  	}
 25835  	req.Header = reqHeaders
 25836  	googleapi.Expand(req.URL, map[string]string{
 25837  		"name": c.name,
 25838  	})
 25839  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 25840  }
 25841  
 25842  // Do executes the "logging.projects.getCmekSettings" call.
 25843  // Any non-2xx status code is an error. Response headers are in either
 25844  // *CmekSettings.ServerResponse.Header or (if a response was returned at all)
 25845  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 25846  // whether the returned error was because http.StatusNotModified was returned.
 25847  func (c *ProjectsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
 25848  	gensupport.SetOptions(c.urlParams_, opts...)
 25849  	res, err := c.doRequest("json")
 25850  	if res != nil && res.StatusCode == http.StatusNotModified {
 25851  		if res.Body != nil {
 25852  			res.Body.Close()
 25853  		}
 25854  		return nil, gensupport.WrapError(&googleapi.Error{
 25855  			Code:   res.StatusCode,
 25856  			Header: res.Header,
 25857  		})
 25858  	}
 25859  	if err != nil {
 25860  		return nil, err
 25861  	}
 25862  	defer googleapi.CloseBody(res)
 25863  	if err := googleapi.CheckResponse(res); err != nil {
 25864  		return nil, gensupport.WrapError(err)
 25865  	}
 25866  	ret := &CmekSettings{
 25867  		ServerResponse: googleapi.ServerResponse{
 25868  			Header:         res.Header,
 25869  			HTTPStatusCode: res.StatusCode,
 25870  		},
 25871  	}
 25872  	target := &ret
 25873  	if err := gensupport.DecodeResponse(target, res); err != nil {
 25874  		return nil, err
 25875  	}
 25876  	return ret, nil
 25877  }
 25878  
 25879  type ProjectsGetSettingsCall struct {
 25880  	s            *Service
 25881  	name         string
 25882  	urlParams_   gensupport.URLParams
 25883  	ifNoneMatch_ string
 25884  	ctx_         context.Context
 25885  	header_      http.Header
 25886  }
 25887  
 25888  // GetSettings: Gets the settings for the given resource.Note: Settings can be
 25889  // retrieved for Google Cloud projects, folders, organizations, and billing
 25890  // accounts.See View default resource settings for Logging
 25891  // (https://cloud.google.com/logging/docs/default-settings#view-org-settings)
 25892  // for more information.
 25893  //
 25894  //   - name: The resource for which to retrieve settings.
 25895  //     "projects/[PROJECT_ID]/settings"
 25896  //     "organizations/[ORGANIZATION_ID]/settings"
 25897  //     "billingAccounts/[BILLING_ACCOUNT_ID]/settings"
 25898  //     "folders/[FOLDER_ID]/settings" For
 25899  //     example:"organizations/12345/settings"Note: Settings can be retrieved for
 25900  //     Google Cloud projects, folders, organizations, and billing accounts.
 25901  func (r *ProjectsService) GetSettings(name string) *ProjectsGetSettingsCall {
 25902  	c := &ProjectsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 25903  	c.name = name
 25904  	return c
 25905  }
 25906  
 25907  // Fields allows partial responses to be retrieved. See
 25908  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 25909  // details.
 25910  func (c *ProjectsGetSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetSettingsCall {
 25911  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 25912  	return c
 25913  }
 25914  
 25915  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 25916  // object's ETag matches the given value. This is useful for getting updates
 25917  // only after the object has changed since the last request.
 25918  func (c *ProjectsGetSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetSettingsCall {
 25919  	c.ifNoneMatch_ = entityTag
 25920  	return c
 25921  }
 25922  
 25923  // Context sets the context to be used in this call's Do method.
 25924  func (c *ProjectsGetSettingsCall) Context(ctx context.Context) *ProjectsGetSettingsCall {
 25925  	c.ctx_ = ctx
 25926  	return c
 25927  }
 25928  
 25929  // Header returns a http.Header that can be modified by the caller to add
 25930  // headers to the request.
 25931  func (c *ProjectsGetSettingsCall) Header() http.Header {
 25932  	if c.header_ == nil {
 25933  		c.header_ = make(http.Header)
 25934  	}
 25935  	return c.header_
 25936  }
 25937  
 25938  func (c *ProjectsGetSettingsCall) doRequest(alt string) (*http.Response, error) {
 25939  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 25940  	if c.ifNoneMatch_ != "" {
 25941  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 25942  	}
 25943  	var body io.Reader = nil
 25944  	c.urlParams_.Set("alt", alt)
 25945  	c.urlParams_.Set("prettyPrint", "false")
 25946  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
 25947  	urls += "?" + c.urlParams_.Encode()
 25948  	req, err := http.NewRequest("GET", urls, body)
 25949  	if err != nil {
 25950  		return nil, err
 25951  	}
 25952  	req.Header = reqHeaders
 25953  	googleapi.Expand(req.URL, map[string]string{
 25954  		"name": c.name,
 25955  	})
 25956  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 25957  }
 25958  
 25959  // Do executes the "logging.projects.getSettings" call.
 25960  // Any non-2xx status code is an error. Response headers are in either
 25961  // *Settings.ServerResponse.Header or (if a response was returned at all) in
 25962  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 25963  // whether the returned error was because http.StatusNotModified was returned.
 25964  func (c *ProjectsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
 25965  	gensupport.SetOptions(c.urlParams_, opts...)
 25966  	res, err := c.doRequest("json")
 25967  	if res != nil && res.StatusCode == http.StatusNotModified {
 25968  		if res.Body != nil {
 25969  			res.Body.Close()
 25970  		}
 25971  		return nil, gensupport.WrapError(&googleapi.Error{
 25972  			Code:   res.StatusCode,
 25973  			Header: res.Header,
 25974  		})
 25975  	}
 25976  	if err != nil {
 25977  		return nil, err
 25978  	}
 25979  	defer googleapi.CloseBody(res)
 25980  	if err := googleapi.CheckResponse(res); err != nil {
 25981  		return nil, gensupport.WrapError(err)
 25982  	}
 25983  	ret := &Settings{
 25984  		ServerResponse: googleapi.ServerResponse{
 25985  			Header:         res.Header,
 25986  			HTTPStatusCode: res.StatusCode,
 25987  		},
 25988  	}
 25989  	target := &ret
 25990  	if err := gensupport.DecodeResponse(target, res); err != nil {
 25991  		return nil, err
 25992  	}
 25993  	return ret, nil
 25994  }
 25995  
 25996  type ProjectsExclusionsCreateCall struct {
 25997  	s            *Service
 25998  	parent       string
 25999  	logexclusion *LogExclusion
 26000  	urlParams_   gensupport.URLParams
 26001  	ctx_         context.Context
 26002  	header_      http.Header
 26003  }
 26004  
 26005  // Create: Creates a new exclusion in the _Default sink in a specified parent
 26006  // resource. Only log entries belonging to that resource can be excluded. You
 26007  // can have up to 10 exclusions in a resource.
 26008  //
 26009  //   - parent: The parent resource in which to create the exclusion:
 26010  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 26011  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
 26012  //     examples:"projects/my-logging-project" "organizations/123456789".
 26013  func (r *ProjectsExclusionsService) Create(parent string, logexclusion *LogExclusion) *ProjectsExclusionsCreateCall {
 26014  	c := &ProjectsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 26015  	c.parent = parent
 26016  	c.logexclusion = logexclusion
 26017  	return c
 26018  }
 26019  
 26020  // Fields allows partial responses to be retrieved. See
 26021  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 26022  // details.
 26023  func (c *ProjectsExclusionsCreateCall) Fields(s ...googleapi.Field) *ProjectsExclusionsCreateCall {
 26024  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 26025  	return c
 26026  }
 26027  
 26028  // Context sets the context to be used in this call's Do method.
 26029  func (c *ProjectsExclusionsCreateCall) Context(ctx context.Context) *ProjectsExclusionsCreateCall {
 26030  	c.ctx_ = ctx
 26031  	return c
 26032  }
 26033  
 26034  // Header returns a http.Header that can be modified by the caller to add
 26035  // headers to the request.
 26036  func (c *ProjectsExclusionsCreateCall) Header() http.Header {
 26037  	if c.header_ == nil {
 26038  		c.header_ = make(http.Header)
 26039  	}
 26040  	return c.header_
 26041  }
 26042  
 26043  func (c *ProjectsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) {
 26044  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 26045  	var body io.Reader = nil
 26046  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
 26047  	if err != nil {
 26048  		return nil, err
 26049  	}
 26050  	c.urlParams_.Set("alt", alt)
 26051  	c.urlParams_.Set("prettyPrint", "false")
 26052  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
 26053  	urls += "?" + c.urlParams_.Encode()
 26054  	req, err := http.NewRequest("POST", urls, body)
 26055  	if err != nil {
 26056  		return nil, err
 26057  	}
 26058  	req.Header = reqHeaders
 26059  	googleapi.Expand(req.URL, map[string]string{
 26060  		"parent": c.parent,
 26061  	})
 26062  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 26063  }
 26064  
 26065  // Do executes the "logging.projects.exclusions.create" call.
 26066  // Any non-2xx status code is an error. Response headers are in either
 26067  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 26068  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 26069  // whether the returned error was because http.StatusNotModified was returned.
 26070  func (c *ProjectsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 26071  	gensupport.SetOptions(c.urlParams_, opts...)
 26072  	res, err := c.doRequest("json")
 26073  	if res != nil && res.StatusCode == http.StatusNotModified {
 26074  		if res.Body != nil {
 26075  			res.Body.Close()
 26076  		}
 26077  		return nil, gensupport.WrapError(&googleapi.Error{
 26078  			Code:   res.StatusCode,
 26079  			Header: res.Header,
 26080  		})
 26081  	}
 26082  	if err != nil {
 26083  		return nil, err
 26084  	}
 26085  	defer googleapi.CloseBody(res)
 26086  	if err := googleapi.CheckResponse(res); err != nil {
 26087  		return nil, gensupport.WrapError(err)
 26088  	}
 26089  	ret := &LogExclusion{
 26090  		ServerResponse: googleapi.ServerResponse{
 26091  			Header:         res.Header,
 26092  			HTTPStatusCode: res.StatusCode,
 26093  		},
 26094  	}
 26095  	target := &ret
 26096  	if err := gensupport.DecodeResponse(target, res); err != nil {
 26097  		return nil, err
 26098  	}
 26099  	return ret, nil
 26100  }
 26101  
 26102  type ProjectsExclusionsDeleteCall struct {
 26103  	s          *Service
 26104  	name       string
 26105  	urlParams_ gensupport.URLParams
 26106  	ctx_       context.Context
 26107  	header_    http.Header
 26108  }
 26109  
 26110  // Delete: Deletes an exclusion in the _Default sink.
 26111  //
 26112  //   - name: The resource name of an existing exclusion to delete:
 26113  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 26114  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 26115  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 26116  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 26117  //     example:"projects/my-project/exclusions/my-exclusion".
 26118  func (r *ProjectsExclusionsService) Delete(name string) *ProjectsExclusionsDeleteCall {
 26119  	c := &ProjectsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 26120  	c.name = name
 26121  	return c
 26122  }
 26123  
 26124  // Fields allows partial responses to be retrieved. See
 26125  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 26126  // details.
 26127  func (c *ProjectsExclusionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsExclusionsDeleteCall {
 26128  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 26129  	return c
 26130  }
 26131  
 26132  // Context sets the context to be used in this call's Do method.
 26133  func (c *ProjectsExclusionsDeleteCall) Context(ctx context.Context) *ProjectsExclusionsDeleteCall {
 26134  	c.ctx_ = ctx
 26135  	return c
 26136  }
 26137  
 26138  // Header returns a http.Header that can be modified by the caller to add
 26139  // headers to the request.
 26140  func (c *ProjectsExclusionsDeleteCall) Header() http.Header {
 26141  	if c.header_ == nil {
 26142  		c.header_ = make(http.Header)
 26143  	}
 26144  	return c.header_
 26145  }
 26146  
 26147  func (c *ProjectsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) {
 26148  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 26149  	var body io.Reader = nil
 26150  	c.urlParams_.Set("alt", alt)
 26151  	c.urlParams_.Set("prettyPrint", "false")
 26152  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 26153  	urls += "?" + c.urlParams_.Encode()
 26154  	req, err := http.NewRequest("DELETE", urls, body)
 26155  	if err != nil {
 26156  		return nil, err
 26157  	}
 26158  	req.Header = reqHeaders
 26159  	googleapi.Expand(req.URL, map[string]string{
 26160  		"name": c.name,
 26161  	})
 26162  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 26163  }
 26164  
 26165  // Do executes the "logging.projects.exclusions.delete" call.
 26166  // Any non-2xx status code is an error. Response headers are in either
 26167  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 26168  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 26169  // whether the returned error was because http.StatusNotModified was returned.
 26170  func (c *ProjectsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 26171  	gensupport.SetOptions(c.urlParams_, opts...)
 26172  	res, err := c.doRequest("json")
 26173  	if res != nil && res.StatusCode == http.StatusNotModified {
 26174  		if res.Body != nil {
 26175  			res.Body.Close()
 26176  		}
 26177  		return nil, gensupport.WrapError(&googleapi.Error{
 26178  			Code:   res.StatusCode,
 26179  			Header: res.Header,
 26180  		})
 26181  	}
 26182  	if err != nil {
 26183  		return nil, err
 26184  	}
 26185  	defer googleapi.CloseBody(res)
 26186  	if err := googleapi.CheckResponse(res); err != nil {
 26187  		return nil, gensupport.WrapError(err)
 26188  	}
 26189  	ret := &Empty{
 26190  		ServerResponse: googleapi.ServerResponse{
 26191  			Header:         res.Header,
 26192  			HTTPStatusCode: res.StatusCode,
 26193  		},
 26194  	}
 26195  	target := &ret
 26196  	if err := gensupport.DecodeResponse(target, res); err != nil {
 26197  		return nil, err
 26198  	}
 26199  	return ret, nil
 26200  }
 26201  
 26202  type ProjectsExclusionsGetCall struct {
 26203  	s            *Service
 26204  	name         string
 26205  	urlParams_   gensupport.URLParams
 26206  	ifNoneMatch_ string
 26207  	ctx_         context.Context
 26208  	header_      http.Header
 26209  }
 26210  
 26211  // Get: Gets the description of an exclusion in the _Default sink.
 26212  //
 26213  //   - name: The resource name of an existing exclusion:
 26214  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 26215  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 26216  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 26217  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 26218  //     example:"projects/my-project/exclusions/my-exclusion".
 26219  func (r *ProjectsExclusionsService) Get(name string) *ProjectsExclusionsGetCall {
 26220  	c := &ProjectsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 26221  	c.name = name
 26222  	return c
 26223  }
 26224  
 26225  // Fields allows partial responses to be retrieved. See
 26226  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 26227  // details.
 26228  func (c *ProjectsExclusionsGetCall) Fields(s ...googleapi.Field) *ProjectsExclusionsGetCall {
 26229  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 26230  	return c
 26231  }
 26232  
 26233  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 26234  // object's ETag matches the given value. This is useful for getting updates
 26235  // only after the object has changed since the last request.
 26236  func (c *ProjectsExclusionsGetCall) IfNoneMatch(entityTag string) *ProjectsExclusionsGetCall {
 26237  	c.ifNoneMatch_ = entityTag
 26238  	return c
 26239  }
 26240  
 26241  // Context sets the context to be used in this call's Do method.
 26242  func (c *ProjectsExclusionsGetCall) Context(ctx context.Context) *ProjectsExclusionsGetCall {
 26243  	c.ctx_ = ctx
 26244  	return c
 26245  }
 26246  
 26247  // Header returns a http.Header that can be modified by the caller to add
 26248  // headers to the request.
 26249  func (c *ProjectsExclusionsGetCall) Header() http.Header {
 26250  	if c.header_ == nil {
 26251  		c.header_ = make(http.Header)
 26252  	}
 26253  	return c.header_
 26254  }
 26255  
 26256  func (c *ProjectsExclusionsGetCall) doRequest(alt string) (*http.Response, error) {
 26257  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 26258  	if c.ifNoneMatch_ != "" {
 26259  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 26260  	}
 26261  	var body io.Reader = nil
 26262  	c.urlParams_.Set("alt", alt)
 26263  	c.urlParams_.Set("prettyPrint", "false")
 26264  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 26265  	urls += "?" + c.urlParams_.Encode()
 26266  	req, err := http.NewRequest("GET", urls, body)
 26267  	if err != nil {
 26268  		return nil, err
 26269  	}
 26270  	req.Header = reqHeaders
 26271  	googleapi.Expand(req.URL, map[string]string{
 26272  		"name": c.name,
 26273  	})
 26274  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 26275  }
 26276  
 26277  // Do executes the "logging.projects.exclusions.get" call.
 26278  // Any non-2xx status code is an error. Response headers are in either
 26279  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 26280  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 26281  // whether the returned error was because http.StatusNotModified was returned.
 26282  func (c *ProjectsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 26283  	gensupport.SetOptions(c.urlParams_, opts...)
 26284  	res, err := c.doRequest("json")
 26285  	if res != nil && res.StatusCode == http.StatusNotModified {
 26286  		if res.Body != nil {
 26287  			res.Body.Close()
 26288  		}
 26289  		return nil, gensupport.WrapError(&googleapi.Error{
 26290  			Code:   res.StatusCode,
 26291  			Header: res.Header,
 26292  		})
 26293  	}
 26294  	if err != nil {
 26295  		return nil, err
 26296  	}
 26297  	defer googleapi.CloseBody(res)
 26298  	if err := googleapi.CheckResponse(res); err != nil {
 26299  		return nil, gensupport.WrapError(err)
 26300  	}
 26301  	ret := &LogExclusion{
 26302  		ServerResponse: googleapi.ServerResponse{
 26303  			Header:         res.Header,
 26304  			HTTPStatusCode: res.StatusCode,
 26305  		},
 26306  	}
 26307  	target := &ret
 26308  	if err := gensupport.DecodeResponse(target, res); err != nil {
 26309  		return nil, err
 26310  	}
 26311  	return ret, nil
 26312  }
 26313  
 26314  type ProjectsExclusionsListCall struct {
 26315  	s            *Service
 26316  	parent       string
 26317  	urlParams_   gensupport.URLParams
 26318  	ifNoneMatch_ string
 26319  	ctx_         context.Context
 26320  	header_      http.Header
 26321  }
 26322  
 26323  // List: Lists all the exclusions on the _Default sink in a parent resource.
 26324  //
 26325  //   - parent: The parent resource whose exclusions are to be listed.
 26326  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 26327  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
 26328  func (r *ProjectsExclusionsService) List(parent string) *ProjectsExclusionsListCall {
 26329  	c := &ProjectsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 26330  	c.parent = parent
 26331  	return c
 26332  }
 26333  
 26334  // PageSize sets the optional parameter "pageSize": The maximum number of
 26335  // results to return from this request. Non-positive values are ignored. The
 26336  // presence of nextPageToken in the response indicates that more results might
 26337  // be available.
 26338  func (c *ProjectsExclusionsListCall) PageSize(pageSize int64) *ProjectsExclusionsListCall {
 26339  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 26340  	return c
 26341  }
 26342  
 26343  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 26344  // the next batch of results from the preceding call to this method. pageToken
 26345  // must be the value of nextPageToken from the previous response. The values of
 26346  // other method parameters should be identical to those in the previous call.
 26347  func (c *ProjectsExclusionsListCall) PageToken(pageToken string) *ProjectsExclusionsListCall {
 26348  	c.urlParams_.Set("pageToken", pageToken)
 26349  	return c
 26350  }
 26351  
 26352  // Fields allows partial responses to be retrieved. See
 26353  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 26354  // details.
 26355  func (c *ProjectsExclusionsListCall) Fields(s ...googleapi.Field) *ProjectsExclusionsListCall {
 26356  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 26357  	return c
 26358  }
 26359  
 26360  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 26361  // object's ETag matches the given value. This is useful for getting updates
 26362  // only after the object has changed since the last request.
 26363  func (c *ProjectsExclusionsListCall) IfNoneMatch(entityTag string) *ProjectsExclusionsListCall {
 26364  	c.ifNoneMatch_ = entityTag
 26365  	return c
 26366  }
 26367  
 26368  // Context sets the context to be used in this call's Do method.
 26369  func (c *ProjectsExclusionsListCall) Context(ctx context.Context) *ProjectsExclusionsListCall {
 26370  	c.ctx_ = ctx
 26371  	return c
 26372  }
 26373  
 26374  // Header returns a http.Header that can be modified by the caller to add
 26375  // headers to the request.
 26376  func (c *ProjectsExclusionsListCall) Header() http.Header {
 26377  	if c.header_ == nil {
 26378  		c.header_ = make(http.Header)
 26379  	}
 26380  	return c.header_
 26381  }
 26382  
 26383  func (c *ProjectsExclusionsListCall) doRequest(alt string) (*http.Response, error) {
 26384  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 26385  	if c.ifNoneMatch_ != "" {
 26386  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 26387  	}
 26388  	var body io.Reader = nil
 26389  	c.urlParams_.Set("alt", alt)
 26390  	c.urlParams_.Set("prettyPrint", "false")
 26391  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions")
 26392  	urls += "?" + c.urlParams_.Encode()
 26393  	req, err := http.NewRequest("GET", urls, body)
 26394  	if err != nil {
 26395  		return nil, err
 26396  	}
 26397  	req.Header = reqHeaders
 26398  	googleapi.Expand(req.URL, map[string]string{
 26399  		"parent": c.parent,
 26400  	})
 26401  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 26402  }
 26403  
 26404  // Do executes the "logging.projects.exclusions.list" call.
 26405  // Any non-2xx status code is an error. Response headers are in either
 26406  // *ListExclusionsResponse.ServerResponse.Header or (if a response was returned
 26407  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 26408  // check whether the returned error was because http.StatusNotModified was
 26409  // returned.
 26410  func (c *ProjectsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) {
 26411  	gensupport.SetOptions(c.urlParams_, opts...)
 26412  	res, err := c.doRequest("json")
 26413  	if res != nil && res.StatusCode == http.StatusNotModified {
 26414  		if res.Body != nil {
 26415  			res.Body.Close()
 26416  		}
 26417  		return nil, gensupport.WrapError(&googleapi.Error{
 26418  			Code:   res.StatusCode,
 26419  			Header: res.Header,
 26420  		})
 26421  	}
 26422  	if err != nil {
 26423  		return nil, err
 26424  	}
 26425  	defer googleapi.CloseBody(res)
 26426  	if err := googleapi.CheckResponse(res); err != nil {
 26427  		return nil, gensupport.WrapError(err)
 26428  	}
 26429  	ret := &ListExclusionsResponse{
 26430  		ServerResponse: googleapi.ServerResponse{
 26431  			Header:         res.Header,
 26432  			HTTPStatusCode: res.StatusCode,
 26433  		},
 26434  	}
 26435  	target := &ret
 26436  	if err := gensupport.DecodeResponse(target, res); err != nil {
 26437  		return nil, err
 26438  	}
 26439  	return ret, nil
 26440  }
 26441  
 26442  // Pages invokes f for each page of results.
 26443  // A non-nil error returned from f will halt the iteration.
 26444  // The provided context supersedes any context provided to the Context method.
 26445  func (c *ProjectsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error {
 26446  	c.ctx_ = ctx
 26447  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 26448  	for {
 26449  		x, err := c.Do()
 26450  		if err != nil {
 26451  			return err
 26452  		}
 26453  		if err := f(x); err != nil {
 26454  			return err
 26455  		}
 26456  		if x.NextPageToken == "" {
 26457  			return nil
 26458  		}
 26459  		c.PageToken(x.NextPageToken)
 26460  	}
 26461  }
 26462  
 26463  type ProjectsExclusionsPatchCall struct {
 26464  	s            *Service
 26465  	name         string
 26466  	logexclusion *LogExclusion
 26467  	urlParams_   gensupport.URLParams
 26468  	ctx_         context.Context
 26469  	header_      http.Header
 26470  }
 26471  
 26472  // Patch: Changes one or more properties of an existing exclusion in the
 26473  // _Default sink.
 26474  //
 26475  //   - name: The resource name of the exclusion to update:
 26476  //     "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
 26477  //     "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
 26478  //     "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
 26479  //     "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For
 26480  //     example:"projects/my-project/exclusions/my-exclusion".
 26481  func (r *ProjectsExclusionsService) Patch(name string, logexclusion *LogExclusion) *ProjectsExclusionsPatchCall {
 26482  	c := &ProjectsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 26483  	c.name = name
 26484  	c.logexclusion = logexclusion
 26485  	return c
 26486  }
 26487  
 26488  // UpdateMask sets the optional parameter "updateMask": Required. A non-empty
 26489  // list of fields to change in the existing exclusion. New values for the
 26490  // fields are taken from the corresponding fields in the LogExclusion included
 26491  // in this request. Fields not mentioned in update_mask are not changed and are
 26492  // ignored in the request.For example, to change the filter and description of
 26493  // an exclusion, specify an update_mask of "filter,description".
 26494  func (c *ProjectsExclusionsPatchCall) UpdateMask(updateMask string) *ProjectsExclusionsPatchCall {
 26495  	c.urlParams_.Set("updateMask", updateMask)
 26496  	return c
 26497  }
 26498  
 26499  // Fields allows partial responses to be retrieved. See
 26500  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 26501  // details.
 26502  func (c *ProjectsExclusionsPatchCall) Fields(s ...googleapi.Field) *ProjectsExclusionsPatchCall {
 26503  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 26504  	return c
 26505  }
 26506  
 26507  // Context sets the context to be used in this call's Do method.
 26508  func (c *ProjectsExclusionsPatchCall) Context(ctx context.Context) *ProjectsExclusionsPatchCall {
 26509  	c.ctx_ = ctx
 26510  	return c
 26511  }
 26512  
 26513  // Header returns a http.Header that can be modified by the caller to add
 26514  // headers to the request.
 26515  func (c *ProjectsExclusionsPatchCall) Header() http.Header {
 26516  	if c.header_ == nil {
 26517  		c.header_ = make(http.Header)
 26518  	}
 26519  	return c.header_
 26520  }
 26521  
 26522  func (c *ProjectsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) {
 26523  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 26524  	var body io.Reader = nil
 26525  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion)
 26526  	if err != nil {
 26527  		return nil, err
 26528  	}
 26529  	c.urlParams_.Set("alt", alt)
 26530  	c.urlParams_.Set("prettyPrint", "false")
 26531  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 26532  	urls += "?" + c.urlParams_.Encode()
 26533  	req, err := http.NewRequest("PATCH", urls, body)
 26534  	if err != nil {
 26535  		return nil, err
 26536  	}
 26537  	req.Header = reqHeaders
 26538  	googleapi.Expand(req.URL, map[string]string{
 26539  		"name": c.name,
 26540  	})
 26541  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 26542  }
 26543  
 26544  // Do executes the "logging.projects.exclusions.patch" call.
 26545  // Any non-2xx status code is an error. Response headers are in either
 26546  // *LogExclusion.ServerResponse.Header or (if a response was returned at all)
 26547  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 26548  // whether the returned error was because http.StatusNotModified was returned.
 26549  func (c *ProjectsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) {
 26550  	gensupport.SetOptions(c.urlParams_, opts...)
 26551  	res, err := c.doRequest("json")
 26552  	if res != nil && res.StatusCode == http.StatusNotModified {
 26553  		if res.Body != nil {
 26554  			res.Body.Close()
 26555  		}
 26556  		return nil, gensupport.WrapError(&googleapi.Error{
 26557  			Code:   res.StatusCode,
 26558  			Header: res.Header,
 26559  		})
 26560  	}
 26561  	if err != nil {
 26562  		return nil, err
 26563  	}
 26564  	defer googleapi.CloseBody(res)
 26565  	if err := googleapi.CheckResponse(res); err != nil {
 26566  		return nil, gensupport.WrapError(err)
 26567  	}
 26568  	ret := &LogExclusion{
 26569  		ServerResponse: googleapi.ServerResponse{
 26570  			Header:         res.Header,
 26571  			HTTPStatusCode: res.StatusCode,
 26572  		},
 26573  	}
 26574  	target := &ret
 26575  	if err := gensupport.DecodeResponse(target, res); err != nil {
 26576  		return nil, err
 26577  	}
 26578  	return ret, nil
 26579  }
 26580  
 26581  type ProjectsLocationsGetCall struct {
 26582  	s            *Service
 26583  	name         string
 26584  	urlParams_   gensupport.URLParams
 26585  	ifNoneMatch_ string
 26586  	ctx_         context.Context
 26587  	header_      http.Header
 26588  }
 26589  
 26590  // Get: Gets information about a location.
 26591  //
 26592  // - name: Resource name for the location.
 26593  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
 26594  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 26595  	c.name = name
 26596  	return c
 26597  }
 26598  
 26599  // Fields allows partial responses to be retrieved. See
 26600  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 26601  // details.
 26602  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
 26603  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 26604  	return c
 26605  }
 26606  
 26607  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 26608  // object's ETag matches the given value. This is useful for getting updates
 26609  // only after the object has changed since the last request.
 26610  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
 26611  	c.ifNoneMatch_ = entityTag
 26612  	return c
 26613  }
 26614  
 26615  // Context sets the context to be used in this call's Do method.
 26616  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
 26617  	c.ctx_ = ctx
 26618  	return c
 26619  }
 26620  
 26621  // Header returns a http.Header that can be modified by the caller to add
 26622  // headers to the request.
 26623  func (c *ProjectsLocationsGetCall) Header() http.Header {
 26624  	if c.header_ == nil {
 26625  		c.header_ = make(http.Header)
 26626  	}
 26627  	return c.header_
 26628  }
 26629  
 26630  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
 26631  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 26632  	if c.ifNoneMatch_ != "" {
 26633  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 26634  	}
 26635  	var body io.Reader = nil
 26636  	c.urlParams_.Set("alt", alt)
 26637  	c.urlParams_.Set("prettyPrint", "false")
 26638  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 26639  	urls += "?" + c.urlParams_.Encode()
 26640  	req, err := http.NewRequest("GET", urls, body)
 26641  	if err != nil {
 26642  		return nil, err
 26643  	}
 26644  	req.Header = reqHeaders
 26645  	googleapi.Expand(req.URL, map[string]string{
 26646  		"name": c.name,
 26647  	})
 26648  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 26649  }
 26650  
 26651  // Do executes the "logging.projects.locations.get" call.
 26652  // Any non-2xx status code is an error. Response headers are in either
 26653  // *Location.ServerResponse.Header or (if a response was returned at all) in
 26654  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 26655  // whether the returned error was because http.StatusNotModified was returned.
 26656  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
 26657  	gensupport.SetOptions(c.urlParams_, opts...)
 26658  	res, err := c.doRequest("json")
 26659  	if res != nil && res.StatusCode == http.StatusNotModified {
 26660  		if res.Body != nil {
 26661  			res.Body.Close()
 26662  		}
 26663  		return nil, gensupport.WrapError(&googleapi.Error{
 26664  			Code:   res.StatusCode,
 26665  			Header: res.Header,
 26666  		})
 26667  	}
 26668  	if err != nil {
 26669  		return nil, err
 26670  	}
 26671  	defer googleapi.CloseBody(res)
 26672  	if err := googleapi.CheckResponse(res); err != nil {
 26673  		return nil, gensupport.WrapError(err)
 26674  	}
 26675  	ret := &Location{
 26676  		ServerResponse: googleapi.ServerResponse{
 26677  			Header:         res.Header,
 26678  			HTTPStatusCode: res.StatusCode,
 26679  		},
 26680  	}
 26681  	target := &ret
 26682  	if err := gensupport.DecodeResponse(target, res); err != nil {
 26683  		return nil, err
 26684  	}
 26685  	return ret, nil
 26686  }
 26687  
 26688  type ProjectsLocationsListCall struct {
 26689  	s            *Service
 26690  	name         string
 26691  	urlParams_   gensupport.URLParams
 26692  	ifNoneMatch_ string
 26693  	ctx_         context.Context
 26694  	header_      http.Header
 26695  }
 26696  
 26697  // List: Lists information about the supported locations for this service.
 26698  //
 26699  // - name: The resource that owns the locations collection, if applicable.
 26700  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
 26701  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 26702  	c.name = name
 26703  	return c
 26704  }
 26705  
 26706  // Filter sets the optional parameter "filter": A filter to narrow down results
 26707  // to a preferred subset. The filtering language accepts strings like
 26708  // "displayName=tokyo", and is documented in more detail in AIP-160
 26709  // (https://google.aip.dev/160).
 26710  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
 26711  	c.urlParams_.Set("filter", filter)
 26712  	return c
 26713  }
 26714  
 26715  // PageSize sets the optional parameter "pageSize": The maximum number of
 26716  // results to return. If not set, the service selects a default.
 26717  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
 26718  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 26719  	return c
 26720  }
 26721  
 26722  // PageToken sets the optional parameter "pageToken": A page token received
 26723  // from the next_page_token field in the response. Send that page token to
 26724  // receive the subsequent page.
 26725  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
 26726  	c.urlParams_.Set("pageToken", pageToken)
 26727  	return c
 26728  }
 26729  
 26730  // Fields allows partial responses to be retrieved. See
 26731  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 26732  // details.
 26733  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
 26734  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 26735  	return c
 26736  }
 26737  
 26738  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 26739  // object's ETag matches the given value. This is useful for getting updates
 26740  // only after the object has changed since the last request.
 26741  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
 26742  	c.ifNoneMatch_ = entityTag
 26743  	return c
 26744  }
 26745  
 26746  // Context sets the context to be used in this call's Do method.
 26747  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
 26748  	c.ctx_ = ctx
 26749  	return c
 26750  }
 26751  
 26752  // Header returns a http.Header that can be modified by the caller to add
 26753  // headers to the request.
 26754  func (c *ProjectsLocationsListCall) Header() http.Header {
 26755  	if c.header_ == nil {
 26756  		c.header_ = make(http.Header)
 26757  	}
 26758  	return c.header_
 26759  }
 26760  
 26761  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
 26762  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 26763  	if c.ifNoneMatch_ != "" {
 26764  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 26765  	}
 26766  	var body io.Reader = nil
 26767  	c.urlParams_.Set("alt", alt)
 26768  	c.urlParams_.Set("prettyPrint", "false")
 26769  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
 26770  	urls += "?" + c.urlParams_.Encode()
 26771  	req, err := http.NewRequest("GET", urls, body)
 26772  	if err != nil {
 26773  		return nil, err
 26774  	}
 26775  	req.Header = reqHeaders
 26776  	googleapi.Expand(req.URL, map[string]string{
 26777  		"name": c.name,
 26778  	})
 26779  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 26780  }
 26781  
 26782  // Do executes the "logging.projects.locations.list" call.
 26783  // Any non-2xx status code is an error. Response headers are in either
 26784  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
 26785  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 26786  // check whether the returned error was because http.StatusNotModified was
 26787  // returned.
 26788  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
 26789  	gensupport.SetOptions(c.urlParams_, opts...)
 26790  	res, err := c.doRequest("json")
 26791  	if res != nil && res.StatusCode == http.StatusNotModified {
 26792  		if res.Body != nil {
 26793  			res.Body.Close()
 26794  		}
 26795  		return nil, gensupport.WrapError(&googleapi.Error{
 26796  			Code:   res.StatusCode,
 26797  			Header: res.Header,
 26798  		})
 26799  	}
 26800  	if err != nil {
 26801  		return nil, err
 26802  	}
 26803  	defer googleapi.CloseBody(res)
 26804  	if err := googleapi.CheckResponse(res); err != nil {
 26805  		return nil, gensupport.WrapError(err)
 26806  	}
 26807  	ret := &ListLocationsResponse{
 26808  		ServerResponse: googleapi.ServerResponse{
 26809  			Header:         res.Header,
 26810  			HTTPStatusCode: res.StatusCode,
 26811  		},
 26812  	}
 26813  	target := &ret
 26814  	if err := gensupport.DecodeResponse(target, res); err != nil {
 26815  		return nil, err
 26816  	}
 26817  	return ret, nil
 26818  }
 26819  
 26820  // Pages invokes f for each page of results.
 26821  // A non-nil error returned from f will halt the iteration.
 26822  // The provided context supersedes any context provided to the Context method.
 26823  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
 26824  	c.ctx_ = ctx
 26825  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 26826  	for {
 26827  		x, err := c.Do()
 26828  		if err != nil {
 26829  			return err
 26830  		}
 26831  		if err := f(x); err != nil {
 26832  			return err
 26833  		}
 26834  		if x.NextPageToken == "" {
 26835  			return nil
 26836  		}
 26837  		c.PageToken(x.NextPageToken)
 26838  	}
 26839  }
 26840  
 26841  type ProjectsLocationsBucketsCreateCall struct {
 26842  	s          *Service
 26843  	parent     string
 26844  	logbucket  *LogBucket
 26845  	urlParams_ gensupport.URLParams
 26846  	ctx_       context.Context
 26847  	header_    http.Header
 26848  }
 26849  
 26850  // Create: Creates a log bucket that can be used to store log entries. After a
 26851  // bucket has been created, the bucket's location cannot be changed.
 26852  //
 26853  //   - parent: The resource in which to create the log bucket:
 26854  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
 26855  //     example:"projects/my-project/locations/global".
 26856  func (r *ProjectsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *ProjectsLocationsBucketsCreateCall {
 26857  	c := &ProjectsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 26858  	c.parent = parent
 26859  	c.logbucket = logbucket
 26860  	return c
 26861  }
 26862  
 26863  // BucketId sets the optional parameter "bucketId": Required. A client-assigned
 26864  // identifier such as "my-bucket". Identifiers are limited to 100 characters
 26865  // and can include only letters, digits, underscores, hyphens, and periods.
 26866  // Bucket identifiers must start with an alphanumeric character.
 26867  func (c *ProjectsLocationsBucketsCreateCall) BucketId(bucketId string) *ProjectsLocationsBucketsCreateCall {
 26868  	c.urlParams_.Set("bucketId", bucketId)
 26869  	return c
 26870  }
 26871  
 26872  // Fields allows partial responses to be retrieved. See
 26873  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 26874  // details.
 26875  func (c *ProjectsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsCreateCall {
 26876  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 26877  	return c
 26878  }
 26879  
 26880  // Context sets the context to be used in this call's Do method.
 26881  func (c *ProjectsLocationsBucketsCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsCreateCall {
 26882  	c.ctx_ = ctx
 26883  	return c
 26884  }
 26885  
 26886  // Header returns a http.Header that can be modified by the caller to add
 26887  // headers to the request.
 26888  func (c *ProjectsLocationsBucketsCreateCall) Header() http.Header {
 26889  	if c.header_ == nil {
 26890  		c.header_ = make(http.Header)
 26891  	}
 26892  	return c.header_
 26893  }
 26894  
 26895  func (c *ProjectsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) {
 26896  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 26897  	var body io.Reader = nil
 26898  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 26899  	if err != nil {
 26900  		return nil, err
 26901  	}
 26902  	c.urlParams_.Set("alt", alt)
 26903  	c.urlParams_.Set("prettyPrint", "false")
 26904  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
 26905  	urls += "?" + c.urlParams_.Encode()
 26906  	req, err := http.NewRequest("POST", urls, body)
 26907  	if err != nil {
 26908  		return nil, err
 26909  	}
 26910  	req.Header = reqHeaders
 26911  	googleapi.Expand(req.URL, map[string]string{
 26912  		"parent": c.parent,
 26913  	})
 26914  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 26915  }
 26916  
 26917  // Do executes the "logging.projects.locations.buckets.create" call.
 26918  // Any non-2xx status code is an error. Response headers are in either
 26919  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 26920  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 26921  // whether the returned error was because http.StatusNotModified was returned.
 26922  func (c *ProjectsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 26923  	gensupport.SetOptions(c.urlParams_, opts...)
 26924  	res, err := c.doRequest("json")
 26925  	if res != nil && res.StatusCode == http.StatusNotModified {
 26926  		if res.Body != nil {
 26927  			res.Body.Close()
 26928  		}
 26929  		return nil, gensupport.WrapError(&googleapi.Error{
 26930  			Code:   res.StatusCode,
 26931  			Header: res.Header,
 26932  		})
 26933  	}
 26934  	if err != nil {
 26935  		return nil, err
 26936  	}
 26937  	defer googleapi.CloseBody(res)
 26938  	if err := googleapi.CheckResponse(res); err != nil {
 26939  		return nil, gensupport.WrapError(err)
 26940  	}
 26941  	ret := &LogBucket{
 26942  		ServerResponse: googleapi.ServerResponse{
 26943  			Header:         res.Header,
 26944  			HTTPStatusCode: res.StatusCode,
 26945  		},
 26946  	}
 26947  	target := &ret
 26948  	if err := gensupport.DecodeResponse(target, res); err != nil {
 26949  		return nil, err
 26950  	}
 26951  	return ret, nil
 26952  }
 26953  
 26954  type ProjectsLocationsBucketsCreateAsyncCall struct {
 26955  	s          *Service
 26956  	parent     string
 26957  	logbucket  *LogBucket
 26958  	urlParams_ gensupport.URLParams
 26959  	ctx_       context.Context
 26960  	header_    http.Header
 26961  }
 26962  
 26963  // CreateAsync: Creates a log bucket asynchronously that can be used to store
 26964  // log entries.After a bucket has been created, the bucket's location cannot be
 26965  // changed.
 26966  //
 26967  //   - parent: The resource in which to create the log bucket:
 26968  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For
 26969  //     example:"projects/my-project/locations/global".
 26970  func (r *ProjectsLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *ProjectsLocationsBucketsCreateAsyncCall {
 26971  	c := &ProjectsLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 26972  	c.parent = parent
 26973  	c.logbucket = logbucket
 26974  	return c
 26975  }
 26976  
 26977  // BucketId sets the optional parameter "bucketId": Required. A client-assigned
 26978  // identifier such as "my-bucket". Identifiers are limited to 100 characters
 26979  // and can include only letters, digits, underscores, hyphens, and periods.
 26980  // Bucket identifiers must start with an alphanumeric character.
 26981  func (c *ProjectsLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *ProjectsLocationsBucketsCreateAsyncCall {
 26982  	c.urlParams_.Set("bucketId", bucketId)
 26983  	return c
 26984  }
 26985  
 26986  // Fields allows partial responses to be retrieved. See
 26987  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 26988  // details.
 26989  func (c *ProjectsLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsCreateAsyncCall {
 26990  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 26991  	return c
 26992  }
 26993  
 26994  // Context sets the context to be used in this call's Do method.
 26995  func (c *ProjectsLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *ProjectsLocationsBucketsCreateAsyncCall {
 26996  	c.ctx_ = ctx
 26997  	return c
 26998  }
 26999  
 27000  // Header returns a http.Header that can be modified by the caller to add
 27001  // headers to the request.
 27002  func (c *ProjectsLocationsBucketsCreateAsyncCall) Header() http.Header {
 27003  	if c.header_ == nil {
 27004  		c.header_ = make(http.Header)
 27005  	}
 27006  	return c.header_
 27007  }
 27008  
 27009  func (c *ProjectsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) {
 27010  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 27011  	var body io.Reader = nil
 27012  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 27013  	if err != nil {
 27014  		return nil, err
 27015  	}
 27016  	c.urlParams_.Set("alt", alt)
 27017  	c.urlParams_.Set("prettyPrint", "false")
 27018  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync")
 27019  	urls += "?" + c.urlParams_.Encode()
 27020  	req, err := http.NewRequest("POST", urls, body)
 27021  	if err != nil {
 27022  		return nil, err
 27023  	}
 27024  	req.Header = reqHeaders
 27025  	googleapi.Expand(req.URL, map[string]string{
 27026  		"parent": c.parent,
 27027  	})
 27028  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 27029  }
 27030  
 27031  // Do executes the "logging.projects.locations.buckets.createAsync" call.
 27032  // Any non-2xx status code is an error. Response headers are in either
 27033  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 27034  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 27035  // whether the returned error was because http.StatusNotModified was returned.
 27036  func (c *ProjectsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 27037  	gensupport.SetOptions(c.urlParams_, opts...)
 27038  	res, err := c.doRequest("json")
 27039  	if res != nil && res.StatusCode == http.StatusNotModified {
 27040  		if res.Body != nil {
 27041  			res.Body.Close()
 27042  		}
 27043  		return nil, gensupport.WrapError(&googleapi.Error{
 27044  			Code:   res.StatusCode,
 27045  			Header: res.Header,
 27046  		})
 27047  	}
 27048  	if err != nil {
 27049  		return nil, err
 27050  	}
 27051  	defer googleapi.CloseBody(res)
 27052  	if err := googleapi.CheckResponse(res); err != nil {
 27053  		return nil, gensupport.WrapError(err)
 27054  	}
 27055  	ret := &Operation{
 27056  		ServerResponse: googleapi.ServerResponse{
 27057  			Header:         res.Header,
 27058  			HTTPStatusCode: res.StatusCode,
 27059  		},
 27060  	}
 27061  	target := &ret
 27062  	if err := gensupport.DecodeResponse(target, res); err != nil {
 27063  		return nil, err
 27064  	}
 27065  	return ret, nil
 27066  }
 27067  
 27068  type ProjectsLocationsBucketsDeleteCall struct {
 27069  	s          *Service
 27070  	name       string
 27071  	urlParams_ gensupport.URLParams
 27072  	ctx_       context.Context
 27073  	header_    http.Header
 27074  }
 27075  
 27076  // Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the
 27077  // DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log
 27078  // entries in the bucket will be permanently deleted.
 27079  //
 27080  //   - name: The full resource name of the bucket to delete.
 27081  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27082  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 27083  //     ]"
 27084  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 27085  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27086  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 27087  func (r *ProjectsLocationsBucketsService) Delete(name string) *ProjectsLocationsBucketsDeleteCall {
 27088  	c := &ProjectsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 27089  	c.name = name
 27090  	return c
 27091  }
 27092  
 27093  // Fields allows partial responses to be retrieved. See
 27094  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 27095  // details.
 27096  func (c *ProjectsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsDeleteCall {
 27097  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 27098  	return c
 27099  }
 27100  
 27101  // Context sets the context to be used in this call's Do method.
 27102  func (c *ProjectsLocationsBucketsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsDeleteCall {
 27103  	c.ctx_ = ctx
 27104  	return c
 27105  }
 27106  
 27107  // Header returns a http.Header that can be modified by the caller to add
 27108  // headers to the request.
 27109  func (c *ProjectsLocationsBucketsDeleteCall) Header() http.Header {
 27110  	if c.header_ == nil {
 27111  		c.header_ = make(http.Header)
 27112  	}
 27113  	return c.header_
 27114  }
 27115  
 27116  func (c *ProjectsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
 27117  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 27118  	var body io.Reader = nil
 27119  	c.urlParams_.Set("alt", alt)
 27120  	c.urlParams_.Set("prettyPrint", "false")
 27121  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 27122  	urls += "?" + c.urlParams_.Encode()
 27123  	req, err := http.NewRequest("DELETE", urls, body)
 27124  	if err != nil {
 27125  		return nil, err
 27126  	}
 27127  	req.Header = reqHeaders
 27128  	googleapi.Expand(req.URL, map[string]string{
 27129  		"name": c.name,
 27130  	})
 27131  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 27132  }
 27133  
 27134  // Do executes the "logging.projects.locations.buckets.delete" call.
 27135  // Any non-2xx status code is an error. Response headers are in either
 27136  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 27137  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 27138  // whether the returned error was because http.StatusNotModified was returned.
 27139  func (c *ProjectsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 27140  	gensupport.SetOptions(c.urlParams_, opts...)
 27141  	res, err := c.doRequest("json")
 27142  	if res != nil && res.StatusCode == http.StatusNotModified {
 27143  		if res.Body != nil {
 27144  			res.Body.Close()
 27145  		}
 27146  		return nil, gensupport.WrapError(&googleapi.Error{
 27147  			Code:   res.StatusCode,
 27148  			Header: res.Header,
 27149  		})
 27150  	}
 27151  	if err != nil {
 27152  		return nil, err
 27153  	}
 27154  	defer googleapi.CloseBody(res)
 27155  	if err := googleapi.CheckResponse(res); err != nil {
 27156  		return nil, gensupport.WrapError(err)
 27157  	}
 27158  	ret := &Empty{
 27159  		ServerResponse: googleapi.ServerResponse{
 27160  			Header:         res.Header,
 27161  			HTTPStatusCode: res.StatusCode,
 27162  		},
 27163  	}
 27164  	target := &ret
 27165  	if err := gensupport.DecodeResponse(target, res); err != nil {
 27166  		return nil, err
 27167  	}
 27168  	return ret, nil
 27169  }
 27170  
 27171  type ProjectsLocationsBucketsGetCall struct {
 27172  	s            *Service
 27173  	name         string
 27174  	urlParams_   gensupport.URLParams
 27175  	ifNoneMatch_ string
 27176  	ctx_         context.Context
 27177  	header_      http.Header
 27178  }
 27179  
 27180  // Get: Gets a log bucket.
 27181  //
 27182  //   - name: The resource name of the bucket:
 27183  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27184  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 27185  //     ]"
 27186  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 27187  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27188  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 27189  func (r *ProjectsLocationsBucketsService) Get(name string) *ProjectsLocationsBucketsGetCall {
 27190  	c := &ProjectsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 27191  	c.name = name
 27192  	return c
 27193  }
 27194  
 27195  // Fields allows partial responses to be retrieved. See
 27196  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 27197  // details.
 27198  func (c *ProjectsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsGetCall {
 27199  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 27200  	return c
 27201  }
 27202  
 27203  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 27204  // object's ETag matches the given value. This is useful for getting updates
 27205  // only after the object has changed since the last request.
 27206  func (c *ProjectsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsGetCall {
 27207  	c.ifNoneMatch_ = entityTag
 27208  	return c
 27209  }
 27210  
 27211  // Context sets the context to be used in this call's Do method.
 27212  func (c *ProjectsLocationsBucketsGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsGetCall {
 27213  	c.ctx_ = ctx
 27214  	return c
 27215  }
 27216  
 27217  // Header returns a http.Header that can be modified by the caller to add
 27218  // headers to the request.
 27219  func (c *ProjectsLocationsBucketsGetCall) Header() http.Header {
 27220  	if c.header_ == nil {
 27221  		c.header_ = make(http.Header)
 27222  	}
 27223  	return c.header_
 27224  }
 27225  
 27226  func (c *ProjectsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) {
 27227  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 27228  	if c.ifNoneMatch_ != "" {
 27229  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 27230  	}
 27231  	var body io.Reader = nil
 27232  	c.urlParams_.Set("alt", alt)
 27233  	c.urlParams_.Set("prettyPrint", "false")
 27234  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 27235  	urls += "?" + c.urlParams_.Encode()
 27236  	req, err := http.NewRequest("GET", urls, body)
 27237  	if err != nil {
 27238  		return nil, err
 27239  	}
 27240  	req.Header = reqHeaders
 27241  	googleapi.Expand(req.URL, map[string]string{
 27242  		"name": c.name,
 27243  	})
 27244  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 27245  }
 27246  
 27247  // Do executes the "logging.projects.locations.buckets.get" call.
 27248  // Any non-2xx status code is an error. Response headers are in either
 27249  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 27250  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 27251  // whether the returned error was because http.StatusNotModified was returned.
 27252  func (c *ProjectsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 27253  	gensupport.SetOptions(c.urlParams_, opts...)
 27254  	res, err := c.doRequest("json")
 27255  	if res != nil && res.StatusCode == http.StatusNotModified {
 27256  		if res.Body != nil {
 27257  			res.Body.Close()
 27258  		}
 27259  		return nil, gensupport.WrapError(&googleapi.Error{
 27260  			Code:   res.StatusCode,
 27261  			Header: res.Header,
 27262  		})
 27263  	}
 27264  	if err != nil {
 27265  		return nil, err
 27266  	}
 27267  	defer googleapi.CloseBody(res)
 27268  	if err := googleapi.CheckResponse(res); err != nil {
 27269  		return nil, gensupport.WrapError(err)
 27270  	}
 27271  	ret := &LogBucket{
 27272  		ServerResponse: googleapi.ServerResponse{
 27273  			Header:         res.Header,
 27274  			HTTPStatusCode: res.StatusCode,
 27275  		},
 27276  	}
 27277  	target := &ret
 27278  	if err := gensupport.DecodeResponse(target, res); err != nil {
 27279  		return nil, err
 27280  	}
 27281  	return ret, nil
 27282  }
 27283  
 27284  type ProjectsLocationsBucketsListCall struct {
 27285  	s            *Service
 27286  	parent       string
 27287  	urlParams_   gensupport.URLParams
 27288  	ifNoneMatch_ string
 27289  	ctx_         context.Context
 27290  	header_      http.Header
 27291  }
 27292  
 27293  // List: Lists log buckets.
 27294  //
 27295  //   - parent: The parent resource whose buckets are to be listed:
 27296  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 27297  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 27298  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 27299  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion
 27300  //     of the resource must be specified, but supplying the character - in place
 27301  //     of LOCATION_ID will return all buckets.
 27302  func (r *ProjectsLocationsBucketsService) List(parent string) *ProjectsLocationsBucketsListCall {
 27303  	c := &ProjectsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 27304  	c.parent = parent
 27305  	return c
 27306  }
 27307  
 27308  // PageSize sets the optional parameter "pageSize": The maximum number of
 27309  // results to return from this request. Non-positive values are ignored. The
 27310  // presence of nextPageToken in the response indicates that more results might
 27311  // be available.
 27312  func (c *ProjectsLocationsBucketsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsListCall {
 27313  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 27314  	return c
 27315  }
 27316  
 27317  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 27318  // the next batch of results from the preceding call to this method. pageToken
 27319  // must be the value of nextPageToken from the previous response. The values of
 27320  // other method parameters should be identical to those in the previous call.
 27321  func (c *ProjectsLocationsBucketsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsListCall {
 27322  	c.urlParams_.Set("pageToken", pageToken)
 27323  	return c
 27324  }
 27325  
 27326  // Fields allows partial responses to be retrieved. See
 27327  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 27328  // details.
 27329  func (c *ProjectsLocationsBucketsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsListCall {
 27330  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 27331  	return c
 27332  }
 27333  
 27334  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 27335  // object's ETag matches the given value. This is useful for getting updates
 27336  // only after the object has changed since the last request.
 27337  func (c *ProjectsLocationsBucketsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsListCall {
 27338  	c.ifNoneMatch_ = entityTag
 27339  	return c
 27340  }
 27341  
 27342  // Context sets the context to be used in this call's Do method.
 27343  func (c *ProjectsLocationsBucketsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsListCall {
 27344  	c.ctx_ = ctx
 27345  	return c
 27346  }
 27347  
 27348  // Header returns a http.Header that can be modified by the caller to add
 27349  // headers to the request.
 27350  func (c *ProjectsLocationsBucketsListCall) Header() http.Header {
 27351  	if c.header_ == nil {
 27352  		c.header_ = make(http.Header)
 27353  	}
 27354  	return c.header_
 27355  }
 27356  
 27357  func (c *ProjectsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) {
 27358  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 27359  	if c.ifNoneMatch_ != "" {
 27360  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 27361  	}
 27362  	var body io.Reader = nil
 27363  	c.urlParams_.Set("alt", alt)
 27364  	c.urlParams_.Set("prettyPrint", "false")
 27365  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets")
 27366  	urls += "?" + c.urlParams_.Encode()
 27367  	req, err := http.NewRequest("GET", urls, body)
 27368  	if err != nil {
 27369  		return nil, err
 27370  	}
 27371  	req.Header = reqHeaders
 27372  	googleapi.Expand(req.URL, map[string]string{
 27373  		"parent": c.parent,
 27374  	})
 27375  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 27376  }
 27377  
 27378  // Do executes the "logging.projects.locations.buckets.list" call.
 27379  // Any non-2xx status code is an error. Response headers are in either
 27380  // *ListBucketsResponse.ServerResponse.Header or (if a response was returned at
 27381  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 27382  // check whether the returned error was because http.StatusNotModified was
 27383  // returned.
 27384  func (c *ProjectsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) {
 27385  	gensupport.SetOptions(c.urlParams_, opts...)
 27386  	res, err := c.doRequest("json")
 27387  	if res != nil && res.StatusCode == http.StatusNotModified {
 27388  		if res.Body != nil {
 27389  			res.Body.Close()
 27390  		}
 27391  		return nil, gensupport.WrapError(&googleapi.Error{
 27392  			Code:   res.StatusCode,
 27393  			Header: res.Header,
 27394  		})
 27395  	}
 27396  	if err != nil {
 27397  		return nil, err
 27398  	}
 27399  	defer googleapi.CloseBody(res)
 27400  	if err := googleapi.CheckResponse(res); err != nil {
 27401  		return nil, gensupport.WrapError(err)
 27402  	}
 27403  	ret := &ListBucketsResponse{
 27404  		ServerResponse: googleapi.ServerResponse{
 27405  			Header:         res.Header,
 27406  			HTTPStatusCode: res.StatusCode,
 27407  		},
 27408  	}
 27409  	target := &ret
 27410  	if err := gensupport.DecodeResponse(target, res); err != nil {
 27411  		return nil, err
 27412  	}
 27413  	return ret, nil
 27414  }
 27415  
 27416  // Pages invokes f for each page of results.
 27417  // A non-nil error returned from f will halt the iteration.
 27418  // The provided context supersedes any context provided to the Context method.
 27419  func (c *ProjectsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error {
 27420  	c.ctx_ = ctx
 27421  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 27422  	for {
 27423  		x, err := c.Do()
 27424  		if err != nil {
 27425  			return err
 27426  		}
 27427  		if err := f(x); err != nil {
 27428  			return err
 27429  		}
 27430  		if x.NextPageToken == "" {
 27431  			return nil
 27432  		}
 27433  		c.PageToken(x.NextPageToken)
 27434  	}
 27435  }
 27436  
 27437  type ProjectsLocationsBucketsPatchCall struct {
 27438  	s          *Service
 27439  	name       string
 27440  	logbucket  *LogBucket
 27441  	urlParams_ gensupport.URLParams
 27442  	ctx_       context.Context
 27443  	header_    http.Header
 27444  }
 27445  
 27446  // Patch: Updates a log bucket.If the bucket has a lifecycle_state of
 27447  // DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket
 27448  // has been created, the bucket's location cannot be changed.
 27449  //
 27450  //   - name: The full resource name of the bucket to update.
 27451  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27452  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 27453  //     ]"
 27454  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 27455  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27456  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 27457  func (r *ProjectsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *ProjectsLocationsBucketsPatchCall {
 27458  	c := &ProjectsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 27459  	c.name = name
 27460  	c.logbucket = logbucket
 27461  	return c
 27462  }
 27463  
 27464  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
 27465  // that specifies the fields in bucket that need an update. A bucket field will
 27466  // be overwritten if, and only if, it is in the update mask. name and output
 27467  // only fields cannot be updated.For a detailed FieldMask definition, see:
 27468  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 27469  // example: updateMask=retention_days
 27470  func (c *ProjectsLocationsBucketsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsPatchCall {
 27471  	c.urlParams_.Set("updateMask", updateMask)
 27472  	return c
 27473  }
 27474  
 27475  // Fields allows partial responses to be retrieved. See
 27476  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 27477  // details.
 27478  func (c *ProjectsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsPatchCall {
 27479  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 27480  	return c
 27481  }
 27482  
 27483  // Context sets the context to be used in this call's Do method.
 27484  func (c *ProjectsLocationsBucketsPatchCall) Context(ctx context.Context) *ProjectsLocationsBucketsPatchCall {
 27485  	c.ctx_ = ctx
 27486  	return c
 27487  }
 27488  
 27489  // Header returns a http.Header that can be modified by the caller to add
 27490  // headers to the request.
 27491  func (c *ProjectsLocationsBucketsPatchCall) Header() http.Header {
 27492  	if c.header_ == nil {
 27493  		c.header_ = make(http.Header)
 27494  	}
 27495  	return c.header_
 27496  }
 27497  
 27498  func (c *ProjectsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
 27499  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 27500  	var body io.Reader = nil
 27501  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 27502  	if err != nil {
 27503  		return nil, err
 27504  	}
 27505  	c.urlParams_.Set("alt", alt)
 27506  	c.urlParams_.Set("prettyPrint", "false")
 27507  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 27508  	urls += "?" + c.urlParams_.Encode()
 27509  	req, err := http.NewRequest("PATCH", urls, body)
 27510  	if err != nil {
 27511  		return nil, err
 27512  	}
 27513  	req.Header = reqHeaders
 27514  	googleapi.Expand(req.URL, map[string]string{
 27515  		"name": c.name,
 27516  	})
 27517  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 27518  }
 27519  
 27520  // Do executes the "logging.projects.locations.buckets.patch" call.
 27521  // Any non-2xx status code is an error. Response headers are in either
 27522  // *LogBucket.ServerResponse.Header or (if a response was returned at all) in
 27523  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 27524  // whether the returned error was because http.StatusNotModified was returned.
 27525  func (c *ProjectsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) {
 27526  	gensupport.SetOptions(c.urlParams_, opts...)
 27527  	res, err := c.doRequest("json")
 27528  	if res != nil && res.StatusCode == http.StatusNotModified {
 27529  		if res.Body != nil {
 27530  			res.Body.Close()
 27531  		}
 27532  		return nil, gensupport.WrapError(&googleapi.Error{
 27533  			Code:   res.StatusCode,
 27534  			Header: res.Header,
 27535  		})
 27536  	}
 27537  	if err != nil {
 27538  		return nil, err
 27539  	}
 27540  	defer googleapi.CloseBody(res)
 27541  	if err := googleapi.CheckResponse(res); err != nil {
 27542  		return nil, gensupport.WrapError(err)
 27543  	}
 27544  	ret := &LogBucket{
 27545  		ServerResponse: googleapi.ServerResponse{
 27546  			Header:         res.Header,
 27547  			HTTPStatusCode: res.StatusCode,
 27548  		},
 27549  	}
 27550  	target := &ret
 27551  	if err := gensupport.DecodeResponse(target, res); err != nil {
 27552  		return nil, err
 27553  	}
 27554  	return ret, nil
 27555  }
 27556  
 27557  type ProjectsLocationsBucketsUndeleteCall struct {
 27558  	s                     *Service
 27559  	name                  string
 27560  	undeletebucketrequest *UndeleteBucketRequest
 27561  	urlParams_            gensupport.URLParams
 27562  	ctx_                  context.Context
 27563  	header_               http.Header
 27564  }
 27565  
 27566  // Undelete: Undeletes a log bucket. A bucket that has been deleted can be
 27567  // undeleted within the grace period of 7 days.
 27568  //
 27569  //   - name: The full resource name of the bucket to undelete.
 27570  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27571  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 27572  //     ]"
 27573  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 27574  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27575  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 27576  func (r *ProjectsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *ProjectsLocationsBucketsUndeleteCall {
 27577  	c := &ProjectsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 27578  	c.name = name
 27579  	c.undeletebucketrequest = undeletebucketrequest
 27580  	return c
 27581  }
 27582  
 27583  // Fields allows partial responses to be retrieved. See
 27584  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 27585  // details.
 27586  func (c *ProjectsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsUndeleteCall {
 27587  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 27588  	return c
 27589  }
 27590  
 27591  // Context sets the context to be used in this call's Do method.
 27592  func (c *ProjectsLocationsBucketsUndeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsUndeleteCall {
 27593  	c.ctx_ = ctx
 27594  	return c
 27595  }
 27596  
 27597  // Header returns a http.Header that can be modified by the caller to add
 27598  // headers to the request.
 27599  func (c *ProjectsLocationsBucketsUndeleteCall) Header() http.Header {
 27600  	if c.header_ == nil {
 27601  		c.header_ = make(http.Header)
 27602  	}
 27603  	return c.header_
 27604  }
 27605  
 27606  func (c *ProjectsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) {
 27607  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 27608  	var body io.Reader = nil
 27609  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest)
 27610  	if err != nil {
 27611  		return nil, err
 27612  	}
 27613  	c.urlParams_.Set("alt", alt)
 27614  	c.urlParams_.Set("prettyPrint", "false")
 27615  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
 27616  	urls += "?" + c.urlParams_.Encode()
 27617  	req, err := http.NewRequest("POST", urls, body)
 27618  	if err != nil {
 27619  		return nil, err
 27620  	}
 27621  	req.Header = reqHeaders
 27622  	googleapi.Expand(req.URL, map[string]string{
 27623  		"name": c.name,
 27624  	})
 27625  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 27626  }
 27627  
 27628  // Do executes the "logging.projects.locations.buckets.undelete" call.
 27629  // Any non-2xx status code is an error. Response headers are in either
 27630  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 27631  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 27632  // whether the returned error was because http.StatusNotModified was returned.
 27633  func (c *ProjectsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 27634  	gensupport.SetOptions(c.urlParams_, opts...)
 27635  	res, err := c.doRequest("json")
 27636  	if res != nil && res.StatusCode == http.StatusNotModified {
 27637  		if res.Body != nil {
 27638  			res.Body.Close()
 27639  		}
 27640  		return nil, gensupport.WrapError(&googleapi.Error{
 27641  			Code:   res.StatusCode,
 27642  			Header: res.Header,
 27643  		})
 27644  	}
 27645  	if err != nil {
 27646  		return nil, err
 27647  	}
 27648  	defer googleapi.CloseBody(res)
 27649  	if err := googleapi.CheckResponse(res); err != nil {
 27650  		return nil, gensupport.WrapError(err)
 27651  	}
 27652  	ret := &Empty{
 27653  		ServerResponse: googleapi.ServerResponse{
 27654  			Header:         res.Header,
 27655  			HTTPStatusCode: res.StatusCode,
 27656  		},
 27657  	}
 27658  	target := &ret
 27659  	if err := gensupport.DecodeResponse(target, res); err != nil {
 27660  		return nil, err
 27661  	}
 27662  	return ret, nil
 27663  }
 27664  
 27665  type ProjectsLocationsBucketsUpdateAsyncCall struct {
 27666  	s          *Service
 27667  	name       string
 27668  	logbucket  *LogBucket
 27669  	urlParams_ gensupport.URLParams
 27670  	ctx_       context.Context
 27671  	header_    http.Header
 27672  }
 27673  
 27674  // UpdateAsync: Updates a log bucket asynchronously.If the bucket has a
 27675  // lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be
 27676  // returned.After a bucket has been created, the bucket's location cannot be
 27677  // changed.
 27678  //
 27679  //   - name: The full resource name of the bucket to update.
 27680  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27681  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 27682  //     ]"
 27683  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 27684  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27685  //     For example:"projects/my-project/locations/global/buckets/my-bucket".
 27686  func (r *ProjectsLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *ProjectsLocationsBucketsUpdateAsyncCall {
 27687  	c := &ProjectsLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 27688  	c.name = name
 27689  	c.logbucket = logbucket
 27690  	return c
 27691  }
 27692  
 27693  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
 27694  // that specifies the fields in bucket that need an update. A bucket field will
 27695  // be overwritten if, and only if, it is in the update mask. name and output
 27696  // only fields cannot be updated.For a detailed FieldMask definition, see:
 27697  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 27698  // example: updateMask=retention_days
 27699  func (c *ProjectsLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsUpdateAsyncCall {
 27700  	c.urlParams_.Set("updateMask", updateMask)
 27701  	return c
 27702  }
 27703  
 27704  // Fields allows partial responses to be retrieved. See
 27705  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 27706  // details.
 27707  func (c *ProjectsLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsUpdateAsyncCall {
 27708  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 27709  	return c
 27710  }
 27711  
 27712  // Context sets the context to be used in this call's Do method.
 27713  func (c *ProjectsLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *ProjectsLocationsBucketsUpdateAsyncCall {
 27714  	c.ctx_ = ctx
 27715  	return c
 27716  }
 27717  
 27718  // Header returns a http.Header that can be modified by the caller to add
 27719  // headers to the request.
 27720  func (c *ProjectsLocationsBucketsUpdateAsyncCall) Header() http.Header {
 27721  	if c.header_ == nil {
 27722  		c.header_ = make(http.Header)
 27723  	}
 27724  	return c.header_
 27725  }
 27726  
 27727  func (c *ProjectsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) {
 27728  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 27729  	var body io.Reader = nil
 27730  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket)
 27731  	if err != nil {
 27732  		return nil, err
 27733  	}
 27734  	c.urlParams_.Set("alt", alt)
 27735  	c.urlParams_.Set("prettyPrint", "false")
 27736  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync")
 27737  	urls += "?" + c.urlParams_.Encode()
 27738  	req, err := http.NewRequest("POST", urls, body)
 27739  	if err != nil {
 27740  		return nil, err
 27741  	}
 27742  	req.Header = reqHeaders
 27743  	googleapi.Expand(req.URL, map[string]string{
 27744  		"name": c.name,
 27745  	})
 27746  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 27747  }
 27748  
 27749  // Do executes the "logging.projects.locations.buckets.updateAsync" call.
 27750  // Any non-2xx status code is an error. Response headers are in either
 27751  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 27752  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 27753  // whether the returned error was because http.StatusNotModified was returned.
 27754  func (c *ProjectsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 27755  	gensupport.SetOptions(c.urlParams_, opts...)
 27756  	res, err := c.doRequest("json")
 27757  	if res != nil && res.StatusCode == http.StatusNotModified {
 27758  		if res.Body != nil {
 27759  			res.Body.Close()
 27760  		}
 27761  		return nil, gensupport.WrapError(&googleapi.Error{
 27762  			Code:   res.StatusCode,
 27763  			Header: res.Header,
 27764  		})
 27765  	}
 27766  	if err != nil {
 27767  		return nil, err
 27768  	}
 27769  	defer googleapi.CloseBody(res)
 27770  	if err := googleapi.CheckResponse(res); err != nil {
 27771  		return nil, gensupport.WrapError(err)
 27772  	}
 27773  	ret := &Operation{
 27774  		ServerResponse: googleapi.ServerResponse{
 27775  			Header:         res.Header,
 27776  			HTTPStatusCode: res.StatusCode,
 27777  		},
 27778  	}
 27779  	target := &ret
 27780  	if err := gensupport.DecodeResponse(target, res); err != nil {
 27781  		return nil, err
 27782  	}
 27783  	return ret, nil
 27784  }
 27785  
 27786  type ProjectsLocationsBucketsLinksCreateCall struct {
 27787  	s          *Service
 27788  	parent     string
 27789  	link       *Link
 27790  	urlParams_ gensupport.URLParams
 27791  	ctx_       context.Context
 27792  	header_    http.Header
 27793  }
 27794  
 27795  // Create: Asynchronously creates a linked dataset in BigQuery which makes it
 27796  // possible to use BigQuery to read the logs stored in the log bucket. A log
 27797  // bucket may currently only contain one link.
 27798  //
 27799  //   - parent: The full resource name of the bucket to create a link for.
 27800  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 27801  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 27802  //     ]"
 27803  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 27804  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 27805  func (r *ProjectsLocationsBucketsLinksService) Create(parent string, link *Link) *ProjectsLocationsBucketsLinksCreateCall {
 27806  	c := &ProjectsLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 27807  	c.parent = parent
 27808  	c.link = link
 27809  	return c
 27810  }
 27811  
 27812  // LinkId sets the optional parameter "linkId": Required. The ID to use for the
 27813  // link. The link_id can have up to 100 characters. A valid link_id must only
 27814  // have alphanumeric characters and underscores within it.
 27815  func (c *ProjectsLocationsBucketsLinksCreateCall) LinkId(linkId string) *ProjectsLocationsBucketsLinksCreateCall {
 27816  	c.urlParams_.Set("linkId", linkId)
 27817  	return c
 27818  }
 27819  
 27820  // Fields allows partial responses to be retrieved. See
 27821  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 27822  // details.
 27823  func (c *ProjectsLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksCreateCall {
 27824  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 27825  	return c
 27826  }
 27827  
 27828  // Context sets the context to be used in this call's Do method.
 27829  func (c *ProjectsLocationsBucketsLinksCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksCreateCall {
 27830  	c.ctx_ = ctx
 27831  	return c
 27832  }
 27833  
 27834  // Header returns a http.Header that can be modified by the caller to add
 27835  // headers to the request.
 27836  func (c *ProjectsLocationsBucketsLinksCreateCall) Header() http.Header {
 27837  	if c.header_ == nil {
 27838  		c.header_ = make(http.Header)
 27839  	}
 27840  	return c.header_
 27841  }
 27842  
 27843  func (c *ProjectsLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
 27844  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 27845  	var body io.Reader = nil
 27846  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
 27847  	if err != nil {
 27848  		return nil, err
 27849  	}
 27850  	c.urlParams_.Set("alt", alt)
 27851  	c.urlParams_.Set("prettyPrint", "false")
 27852  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
 27853  	urls += "?" + c.urlParams_.Encode()
 27854  	req, err := http.NewRequest("POST", urls, body)
 27855  	if err != nil {
 27856  		return nil, err
 27857  	}
 27858  	req.Header = reqHeaders
 27859  	googleapi.Expand(req.URL, map[string]string{
 27860  		"parent": c.parent,
 27861  	})
 27862  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 27863  }
 27864  
 27865  // Do executes the "logging.projects.locations.buckets.links.create" call.
 27866  // Any non-2xx status code is an error. Response headers are in either
 27867  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 27868  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 27869  // whether the returned error was because http.StatusNotModified was returned.
 27870  func (c *ProjectsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 27871  	gensupport.SetOptions(c.urlParams_, opts...)
 27872  	res, err := c.doRequest("json")
 27873  	if res != nil && res.StatusCode == http.StatusNotModified {
 27874  		if res.Body != nil {
 27875  			res.Body.Close()
 27876  		}
 27877  		return nil, gensupport.WrapError(&googleapi.Error{
 27878  			Code:   res.StatusCode,
 27879  			Header: res.Header,
 27880  		})
 27881  	}
 27882  	if err != nil {
 27883  		return nil, err
 27884  	}
 27885  	defer googleapi.CloseBody(res)
 27886  	if err := googleapi.CheckResponse(res); err != nil {
 27887  		return nil, gensupport.WrapError(err)
 27888  	}
 27889  	ret := &Operation{
 27890  		ServerResponse: googleapi.ServerResponse{
 27891  			Header:         res.Header,
 27892  			HTTPStatusCode: res.StatusCode,
 27893  		},
 27894  	}
 27895  	target := &ret
 27896  	if err := gensupport.DecodeResponse(target, res); err != nil {
 27897  		return nil, err
 27898  	}
 27899  	return ret, nil
 27900  }
 27901  
 27902  type ProjectsLocationsBucketsLinksDeleteCall struct {
 27903  	s          *Service
 27904  	name       string
 27905  	urlParams_ gensupport.URLParams
 27906  	ctx_       context.Context
 27907  	header_    http.Header
 27908  }
 27909  
 27910  // Delete: Deletes a link. This will also delete the corresponding BigQuery
 27911  // linked dataset.
 27912  //
 27913  //   - name: The full resource name of the link to delete.
 27914  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L
 27915  //     INK_ID]"
 27916  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 27917  //     ]/links/[LINK_ID]"
 27918  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 27919  //     ET_ID]/links/[LINK_ID]"
 27920  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
 27921  //     K_ID]".
 27922  func (r *ProjectsLocationsBucketsLinksService) Delete(name string) *ProjectsLocationsBucketsLinksDeleteCall {
 27923  	c := &ProjectsLocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 27924  	c.name = name
 27925  	return c
 27926  }
 27927  
 27928  // Fields allows partial responses to be retrieved. See
 27929  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 27930  // details.
 27931  func (c *ProjectsLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksDeleteCall {
 27932  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 27933  	return c
 27934  }
 27935  
 27936  // Context sets the context to be used in this call's Do method.
 27937  func (c *ProjectsLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksDeleteCall {
 27938  	c.ctx_ = ctx
 27939  	return c
 27940  }
 27941  
 27942  // Header returns a http.Header that can be modified by the caller to add
 27943  // headers to the request.
 27944  func (c *ProjectsLocationsBucketsLinksDeleteCall) Header() http.Header {
 27945  	if c.header_ == nil {
 27946  		c.header_ = make(http.Header)
 27947  	}
 27948  	return c.header_
 27949  }
 27950  
 27951  func (c *ProjectsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 27952  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 27953  	var body io.Reader = nil
 27954  	c.urlParams_.Set("alt", alt)
 27955  	c.urlParams_.Set("prettyPrint", "false")
 27956  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 27957  	urls += "?" + c.urlParams_.Encode()
 27958  	req, err := http.NewRequest("DELETE", urls, body)
 27959  	if err != nil {
 27960  		return nil, err
 27961  	}
 27962  	req.Header = reqHeaders
 27963  	googleapi.Expand(req.URL, map[string]string{
 27964  		"name": c.name,
 27965  	})
 27966  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 27967  }
 27968  
 27969  // Do executes the "logging.projects.locations.buckets.links.delete" call.
 27970  // Any non-2xx status code is an error. Response headers are in either
 27971  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 27972  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 27973  // whether the returned error was because http.StatusNotModified was returned.
 27974  func (c *ProjectsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 27975  	gensupport.SetOptions(c.urlParams_, opts...)
 27976  	res, err := c.doRequest("json")
 27977  	if res != nil && res.StatusCode == http.StatusNotModified {
 27978  		if res.Body != nil {
 27979  			res.Body.Close()
 27980  		}
 27981  		return nil, gensupport.WrapError(&googleapi.Error{
 27982  			Code:   res.StatusCode,
 27983  			Header: res.Header,
 27984  		})
 27985  	}
 27986  	if err != nil {
 27987  		return nil, err
 27988  	}
 27989  	defer googleapi.CloseBody(res)
 27990  	if err := googleapi.CheckResponse(res); err != nil {
 27991  		return nil, gensupport.WrapError(err)
 27992  	}
 27993  	ret := &Operation{
 27994  		ServerResponse: googleapi.ServerResponse{
 27995  			Header:         res.Header,
 27996  			HTTPStatusCode: res.StatusCode,
 27997  		},
 27998  	}
 27999  	target := &ret
 28000  	if err := gensupport.DecodeResponse(target, res); err != nil {
 28001  		return nil, err
 28002  	}
 28003  	return ret, nil
 28004  }
 28005  
 28006  type ProjectsLocationsBucketsLinksGetCall struct {
 28007  	s            *Service
 28008  	name         string
 28009  	urlParams_   gensupport.URLParams
 28010  	ifNoneMatch_ string
 28011  	ctx_         context.Context
 28012  	header_      http.Header
 28013  }
 28014  
 28015  // Get: Gets a link.
 28016  //
 28017  //   - name: The resource name of the link:
 28018  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L
 28019  //     INK_ID]"
 28020  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 28021  //     ]/links/[LINK_ID]"
 28022  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 28023  //     ET_ID]/links/[LINK_ID]"
 28024  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN
 28025  //     K_ID]".
 28026  func (r *ProjectsLocationsBucketsLinksService) Get(name string) *ProjectsLocationsBucketsLinksGetCall {
 28027  	c := &ProjectsLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 28028  	c.name = name
 28029  	return c
 28030  }
 28031  
 28032  // Fields allows partial responses to be retrieved. See
 28033  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 28034  // details.
 28035  func (c *ProjectsLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksGetCall {
 28036  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 28037  	return c
 28038  }
 28039  
 28040  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 28041  // object's ETag matches the given value. This is useful for getting updates
 28042  // only after the object has changed since the last request.
 28043  func (c *ProjectsLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsLinksGetCall {
 28044  	c.ifNoneMatch_ = entityTag
 28045  	return c
 28046  }
 28047  
 28048  // Context sets the context to be used in this call's Do method.
 28049  func (c *ProjectsLocationsBucketsLinksGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksGetCall {
 28050  	c.ctx_ = ctx
 28051  	return c
 28052  }
 28053  
 28054  // Header returns a http.Header that can be modified by the caller to add
 28055  // headers to the request.
 28056  func (c *ProjectsLocationsBucketsLinksGetCall) Header() http.Header {
 28057  	if c.header_ == nil {
 28058  		c.header_ = make(http.Header)
 28059  	}
 28060  	return c.header_
 28061  }
 28062  
 28063  func (c *ProjectsLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) {
 28064  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 28065  	if c.ifNoneMatch_ != "" {
 28066  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 28067  	}
 28068  	var body io.Reader = nil
 28069  	c.urlParams_.Set("alt", alt)
 28070  	c.urlParams_.Set("prettyPrint", "false")
 28071  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 28072  	urls += "?" + c.urlParams_.Encode()
 28073  	req, err := http.NewRequest("GET", urls, body)
 28074  	if err != nil {
 28075  		return nil, err
 28076  	}
 28077  	req.Header = reqHeaders
 28078  	googleapi.Expand(req.URL, map[string]string{
 28079  		"name": c.name,
 28080  	})
 28081  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 28082  }
 28083  
 28084  // Do executes the "logging.projects.locations.buckets.links.get" call.
 28085  // Any non-2xx status code is an error. Response headers are in either
 28086  // *Link.ServerResponse.Header or (if a response was returned at all) in
 28087  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 28088  // whether the returned error was because http.StatusNotModified was returned.
 28089  func (c *ProjectsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) {
 28090  	gensupport.SetOptions(c.urlParams_, opts...)
 28091  	res, err := c.doRequest("json")
 28092  	if res != nil && res.StatusCode == http.StatusNotModified {
 28093  		if res.Body != nil {
 28094  			res.Body.Close()
 28095  		}
 28096  		return nil, gensupport.WrapError(&googleapi.Error{
 28097  			Code:   res.StatusCode,
 28098  			Header: res.Header,
 28099  		})
 28100  	}
 28101  	if err != nil {
 28102  		return nil, err
 28103  	}
 28104  	defer googleapi.CloseBody(res)
 28105  	if err := googleapi.CheckResponse(res); err != nil {
 28106  		return nil, gensupport.WrapError(err)
 28107  	}
 28108  	ret := &Link{
 28109  		ServerResponse: googleapi.ServerResponse{
 28110  			Header:         res.Header,
 28111  			HTTPStatusCode: res.StatusCode,
 28112  		},
 28113  	}
 28114  	target := &ret
 28115  	if err := gensupport.DecodeResponse(target, res); err != nil {
 28116  		return nil, err
 28117  	}
 28118  	return ret, nil
 28119  }
 28120  
 28121  type ProjectsLocationsBucketsLinksListCall struct {
 28122  	s            *Service
 28123  	parent       string
 28124  	urlParams_   gensupport.URLParams
 28125  	ifNoneMatch_ string
 28126  	ctx_         context.Context
 28127  	header_      http.Header
 28128  }
 28129  
 28130  // List: Lists links.
 28131  //
 28132  //   - parent: The parent resource whose links are to be listed:
 28133  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
 28134  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID
 28135  //     ]"
 28136  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK
 28137  //     ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 28138  func (r *ProjectsLocationsBucketsLinksService) List(parent string) *ProjectsLocationsBucketsLinksListCall {
 28139  	c := &ProjectsLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 28140  	c.parent = parent
 28141  	return c
 28142  }
 28143  
 28144  // PageSize sets the optional parameter "pageSize": The maximum number of
 28145  // results to return from this request.
 28146  func (c *ProjectsLocationsBucketsLinksListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsLinksListCall {
 28147  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 28148  	return c
 28149  }
 28150  
 28151  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 28152  // the next batch of results from the preceding call to this method. pageToken
 28153  // must be the value of nextPageToken from the previous response.
 28154  func (c *ProjectsLocationsBucketsLinksListCall) PageToken(pageToken string) *ProjectsLocationsBucketsLinksListCall {
 28155  	c.urlParams_.Set("pageToken", pageToken)
 28156  	return c
 28157  }
 28158  
 28159  // Fields allows partial responses to be retrieved. See
 28160  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 28161  // details.
 28162  func (c *ProjectsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksListCall {
 28163  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 28164  	return c
 28165  }
 28166  
 28167  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 28168  // object's ETag matches the given value. This is useful for getting updates
 28169  // only after the object has changed since the last request.
 28170  func (c *ProjectsLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsLinksListCall {
 28171  	c.ifNoneMatch_ = entityTag
 28172  	return c
 28173  }
 28174  
 28175  // Context sets the context to be used in this call's Do method.
 28176  func (c *ProjectsLocationsBucketsLinksListCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksListCall {
 28177  	c.ctx_ = ctx
 28178  	return c
 28179  }
 28180  
 28181  // Header returns a http.Header that can be modified by the caller to add
 28182  // headers to the request.
 28183  func (c *ProjectsLocationsBucketsLinksListCall) Header() http.Header {
 28184  	if c.header_ == nil {
 28185  		c.header_ = make(http.Header)
 28186  	}
 28187  	return c.header_
 28188  }
 28189  
 28190  func (c *ProjectsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) {
 28191  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 28192  	if c.ifNoneMatch_ != "" {
 28193  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 28194  	}
 28195  	var body io.Reader = nil
 28196  	c.urlParams_.Set("alt", alt)
 28197  	c.urlParams_.Set("prettyPrint", "false")
 28198  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links")
 28199  	urls += "?" + c.urlParams_.Encode()
 28200  	req, err := http.NewRequest("GET", urls, body)
 28201  	if err != nil {
 28202  		return nil, err
 28203  	}
 28204  	req.Header = reqHeaders
 28205  	googleapi.Expand(req.URL, map[string]string{
 28206  		"parent": c.parent,
 28207  	})
 28208  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 28209  }
 28210  
 28211  // Do executes the "logging.projects.locations.buckets.links.list" call.
 28212  // Any non-2xx status code is an error. Response headers are in either
 28213  // *ListLinksResponse.ServerResponse.Header or (if a response was returned at
 28214  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 28215  // check whether the returned error was because http.StatusNotModified was
 28216  // returned.
 28217  func (c *ProjectsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) {
 28218  	gensupport.SetOptions(c.urlParams_, opts...)
 28219  	res, err := c.doRequest("json")
 28220  	if res != nil && res.StatusCode == http.StatusNotModified {
 28221  		if res.Body != nil {
 28222  			res.Body.Close()
 28223  		}
 28224  		return nil, gensupport.WrapError(&googleapi.Error{
 28225  			Code:   res.StatusCode,
 28226  			Header: res.Header,
 28227  		})
 28228  	}
 28229  	if err != nil {
 28230  		return nil, err
 28231  	}
 28232  	defer googleapi.CloseBody(res)
 28233  	if err := googleapi.CheckResponse(res); err != nil {
 28234  		return nil, gensupport.WrapError(err)
 28235  	}
 28236  	ret := &ListLinksResponse{
 28237  		ServerResponse: googleapi.ServerResponse{
 28238  			Header:         res.Header,
 28239  			HTTPStatusCode: res.StatusCode,
 28240  		},
 28241  	}
 28242  	target := &ret
 28243  	if err := gensupport.DecodeResponse(target, res); err != nil {
 28244  		return nil, err
 28245  	}
 28246  	return ret, nil
 28247  }
 28248  
 28249  // Pages invokes f for each page of results.
 28250  // A non-nil error returned from f will halt the iteration.
 28251  // The provided context supersedes any context provided to the Context method.
 28252  func (c *ProjectsLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error {
 28253  	c.ctx_ = ctx
 28254  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 28255  	for {
 28256  		x, err := c.Do()
 28257  		if err != nil {
 28258  			return err
 28259  		}
 28260  		if err := f(x); err != nil {
 28261  			return err
 28262  		}
 28263  		if x.NextPageToken == "" {
 28264  			return nil
 28265  		}
 28266  		c.PageToken(x.NextPageToken)
 28267  	}
 28268  }
 28269  
 28270  type ProjectsLocationsBucketsViewsCreateCall struct {
 28271  	s          *Service
 28272  	parent     string
 28273  	logview    *LogView
 28274  	urlParams_ gensupport.URLParams
 28275  	ctx_       context.Context
 28276  	header_    http.Header
 28277  }
 28278  
 28279  // Create: Creates a view over log entries in a log bucket. A bucket may
 28280  // contain a maximum of 30 views.
 28281  //
 28282  //   - parent: The bucket in which to create the view
 28283  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For
 28284  //     example:"projects/my-project/locations/global/buckets/my-bucket".
 28285  func (r *ProjectsLocationsBucketsViewsService) Create(parent string, logview *LogView) *ProjectsLocationsBucketsViewsCreateCall {
 28286  	c := &ProjectsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 28287  	c.parent = parent
 28288  	c.logview = logview
 28289  	return c
 28290  }
 28291  
 28292  // ViewId sets the optional parameter "viewId": Required. A client-assigned
 28293  // identifier such as "my-view". Identifiers are limited to 100 characters and
 28294  // can include only letters, digits, underscores, hyphens, and periods.
 28295  func (c *ProjectsLocationsBucketsViewsCreateCall) ViewId(viewId string) *ProjectsLocationsBucketsViewsCreateCall {
 28296  	c.urlParams_.Set("viewId", viewId)
 28297  	return c
 28298  }
 28299  
 28300  // Fields allows partial responses to be retrieved. See
 28301  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 28302  // details.
 28303  func (c *ProjectsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsCreateCall {
 28304  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 28305  	return c
 28306  }
 28307  
 28308  // Context sets the context to be used in this call's Do method.
 28309  func (c *ProjectsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsCreateCall {
 28310  	c.ctx_ = ctx
 28311  	return c
 28312  }
 28313  
 28314  // Header returns a http.Header that can be modified by the caller to add
 28315  // headers to the request.
 28316  func (c *ProjectsLocationsBucketsViewsCreateCall) Header() http.Header {
 28317  	if c.header_ == nil {
 28318  		c.header_ = make(http.Header)
 28319  	}
 28320  	return c.header_
 28321  }
 28322  
 28323  func (c *ProjectsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) {
 28324  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 28325  	var body io.Reader = nil
 28326  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
 28327  	if err != nil {
 28328  		return nil, err
 28329  	}
 28330  	c.urlParams_.Set("alt", alt)
 28331  	c.urlParams_.Set("prettyPrint", "false")
 28332  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
 28333  	urls += "?" + c.urlParams_.Encode()
 28334  	req, err := http.NewRequest("POST", urls, body)
 28335  	if err != nil {
 28336  		return nil, err
 28337  	}
 28338  	req.Header = reqHeaders
 28339  	googleapi.Expand(req.URL, map[string]string{
 28340  		"parent": c.parent,
 28341  	})
 28342  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 28343  }
 28344  
 28345  // Do executes the "logging.projects.locations.buckets.views.create" call.
 28346  // Any non-2xx status code is an error. Response headers are in either
 28347  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 28348  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 28349  // whether the returned error was because http.StatusNotModified was returned.
 28350  func (c *ProjectsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 28351  	gensupport.SetOptions(c.urlParams_, opts...)
 28352  	res, err := c.doRequest("json")
 28353  	if res != nil && res.StatusCode == http.StatusNotModified {
 28354  		if res.Body != nil {
 28355  			res.Body.Close()
 28356  		}
 28357  		return nil, gensupport.WrapError(&googleapi.Error{
 28358  			Code:   res.StatusCode,
 28359  			Header: res.Header,
 28360  		})
 28361  	}
 28362  	if err != nil {
 28363  		return nil, err
 28364  	}
 28365  	defer googleapi.CloseBody(res)
 28366  	if err := googleapi.CheckResponse(res); err != nil {
 28367  		return nil, gensupport.WrapError(err)
 28368  	}
 28369  	ret := &LogView{
 28370  		ServerResponse: googleapi.ServerResponse{
 28371  			Header:         res.Header,
 28372  			HTTPStatusCode: res.StatusCode,
 28373  		},
 28374  	}
 28375  	target := &ret
 28376  	if err := gensupport.DecodeResponse(target, res); err != nil {
 28377  		return nil, err
 28378  	}
 28379  	return ret, nil
 28380  }
 28381  
 28382  type ProjectsLocationsBucketsViewsDeleteCall struct {
 28383  	s          *Service
 28384  	name       string
 28385  	urlParams_ gensupport.URLParams
 28386  	ctx_       context.Context
 28387  	header_    http.Header
 28388  }
 28389  
 28390  // Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned,
 28391  // this indicates that system is not in a state where it can delete the view.
 28392  // If this occurs, please try again in a few minutes.
 28393  //
 28394  //   - name: The full resource name of the view to delete:
 28395  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 28396  //     IEW_ID]" For
 28397  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 28398  //     ew".
 28399  func (r *ProjectsLocationsBucketsViewsService) Delete(name string) *ProjectsLocationsBucketsViewsDeleteCall {
 28400  	c := &ProjectsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 28401  	c.name = name
 28402  	return c
 28403  }
 28404  
 28405  // Fields allows partial responses to be retrieved. See
 28406  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 28407  // details.
 28408  func (c *ProjectsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsDeleteCall {
 28409  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 28410  	return c
 28411  }
 28412  
 28413  // Context sets the context to be used in this call's Do method.
 28414  func (c *ProjectsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsDeleteCall {
 28415  	c.ctx_ = ctx
 28416  	return c
 28417  }
 28418  
 28419  // Header returns a http.Header that can be modified by the caller to add
 28420  // headers to the request.
 28421  func (c *ProjectsLocationsBucketsViewsDeleteCall) Header() http.Header {
 28422  	if c.header_ == nil {
 28423  		c.header_ = make(http.Header)
 28424  	}
 28425  	return c.header_
 28426  }
 28427  
 28428  func (c *ProjectsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
 28429  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 28430  	var body io.Reader = nil
 28431  	c.urlParams_.Set("alt", alt)
 28432  	c.urlParams_.Set("prettyPrint", "false")
 28433  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 28434  	urls += "?" + c.urlParams_.Encode()
 28435  	req, err := http.NewRequest("DELETE", urls, body)
 28436  	if err != nil {
 28437  		return nil, err
 28438  	}
 28439  	req.Header = reqHeaders
 28440  	googleapi.Expand(req.URL, map[string]string{
 28441  		"name": c.name,
 28442  	})
 28443  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 28444  }
 28445  
 28446  // Do executes the "logging.projects.locations.buckets.views.delete" call.
 28447  // Any non-2xx status code is an error. Response headers are in either
 28448  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 28449  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 28450  // whether the returned error was because http.StatusNotModified was returned.
 28451  func (c *ProjectsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 28452  	gensupport.SetOptions(c.urlParams_, opts...)
 28453  	res, err := c.doRequest("json")
 28454  	if res != nil && res.StatusCode == http.StatusNotModified {
 28455  		if res.Body != nil {
 28456  			res.Body.Close()
 28457  		}
 28458  		return nil, gensupport.WrapError(&googleapi.Error{
 28459  			Code:   res.StatusCode,
 28460  			Header: res.Header,
 28461  		})
 28462  	}
 28463  	if err != nil {
 28464  		return nil, err
 28465  	}
 28466  	defer googleapi.CloseBody(res)
 28467  	if err := googleapi.CheckResponse(res); err != nil {
 28468  		return nil, gensupport.WrapError(err)
 28469  	}
 28470  	ret := &Empty{
 28471  		ServerResponse: googleapi.ServerResponse{
 28472  			Header:         res.Header,
 28473  			HTTPStatusCode: res.StatusCode,
 28474  		},
 28475  	}
 28476  	target := &ret
 28477  	if err := gensupport.DecodeResponse(target, res); err != nil {
 28478  		return nil, err
 28479  	}
 28480  	return ret, nil
 28481  }
 28482  
 28483  type ProjectsLocationsBucketsViewsGetCall struct {
 28484  	s            *Service
 28485  	name         string
 28486  	urlParams_   gensupport.URLParams
 28487  	ifNoneMatch_ string
 28488  	ctx_         context.Context
 28489  	header_      http.Header
 28490  }
 28491  
 28492  // Get: Gets a view on a log bucket.
 28493  //
 28494  //   - name: The resource name of the policy:
 28495  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 28496  //     IEW_ID]" For
 28497  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 28498  //     ew".
 28499  func (r *ProjectsLocationsBucketsViewsService) Get(name string) *ProjectsLocationsBucketsViewsGetCall {
 28500  	c := &ProjectsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 28501  	c.name = name
 28502  	return c
 28503  }
 28504  
 28505  // Fields allows partial responses to be retrieved. See
 28506  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 28507  // details.
 28508  func (c *ProjectsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsGetCall {
 28509  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 28510  	return c
 28511  }
 28512  
 28513  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 28514  // object's ETag matches the given value. This is useful for getting updates
 28515  // only after the object has changed since the last request.
 28516  func (c *ProjectsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsGetCall {
 28517  	c.ifNoneMatch_ = entityTag
 28518  	return c
 28519  }
 28520  
 28521  // Context sets the context to be used in this call's Do method.
 28522  func (c *ProjectsLocationsBucketsViewsGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsGetCall {
 28523  	c.ctx_ = ctx
 28524  	return c
 28525  }
 28526  
 28527  // Header returns a http.Header that can be modified by the caller to add
 28528  // headers to the request.
 28529  func (c *ProjectsLocationsBucketsViewsGetCall) Header() http.Header {
 28530  	if c.header_ == nil {
 28531  		c.header_ = make(http.Header)
 28532  	}
 28533  	return c.header_
 28534  }
 28535  
 28536  func (c *ProjectsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) {
 28537  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 28538  	if c.ifNoneMatch_ != "" {
 28539  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 28540  	}
 28541  	var body io.Reader = nil
 28542  	c.urlParams_.Set("alt", alt)
 28543  	c.urlParams_.Set("prettyPrint", "false")
 28544  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 28545  	urls += "?" + c.urlParams_.Encode()
 28546  	req, err := http.NewRequest("GET", urls, body)
 28547  	if err != nil {
 28548  		return nil, err
 28549  	}
 28550  	req.Header = reqHeaders
 28551  	googleapi.Expand(req.URL, map[string]string{
 28552  		"name": c.name,
 28553  	})
 28554  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 28555  }
 28556  
 28557  // Do executes the "logging.projects.locations.buckets.views.get" call.
 28558  // Any non-2xx status code is an error. Response headers are in either
 28559  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 28560  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 28561  // whether the returned error was because http.StatusNotModified was returned.
 28562  func (c *ProjectsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 28563  	gensupport.SetOptions(c.urlParams_, opts...)
 28564  	res, err := c.doRequest("json")
 28565  	if res != nil && res.StatusCode == http.StatusNotModified {
 28566  		if res.Body != nil {
 28567  			res.Body.Close()
 28568  		}
 28569  		return nil, gensupport.WrapError(&googleapi.Error{
 28570  			Code:   res.StatusCode,
 28571  			Header: res.Header,
 28572  		})
 28573  	}
 28574  	if err != nil {
 28575  		return nil, err
 28576  	}
 28577  	defer googleapi.CloseBody(res)
 28578  	if err := googleapi.CheckResponse(res); err != nil {
 28579  		return nil, gensupport.WrapError(err)
 28580  	}
 28581  	ret := &LogView{
 28582  		ServerResponse: googleapi.ServerResponse{
 28583  			Header:         res.Header,
 28584  			HTTPStatusCode: res.StatusCode,
 28585  		},
 28586  	}
 28587  	target := &ret
 28588  	if err := gensupport.DecodeResponse(target, res); err != nil {
 28589  		return nil, err
 28590  	}
 28591  	return ret, nil
 28592  }
 28593  
 28594  type ProjectsLocationsBucketsViewsGetIamPolicyCall struct {
 28595  	s                   *Service
 28596  	resource            string
 28597  	getiampolicyrequest *GetIamPolicyRequest
 28598  	urlParams_          gensupport.URLParams
 28599  	ctx_                context.Context
 28600  	header_             http.Header
 28601  }
 28602  
 28603  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 28604  // empty policy if the resource exists and does not have a policy set.
 28605  //
 28606  //   - resource: REQUIRED: The resource for which the policy is being requested.
 28607  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 28608  //     for the appropriate value for this field.
 28609  func (r *ProjectsLocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsBucketsViewsGetIamPolicyCall {
 28610  	c := &ProjectsLocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 28611  	c.resource = resource
 28612  	c.getiampolicyrequest = getiampolicyrequest
 28613  	return c
 28614  }
 28615  
 28616  // Fields allows partial responses to be retrieved. See
 28617  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 28618  // details.
 28619  func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsGetIamPolicyCall {
 28620  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 28621  	return c
 28622  }
 28623  
 28624  // Context sets the context to be used in this call's Do method.
 28625  func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsGetIamPolicyCall {
 28626  	c.ctx_ = ctx
 28627  	return c
 28628  }
 28629  
 28630  // Header returns a http.Header that can be modified by the caller to add
 28631  // headers to the request.
 28632  func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Header() http.Header {
 28633  	if c.header_ == nil {
 28634  		c.header_ = make(http.Header)
 28635  	}
 28636  	return c.header_
 28637  }
 28638  
 28639  func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 28640  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 28641  	var body io.Reader = nil
 28642  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
 28643  	if err != nil {
 28644  		return nil, err
 28645  	}
 28646  	c.urlParams_.Set("alt", alt)
 28647  	c.urlParams_.Set("prettyPrint", "false")
 28648  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
 28649  	urls += "?" + c.urlParams_.Encode()
 28650  	req, err := http.NewRequest("POST", urls, body)
 28651  	if err != nil {
 28652  		return nil, err
 28653  	}
 28654  	req.Header = reqHeaders
 28655  	googleapi.Expand(req.URL, map[string]string{
 28656  		"resource": c.resource,
 28657  	})
 28658  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 28659  }
 28660  
 28661  // Do executes the "logging.projects.locations.buckets.views.getIamPolicy" call.
 28662  // Any non-2xx status code is an error. Response headers are in either
 28663  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 28664  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 28665  // whether the returned error was because http.StatusNotModified was returned.
 28666  func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 28667  	gensupport.SetOptions(c.urlParams_, opts...)
 28668  	res, err := c.doRequest("json")
 28669  	if res != nil && res.StatusCode == http.StatusNotModified {
 28670  		if res.Body != nil {
 28671  			res.Body.Close()
 28672  		}
 28673  		return nil, gensupport.WrapError(&googleapi.Error{
 28674  			Code:   res.StatusCode,
 28675  			Header: res.Header,
 28676  		})
 28677  	}
 28678  	if err != nil {
 28679  		return nil, err
 28680  	}
 28681  	defer googleapi.CloseBody(res)
 28682  	if err := googleapi.CheckResponse(res); err != nil {
 28683  		return nil, gensupport.WrapError(err)
 28684  	}
 28685  	ret := &Policy{
 28686  		ServerResponse: googleapi.ServerResponse{
 28687  			Header:         res.Header,
 28688  			HTTPStatusCode: res.StatusCode,
 28689  		},
 28690  	}
 28691  	target := &ret
 28692  	if err := gensupport.DecodeResponse(target, res); err != nil {
 28693  		return nil, err
 28694  	}
 28695  	return ret, nil
 28696  }
 28697  
 28698  type ProjectsLocationsBucketsViewsListCall struct {
 28699  	s            *Service
 28700  	parent       string
 28701  	urlParams_   gensupport.URLParams
 28702  	ifNoneMatch_ string
 28703  	ctx_         context.Context
 28704  	header_      http.Header
 28705  }
 28706  
 28707  // List: Lists views on a log bucket.
 28708  //
 28709  //   - parent: The bucket whose views are to be listed:
 28710  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]".
 28711  func (r *ProjectsLocationsBucketsViewsService) List(parent string) *ProjectsLocationsBucketsViewsListCall {
 28712  	c := &ProjectsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 28713  	c.parent = parent
 28714  	return c
 28715  }
 28716  
 28717  // PageSize sets the optional parameter "pageSize": The maximum number of
 28718  // results to return from this request.Non-positive values are ignored. The
 28719  // presence of nextPageToken in the response indicates that more results might
 28720  // be available.
 28721  func (c *ProjectsLocationsBucketsViewsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsViewsListCall {
 28722  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 28723  	return c
 28724  }
 28725  
 28726  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 28727  // the next batch of results from the preceding call to this method. pageToken
 28728  // must be the value of nextPageToken from the previous response. The values of
 28729  // other method parameters should be identical to those in the previous call.
 28730  func (c *ProjectsLocationsBucketsViewsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsViewsListCall {
 28731  	c.urlParams_.Set("pageToken", pageToken)
 28732  	return c
 28733  }
 28734  
 28735  // Fields allows partial responses to be retrieved. See
 28736  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 28737  // details.
 28738  func (c *ProjectsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsListCall {
 28739  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 28740  	return c
 28741  }
 28742  
 28743  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 28744  // object's ETag matches the given value. This is useful for getting updates
 28745  // only after the object has changed since the last request.
 28746  func (c *ProjectsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsListCall {
 28747  	c.ifNoneMatch_ = entityTag
 28748  	return c
 28749  }
 28750  
 28751  // Context sets the context to be used in this call's Do method.
 28752  func (c *ProjectsLocationsBucketsViewsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsListCall {
 28753  	c.ctx_ = ctx
 28754  	return c
 28755  }
 28756  
 28757  // Header returns a http.Header that can be modified by the caller to add
 28758  // headers to the request.
 28759  func (c *ProjectsLocationsBucketsViewsListCall) Header() http.Header {
 28760  	if c.header_ == nil {
 28761  		c.header_ = make(http.Header)
 28762  	}
 28763  	return c.header_
 28764  }
 28765  
 28766  func (c *ProjectsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) {
 28767  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 28768  	if c.ifNoneMatch_ != "" {
 28769  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 28770  	}
 28771  	var body io.Reader = nil
 28772  	c.urlParams_.Set("alt", alt)
 28773  	c.urlParams_.Set("prettyPrint", "false")
 28774  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views")
 28775  	urls += "?" + c.urlParams_.Encode()
 28776  	req, err := http.NewRequest("GET", urls, body)
 28777  	if err != nil {
 28778  		return nil, err
 28779  	}
 28780  	req.Header = reqHeaders
 28781  	googleapi.Expand(req.URL, map[string]string{
 28782  		"parent": c.parent,
 28783  	})
 28784  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 28785  }
 28786  
 28787  // Do executes the "logging.projects.locations.buckets.views.list" call.
 28788  // Any non-2xx status code is an error. Response headers are in either
 28789  // *ListViewsResponse.ServerResponse.Header or (if a response was returned at
 28790  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 28791  // check whether the returned error was because http.StatusNotModified was
 28792  // returned.
 28793  func (c *ProjectsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) {
 28794  	gensupport.SetOptions(c.urlParams_, opts...)
 28795  	res, err := c.doRequest("json")
 28796  	if res != nil && res.StatusCode == http.StatusNotModified {
 28797  		if res.Body != nil {
 28798  			res.Body.Close()
 28799  		}
 28800  		return nil, gensupport.WrapError(&googleapi.Error{
 28801  			Code:   res.StatusCode,
 28802  			Header: res.Header,
 28803  		})
 28804  	}
 28805  	if err != nil {
 28806  		return nil, err
 28807  	}
 28808  	defer googleapi.CloseBody(res)
 28809  	if err := googleapi.CheckResponse(res); err != nil {
 28810  		return nil, gensupport.WrapError(err)
 28811  	}
 28812  	ret := &ListViewsResponse{
 28813  		ServerResponse: googleapi.ServerResponse{
 28814  			Header:         res.Header,
 28815  			HTTPStatusCode: res.StatusCode,
 28816  		},
 28817  	}
 28818  	target := &ret
 28819  	if err := gensupport.DecodeResponse(target, res); err != nil {
 28820  		return nil, err
 28821  	}
 28822  	return ret, nil
 28823  }
 28824  
 28825  // Pages invokes f for each page of results.
 28826  // A non-nil error returned from f will halt the iteration.
 28827  // The provided context supersedes any context provided to the Context method.
 28828  func (c *ProjectsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error {
 28829  	c.ctx_ = ctx
 28830  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 28831  	for {
 28832  		x, err := c.Do()
 28833  		if err != nil {
 28834  			return err
 28835  		}
 28836  		if err := f(x); err != nil {
 28837  			return err
 28838  		}
 28839  		if x.NextPageToken == "" {
 28840  			return nil
 28841  		}
 28842  		c.PageToken(x.NextPageToken)
 28843  	}
 28844  }
 28845  
 28846  type ProjectsLocationsBucketsViewsPatchCall struct {
 28847  	s          *Service
 28848  	name       string
 28849  	logview    *LogView
 28850  	urlParams_ gensupport.URLParams
 28851  	ctx_       context.Context
 28852  	header_    http.Header
 28853  }
 28854  
 28855  // Patch: Updates a view on a log bucket. This method replaces the value of the
 28856  // filter field from the existing view with the corresponding value from the
 28857  // new view. If an UNAVAILABLE error is returned, this indicates that system is
 28858  // not in a state where it can update the view. If this occurs, please try
 28859  // again in a few minutes.
 28860  //
 28861  //   - name: The full resource name of the view to update
 28862  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V
 28863  //     IEW_ID]" For
 28864  //     example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi
 28865  //     ew".
 28866  func (r *ProjectsLocationsBucketsViewsService) Patch(name string, logview *LogView) *ProjectsLocationsBucketsViewsPatchCall {
 28867  	c := &ProjectsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 28868  	c.name = name
 28869  	c.logview = logview
 28870  	return c
 28871  }
 28872  
 28873  // UpdateMask sets the optional parameter "updateMask": Field mask that
 28874  // specifies the fields in view that need an update. A field will be
 28875  // overwritten if, and only if, it is in the update mask. name and output only
 28876  // fields cannot be updated.For a detailed FieldMask definition, see
 28877  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 28878  // example: updateMask=filter
 28879  func (c *ProjectsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsViewsPatchCall {
 28880  	c.urlParams_.Set("updateMask", updateMask)
 28881  	return c
 28882  }
 28883  
 28884  // Fields allows partial responses to be retrieved. See
 28885  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 28886  // details.
 28887  func (c *ProjectsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsPatchCall {
 28888  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 28889  	return c
 28890  }
 28891  
 28892  // Context sets the context to be used in this call's Do method.
 28893  func (c *ProjectsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsPatchCall {
 28894  	c.ctx_ = ctx
 28895  	return c
 28896  }
 28897  
 28898  // Header returns a http.Header that can be modified by the caller to add
 28899  // headers to the request.
 28900  func (c *ProjectsLocationsBucketsViewsPatchCall) Header() http.Header {
 28901  	if c.header_ == nil {
 28902  		c.header_ = make(http.Header)
 28903  	}
 28904  	return c.header_
 28905  }
 28906  
 28907  func (c *ProjectsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) {
 28908  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 28909  	var body io.Reader = nil
 28910  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview)
 28911  	if err != nil {
 28912  		return nil, err
 28913  	}
 28914  	c.urlParams_.Set("alt", alt)
 28915  	c.urlParams_.Set("prettyPrint", "false")
 28916  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 28917  	urls += "?" + c.urlParams_.Encode()
 28918  	req, err := http.NewRequest("PATCH", urls, body)
 28919  	if err != nil {
 28920  		return nil, err
 28921  	}
 28922  	req.Header = reqHeaders
 28923  	googleapi.Expand(req.URL, map[string]string{
 28924  		"name": c.name,
 28925  	})
 28926  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 28927  }
 28928  
 28929  // Do executes the "logging.projects.locations.buckets.views.patch" call.
 28930  // Any non-2xx status code is an error. Response headers are in either
 28931  // *LogView.ServerResponse.Header or (if a response was returned at all) in
 28932  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 28933  // whether the returned error was because http.StatusNotModified was returned.
 28934  func (c *ProjectsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) {
 28935  	gensupport.SetOptions(c.urlParams_, opts...)
 28936  	res, err := c.doRequest("json")
 28937  	if res != nil && res.StatusCode == http.StatusNotModified {
 28938  		if res.Body != nil {
 28939  			res.Body.Close()
 28940  		}
 28941  		return nil, gensupport.WrapError(&googleapi.Error{
 28942  			Code:   res.StatusCode,
 28943  			Header: res.Header,
 28944  		})
 28945  	}
 28946  	if err != nil {
 28947  		return nil, err
 28948  	}
 28949  	defer googleapi.CloseBody(res)
 28950  	if err := googleapi.CheckResponse(res); err != nil {
 28951  		return nil, gensupport.WrapError(err)
 28952  	}
 28953  	ret := &LogView{
 28954  		ServerResponse: googleapi.ServerResponse{
 28955  			Header:         res.Header,
 28956  			HTTPStatusCode: res.StatusCode,
 28957  		},
 28958  	}
 28959  	target := &ret
 28960  	if err := gensupport.DecodeResponse(target, res); err != nil {
 28961  		return nil, err
 28962  	}
 28963  	return ret, nil
 28964  }
 28965  
 28966  type ProjectsLocationsBucketsViewsSetIamPolicyCall struct {
 28967  	s                   *Service
 28968  	resource            string
 28969  	setiampolicyrequest *SetIamPolicyRequest
 28970  	urlParams_          gensupport.URLParams
 28971  	ctx_                context.Context
 28972  	header_             http.Header
 28973  }
 28974  
 28975  // SetIamPolicy: Sets the access control policy on the specified resource.
 28976  // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
 28977  // PERMISSION_DENIED errors.
 28978  //
 28979  //   - resource: REQUIRED: The resource for which the policy is being specified.
 28980  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 28981  //     for the appropriate value for this field.
 28982  func (r *ProjectsLocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsBucketsViewsSetIamPolicyCall {
 28983  	c := &ProjectsLocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 28984  	c.resource = resource
 28985  	c.setiampolicyrequest = setiampolicyrequest
 28986  	return c
 28987  }
 28988  
 28989  // Fields allows partial responses to be retrieved. See
 28990  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 28991  // details.
 28992  func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsSetIamPolicyCall {
 28993  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 28994  	return c
 28995  }
 28996  
 28997  // Context sets the context to be used in this call's Do method.
 28998  func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsSetIamPolicyCall {
 28999  	c.ctx_ = ctx
 29000  	return c
 29001  }
 29002  
 29003  // Header returns a http.Header that can be modified by the caller to add
 29004  // headers to the request.
 29005  func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Header() http.Header {
 29006  	if c.header_ == nil {
 29007  		c.header_ = make(http.Header)
 29008  	}
 29009  	return c.header_
 29010  }
 29011  
 29012  func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 29013  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 29014  	var body io.Reader = nil
 29015  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 29016  	if err != nil {
 29017  		return nil, err
 29018  	}
 29019  	c.urlParams_.Set("alt", alt)
 29020  	c.urlParams_.Set("prettyPrint", "false")
 29021  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
 29022  	urls += "?" + c.urlParams_.Encode()
 29023  	req, err := http.NewRequest("POST", urls, body)
 29024  	if err != nil {
 29025  		return nil, err
 29026  	}
 29027  	req.Header = reqHeaders
 29028  	googleapi.Expand(req.URL, map[string]string{
 29029  		"resource": c.resource,
 29030  	})
 29031  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 29032  }
 29033  
 29034  // Do executes the "logging.projects.locations.buckets.views.setIamPolicy" call.
 29035  // Any non-2xx status code is an error. Response headers are in either
 29036  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 29037  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 29038  // whether the returned error was because http.StatusNotModified was returned.
 29039  func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 29040  	gensupport.SetOptions(c.urlParams_, opts...)
 29041  	res, err := c.doRequest("json")
 29042  	if res != nil && res.StatusCode == http.StatusNotModified {
 29043  		if res.Body != nil {
 29044  			res.Body.Close()
 29045  		}
 29046  		return nil, gensupport.WrapError(&googleapi.Error{
 29047  			Code:   res.StatusCode,
 29048  			Header: res.Header,
 29049  		})
 29050  	}
 29051  	if err != nil {
 29052  		return nil, err
 29053  	}
 29054  	defer googleapi.CloseBody(res)
 29055  	if err := googleapi.CheckResponse(res); err != nil {
 29056  		return nil, gensupport.WrapError(err)
 29057  	}
 29058  	ret := &Policy{
 29059  		ServerResponse: googleapi.ServerResponse{
 29060  			Header:         res.Header,
 29061  			HTTPStatusCode: res.StatusCode,
 29062  		},
 29063  	}
 29064  	target := &ret
 29065  	if err := gensupport.DecodeResponse(target, res); err != nil {
 29066  		return nil, err
 29067  	}
 29068  	return ret, nil
 29069  }
 29070  
 29071  type ProjectsLocationsBucketsViewsTestIamPermissionsCall struct {
 29072  	s                         *Service
 29073  	resource                  string
 29074  	testiampermissionsrequest *TestIamPermissionsRequest
 29075  	urlParams_                gensupport.URLParams
 29076  	ctx_                      context.Context
 29077  	header_                   http.Header
 29078  }
 29079  
 29080  // TestIamPermissions: Returns permissions that a caller has on the specified
 29081  // resource. If the resource does not exist, this will return an empty set of
 29082  // permissions, not a NOT_FOUND error.Note: This operation is designed to be
 29083  // used for building permission-aware UIs and command-line tools, not for
 29084  // authorization checking. This operation may "fail open" without warning.
 29085  //
 29086  //   - resource: REQUIRED: The resource for which the policy detail is being
 29087  //     requested. See Resource names
 29088  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 29089  //     value for this field.
 29090  func (r *ProjectsLocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsBucketsViewsTestIamPermissionsCall {
 29091  	c := &ProjectsLocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 29092  	c.resource = resource
 29093  	c.testiampermissionsrequest = testiampermissionsrequest
 29094  	return c
 29095  }
 29096  
 29097  // Fields allows partial responses to be retrieved. See
 29098  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 29099  // details.
 29100  func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsTestIamPermissionsCall {
 29101  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 29102  	return c
 29103  }
 29104  
 29105  // Context sets the context to be used in this call's Do method.
 29106  func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsTestIamPermissionsCall {
 29107  	c.ctx_ = ctx
 29108  	return c
 29109  }
 29110  
 29111  // Header returns a http.Header that can be modified by the caller to add
 29112  // headers to the request.
 29113  func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Header() http.Header {
 29114  	if c.header_ == nil {
 29115  		c.header_ = make(http.Header)
 29116  	}
 29117  	return c.header_
 29118  }
 29119  
 29120  func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 29121  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 29122  	var body io.Reader = nil
 29123  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 29124  	if err != nil {
 29125  		return nil, err
 29126  	}
 29127  	c.urlParams_.Set("alt", alt)
 29128  	c.urlParams_.Set("prettyPrint", "false")
 29129  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
 29130  	urls += "?" + c.urlParams_.Encode()
 29131  	req, err := http.NewRequest("POST", urls, body)
 29132  	if err != nil {
 29133  		return nil, err
 29134  	}
 29135  	req.Header = reqHeaders
 29136  	googleapi.Expand(req.URL, map[string]string{
 29137  		"resource": c.resource,
 29138  	})
 29139  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 29140  }
 29141  
 29142  // Do executes the "logging.projects.locations.buckets.views.testIamPermissions" call.
 29143  // Any non-2xx status code is an error. Response headers are in either
 29144  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 29145  // returned at all) in error.(*googleapi.Error).Header. Use
 29146  // googleapi.IsNotModified to check whether the returned error was because
 29147  // http.StatusNotModified was returned.
 29148  func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 29149  	gensupport.SetOptions(c.urlParams_, opts...)
 29150  	res, err := c.doRequest("json")
 29151  	if res != nil && res.StatusCode == http.StatusNotModified {
 29152  		if res.Body != nil {
 29153  			res.Body.Close()
 29154  		}
 29155  		return nil, gensupport.WrapError(&googleapi.Error{
 29156  			Code:   res.StatusCode,
 29157  			Header: res.Header,
 29158  		})
 29159  	}
 29160  	if err != nil {
 29161  		return nil, err
 29162  	}
 29163  	defer googleapi.CloseBody(res)
 29164  	if err := googleapi.CheckResponse(res); err != nil {
 29165  		return nil, gensupport.WrapError(err)
 29166  	}
 29167  	ret := &TestIamPermissionsResponse{
 29168  		ServerResponse: googleapi.ServerResponse{
 29169  			Header:         res.Header,
 29170  			HTTPStatusCode: res.StatusCode,
 29171  		},
 29172  	}
 29173  	target := &ret
 29174  	if err := gensupport.DecodeResponse(target, res); err != nil {
 29175  		return nil, err
 29176  	}
 29177  	return ret, nil
 29178  }
 29179  
 29180  type ProjectsLocationsBucketsViewsLogsListCall struct {
 29181  	s            *Service
 29182  	parent       string
 29183  	urlParams_   gensupport.URLParams
 29184  	ifNoneMatch_ string
 29185  	ctx_         context.Context
 29186  	header_      http.Header
 29187  }
 29188  
 29189  // List: Lists the logs in projects, organizations, folders, or billing
 29190  // accounts. Only logs that have entries are listed.
 29191  //
 29192  //   - parent: The resource name to list logs for: projects/[PROJECT_ID]
 29193  //     organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 29194  //     folders/[FOLDER_ID].
 29195  func (r *ProjectsLocationsBucketsViewsLogsService) List(parent string) *ProjectsLocationsBucketsViewsLogsListCall {
 29196  	c := &ProjectsLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 29197  	c.parent = parent
 29198  	return c
 29199  }
 29200  
 29201  // PageSize sets the optional parameter "pageSize": The maximum number of
 29202  // results to return from this request. Non-positive values are ignored. The
 29203  // presence of nextPageToken in the response indicates that more results might
 29204  // be available.
 29205  func (c *ProjectsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsViewsLogsListCall {
 29206  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 29207  	return c
 29208  }
 29209  
 29210  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 29211  // the next batch of results from the preceding call to this method. pageToken
 29212  // must be the value of nextPageToken from the previous response. The values of
 29213  // other method parameters should be identical to those in the previous call.
 29214  func (c *ProjectsLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsViewsLogsListCall {
 29215  	c.urlParams_.Set("pageToken", pageToken)
 29216  	return c
 29217  }
 29218  
 29219  // ResourceNames sets the optional parameter "resourceNames": List of resource
 29220  // names to list logs for:
 29221  // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
 29222  // _ID]
 29223  // organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
 29224  // iews/[VIEW_ID]
 29225  // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
 29226  // ID]/views/[VIEW_ID]
 29227  // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
 29228  // D]To support legacy queries, it could also be: projects/[PROJECT_ID]
 29229  // organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 29230  // folders/[FOLDER_ID]The resource name in the parent field is added to this
 29231  // list.
 29232  func (c *ProjectsLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *ProjectsLocationsBucketsViewsLogsListCall {
 29233  	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
 29234  	return c
 29235  }
 29236  
 29237  // Fields allows partial responses to be retrieved. See
 29238  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 29239  // details.
 29240  func (c *ProjectsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsLogsListCall {
 29241  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 29242  	return c
 29243  }
 29244  
 29245  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 29246  // object's ETag matches the given value. This is useful for getting updates
 29247  // only after the object has changed since the last request.
 29248  func (c *ProjectsLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsLogsListCall {
 29249  	c.ifNoneMatch_ = entityTag
 29250  	return c
 29251  }
 29252  
 29253  // Context sets the context to be used in this call's Do method.
 29254  func (c *ProjectsLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsLogsListCall {
 29255  	c.ctx_ = ctx
 29256  	return c
 29257  }
 29258  
 29259  // Header returns a http.Header that can be modified by the caller to add
 29260  // headers to the request.
 29261  func (c *ProjectsLocationsBucketsViewsLogsListCall) Header() http.Header {
 29262  	if c.header_ == nil {
 29263  		c.header_ = make(http.Header)
 29264  	}
 29265  	return c.header_
 29266  }
 29267  
 29268  func (c *ProjectsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) {
 29269  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 29270  	if c.ifNoneMatch_ != "" {
 29271  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 29272  	}
 29273  	var body io.Reader = nil
 29274  	c.urlParams_.Set("alt", alt)
 29275  	c.urlParams_.Set("prettyPrint", "false")
 29276  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
 29277  	urls += "?" + c.urlParams_.Encode()
 29278  	req, err := http.NewRequest("GET", urls, body)
 29279  	if err != nil {
 29280  		return nil, err
 29281  	}
 29282  	req.Header = reqHeaders
 29283  	googleapi.Expand(req.URL, map[string]string{
 29284  		"parent": c.parent,
 29285  	})
 29286  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 29287  }
 29288  
 29289  // Do executes the "logging.projects.locations.buckets.views.logs.list" call.
 29290  // Any non-2xx status code is an error. Response headers are in either
 29291  // *ListLogsResponse.ServerResponse.Header or (if a response was returned at
 29292  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 29293  // check whether the returned error was because http.StatusNotModified was
 29294  // returned.
 29295  func (c *ProjectsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
 29296  	gensupport.SetOptions(c.urlParams_, opts...)
 29297  	res, err := c.doRequest("json")
 29298  	if res != nil && res.StatusCode == http.StatusNotModified {
 29299  		if res.Body != nil {
 29300  			res.Body.Close()
 29301  		}
 29302  		return nil, gensupport.WrapError(&googleapi.Error{
 29303  			Code:   res.StatusCode,
 29304  			Header: res.Header,
 29305  		})
 29306  	}
 29307  	if err != nil {
 29308  		return nil, err
 29309  	}
 29310  	defer googleapi.CloseBody(res)
 29311  	if err := googleapi.CheckResponse(res); err != nil {
 29312  		return nil, gensupport.WrapError(err)
 29313  	}
 29314  	ret := &ListLogsResponse{
 29315  		ServerResponse: googleapi.ServerResponse{
 29316  			Header:         res.Header,
 29317  			HTTPStatusCode: res.StatusCode,
 29318  		},
 29319  	}
 29320  	target := &ret
 29321  	if err := gensupport.DecodeResponse(target, res); err != nil {
 29322  		return nil, err
 29323  	}
 29324  	return ret, nil
 29325  }
 29326  
 29327  // Pages invokes f for each page of results.
 29328  // A non-nil error returned from f will halt the iteration.
 29329  // The provided context supersedes any context provided to the Context method.
 29330  func (c *ProjectsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
 29331  	c.ctx_ = ctx
 29332  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 29333  	for {
 29334  		x, err := c.Do()
 29335  		if err != nil {
 29336  			return err
 29337  		}
 29338  		if err := f(x); err != nil {
 29339  			return err
 29340  		}
 29341  		if x.NextPageToken == "" {
 29342  			return nil
 29343  		}
 29344  		c.PageToken(x.NextPageToken)
 29345  	}
 29346  }
 29347  
 29348  type ProjectsLocationsOperationsCancelCall struct {
 29349  	s                      *Service
 29350  	name                   string
 29351  	canceloperationrequest *CancelOperationRequest
 29352  	urlParams_             gensupport.URLParams
 29353  	ctx_                   context.Context
 29354  	header_                http.Header
 29355  }
 29356  
 29357  // Cancel: Starts asynchronous cancellation on a long-running operation. The
 29358  // server makes a best effort to cancel the operation, but success is not
 29359  // guaranteed. If the server doesn't support this method, it returns
 29360  // google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or
 29361  // other methods to check whether the cancellation succeeded or whether the
 29362  // operation completed despite cancellation. On successful cancellation, the
 29363  // operation is not deleted; instead, it becomes an operation with an
 29364  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
 29365  // Code.CANCELLED.
 29366  //
 29367  // - name: The name of the operation resource to be cancelled.
 29368  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
 29369  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 29370  	c.name = name
 29371  	c.canceloperationrequest = canceloperationrequest
 29372  	return c
 29373  }
 29374  
 29375  // Fields allows partial responses to be retrieved. See
 29376  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 29377  // details.
 29378  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
 29379  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 29380  	return c
 29381  }
 29382  
 29383  // Context sets the context to be used in this call's Do method.
 29384  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
 29385  	c.ctx_ = ctx
 29386  	return c
 29387  }
 29388  
 29389  // Header returns a http.Header that can be modified by the caller to add
 29390  // headers to the request.
 29391  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
 29392  	if c.header_ == nil {
 29393  		c.header_ = make(http.Header)
 29394  	}
 29395  	return c.header_
 29396  }
 29397  
 29398  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
 29399  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 29400  	var body io.Reader = nil
 29401  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
 29402  	if err != nil {
 29403  		return nil, err
 29404  	}
 29405  	c.urlParams_.Set("alt", alt)
 29406  	c.urlParams_.Set("prettyPrint", "false")
 29407  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
 29408  	urls += "?" + c.urlParams_.Encode()
 29409  	req, err := http.NewRequest("POST", urls, body)
 29410  	if err != nil {
 29411  		return nil, err
 29412  	}
 29413  	req.Header = reqHeaders
 29414  	googleapi.Expand(req.URL, map[string]string{
 29415  		"name": c.name,
 29416  	})
 29417  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 29418  }
 29419  
 29420  // Do executes the "logging.projects.locations.operations.cancel" call.
 29421  // Any non-2xx status code is an error. Response headers are in either
 29422  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 29423  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 29424  // whether the returned error was because http.StatusNotModified was returned.
 29425  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 29426  	gensupport.SetOptions(c.urlParams_, opts...)
 29427  	res, err := c.doRequest("json")
 29428  	if res != nil && res.StatusCode == http.StatusNotModified {
 29429  		if res.Body != nil {
 29430  			res.Body.Close()
 29431  		}
 29432  		return nil, gensupport.WrapError(&googleapi.Error{
 29433  			Code:   res.StatusCode,
 29434  			Header: res.Header,
 29435  		})
 29436  	}
 29437  	if err != nil {
 29438  		return nil, err
 29439  	}
 29440  	defer googleapi.CloseBody(res)
 29441  	if err := googleapi.CheckResponse(res); err != nil {
 29442  		return nil, gensupport.WrapError(err)
 29443  	}
 29444  	ret := &Empty{
 29445  		ServerResponse: googleapi.ServerResponse{
 29446  			Header:         res.Header,
 29447  			HTTPStatusCode: res.StatusCode,
 29448  		},
 29449  	}
 29450  	target := &ret
 29451  	if err := gensupport.DecodeResponse(target, res); err != nil {
 29452  		return nil, err
 29453  	}
 29454  	return ret, nil
 29455  }
 29456  
 29457  type ProjectsLocationsOperationsGetCall struct {
 29458  	s            *Service
 29459  	name         string
 29460  	urlParams_   gensupport.URLParams
 29461  	ifNoneMatch_ string
 29462  	ctx_         context.Context
 29463  	header_      http.Header
 29464  }
 29465  
 29466  // Get: Gets the latest state of a long-running operation. Clients can use this
 29467  // method to poll the operation result at intervals as recommended by the API
 29468  // service.
 29469  //
 29470  // - name: The name of the operation resource.
 29471  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
 29472  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 29473  	c.name = name
 29474  	return c
 29475  }
 29476  
 29477  // Fields allows partial responses to be retrieved. See
 29478  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 29479  // details.
 29480  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
 29481  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 29482  	return c
 29483  }
 29484  
 29485  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 29486  // object's ETag matches the given value. This is useful for getting updates
 29487  // only after the object has changed since the last request.
 29488  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
 29489  	c.ifNoneMatch_ = entityTag
 29490  	return c
 29491  }
 29492  
 29493  // Context sets the context to be used in this call's Do method.
 29494  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
 29495  	c.ctx_ = ctx
 29496  	return c
 29497  }
 29498  
 29499  // Header returns a http.Header that can be modified by the caller to add
 29500  // headers to the request.
 29501  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
 29502  	if c.header_ == nil {
 29503  		c.header_ = make(http.Header)
 29504  	}
 29505  	return c.header_
 29506  }
 29507  
 29508  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 29509  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 29510  	if c.ifNoneMatch_ != "" {
 29511  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 29512  	}
 29513  	var body io.Reader = nil
 29514  	c.urlParams_.Set("alt", alt)
 29515  	c.urlParams_.Set("prettyPrint", "false")
 29516  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 29517  	urls += "?" + c.urlParams_.Encode()
 29518  	req, err := http.NewRequest("GET", urls, body)
 29519  	if err != nil {
 29520  		return nil, err
 29521  	}
 29522  	req.Header = reqHeaders
 29523  	googleapi.Expand(req.URL, map[string]string{
 29524  		"name": c.name,
 29525  	})
 29526  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 29527  }
 29528  
 29529  // Do executes the "logging.projects.locations.operations.get" call.
 29530  // Any non-2xx status code is an error. Response headers are in either
 29531  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 29532  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 29533  // whether the returned error was because http.StatusNotModified was returned.
 29534  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 29535  	gensupport.SetOptions(c.urlParams_, opts...)
 29536  	res, err := c.doRequest("json")
 29537  	if res != nil && res.StatusCode == http.StatusNotModified {
 29538  		if res.Body != nil {
 29539  			res.Body.Close()
 29540  		}
 29541  		return nil, gensupport.WrapError(&googleapi.Error{
 29542  			Code:   res.StatusCode,
 29543  			Header: res.Header,
 29544  		})
 29545  	}
 29546  	if err != nil {
 29547  		return nil, err
 29548  	}
 29549  	defer googleapi.CloseBody(res)
 29550  	if err := googleapi.CheckResponse(res); err != nil {
 29551  		return nil, gensupport.WrapError(err)
 29552  	}
 29553  	ret := &Operation{
 29554  		ServerResponse: googleapi.ServerResponse{
 29555  			Header:         res.Header,
 29556  			HTTPStatusCode: res.StatusCode,
 29557  		},
 29558  	}
 29559  	target := &ret
 29560  	if err := gensupport.DecodeResponse(target, res); err != nil {
 29561  		return nil, err
 29562  	}
 29563  	return ret, nil
 29564  }
 29565  
 29566  type ProjectsLocationsOperationsListCall struct {
 29567  	s            *Service
 29568  	name         string
 29569  	urlParams_   gensupport.URLParams
 29570  	ifNoneMatch_ string
 29571  	ctx_         context.Context
 29572  	header_      http.Header
 29573  }
 29574  
 29575  // List: Lists operations that match the specified filter in the request. If
 29576  // the server doesn't support this method, it returns UNIMPLEMENTED.
 29577  //
 29578  // - name: The name of the operation's parent resource.
 29579  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
 29580  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 29581  	c.name = name
 29582  	return c
 29583  }
 29584  
 29585  // Filter sets the optional parameter "filter": The standard list filter.
 29586  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
 29587  	c.urlParams_.Set("filter", filter)
 29588  	return c
 29589  }
 29590  
 29591  // PageSize sets the optional parameter "pageSize": The standard list page
 29592  // size.
 29593  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
 29594  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 29595  	return c
 29596  }
 29597  
 29598  // PageToken sets the optional parameter "pageToken": The standard list page
 29599  // token.
 29600  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
 29601  	c.urlParams_.Set("pageToken", pageToken)
 29602  	return c
 29603  }
 29604  
 29605  // Fields allows partial responses to be retrieved. See
 29606  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 29607  // details.
 29608  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
 29609  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 29610  	return c
 29611  }
 29612  
 29613  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 29614  // object's ETag matches the given value. This is useful for getting updates
 29615  // only after the object has changed since the last request.
 29616  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
 29617  	c.ifNoneMatch_ = entityTag
 29618  	return c
 29619  }
 29620  
 29621  // Context sets the context to be used in this call's Do method.
 29622  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
 29623  	c.ctx_ = ctx
 29624  	return c
 29625  }
 29626  
 29627  // Header returns a http.Header that can be modified by the caller to add
 29628  // headers to the request.
 29629  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
 29630  	if c.header_ == nil {
 29631  		c.header_ = make(http.Header)
 29632  	}
 29633  	return c.header_
 29634  }
 29635  
 29636  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 29637  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 29638  	if c.ifNoneMatch_ != "" {
 29639  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 29640  	}
 29641  	var body io.Reader = nil
 29642  	c.urlParams_.Set("alt", alt)
 29643  	c.urlParams_.Set("prettyPrint", "false")
 29644  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
 29645  	urls += "?" + c.urlParams_.Encode()
 29646  	req, err := http.NewRequest("GET", urls, body)
 29647  	if err != nil {
 29648  		return nil, err
 29649  	}
 29650  	req.Header = reqHeaders
 29651  	googleapi.Expand(req.URL, map[string]string{
 29652  		"name": c.name,
 29653  	})
 29654  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 29655  }
 29656  
 29657  // Do executes the "logging.projects.locations.operations.list" call.
 29658  // Any non-2xx status code is an error. Response headers are in either
 29659  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
 29660  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 29661  // check whether the returned error was because http.StatusNotModified was
 29662  // returned.
 29663  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
 29664  	gensupport.SetOptions(c.urlParams_, opts...)
 29665  	res, err := c.doRequest("json")
 29666  	if res != nil && res.StatusCode == http.StatusNotModified {
 29667  		if res.Body != nil {
 29668  			res.Body.Close()
 29669  		}
 29670  		return nil, gensupport.WrapError(&googleapi.Error{
 29671  			Code:   res.StatusCode,
 29672  			Header: res.Header,
 29673  		})
 29674  	}
 29675  	if err != nil {
 29676  		return nil, err
 29677  	}
 29678  	defer googleapi.CloseBody(res)
 29679  	if err := googleapi.CheckResponse(res); err != nil {
 29680  		return nil, gensupport.WrapError(err)
 29681  	}
 29682  	ret := &ListOperationsResponse{
 29683  		ServerResponse: googleapi.ServerResponse{
 29684  			Header:         res.Header,
 29685  			HTTPStatusCode: res.StatusCode,
 29686  		},
 29687  	}
 29688  	target := &ret
 29689  	if err := gensupport.DecodeResponse(target, res); err != nil {
 29690  		return nil, err
 29691  	}
 29692  	return ret, nil
 29693  }
 29694  
 29695  // Pages invokes f for each page of results.
 29696  // A non-nil error returned from f will halt the iteration.
 29697  // The provided context supersedes any context provided to the Context method.
 29698  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
 29699  	c.ctx_ = ctx
 29700  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 29701  	for {
 29702  		x, err := c.Do()
 29703  		if err != nil {
 29704  			return err
 29705  		}
 29706  		if err := f(x); err != nil {
 29707  			return err
 29708  		}
 29709  		if x.NextPageToken == "" {
 29710  			return nil
 29711  		}
 29712  		c.PageToken(x.NextPageToken)
 29713  	}
 29714  }
 29715  
 29716  type ProjectsLocationsRecentQueriesListCall struct {
 29717  	s            *Service
 29718  	parent       string
 29719  	urlParams_   gensupport.URLParams
 29720  	ifNoneMatch_ string
 29721  	ctx_         context.Context
 29722  	header_      http.Header
 29723  }
 29724  
 29725  // List: Lists the RecentQueries that were created by the user making the
 29726  // request.
 29727  //
 29728  //   - parent: The resource to which the listed queries belong.
 29729  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 29730  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 29731  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 29732  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For
 29733  //     example:projects/my-project/locations/us-central1Note: The location
 29734  //     portion of the resource must be specified, but supplying the character -
 29735  //     in place of LOCATION_ID will return all recent queries.
 29736  func (r *ProjectsLocationsRecentQueriesService) List(parent string) *ProjectsLocationsRecentQueriesListCall {
 29737  	c := &ProjectsLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 29738  	c.parent = parent
 29739  	return c
 29740  }
 29741  
 29742  // PageSize sets the optional parameter "pageSize": The maximum number of
 29743  // results to return from this request. Non-positive values are ignored. The
 29744  // presence of nextPageToken in the response indicates that more results might
 29745  // be available.
 29746  func (c *ProjectsLocationsRecentQueriesListCall) PageSize(pageSize int64) *ProjectsLocationsRecentQueriesListCall {
 29747  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 29748  	return c
 29749  }
 29750  
 29751  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 29752  // the next batch of results from the preceding call to this method. pageToken
 29753  // must be the value of nextPageToken from the previous response. The values of
 29754  // other method parameters should be identical to those in the previous call.
 29755  func (c *ProjectsLocationsRecentQueriesListCall) PageToken(pageToken string) *ProjectsLocationsRecentQueriesListCall {
 29756  	c.urlParams_.Set("pageToken", pageToken)
 29757  	return c
 29758  }
 29759  
 29760  // Fields allows partial responses to be retrieved. See
 29761  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 29762  // details.
 29763  func (c *ProjectsLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRecentQueriesListCall {
 29764  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 29765  	return c
 29766  }
 29767  
 29768  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 29769  // object's ETag matches the given value. This is useful for getting updates
 29770  // only after the object has changed since the last request.
 29771  func (c *ProjectsLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRecentQueriesListCall {
 29772  	c.ifNoneMatch_ = entityTag
 29773  	return c
 29774  }
 29775  
 29776  // Context sets the context to be used in this call's Do method.
 29777  func (c *ProjectsLocationsRecentQueriesListCall) Context(ctx context.Context) *ProjectsLocationsRecentQueriesListCall {
 29778  	c.ctx_ = ctx
 29779  	return c
 29780  }
 29781  
 29782  // Header returns a http.Header that can be modified by the caller to add
 29783  // headers to the request.
 29784  func (c *ProjectsLocationsRecentQueriesListCall) Header() http.Header {
 29785  	if c.header_ == nil {
 29786  		c.header_ = make(http.Header)
 29787  	}
 29788  	return c.header_
 29789  }
 29790  
 29791  func (c *ProjectsLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) {
 29792  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 29793  	if c.ifNoneMatch_ != "" {
 29794  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 29795  	}
 29796  	var body io.Reader = nil
 29797  	c.urlParams_.Set("alt", alt)
 29798  	c.urlParams_.Set("prettyPrint", "false")
 29799  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries")
 29800  	urls += "?" + c.urlParams_.Encode()
 29801  	req, err := http.NewRequest("GET", urls, body)
 29802  	if err != nil {
 29803  		return nil, err
 29804  	}
 29805  	req.Header = reqHeaders
 29806  	googleapi.Expand(req.URL, map[string]string{
 29807  		"parent": c.parent,
 29808  	})
 29809  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 29810  }
 29811  
 29812  // Do executes the "logging.projects.locations.recentQueries.list" call.
 29813  // Any non-2xx status code is an error. Response headers are in either
 29814  // *ListRecentQueriesResponse.ServerResponse.Header or (if a response was
 29815  // returned at all) in error.(*googleapi.Error).Header. Use
 29816  // googleapi.IsNotModified to check whether the returned error was because
 29817  // http.StatusNotModified was returned.
 29818  func (c *ProjectsLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) {
 29819  	gensupport.SetOptions(c.urlParams_, opts...)
 29820  	res, err := c.doRequest("json")
 29821  	if res != nil && res.StatusCode == http.StatusNotModified {
 29822  		if res.Body != nil {
 29823  			res.Body.Close()
 29824  		}
 29825  		return nil, gensupport.WrapError(&googleapi.Error{
 29826  			Code:   res.StatusCode,
 29827  			Header: res.Header,
 29828  		})
 29829  	}
 29830  	if err != nil {
 29831  		return nil, err
 29832  	}
 29833  	defer googleapi.CloseBody(res)
 29834  	if err := googleapi.CheckResponse(res); err != nil {
 29835  		return nil, gensupport.WrapError(err)
 29836  	}
 29837  	ret := &ListRecentQueriesResponse{
 29838  		ServerResponse: googleapi.ServerResponse{
 29839  			Header:         res.Header,
 29840  			HTTPStatusCode: res.StatusCode,
 29841  		},
 29842  	}
 29843  	target := &ret
 29844  	if err := gensupport.DecodeResponse(target, res); err != nil {
 29845  		return nil, err
 29846  	}
 29847  	return ret, nil
 29848  }
 29849  
 29850  // Pages invokes f for each page of results.
 29851  // A non-nil error returned from f will halt the iteration.
 29852  // The provided context supersedes any context provided to the Context method.
 29853  func (c *ProjectsLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error {
 29854  	c.ctx_ = ctx
 29855  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 29856  	for {
 29857  		x, err := c.Do()
 29858  		if err != nil {
 29859  			return err
 29860  		}
 29861  		if err := f(x); err != nil {
 29862  			return err
 29863  		}
 29864  		if x.NextPageToken == "" {
 29865  			return nil
 29866  		}
 29867  		c.PageToken(x.NextPageToken)
 29868  	}
 29869  }
 29870  
 29871  type ProjectsLocationsSavedQueriesCreateCall struct {
 29872  	s          *Service
 29873  	parent     string
 29874  	savedquery *SavedQuery
 29875  	urlParams_ gensupport.URLParams
 29876  	ctx_       context.Context
 29877  	header_    http.Header
 29878  }
 29879  
 29880  // Create: Creates a new SavedQuery for the user making the request.
 29881  //
 29882  //   - parent: The parent resource in which to create the saved query:
 29883  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 29884  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 29885  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 29886  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:
 29887  //     "projects/my-project/locations/global"
 29888  //     "organizations/123456789/locations/us-central1".
 29889  func (r *ProjectsLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *ProjectsLocationsSavedQueriesCreateCall {
 29890  	c := &ProjectsLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 29891  	c.parent = parent
 29892  	c.savedquery = savedquery
 29893  	return c
 29894  }
 29895  
 29896  // SavedQueryId sets the optional parameter "savedQueryId": The ID to use for
 29897  // the saved query, which will become the final component of the saved query's
 29898  // resource name.If the saved_query_id is not provided, the system will
 29899  // generate an alphanumeric ID.The saved_query_id is limited to 100 characters
 29900  // and can include only the following characters: upper and lower-case
 29901  // alphanumeric characters, underscores, hyphens, periods.First character has
 29902  // to be alphanumeric.
 29903  func (c *ProjectsLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *ProjectsLocationsSavedQueriesCreateCall {
 29904  	c.urlParams_.Set("savedQueryId", savedQueryId)
 29905  	return c
 29906  }
 29907  
 29908  // Fields allows partial responses to be retrieved. See
 29909  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 29910  // details.
 29911  func (c *ProjectsLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSavedQueriesCreateCall {
 29912  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 29913  	return c
 29914  }
 29915  
 29916  // Context sets the context to be used in this call's Do method.
 29917  func (c *ProjectsLocationsSavedQueriesCreateCall) Context(ctx context.Context) *ProjectsLocationsSavedQueriesCreateCall {
 29918  	c.ctx_ = ctx
 29919  	return c
 29920  }
 29921  
 29922  // Header returns a http.Header that can be modified by the caller to add
 29923  // headers to the request.
 29924  func (c *ProjectsLocationsSavedQueriesCreateCall) Header() http.Header {
 29925  	if c.header_ == nil {
 29926  		c.header_ = make(http.Header)
 29927  	}
 29928  	return c.header_
 29929  }
 29930  
 29931  func (c *ProjectsLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) {
 29932  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 29933  	var body io.Reader = nil
 29934  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery)
 29935  	if err != nil {
 29936  		return nil, err
 29937  	}
 29938  	c.urlParams_.Set("alt", alt)
 29939  	c.urlParams_.Set("prettyPrint", "false")
 29940  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
 29941  	urls += "?" + c.urlParams_.Encode()
 29942  	req, err := http.NewRequest("POST", urls, body)
 29943  	if err != nil {
 29944  		return nil, err
 29945  	}
 29946  	req.Header = reqHeaders
 29947  	googleapi.Expand(req.URL, map[string]string{
 29948  		"parent": c.parent,
 29949  	})
 29950  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 29951  }
 29952  
 29953  // Do executes the "logging.projects.locations.savedQueries.create" call.
 29954  // Any non-2xx status code is an error. Response headers are in either
 29955  // *SavedQuery.ServerResponse.Header or (if a response was returned at all) in
 29956  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 29957  // whether the returned error was because http.StatusNotModified was returned.
 29958  func (c *ProjectsLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
 29959  	gensupport.SetOptions(c.urlParams_, opts...)
 29960  	res, err := c.doRequest("json")
 29961  	if res != nil && res.StatusCode == http.StatusNotModified {
 29962  		if res.Body != nil {
 29963  			res.Body.Close()
 29964  		}
 29965  		return nil, gensupport.WrapError(&googleapi.Error{
 29966  			Code:   res.StatusCode,
 29967  			Header: res.Header,
 29968  		})
 29969  	}
 29970  	if err != nil {
 29971  		return nil, err
 29972  	}
 29973  	defer googleapi.CloseBody(res)
 29974  	if err := googleapi.CheckResponse(res); err != nil {
 29975  		return nil, gensupport.WrapError(err)
 29976  	}
 29977  	ret := &SavedQuery{
 29978  		ServerResponse: googleapi.ServerResponse{
 29979  			Header:         res.Header,
 29980  			HTTPStatusCode: res.StatusCode,
 29981  		},
 29982  	}
 29983  	target := &ret
 29984  	if err := gensupport.DecodeResponse(target, res); err != nil {
 29985  		return nil, err
 29986  	}
 29987  	return ret, nil
 29988  }
 29989  
 29990  type ProjectsLocationsSavedQueriesDeleteCall struct {
 29991  	s          *Service
 29992  	name       string
 29993  	urlParams_ gensupport.URLParams
 29994  	ctx_       context.Context
 29995  	header_    http.Header
 29996  }
 29997  
 29998  // Delete: Deletes an existing SavedQuery that was created by the user making
 29999  // the request.
 30000  //
 30001  //   - name: The full resource name of the saved query to delete.
 30002  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]"
 30003  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER
 30004  //     Y_ID]"
 30005  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/
 30006  //     [QUERY_ID]"
 30007  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For
 30008  //     example:
 30009  //     "projects/my-project/locations/global/savedQueries/my-saved-query".
 30010  func (r *ProjectsLocationsSavedQueriesService) Delete(name string) *ProjectsLocationsSavedQueriesDeleteCall {
 30011  	c := &ProjectsLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 30012  	c.name = name
 30013  	return c
 30014  }
 30015  
 30016  // Fields allows partial responses to be retrieved. See
 30017  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 30018  // details.
 30019  func (c *ProjectsLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSavedQueriesDeleteCall {
 30020  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 30021  	return c
 30022  }
 30023  
 30024  // Context sets the context to be used in this call's Do method.
 30025  func (c *ProjectsLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSavedQueriesDeleteCall {
 30026  	c.ctx_ = ctx
 30027  	return c
 30028  }
 30029  
 30030  // Header returns a http.Header that can be modified by the caller to add
 30031  // headers to the request.
 30032  func (c *ProjectsLocationsSavedQueriesDeleteCall) Header() http.Header {
 30033  	if c.header_ == nil {
 30034  		c.header_ = make(http.Header)
 30035  	}
 30036  	return c.header_
 30037  }
 30038  
 30039  func (c *ProjectsLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) {
 30040  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 30041  	var body io.Reader = nil
 30042  	c.urlParams_.Set("alt", alt)
 30043  	c.urlParams_.Set("prettyPrint", "false")
 30044  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
 30045  	urls += "?" + c.urlParams_.Encode()
 30046  	req, err := http.NewRequest("DELETE", urls, body)
 30047  	if err != nil {
 30048  		return nil, err
 30049  	}
 30050  	req.Header = reqHeaders
 30051  	googleapi.Expand(req.URL, map[string]string{
 30052  		"name": c.name,
 30053  	})
 30054  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 30055  }
 30056  
 30057  // Do executes the "logging.projects.locations.savedQueries.delete" call.
 30058  // Any non-2xx status code is an error. Response headers are in either
 30059  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 30060  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 30061  // whether the returned error was because http.StatusNotModified was returned.
 30062  func (c *ProjectsLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 30063  	gensupport.SetOptions(c.urlParams_, opts...)
 30064  	res, err := c.doRequest("json")
 30065  	if res != nil && res.StatusCode == http.StatusNotModified {
 30066  		if res.Body != nil {
 30067  			res.Body.Close()
 30068  		}
 30069  		return nil, gensupport.WrapError(&googleapi.Error{
 30070  			Code:   res.StatusCode,
 30071  			Header: res.Header,
 30072  		})
 30073  	}
 30074  	if err != nil {
 30075  		return nil, err
 30076  	}
 30077  	defer googleapi.CloseBody(res)
 30078  	if err := googleapi.CheckResponse(res); err != nil {
 30079  		return nil, gensupport.WrapError(err)
 30080  	}
 30081  	ret := &Empty{
 30082  		ServerResponse: googleapi.ServerResponse{
 30083  			Header:         res.Header,
 30084  			HTTPStatusCode: res.StatusCode,
 30085  		},
 30086  	}
 30087  	target := &ret
 30088  	if err := gensupport.DecodeResponse(target, res); err != nil {
 30089  		return nil, err
 30090  	}
 30091  	return ret, nil
 30092  }
 30093  
 30094  type ProjectsLocationsSavedQueriesListCall struct {
 30095  	s            *Service
 30096  	parent       string
 30097  	urlParams_   gensupport.URLParams
 30098  	ifNoneMatch_ string
 30099  	ctx_         context.Context
 30100  	header_      http.Header
 30101  }
 30102  
 30103  // List: Lists the SavedQueries that were created by the user making the
 30104  // request.
 30105  //
 30106  //   - parent: The resource to which the listed queries belong.
 30107  //     "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
 30108  //     "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
 30109  //     "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
 30110  //     "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:
 30111  //     "projects/my-project/locations/us-central1" Note: The locations portion of
 30112  //     the resource must be specified. To get a list of all saved queries, a
 30113  //     wildcard character - can be used for LOCATION_ID, for example:
 30114  //     "projects/my-project/locations/-".
 30115  func (r *ProjectsLocationsSavedQueriesService) List(parent string) *ProjectsLocationsSavedQueriesListCall {
 30116  	c := &ProjectsLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 30117  	c.parent = parent
 30118  	return c
 30119  }
 30120  
 30121  // PageSize sets the optional parameter "pageSize": The maximum number of
 30122  // results to return from this request.Non-positive values are ignored. The
 30123  // presence of nextPageToken in the response indicates that more results might
 30124  // be available.
 30125  func (c *ProjectsLocationsSavedQueriesListCall) PageSize(pageSize int64) *ProjectsLocationsSavedQueriesListCall {
 30126  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 30127  	return c
 30128  }
 30129  
 30130  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 30131  // the next batch of results from the preceding call to this method. pageToken
 30132  // must be the value of nextPageToken from the previous response. The values of
 30133  // other method parameters should be identical to those in the previous call.
 30134  func (c *ProjectsLocationsSavedQueriesListCall) PageToken(pageToken string) *ProjectsLocationsSavedQueriesListCall {
 30135  	c.urlParams_.Set("pageToken", pageToken)
 30136  	return c
 30137  }
 30138  
 30139  // Fields allows partial responses to be retrieved. See
 30140  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 30141  // details.
 30142  func (c *ProjectsLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSavedQueriesListCall {
 30143  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 30144  	return c
 30145  }
 30146  
 30147  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 30148  // object's ETag matches the given value. This is useful for getting updates
 30149  // only after the object has changed since the last request.
 30150  func (c *ProjectsLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSavedQueriesListCall {
 30151  	c.ifNoneMatch_ = entityTag
 30152  	return c
 30153  }
 30154  
 30155  // Context sets the context to be used in this call's Do method.
 30156  func (c *ProjectsLocationsSavedQueriesListCall) Context(ctx context.Context) *ProjectsLocationsSavedQueriesListCall {
 30157  	c.ctx_ = ctx
 30158  	return c
 30159  }
 30160  
 30161  // Header returns a http.Header that can be modified by the caller to add
 30162  // headers to the request.
 30163  func (c *ProjectsLocationsSavedQueriesListCall) Header() http.Header {
 30164  	if c.header_ == nil {
 30165  		c.header_ = make(http.Header)
 30166  	}
 30167  	return c.header_
 30168  }
 30169  
 30170  func (c *ProjectsLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) {
 30171  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 30172  	if c.ifNoneMatch_ != "" {
 30173  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 30174  	}
 30175  	var body io.Reader = nil
 30176  	c.urlParams_.Set("alt", alt)
 30177  	c.urlParams_.Set("prettyPrint", "false")
 30178  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries")
 30179  	urls += "?" + c.urlParams_.Encode()
 30180  	req, err := http.NewRequest("GET", urls, body)
 30181  	if err != nil {
 30182  		return nil, err
 30183  	}
 30184  	req.Header = reqHeaders
 30185  	googleapi.Expand(req.URL, map[string]string{
 30186  		"parent": c.parent,
 30187  	})
 30188  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 30189  }
 30190  
 30191  // Do executes the "logging.projects.locations.savedQueries.list" call.
 30192  // Any non-2xx status code is an error. Response headers are in either
 30193  // *ListSavedQueriesResponse.ServerResponse.Header or (if a response was
 30194  // returned at all) in error.(*googleapi.Error).Header. Use
 30195  // googleapi.IsNotModified to check whether the returned error was because
 30196  // http.StatusNotModified was returned.
 30197  func (c *ProjectsLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) {
 30198  	gensupport.SetOptions(c.urlParams_, opts...)
 30199  	res, err := c.doRequest("json")
 30200  	if res != nil && res.StatusCode == http.StatusNotModified {
 30201  		if res.Body != nil {
 30202  			res.Body.Close()
 30203  		}
 30204  		return nil, gensupport.WrapError(&googleapi.Error{
 30205  			Code:   res.StatusCode,
 30206  			Header: res.Header,
 30207  		})
 30208  	}
 30209  	if err != nil {
 30210  		return nil, err
 30211  	}
 30212  	defer googleapi.CloseBody(res)
 30213  	if err := googleapi.CheckResponse(res); err != nil {
 30214  		return nil, gensupport.WrapError(err)
 30215  	}
 30216  	ret := &ListSavedQueriesResponse{
 30217  		ServerResponse: googleapi.ServerResponse{
 30218  			Header:         res.Header,
 30219  			HTTPStatusCode: res.StatusCode,
 30220  		},
 30221  	}
 30222  	target := &ret
 30223  	if err := gensupport.DecodeResponse(target, res); err != nil {
 30224  		return nil, err
 30225  	}
 30226  	return ret, nil
 30227  }
 30228  
 30229  // Pages invokes f for each page of results.
 30230  // A non-nil error returned from f will halt the iteration.
 30231  // The provided context supersedes any context provided to the Context method.
 30232  func (c *ProjectsLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error {
 30233  	c.ctx_ = ctx
 30234  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 30235  	for {
 30236  		x, err := c.Do()
 30237  		if err != nil {
 30238  			return err
 30239  		}
 30240  		if err := f(x); err != nil {
 30241  			return err
 30242  		}
 30243  		if x.NextPageToken == "" {
 30244  			return nil
 30245  		}
 30246  		c.PageToken(x.NextPageToken)
 30247  	}
 30248  }
 30249  
 30250  type ProjectsLogsDeleteCall struct {
 30251  	s          *Service
 30252  	logName    string
 30253  	urlParams_ gensupport.URLParams
 30254  	ctx_       context.Context
 30255  	header_    http.Header
 30256  }
 30257  
 30258  // Delete: Deletes all the log entries in a log for the _Default Log Bucket.
 30259  // The log reappears if it receives new entries. Log entries written shortly
 30260  // before the delete operation might not be deleted. Entries received after the
 30261  // delete operation with a timestamp before the operation will be deleted.
 30262  //
 30263  //   - logName: The resource name of the log to delete:
 30264  //     projects/[PROJECT_ID]/logs/[LOG_ID]
 30265  //     organizations/[ORGANIZATION_ID]/logs/[LOG_ID]
 30266  //     billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]
 30267  //     folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For
 30268  //     example, "projects/my-project-id/logs/syslog",
 30269  //     "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more
 30270  //     information about log names, see LogEntry.
 30271  func (r *ProjectsLogsService) Delete(logName string) *ProjectsLogsDeleteCall {
 30272  	c := &ProjectsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 30273  	c.logName = logName
 30274  	return c
 30275  }
 30276  
 30277  // Fields allows partial responses to be retrieved. See
 30278  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 30279  // details.
 30280  func (c *ProjectsLogsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLogsDeleteCall {
 30281  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 30282  	return c
 30283  }
 30284  
 30285  // Context sets the context to be used in this call's Do method.
 30286  func (c *ProjectsLogsDeleteCall) Context(ctx context.Context) *ProjectsLogsDeleteCall {
 30287  	c.ctx_ = ctx
 30288  	return c
 30289  }
 30290  
 30291  // Header returns a http.Header that can be modified by the caller to add
 30292  // headers to the request.
 30293  func (c *ProjectsLogsDeleteCall) Header() http.Header {
 30294  	if c.header_ == nil {
 30295  		c.header_ = make(http.Header)
 30296  	}
 30297  	return c.header_
 30298  }
 30299  
 30300  func (c *ProjectsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
 30301  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 30302  	var body io.Reader = nil
 30303  	c.urlParams_.Set("alt", alt)
 30304  	c.urlParams_.Set("prettyPrint", "false")
 30305  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}")
 30306  	urls += "?" + c.urlParams_.Encode()
 30307  	req, err := http.NewRequest("DELETE", urls, body)
 30308  	if err != nil {
 30309  		return nil, err
 30310  	}
 30311  	req.Header = reqHeaders
 30312  	googleapi.Expand(req.URL, map[string]string{
 30313  		"logName": c.logName,
 30314  	})
 30315  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 30316  }
 30317  
 30318  // Do executes the "logging.projects.logs.delete" call.
 30319  // Any non-2xx status code is an error. Response headers are in either
 30320  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 30321  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 30322  // whether the returned error was because http.StatusNotModified was returned.
 30323  func (c *ProjectsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 30324  	gensupport.SetOptions(c.urlParams_, opts...)
 30325  	res, err := c.doRequest("json")
 30326  	if res != nil && res.StatusCode == http.StatusNotModified {
 30327  		if res.Body != nil {
 30328  			res.Body.Close()
 30329  		}
 30330  		return nil, gensupport.WrapError(&googleapi.Error{
 30331  			Code:   res.StatusCode,
 30332  			Header: res.Header,
 30333  		})
 30334  	}
 30335  	if err != nil {
 30336  		return nil, err
 30337  	}
 30338  	defer googleapi.CloseBody(res)
 30339  	if err := googleapi.CheckResponse(res); err != nil {
 30340  		return nil, gensupport.WrapError(err)
 30341  	}
 30342  	ret := &Empty{
 30343  		ServerResponse: googleapi.ServerResponse{
 30344  			Header:         res.Header,
 30345  			HTTPStatusCode: res.StatusCode,
 30346  		},
 30347  	}
 30348  	target := &ret
 30349  	if err := gensupport.DecodeResponse(target, res); err != nil {
 30350  		return nil, err
 30351  	}
 30352  	return ret, nil
 30353  }
 30354  
 30355  type ProjectsLogsListCall struct {
 30356  	s            *Service
 30357  	parent       string
 30358  	urlParams_   gensupport.URLParams
 30359  	ifNoneMatch_ string
 30360  	ctx_         context.Context
 30361  	header_      http.Header
 30362  }
 30363  
 30364  // List: Lists the logs in projects, organizations, folders, or billing
 30365  // accounts. Only logs that have entries are listed.
 30366  //
 30367  //   - parent: The resource name to list logs for: projects/[PROJECT_ID]
 30368  //     organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 30369  //     folders/[FOLDER_ID].
 30370  func (r *ProjectsLogsService) List(parent string) *ProjectsLogsListCall {
 30371  	c := &ProjectsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 30372  	c.parent = parent
 30373  	return c
 30374  }
 30375  
 30376  // PageSize sets the optional parameter "pageSize": The maximum number of
 30377  // results to return from this request. Non-positive values are ignored. The
 30378  // presence of nextPageToken in the response indicates that more results might
 30379  // be available.
 30380  func (c *ProjectsLogsListCall) PageSize(pageSize int64) *ProjectsLogsListCall {
 30381  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 30382  	return c
 30383  }
 30384  
 30385  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 30386  // the next batch of results from the preceding call to this method. pageToken
 30387  // must be the value of nextPageToken from the previous response. The values of
 30388  // other method parameters should be identical to those in the previous call.
 30389  func (c *ProjectsLogsListCall) PageToken(pageToken string) *ProjectsLogsListCall {
 30390  	c.urlParams_.Set("pageToken", pageToken)
 30391  	return c
 30392  }
 30393  
 30394  // ResourceNames sets the optional parameter "resourceNames": List of resource
 30395  // names to list logs for:
 30396  // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW
 30397  // _ID]
 30398  // organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v
 30399  // iews/[VIEW_ID]
 30400  // billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_
 30401  // ID]/views/[VIEW_ID]
 30402  // folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I
 30403  // D]To support legacy queries, it could also be: projects/[PROJECT_ID]
 30404  // organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID]
 30405  // folders/[FOLDER_ID]The resource name in the parent field is added to this
 30406  // list.
 30407  func (c *ProjectsLogsListCall) ResourceNames(resourceNames ...string) *ProjectsLogsListCall {
 30408  	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
 30409  	return c
 30410  }
 30411  
 30412  // Fields allows partial responses to be retrieved. See
 30413  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 30414  // details.
 30415  func (c *ProjectsLogsListCall) Fields(s ...googleapi.Field) *ProjectsLogsListCall {
 30416  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 30417  	return c
 30418  }
 30419  
 30420  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 30421  // object's ETag matches the given value. This is useful for getting updates
 30422  // only after the object has changed since the last request.
 30423  func (c *ProjectsLogsListCall) IfNoneMatch(entityTag string) *ProjectsLogsListCall {
 30424  	c.ifNoneMatch_ = entityTag
 30425  	return c
 30426  }
 30427  
 30428  // Context sets the context to be used in this call's Do method.
 30429  func (c *ProjectsLogsListCall) Context(ctx context.Context) *ProjectsLogsListCall {
 30430  	c.ctx_ = ctx
 30431  	return c
 30432  }
 30433  
 30434  // Header returns a http.Header that can be modified by the caller to add
 30435  // headers to the request.
 30436  func (c *ProjectsLogsListCall) Header() http.Header {
 30437  	if c.header_ == nil {
 30438  		c.header_ = make(http.Header)
 30439  	}
 30440  	return c.header_
 30441  }
 30442  
 30443  func (c *ProjectsLogsListCall) doRequest(alt string) (*http.Response, error) {
 30444  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 30445  	if c.ifNoneMatch_ != "" {
 30446  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 30447  	}
 30448  	var body io.Reader = nil
 30449  	c.urlParams_.Set("alt", alt)
 30450  	c.urlParams_.Set("prettyPrint", "false")
 30451  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs")
 30452  	urls += "?" + c.urlParams_.Encode()
 30453  	req, err := http.NewRequest("GET", urls, body)
 30454  	if err != nil {
 30455  		return nil, err
 30456  	}
 30457  	req.Header = reqHeaders
 30458  	googleapi.Expand(req.URL, map[string]string{
 30459  		"parent": c.parent,
 30460  	})
 30461  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 30462  }
 30463  
 30464  // Do executes the "logging.projects.logs.list" call.
 30465  // Any non-2xx status code is an error. Response headers are in either
 30466  // *ListLogsResponse.ServerResponse.Header or (if a response was returned at
 30467  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 30468  // check whether the returned error was because http.StatusNotModified was
 30469  // returned.
 30470  func (c *ProjectsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) {
 30471  	gensupport.SetOptions(c.urlParams_, opts...)
 30472  	res, err := c.doRequest("json")
 30473  	if res != nil && res.StatusCode == http.StatusNotModified {
 30474  		if res.Body != nil {
 30475  			res.Body.Close()
 30476  		}
 30477  		return nil, gensupport.WrapError(&googleapi.Error{
 30478  			Code:   res.StatusCode,
 30479  			Header: res.Header,
 30480  		})
 30481  	}
 30482  	if err != nil {
 30483  		return nil, err
 30484  	}
 30485  	defer googleapi.CloseBody(res)
 30486  	if err := googleapi.CheckResponse(res); err != nil {
 30487  		return nil, gensupport.WrapError(err)
 30488  	}
 30489  	ret := &ListLogsResponse{
 30490  		ServerResponse: googleapi.ServerResponse{
 30491  			Header:         res.Header,
 30492  			HTTPStatusCode: res.StatusCode,
 30493  		},
 30494  	}
 30495  	target := &ret
 30496  	if err := gensupport.DecodeResponse(target, res); err != nil {
 30497  		return nil, err
 30498  	}
 30499  	return ret, nil
 30500  }
 30501  
 30502  // Pages invokes f for each page of results.
 30503  // A non-nil error returned from f will halt the iteration.
 30504  // The provided context supersedes any context provided to the Context method.
 30505  func (c *ProjectsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error {
 30506  	c.ctx_ = ctx
 30507  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 30508  	for {
 30509  		x, err := c.Do()
 30510  		if err != nil {
 30511  			return err
 30512  		}
 30513  		if err := f(x); err != nil {
 30514  			return err
 30515  		}
 30516  		if x.NextPageToken == "" {
 30517  			return nil
 30518  		}
 30519  		c.PageToken(x.NextPageToken)
 30520  	}
 30521  }
 30522  
 30523  type ProjectsMetricsCreateCall struct {
 30524  	s          *Service
 30525  	parent     string
 30526  	logmetric  *LogMetric
 30527  	urlParams_ gensupport.URLParams
 30528  	ctx_       context.Context
 30529  	header_    http.Header
 30530  }
 30531  
 30532  // Create: Creates a logs-based metric.
 30533  //
 30534  //   - parent: The resource name of the project in which to create the metric:
 30535  //     "projects/[PROJECT_ID]" The new metric must be provided in the request.
 30536  func (r *ProjectsMetricsService) Create(parent string, logmetric *LogMetric) *ProjectsMetricsCreateCall {
 30537  	c := &ProjectsMetricsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 30538  	c.parent = parent
 30539  	c.logmetric = logmetric
 30540  	return c
 30541  }
 30542  
 30543  // Fields allows partial responses to be retrieved. See
 30544  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 30545  // details.
 30546  func (c *ProjectsMetricsCreateCall) Fields(s ...googleapi.Field) *ProjectsMetricsCreateCall {
 30547  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 30548  	return c
 30549  }
 30550  
 30551  // Context sets the context to be used in this call's Do method.
 30552  func (c *ProjectsMetricsCreateCall) Context(ctx context.Context) *ProjectsMetricsCreateCall {
 30553  	c.ctx_ = ctx
 30554  	return c
 30555  }
 30556  
 30557  // Header returns a http.Header that can be modified by the caller to add
 30558  // headers to the request.
 30559  func (c *ProjectsMetricsCreateCall) Header() http.Header {
 30560  	if c.header_ == nil {
 30561  		c.header_ = make(http.Header)
 30562  	}
 30563  	return c.header_
 30564  }
 30565  
 30566  func (c *ProjectsMetricsCreateCall) doRequest(alt string) (*http.Response, error) {
 30567  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 30568  	var body io.Reader = nil
 30569  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logmetric)
 30570  	if err != nil {
 30571  		return nil, err
 30572  	}
 30573  	c.urlParams_.Set("alt", alt)
 30574  	c.urlParams_.Set("prettyPrint", "false")
 30575  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/metrics")
 30576  	urls += "?" + c.urlParams_.Encode()
 30577  	req, err := http.NewRequest("POST", urls, body)
 30578  	if err != nil {
 30579  		return nil, err
 30580  	}
 30581  	req.Header = reqHeaders
 30582  	googleapi.Expand(req.URL, map[string]string{
 30583  		"parent": c.parent,
 30584  	})
 30585  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 30586  }
 30587  
 30588  // Do executes the "logging.projects.metrics.create" call.
 30589  // Any non-2xx status code is an error. Response headers are in either
 30590  // *LogMetric.ServerResponse.Header or (if a response was returned at all) in
 30591  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 30592  // whether the returned error was because http.StatusNotModified was returned.
 30593  func (c *ProjectsMetricsCreateCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
 30594  	gensupport.SetOptions(c.urlParams_, opts...)
 30595  	res, err := c.doRequest("json")
 30596  	if res != nil && res.StatusCode == http.StatusNotModified {
 30597  		if res.Body != nil {
 30598  			res.Body.Close()
 30599  		}
 30600  		return nil, gensupport.WrapError(&googleapi.Error{
 30601  			Code:   res.StatusCode,
 30602  			Header: res.Header,
 30603  		})
 30604  	}
 30605  	if err != nil {
 30606  		return nil, err
 30607  	}
 30608  	defer googleapi.CloseBody(res)
 30609  	if err := googleapi.CheckResponse(res); err != nil {
 30610  		return nil, gensupport.WrapError(err)
 30611  	}
 30612  	ret := &LogMetric{
 30613  		ServerResponse: googleapi.ServerResponse{
 30614  			Header:         res.Header,
 30615  			HTTPStatusCode: res.StatusCode,
 30616  		},
 30617  	}
 30618  	target := &ret
 30619  	if err := gensupport.DecodeResponse(target, res); err != nil {
 30620  		return nil, err
 30621  	}
 30622  	return ret, nil
 30623  }
 30624  
 30625  type ProjectsMetricsDeleteCall struct {
 30626  	s          *Service
 30627  	metricName string
 30628  	urlParams_ gensupport.URLParams
 30629  	ctx_       context.Context
 30630  	header_    http.Header
 30631  }
 30632  
 30633  // Delete: Deletes a logs-based metric.
 30634  //
 30635  //   - metricName: The resource name of the metric to delete:
 30636  //     "projects/[PROJECT_ID]/metrics/[METRIC_ID]".
 30637  func (r *ProjectsMetricsService) Delete(metricName string) *ProjectsMetricsDeleteCall {
 30638  	c := &ProjectsMetricsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 30639  	c.metricName = metricName
 30640  	return c
 30641  }
 30642  
 30643  // Fields allows partial responses to be retrieved. See
 30644  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 30645  // details.
 30646  func (c *ProjectsMetricsDeleteCall) Fields(s ...googleapi.Field) *ProjectsMetricsDeleteCall {
 30647  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 30648  	return c
 30649  }
 30650  
 30651  // Context sets the context to be used in this call's Do method.
 30652  func (c *ProjectsMetricsDeleteCall) Context(ctx context.Context) *ProjectsMetricsDeleteCall {
 30653  	c.ctx_ = ctx
 30654  	return c
 30655  }
 30656  
 30657  // Header returns a http.Header that can be modified by the caller to add
 30658  // headers to the request.
 30659  func (c *ProjectsMetricsDeleteCall) Header() http.Header {
 30660  	if c.header_ == nil {
 30661  		c.header_ = make(http.Header)
 30662  	}
 30663  	return c.header_
 30664  }
 30665  
 30666  func (c *ProjectsMetricsDeleteCall) doRequest(alt string) (*http.Response, error) {
 30667  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 30668  	var body io.Reader = nil
 30669  	c.urlParams_.Set("alt", alt)
 30670  	c.urlParams_.Set("prettyPrint", "false")
 30671  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
 30672  	urls += "?" + c.urlParams_.Encode()
 30673  	req, err := http.NewRequest("DELETE", urls, body)
 30674  	if err != nil {
 30675  		return nil, err
 30676  	}
 30677  	req.Header = reqHeaders
 30678  	googleapi.Expand(req.URL, map[string]string{
 30679  		"metricName": c.metricName,
 30680  	})
 30681  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 30682  }
 30683  
 30684  // Do executes the "logging.projects.metrics.delete" call.
 30685  // Any non-2xx status code is an error. Response headers are in either
 30686  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 30687  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 30688  // whether the returned error was because http.StatusNotModified was returned.
 30689  func (c *ProjectsMetricsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 30690  	gensupport.SetOptions(c.urlParams_, opts...)
 30691  	res, err := c.doRequest("json")
 30692  	if res != nil && res.StatusCode == http.StatusNotModified {
 30693  		if res.Body != nil {
 30694  			res.Body.Close()
 30695  		}
 30696  		return nil, gensupport.WrapError(&googleapi.Error{
 30697  			Code:   res.StatusCode,
 30698  			Header: res.Header,
 30699  		})
 30700  	}
 30701  	if err != nil {
 30702  		return nil, err
 30703  	}
 30704  	defer googleapi.CloseBody(res)
 30705  	if err := googleapi.CheckResponse(res); err != nil {
 30706  		return nil, gensupport.WrapError(err)
 30707  	}
 30708  	ret := &Empty{
 30709  		ServerResponse: googleapi.ServerResponse{
 30710  			Header:         res.Header,
 30711  			HTTPStatusCode: res.StatusCode,
 30712  		},
 30713  	}
 30714  	target := &ret
 30715  	if err := gensupport.DecodeResponse(target, res); err != nil {
 30716  		return nil, err
 30717  	}
 30718  	return ret, nil
 30719  }
 30720  
 30721  type ProjectsMetricsGetCall struct {
 30722  	s            *Service
 30723  	metricName   string
 30724  	urlParams_   gensupport.URLParams
 30725  	ifNoneMatch_ string
 30726  	ctx_         context.Context
 30727  	header_      http.Header
 30728  }
 30729  
 30730  // Get: Gets a logs-based metric.
 30731  //
 30732  //   - metricName: The resource name of the desired metric:
 30733  //     "projects/[PROJECT_ID]/metrics/[METRIC_ID]".
 30734  func (r *ProjectsMetricsService) Get(metricName string) *ProjectsMetricsGetCall {
 30735  	c := &ProjectsMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 30736  	c.metricName = metricName
 30737  	return c
 30738  }
 30739  
 30740  // Fields allows partial responses to be retrieved. See
 30741  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 30742  // details.
 30743  func (c *ProjectsMetricsGetCall) Fields(s ...googleapi.Field) *ProjectsMetricsGetCall {
 30744  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 30745  	return c
 30746  }
 30747  
 30748  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 30749  // object's ETag matches the given value. This is useful for getting updates
 30750  // only after the object has changed since the last request.
 30751  func (c *ProjectsMetricsGetCall) IfNoneMatch(entityTag string) *ProjectsMetricsGetCall {
 30752  	c.ifNoneMatch_ = entityTag
 30753  	return c
 30754  }
 30755  
 30756  // Context sets the context to be used in this call's Do method.
 30757  func (c *ProjectsMetricsGetCall) Context(ctx context.Context) *ProjectsMetricsGetCall {
 30758  	c.ctx_ = ctx
 30759  	return c
 30760  }
 30761  
 30762  // Header returns a http.Header that can be modified by the caller to add
 30763  // headers to the request.
 30764  func (c *ProjectsMetricsGetCall) Header() http.Header {
 30765  	if c.header_ == nil {
 30766  		c.header_ = make(http.Header)
 30767  	}
 30768  	return c.header_
 30769  }
 30770  
 30771  func (c *ProjectsMetricsGetCall) doRequest(alt string) (*http.Response, error) {
 30772  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 30773  	if c.ifNoneMatch_ != "" {
 30774  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 30775  	}
 30776  	var body io.Reader = nil
 30777  	c.urlParams_.Set("alt", alt)
 30778  	c.urlParams_.Set("prettyPrint", "false")
 30779  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
 30780  	urls += "?" + c.urlParams_.Encode()
 30781  	req, err := http.NewRequest("GET", urls, body)
 30782  	if err != nil {
 30783  		return nil, err
 30784  	}
 30785  	req.Header = reqHeaders
 30786  	googleapi.Expand(req.URL, map[string]string{
 30787  		"metricName": c.metricName,
 30788  	})
 30789  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 30790  }
 30791  
 30792  // Do executes the "logging.projects.metrics.get" call.
 30793  // Any non-2xx status code is an error. Response headers are in either
 30794  // *LogMetric.ServerResponse.Header or (if a response was returned at all) in
 30795  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 30796  // whether the returned error was because http.StatusNotModified was returned.
 30797  func (c *ProjectsMetricsGetCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
 30798  	gensupport.SetOptions(c.urlParams_, opts...)
 30799  	res, err := c.doRequest("json")
 30800  	if res != nil && res.StatusCode == http.StatusNotModified {
 30801  		if res.Body != nil {
 30802  			res.Body.Close()
 30803  		}
 30804  		return nil, gensupport.WrapError(&googleapi.Error{
 30805  			Code:   res.StatusCode,
 30806  			Header: res.Header,
 30807  		})
 30808  	}
 30809  	if err != nil {
 30810  		return nil, err
 30811  	}
 30812  	defer googleapi.CloseBody(res)
 30813  	if err := googleapi.CheckResponse(res); err != nil {
 30814  		return nil, gensupport.WrapError(err)
 30815  	}
 30816  	ret := &LogMetric{
 30817  		ServerResponse: googleapi.ServerResponse{
 30818  			Header:         res.Header,
 30819  			HTTPStatusCode: res.StatusCode,
 30820  		},
 30821  	}
 30822  	target := &ret
 30823  	if err := gensupport.DecodeResponse(target, res); err != nil {
 30824  		return nil, err
 30825  	}
 30826  	return ret, nil
 30827  }
 30828  
 30829  type ProjectsMetricsListCall struct {
 30830  	s            *Service
 30831  	parent       string
 30832  	urlParams_   gensupport.URLParams
 30833  	ifNoneMatch_ string
 30834  	ctx_         context.Context
 30835  	header_      http.Header
 30836  }
 30837  
 30838  // List: Lists logs-based metrics.
 30839  //
 30840  //   - parent: The name of the project containing the metrics:
 30841  //     "projects/[PROJECT_ID]".
 30842  func (r *ProjectsMetricsService) List(parent string) *ProjectsMetricsListCall {
 30843  	c := &ProjectsMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 30844  	c.parent = parent
 30845  	return c
 30846  }
 30847  
 30848  // PageSize sets the optional parameter "pageSize": The maximum number of
 30849  // results to return from this request. Non-positive values are ignored. The
 30850  // presence of nextPageToken in the response indicates that more results might
 30851  // be available.
 30852  func (c *ProjectsMetricsListCall) PageSize(pageSize int64) *ProjectsMetricsListCall {
 30853  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 30854  	return c
 30855  }
 30856  
 30857  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 30858  // the next batch of results from the preceding call to this method. pageToken
 30859  // must be the value of nextPageToken from the previous response. The values of
 30860  // other method parameters should be identical to those in the previous call.
 30861  func (c *ProjectsMetricsListCall) PageToken(pageToken string) *ProjectsMetricsListCall {
 30862  	c.urlParams_.Set("pageToken", pageToken)
 30863  	return c
 30864  }
 30865  
 30866  // Fields allows partial responses to be retrieved. See
 30867  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 30868  // details.
 30869  func (c *ProjectsMetricsListCall) Fields(s ...googleapi.Field) *ProjectsMetricsListCall {
 30870  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 30871  	return c
 30872  }
 30873  
 30874  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 30875  // object's ETag matches the given value. This is useful for getting updates
 30876  // only after the object has changed since the last request.
 30877  func (c *ProjectsMetricsListCall) IfNoneMatch(entityTag string) *ProjectsMetricsListCall {
 30878  	c.ifNoneMatch_ = entityTag
 30879  	return c
 30880  }
 30881  
 30882  // Context sets the context to be used in this call's Do method.
 30883  func (c *ProjectsMetricsListCall) Context(ctx context.Context) *ProjectsMetricsListCall {
 30884  	c.ctx_ = ctx
 30885  	return c
 30886  }
 30887  
 30888  // Header returns a http.Header that can be modified by the caller to add
 30889  // headers to the request.
 30890  func (c *ProjectsMetricsListCall) Header() http.Header {
 30891  	if c.header_ == nil {
 30892  		c.header_ = make(http.Header)
 30893  	}
 30894  	return c.header_
 30895  }
 30896  
 30897  func (c *ProjectsMetricsListCall) doRequest(alt string) (*http.Response, error) {
 30898  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 30899  	if c.ifNoneMatch_ != "" {
 30900  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 30901  	}
 30902  	var body io.Reader = nil
 30903  	c.urlParams_.Set("alt", alt)
 30904  	c.urlParams_.Set("prettyPrint", "false")
 30905  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/metrics")
 30906  	urls += "?" + c.urlParams_.Encode()
 30907  	req, err := http.NewRequest("GET", urls, body)
 30908  	if err != nil {
 30909  		return nil, err
 30910  	}
 30911  	req.Header = reqHeaders
 30912  	googleapi.Expand(req.URL, map[string]string{
 30913  		"parent": c.parent,
 30914  	})
 30915  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 30916  }
 30917  
 30918  // Do executes the "logging.projects.metrics.list" call.
 30919  // Any non-2xx status code is an error. Response headers are in either
 30920  // *ListLogMetricsResponse.ServerResponse.Header or (if a response was returned
 30921  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 30922  // check whether the returned error was because http.StatusNotModified was
 30923  // returned.
 30924  func (c *ProjectsMetricsListCall) Do(opts ...googleapi.CallOption) (*ListLogMetricsResponse, error) {
 30925  	gensupport.SetOptions(c.urlParams_, opts...)
 30926  	res, err := c.doRequest("json")
 30927  	if res != nil && res.StatusCode == http.StatusNotModified {
 30928  		if res.Body != nil {
 30929  			res.Body.Close()
 30930  		}
 30931  		return nil, gensupport.WrapError(&googleapi.Error{
 30932  			Code:   res.StatusCode,
 30933  			Header: res.Header,
 30934  		})
 30935  	}
 30936  	if err != nil {
 30937  		return nil, err
 30938  	}
 30939  	defer googleapi.CloseBody(res)
 30940  	if err := googleapi.CheckResponse(res); err != nil {
 30941  		return nil, gensupport.WrapError(err)
 30942  	}
 30943  	ret := &ListLogMetricsResponse{
 30944  		ServerResponse: googleapi.ServerResponse{
 30945  			Header:         res.Header,
 30946  			HTTPStatusCode: res.StatusCode,
 30947  		},
 30948  	}
 30949  	target := &ret
 30950  	if err := gensupport.DecodeResponse(target, res); err != nil {
 30951  		return nil, err
 30952  	}
 30953  	return ret, nil
 30954  }
 30955  
 30956  // Pages invokes f for each page of results.
 30957  // A non-nil error returned from f will halt the iteration.
 30958  // The provided context supersedes any context provided to the Context method.
 30959  func (c *ProjectsMetricsListCall) Pages(ctx context.Context, f func(*ListLogMetricsResponse) error) error {
 30960  	c.ctx_ = ctx
 30961  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 30962  	for {
 30963  		x, err := c.Do()
 30964  		if err != nil {
 30965  			return err
 30966  		}
 30967  		if err := f(x); err != nil {
 30968  			return err
 30969  		}
 30970  		if x.NextPageToken == "" {
 30971  			return nil
 30972  		}
 30973  		c.PageToken(x.NextPageToken)
 30974  	}
 30975  }
 30976  
 30977  type ProjectsMetricsUpdateCall struct {
 30978  	s          *Service
 30979  	metricName string
 30980  	logmetric  *LogMetric
 30981  	urlParams_ gensupport.URLParams
 30982  	ctx_       context.Context
 30983  	header_    http.Header
 30984  }
 30985  
 30986  // Update: Creates or updates a logs-based metric.
 30987  //
 30988  //   - metricName: The resource name of the metric to update:
 30989  //     "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be
 30990  //     provided in the request and it's name field must be the same as
 30991  //     [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new
 30992  //     metric is created.
 30993  func (r *ProjectsMetricsService) Update(metricName string, logmetric *LogMetric) *ProjectsMetricsUpdateCall {
 30994  	c := &ProjectsMetricsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 30995  	c.metricName = metricName
 30996  	c.logmetric = logmetric
 30997  	return c
 30998  }
 30999  
 31000  // Fields allows partial responses to be retrieved. See
 31001  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 31002  // details.
 31003  func (c *ProjectsMetricsUpdateCall) Fields(s ...googleapi.Field) *ProjectsMetricsUpdateCall {
 31004  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 31005  	return c
 31006  }
 31007  
 31008  // Context sets the context to be used in this call's Do method.
 31009  func (c *ProjectsMetricsUpdateCall) Context(ctx context.Context) *ProjectsMetricsUpdateCall {
 31010  	c.ctx_ = ctx
 31011  	return c
 31012  }
 31013  
 31014  // Header returns a http.Header that can be modified by the caller to add
 31015  // headers to the request.
 31016  func (c *ProjectsMetricsUpdateCall) Header() http.Header {
 31017  	if c.header_ == nil {
 31018  		c.header_ = make(http.Header)
 31019  	}
 31020  	return c.header_
 31021  }
 31022  
 31023  func (c *ProjectsMetricsUpdateCall) doRequest(alt string) (*http.Response, error) {
 31024  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 31025  	var body io.Reader = nil
 31026  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logmetric)
 31027  	if err != nil {
 31028  		return nil, err
 31029  	}
 31030  	c.urlParams_.Set("alt", alt)
 31031  	c.urlParams_.Set("prettyPrint", "false")
 31032  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}")
 31033  	urls += "?" + c.urlParams_.Encode()
 31034  	req, err := http.NewRequest("PUT", urls, body)
 31035  	if err != nil {
 31036  		return nil, err
 31037  	}
 31038  	req.Header = reqHeaders
 31039  	googleapi.Expand(req.URL, map[string]string{
 31040  		"metricName": c.metricName,
 31041  	})
 31042  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 31043  }
 31044  
 31045  // Do executes the "logging.projects.metrics.update" call.
 31046  // Any non-2xx status code is an error. Response headers are in either
 31047  // *LogMetric.ServerResponse.Header or (if a response was returned at all) in
 31048  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 31049  // whether the returned error was because http.StatusNotModified was returned.
 31050  func (c *ProjectsMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*LogMetric, error) {
 31051  	gensupport.SetOptions(c.urlParams_, opts...)
 31052  	res, err := c.doRequest("json")
 31053  	if res != nil && res.StatusCode == http.StatusNotModified {
 31054  		if res.Body != nil {
 31055  			res.Body.Close()
 31056  		}
 31057  		return nil, gensupport.WrapError(&googleapi.Error{
 31058  			Code:   res.StatusCode,
 31059  			Header: res.Header,
 31060  		})
 31061  	}
 31062  	if err != nil {
 31063  		return nil, err
 31064  	}
 31065  	defer googleapi.CloseBody(res)
 31066  	if err := googleapi.CheckResponse(res); err != nil {
 31067  		return nil, gensupport.WrapError(err)
 31068  	}
 31069  	ret := &LogMetric{
 31070  		ServerResponse: googleapi.ServerResponse{
 31071  			Header:         res.Header,
 31072  			HTTPStatusCode: res.StatusCode,
 31073  		},
 31074  	}
 31075  	target := &ret
 31076  	if err := gensupport.DecodeResponse(target, res); err != nil {
 31077  		return nil, err
 31078  	}
 31079  	return ret, nil
 31080  }
 31081  
 31082  type ProjectsSinksCreateCall struct {
 31083  	s          *Service
 31084  	parent     string
 31085  	logsink    *LogSink
 31086  	urlParams_ gensupport.URLParams
 31087  	ctx_       context.Context
 31088  	header_    http.Header
 31089  }
 31090  
 31091  // Create: Creates a sink that exports specified log entries to a destination.
 31092  // The export begins upon ingress, unless the sink's writer_identity is not
 31093  // permitted to write to the destination. A sink can export log entries only
 31094  // from the resource owning the sink.
 31095  //
 31096  //   - parent: The resource in which to create the sink: "projects/[PROJECT_ID]"
 31097  //     "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]"
 31098  //     "folders/[FOLDER_ID]" For examples:"projects/my-project"
 31099  //     "organizations/123456789".
 31100  func (r *ProjectsSinksService) Create(parent string, logsink *LogSink) *ProjectsSinksCreateCall {
 31101  	c := &ProjectsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 31102  	c.parent = parent
 31103  	c.logsink = logsink
 31104  	return c
 31105  }
 31106  
 31107  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 31108  // service account provided by the caller that will be used to write the log
 31109  // entries. The format must be serviceAccount:some@email. This field can only
 31110  // be specified if you are routing logs to a destination outside this sink's
 31111  // project. If not specified, a Logging service account will automatically be
 31112  // generated.
 31113  func (c *ProjectsSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *ProjectsSinksCreateCall {
 31114  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 31115  	return c
 31116  }
 31117  
 31118  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity":
 31119  // Determines the kind of IAM identity returned as writer_identity in the new
 31120  // sink. If this value is omitted or set to false, and if the sink's parent is
 31121  // a project, then the value returned as writer_identity is the same group or
 31122  // service account used by Cloud Logging before the addition of writer
 31123  // identities to this API. The sink's destination must be in the same project
 31124  // as the sink itself.If this field is set to true, or if the sink is owned by
 31125  // a non-project resource such as an organization, then the value of
 31126  // writer_identity will be a service agent
 31127  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 31128  // used by the sinks with the same parent. For more information, see
 31129  // writer_identity in LogSink.
 31130  func (c *ProjectsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksCreateCall {
 31131  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 31132  	return c
 31133  }
 31134  
 31135  // Fields allows partial responses to be retrieved. See
 31136  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 31137  // details.
 31138  func (c *ProjectsSinksCreateCall) Fields(s ...googleapi.Field) *ProjectsSinksCreateCall {
 31139  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 31140  	return c
 31141  }
 31142  
 31143  // Context sets the context to be used in this call's Do method.
 31144  func (c *ProjectsSinksCreateCall) Context(ctx context.Context) *ProjectsSinksCreateCall {
 31145  	c.ctx_ = ctx
 31146  	return c
 31147  }
 31148  
 31149  // Header returns a http.Header that can be modified by the caller to add
 31150  // headers to the request.
 31151  func (c *ProjectsSinksCreateCall) Header() http.Header {
 31152  	if c.header_ == nil {
 31153  		c.header_ = make(http.Header)
 31154  	}
 31155  	return c.header_
 31156  }
 31157  
 31158  func (c *ProjectsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
 31159  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 31160  	var body io.Reader = nil
 31161  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 31162  	if err != nil {
 31163  		return nil, err
 31164  	}
 31165  	c.urlParams_.Set("alt", alt)
 31166  	c.urlParams_.Set("prettyPrint", "false")
 31167  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
 31168  	urls += "?" + c.urlParams_.Encode()
 31169  	req, err := http.NewRequest("POST", urls, body)
 31170  	if err != nil {
 31171  		return nil, err
 31172  	}
 31173  	req.Header = reqHeaders
 31174  	googleapi.Expand(req.URL, map[string]string{
 31175  		"parent": c.parent,
 31176  	})
 31177  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 31178  }
 31179  
 31180  // Do executes the "logging.projects.sinks.create" call.
 31181  // Any non-2xx status code is an error. Response headers are in either
 31182  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 31183  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 31184  // whether the returned error was because http.StatusNotModified was returned.
 31185  func (c *ProjectsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 31186  	gensupport.SetOptions(c.urlParams_, opts...)
 31187  	res, err := c.doRequest("json")
 31188  	if res != nil && res.StatusCode == http.StatusNotModified {
 31189  		if res.Body != nil {
 31190  			res.Body.Close()
 31191  		}
 31192  		return nil, gensupport.WrapError(&googleapi.Error{
 31193  			Code:   res.StatusCode,
 31194  			Header: res.Header,
 31195  		})
 31196  	}
 31197  	if err != nil {
 31198  		return nil, err
 31199  	}
 31200  	defer googleapi.CloseBody(res)
 31201  	if err := googleapi.CheckResponse(res); err != nil {
 31202  		return nil, gensupport.WrapError(err)
 31203  	}
 31204  	ret := &LogSink{
 31205  		ServerResponse: googleapi.ServerResponse{
 31206  			Header:         res.Header,
 31207  			HTTPStatusCode: res.StatusCode,
 31208  		},
 31209  	}
 31210  	target := &ret
 31211  	if err := gensupport.DecodeResponse(target, res); err != nil {
 31212  		return nil, err
 31213  	}
 31214  	return ret, nil
 31215  }
 31216  
 31217  type ProjectsSinksDeleteCall struct {
 31218  	s          *Service
 31219  	sinkNameid string
 31220  	urlParams_ gensupport.URLParams
 31221  	ctx_       context.Context
 31222  	header_    http.Header
 31223  }
 31224  
 31225  // Delete: Deletes a sink. If the sink has a unique writer_identity, then that
 31226  // service account is also deleted.
 31227  //
 31228  //   - sinkName: The full resource name of the sink to delete, including the
 31229  //     parent resource and the sink identifier:
 31230  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 31231  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 31232  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 31233  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 31234  //     example:"projects/my-project/sinks/my-sink".
 31235  func (r *ProjectsSinksService) Delete(sinkNameid string) *ProjectsSinksDeleteCall {
 31236  	c := &ProjectsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 31237  	c.sinkNameid = sinkNameid
 31238  	return c
 31239  }
 31240  
 31241  // Fields allows partial responses to be retrieved. See
 31242  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 31243  // details.
 31244  func (c *ProjectsSinksDeleteCall) Fields(s ...googleapi.Field) *ProjectsSinksDeleteCall {
 31245  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 31246  	return c
 31247  }
 31248  
 31249  // Context sets the context to be used in this call's Do method.
 31250  func (c *ProjectsSinksDeleteCall) Context(ctx context.Context) *ProjectsSinksDeleteCall {
 31251  	c.ctx_ = ctx
 31252  	return c
 31253  }
 31254  
 31255  // Header returns a http.Header that can be modified by the caller to add
 31256  // headers to the request.
 31257  func (c *ProjectsSinksDeleteCall) Header() http.Header {
 31258  	if c.header_ == nil {
 31259  		c.header_ = make(http.Header)
 31260  	}
 31261  	return c.header_
 31262  }
 31263  
 31264  func (c *ProjectsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 31265  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 31266  	var body io.Reader = nil
 31267  	c.urlParams_.Set("alt", alt)
 31268  	c.urlParams_.Set("prettyPrint", "false")
 31269  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 31270  	urls += "?" + c.urlParams_.Encode()
 31271  	req, err := http.NewRequest("DELETE", urls, body)
 31272  	if err != nil {
 31273  		return nil, err
 31274  	}
 31275  	req.Header = reqHeaders
 31276  	googleapi.Expand(req.URL, map[string]string{
 31277  		"sinkName": c.sinkNameid,
 31278  	})
 31279  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 31280  }
 31281  
 31282  // Do executes the "logging.projects.sinks.delete" call.
 31283  // Any non-2xx status code is an error. Response headers are in either
 31284  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 31285  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 31286  // whether the returned error was because http.StatusNotModified was returned.
 31287  func (c *ProjectsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 31288  	gensupport.SetOptions(c.urlParams_, opts...)
 31289  	res, err := c.doRequest("json")
 31290  	if res != nil && res.StatusCode == http.StatusNotModified {
 31291  		if res.Body != nil {
 31292  			res.Body.Close()
 31293  		}
 31294  		return nil, gensupport.WrapError(&googleapi.Error{
 31295  			Code:   res.StatusCode,
 31296  			Header: res.Header,
 31297  		})
 31298  	}
 31299  	if err != nil {
 31300  		return nil, err
 31301  	}
 31302  	defer googleapi.CloseBody(res)
 31303  	if err := googleapi.CheckResponse(res); err != nil {
 31304  		return nil, gensupport.WrapError(err)
 31305  	}
 31306  	ret := &Empty{
 31307  		ServerResponse: googleapi.ServerResponse{
 31308  			Header:         res.Header,
 31309  			HTTPStatusCode: res.StatusCode,
 31310  		},
 31311  	}
 31312  	target := &ret
 31313  	if err := gensupport.DecodeResponse(target, res); err != nil {
 31314  		return nil, err
 31315  	}
 31316  	return ret, nil
 31317  }
 31318  
 31319  type ProjectsSinksGetCall struct {
 31320  	s            *Service
 31321  	sinkName     string
 31322  	urlParams_   gensupport.URLParams
 31323  	ifNoneMatch_ string
 31324  	ctx_         context.Context
 31325  	header_      http.Header
 31326  }
 31327  
 31328  // Get: Gets a sink.
 31329  //
 31330  //   - sinkName: The resource name of the sink:
 31331  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 31332  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 31333  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 31334  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 31335  //     example:"projects/my-project/sinks/my-sink".
 31336  func (r *ProjectsSinksService) Get(sinkName string) *ProjectsSinksGetCall {
 31337  	c := &ProjectsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 31338  	c.sinkName = sinkName
 31339  	return c
 31340  }
 31341  
 31342  // Fields allows partial responses to be retrieved. See
 31343  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 31344  // details.
 31345  func (c *ProjectsSinksGetCall) Fields(s ...googleapi.Field) *ProjectsSinksGetCall {
 31346  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 31347  	return c
 31348  }
 31349  
 31350  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 31351  // object's ETag matches the given value. This is useful for getting updates
 31352  // only after the object has changed since the last request.
 31353  func (c *ProjectsSinksGetCall) IfNoneMatch(entityTag string) *ProjectsSinksGetCall {
 31354  	c.ifNoneMatch_ = entityTag
 31355  	return c
 31356  }
 31357  
 31358  // Context sets the context to be used in this call's Do method.
 31359  func (c *ProjectsSinksGetCall) Context(ctx context.Context) *ProjectsSinksGetCall {
 31360  	c.ctx_ = ctx
 31361  	return c
 31362  }
 31363  
 31364  // Header returns a http.Header that can be modified by the caller to add
 31365  // headers to the request.
 31366  func (c *ProjectsSinksGetCall) Header() http.Header {
 31367  	if c.header_ == nil {
 31368  		c.header_ = make(http.Header)
 31369  	}
 31370  	return c.header_
 31371  }
 31372  
 31373  func (c *ProjectsSinksGetCall) doRequest(alt string) (*http.Response, error) {
 31374  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 31375  	if c.ifNoneMatch_ != "" {
 31376  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 31377  	}
 31378  	var body io.Reader = nil
 31379  	c.urlParams_.Set("alt", alt)
 31380  	c.urlParams_.Set("prettyPrint", "false")
 31381  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 31382  	urls += "?" + c.urlParams_.Encode()
 31383  	req, err := http.NewRequest("GET", urls, body)
 31384  	if err != nil {
 31385  		return nil, err
 31386  	}
 31387  	req.Header = reqHeaders
 31388  	googleapi.Expand(req.URL, map[string]string{
 31389  		"sinkName": c.sinkName,
 31390  	})
 31391  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 31392  }
 31393  
 31394  // Do executes the "logging.projects.sinks.get" call.
 31395  // Any non-2xx status code is an error. Response headers are in either
 31396  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 31397  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 31398  // whether the returned error was because http.StatusNotModified was returned.
 31399  func (c *ProjectsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 31400  	gensupport.SetOptions(c.urlParams_, opts...)
 31401  	res, err := c.doRequest("json")
 31402  	if res != nil && res.StatusCode == http.StatusNotModified {
 31403  		if res.Body != nil {
 31404  			res.Body.Close()
 31405  		}
 31406  		return nil, gensupport.WrapError(&googleapi.Error{
 31407  			Code:   res.StatusCode,
 31408  			Header: res.Header,
 31409  		})
 31410  	}
 31411  	if err != nil {
 31412  		return nil, err
 31413  	}
 31414  	defer googleapi.CloseBody(res)
 31415  	if err := googleapi.CheckResponse(res); err != nil {
 31416  		return nil, gensupport.WrapError(err)
 31417  	}
 31418  	ret := &LogSink{
 31419  		ServerResponse: googleapi.ServerResponse{
 31420  			Header:         res.Header,
 31421  			HTTPStatusCode: res.StatusCode,
 31422  		},
 31423  	}
 31424  	target := &ret
 31425  	if err := gensupport.DecodeResponse(target, res); err != nil {
 31426  		return nil, err
 31427  	}
 31428  	return ret, nil
 31429  }
 31430  
 31431  type ProjectsSinksListCall struct {
 31432  	s            *Service
 31433  	parent       string
 31434  	urlParams_   gensupport.URLParams
 31435  	ifNoneMatch_ string
 31436  	ctx_         context.Context
 31437  	header_      http.Header
 31438  }
 31439  
 31440  // List: Lists sinks.
 31441  //
 31442  //   - parent: The parent resource whose sinks are to be listed:
 31443  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 31444  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
 31445  func (r *ProjectsSinksService) List(parent string) *ProjectsSinksListCall {
 31446  	c := &ProjectsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 31447  	c.parent = parent
 31448  	return c
 31449  }
 31450  
 31451  // Filter sets the optional parameter "filter": A filter expression to
 31452  // constrain the sinks returned. Today, this only supports the following
 31453  // strings: ” 'in_scope("ALL")', 'in_scope("ANCESTOR")',
 31454  // 'in_scope("DEFAULT")'.Description of scopes below. ALL: Includes all of the
 31455  // sinks which can be returned in any other scope. ANCESTOR: Includes
 31456  // intercepting sinks owned by ancestor resources. DEFAULT: Includes sinks
 31457  // owned by parent.When the empty string is provided, then the filter
 31458  // 'in_scope("DEFAULT")' is applied.
 31459  func (c *ProjectsSinksListCall) Filter(filter string) *ProjectsSinksListCall {
 31460  	c.urlParams_.Set("filter", filter)
 31461  	return c
 31462  }
 31463  
 31464  // PageSize sets the optional parameter "pageSize": The maximum number of
 31465  // results to return from this request. Non-positive values are ignored. The
 31466  // presence of nextPageToken in the response indicates that more results might
 31467  // be available.
 31468  func (c *ProjectsSinksListCall) PageSize(pageSize int64) *ProjectsSinksListCall {
 31469  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 31470  	return c
 31471  }
 31472  
 31473  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 31474  // the next batch of results from the preceding call to this method. pageToken
 31475  // must be the value of nextPageToken from the previous response. The values of
 31476  // other method parameters should be identical to those in the previous call.
 31477  func (c *ProjectsSinksListCall) PageToken(pageToken string) *ProjectsSinksListCall {
 31478  	c.urlParams_.Set("pageToken", pageToken)
 31479  	return c
 31480  }
 31481  
 31482  // Fields allows partial responses to be retrieved. See
 31483  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 31484  // details.
 31485  func (c *ProjectsSinksListCall) Fields(s ...googleapi.Field) *ProjectsSinksListCall {
 31486  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 31487  	return c
 31488  }
 31489  
 31490  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 31491  // object's ETag matches the given value. This is useful for getting updates
 31492  // only after the object has changed since the last request.
 31493  func (c *ProjectsSinksListCall) IfNoneMatch(entityTag string) *ProjectsSinksListCall {
 31494  	c.ifNoneMatch_ = entityTag
 31495  	return c
 31496  }
 31497  
 31498  // Context sets the context to be used in this call's Do method.
 31499  func (c *ProjectsSinksListCall) Context(ctx context.Context) *ProjectsSinksListCall {
 31500  	c.ctx_ = ctx
 31501  	return c
 31502  }
 31503  
 31504  // Header returns a http.Header that can be modified by the caller to add
 31505  // headers to the request.
 31506  func (c *ProjectsSinksListCall) Header() http.Header {
 31507  	if c.header_ == nil {
 31508  		c.header_ = make(http.Header)
 31509  	}
 31510  	return c.header_
 31511  }
 31512  
 31513  func (c *ProjectsSinksListCall) doRequest(alt string) (*http.Response, error) {
 31514  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 31515  	if c.ifNoneMatch_ != "" {
 31516  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 31517  	}
 31518  	var body io.Reader = nil
 31519  	c.urlParams_.Set("alt", alt)
 31520  	c.urlParams_.Set("prettyPrint", "false")
 31521  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
 31522  	urls += "?" + c.urlParams_.Encode()
 31523  	req, err := http.NewRequest("GET", urls, body)
 31524  	if err != nil {
 31525  		return nil, err
 31526  	}
 31527  	req.Header = reqHeaders
 31528  	googleapi.Expand(req.URL, map[string]string{
 31529  		"parent": c.parent,
 31530  	})
 31531  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 31532  }
 31533  
 31534  // Do executes the "logging.projects.sinks.list" call.
 31535  // Any non-2xx status code is an error. Response headers are in either
 31536  // *ListSinksResponse.ServerResponse.Header or (if a response was returned at
 31537  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 31538  // check whether the returned error was because http.StatusNotModified was
 31539  // returned.
 31540  func (c *ProjectsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
 31541  	gensupport.SetOptions(c.urlParams_, opts...)
 31542  	res, err := c.doRequest("json")
 31543  	if res != nil && res.StatusCode == http.StatusNotModified {
 31544  		if res.Body != nil {
 31545  			res.Body.Close()
 31546  		}
 31547  		return nil, gensupport.WrapError(&googleapi.Error{
 31548  			Code:   res.StatusCode,
 31549  			Header: res.Header,
 31550  		})
 31551  	}
 31552  	if err != nil {
 31553  		return nil, err
 31554  	}
 31555  	defer googleapi.CloseBody(res)
 31556  	if err := googleapi.CheckResponse(res); err != nil {
 31557  		return nil, gensupport.WrapError(err)
 31558  	}
 31559  	ret := &ListSinksResponse{
 31560  		ServerResponse: googleapi.ServerResponse{
 31561  			Header:         res.Header,
 31562  			HTTPStatusCode: res.StatusCode,
 31563  		},
 31564  	}
 31565  	target := &ret
 31566  	if err := gensupport.DecodeResponse(target, res); err != nil {
 31567  		return nil, err
 31568  	}
 31569  	return ret, nil
 31570  }
 31571  
 31572  // Pages invokes f for each page of results.
 31573  // A non-nil error returned from f will halt the iteration.
 31574  // The provided context supersedes any context provided to the Context method.
 31575  func (c *ProjectsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
 31576  	c.ctx_ = ctx
 31577  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 31578  	for {
 31579  		x, err := c.Do()
 31580  		if err != nil {
 31581  			return err
 31582  		}
 31583  		if err := f(x); err != nil {
 31584  			return err
 31585  		}
 31586  		if x.NextPageToken == "" {
 31587  			return nil
 31588  		}
 31589  		c.PageToken(x.NextPageToken)
 31590  	}
 31591  }
 31592  
 31593  type ProjectsSinksPatchCall struct {
 31594  	s          *Service
 31595  	sinkNameid string
 31596  	logsink    *LogSink
 31597  	urlParams_ gensupport.URLParams
 31598  	ctx_       context.Context
 31599  	header_    http.Header
 31600  }
 31601  
 31602  // Patch: Updates a sink. This method replaces the values of the destination
 31603  // and filter fields of the existing sink with the corresponding values from
 31604  // the new sink.The updated sink might also have a new writer_identity; see the
 31605  // unique_writer_identity field.
 31606  //
 31607  //   - sinkName: The full resource name of the sink to update, including the
 31608  //     parent resource and the sink identifier:
 31609  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 31610  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 31611  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 31612  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 31613  //     example:"projects/my-project/sinks/my-sink".
 31614  func (r *ProjectsSinksService) Patch(sinkNameid string, logsink *LogSink) *ProjectsSinksPatchCall {
 31615  	c := &ProjectsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 31616  	c.sinkNameid = sinkNameid
 31617  	c.logsink = logsink
 31618  	return c
 31619  }
 31620  
 31621  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 31622  // service account provided by the caller that will be used to write the log
 31623  // entries. The format must be serviceAccount:some@email. This field can only
 31624  // be specified if you are routing logs to a destination outside this sink's
 31625  // project. If not specified, a Logging service account will automatically be
 31626  // generated.
 31627  func (c *ProjectsSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *ProjectsSinksPatchCall {
 31628  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 31629  	return c
 31630  }
 31631  
 31632  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See
 31633  // sinks.create for a description of this field. When updating a sink, the
 31634  // effect of this field on the value of writer_identity in the updated sink
 31635  // depends on both the old and new values of this field: If the old and new
 31636  // values of this field are both false or both true, then there is no change to
 31637  // the sink's writer_identity. If the old value is false and the new value is
 31638  // true, then writer_identity is changed to a service agent
 31639  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 31640  // owned by Cloud Logging. It is an error if the old value is true and the new
 31641  // value is set to false or defaulted to false.
 31642  func (c *ProjectsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksPatchCall {
 31643  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 31644  	return c
 31645  }
 31646  
 31647  // UpdateMask sets the optional parameter "updateMask": Field mask that
 31648  // specifies the fields in sink that need an update. A sink field will be
 31649  // overwritten if, and only if, it is in the update mask. name and output only
 31650  // fields cannot be updated.An empty updateMask is temporarily treated as using
 31651  // the following mask for backwards compatibility
 31652  // purposes:destination,filter,includeChildrenAt some point in the future,
 31653  // behavior will be removed and specifying an empty updateMask will be an
 31654  // error.For a detailed FieldMask definition, see
 31655  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 31656  // example: updateMask=filter
 31657  func (c *ProjectsSinksPatchCall) UpdateMask(updateMask string) *ProjectsSinksPatchCall {
 31658  	c.urlParams_.Set("updateMask", updateMask)
 31659  	return c
 31660  }
 31661  
 31662  // Fields allows partial responses to be retrieved. See
 31663  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 31664  // details.
 31665  func (c *ProjectsSinksPatchCall) Fields(s ...googleapi.Field) *ProjectsSinksPatchCall {
 31666  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 31667  	return c
 31668  }
 31669  
 31670  // Context sets the context to be used in this call's Do method.
 31671  func (c *ProjectsSinksPatchCall) Context(ctx context.Context) *ProjectsSinksPatchCall {
 31672  	c.ctx_ = ctx
 31673  	return c
 31674  }
 31675  
 31676  // Header returns a http.Header that can be modified by the caller to add
 31677  // headers to the request.
 31678  func (c *ProjectsSinksPatchCall) Header() http.Header {
 31679  	if c.header_ == nil {
 31680  		c.header_ = make(http.Header)
 31681  	}
 31682  	return c.header_
 31683  }
 31684  
 31685  func (c *ProjectsSinksPatchCall) doRequest(alt string) (*http.Response, error) {
 31686  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 31687  	var body io.Reader = nil
 31688  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 31689  	if err != nil {
 31690  		return nil, err
 31691  	}
 31692  	c.urlParams_.Set("alt", alt)
 31693  	c.urlParams_.Set("prettyPrint", "false")
 31694  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 31695  	urls += "?" + c.urlParams_.Encode()
 31696  	req, err := http.NewRequest("PATCH", urls, body)
 31697  	if err != nil {
 31698  		return nil, err
 31699  	}
 31700  	req.Header = reqHeaders
 31701  	googleapi.Expand(req.URL, map[string]string{
 31702  		"sinkName": c.sinkNameid,
 31703  	})
 31704  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 31705  }
 31706  
 31707  // Do executes the "logging.projects.sinks.patch" call.
 31708  // Any non-2xx status code is an error. Response headers are in either
 31709  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 31710  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 31711  // whether the returned error was because http.StatusNotModified was returned.
 31712  func (c *ProjectsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 31713  	gensupport.SetOptions(c.urlParams_, opts...)
 31714  	res, err := c.doRequest("json")
 31715  	if res != nil && res.StatusCode == http.StatusNotModified {
 31716  		if res.Body != nil {
 31717  			res.Body.Close()
 31718  		}
 31719  		return nil, gensupport.WrapError(&googleapi.Error{
 31720  			Code:   res.StatusCode,
 31721  			Header: res.Header,
 31722  		})
 31723  	}
 31724  	if err != nil {
 31725  		return nil, err
 31726  	}
 31727  	defer googleapi.CloseBody(res)
 31728  	if err := googleapi.CheckResponse(res); err != nil {
 31729  		return nil, gensupport.WrapError(err)
 31730  	}
 31731  	ret := &LogSink{
 31732  		ServerResponse: googleapi.ServerResponse{
 31733  			Header:         res.Header,
 31734  			HTTPStatusCode: res.StatusCode,
 31735  		},
 31736  	}
 31737  	target := &ret
 31738  	if err := gensupport.DecodeResponse(target, res); err != nil {
 31739  		return nil, err
 31740  	}
 31741  	return ret, nil
 31742  }
 31743  
 31744  type ProjectsSinksUpdateCall struct {
 31745  	s          *Service
 31746  	sinkNameid string
 31747  	logsink    *LogSink
 31748  	urlParams_ gensupport.URLParams
 31749  	ctx_       context.Context
 31750  	header_    http.Header
 31751  }
 31752  
 31753  // Update: Updates a sink. This method replaces the values of the destination
 31754  // and filter fields of the existing sink with the corresponding values from
 31755  // the new sink.The updated sink might also have a new writer_identity; see the
 31756  // unique_writer_identity field.
 31757  //
 31758  //   - sinkName: The full resource name of the sink to update, including the
 31759  //     parent resource and the sink identifier:
 31760  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 31761  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 31762  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 31763  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 31764  //     example:"projects/my-project/sinks/my-sink".
 31765  func (r *ProjectsSinksService) Update(sinkNameid string, logsink *LogSink) *ProjectsSinksUpdateCall {
 31766  	c := &ProjectsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 31767  	c.sinkNameid = sinkNameid
 31768  	c.logsink = logsink
 31769  	return c
 31770  }
 31771  
 31772  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 31773  // service account provided by the caller that will be used to write the log
 31774  // entries. The format must be serviceAccount:some@email. This field can only
 31775  // be specified if you are routing logs to a destination outside this sink's
 31776  // project. If not specified, a Logging service account will automatically be
 31777  // generated.
 31778  func (c *ProjectsSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *ProjectsSinksUpdateCall {
 31779  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 31780  	return c
 31781  }
 31782  
 31783  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See
 31784  // sinks.create for a description of this field. When updating a sink, the
 31785  // effect of this field on the value of writer_identity in the updated sink
 31786  // depends on both the old and new values of this field: If the old and new
 31787  // values of this field are both false or both true, then there is no change to
 31788  // the sink's writer_identity. If the old value is false and the new value is
 31789  // true, then writer_identity is changed to a service agent
 31790  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 31791  // owned by Cloud Logging. It is an error if the old value is true and the new
 31792  // value is set to false or defaulted to false.
 31793  func (c *ProjectsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *ProjectsSinksUpdateCall {
 31794  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 31795  	return c
 31796  }
 31797  
 31798  // UpdateMask sets the optional parameter "updateMask": Field mask that
 31799  // specifies the fields in sink that need an update. A sink field will be
 31800  // overwritten if, and only if, it is in the update mask. name and output only
 31801  // fields cannot be updated.An empty updateMask is temporarily treated as using
 31802  // the following mask for backwards compatibility
 31803  // purposes:destination,filter,includeChildrenAt some point in the future,
 31804  // behavior will be removed and specifying an empty updateMask will be an
 31805  // error.For a detailed FieldMask definition, see
 31806  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 31807  // example: updateMask=filter
 31808  func (c *ProjectsSinksUpdateCall) UpdateMask(updateMask string) *ProjectsSinksUpdateCall {
 31809  	c.urlParams_.Set("updateMask", updateMask)
 31810  	return c
 31811  }
 31812  
 31813  // Fields allows partial responses to be retrieved. See
 31814  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 31815  // details.
 31816  func (c *ProjectsSinksUpdateCall) Fields(s ...googleapi.Field) *ProjectsSinksUpdateCall {
 31817  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 31818  	return c
 31819  }
 31820  
 31821  // Context sets the context to be used in this call's Do method.
 31822  func (c *ProjectsSinksUpdateCall) Context(ctx context.Context) *ProjectsSinksUpdateCall {
 31823  	c.ctx_ = ctx
 31824  	return c
 31825  }
 31826  
 31827  // Header returns a http.Header that can be modified by the caller to add
 31828  // headers to the request.
 31829  func (c *ProjectsSinksUpdateCall) Header() http.Header {
 31830  	if c.header_ == nil {
 31831  		c.header_ = make(http.Header)
 31832  	}
 31833  	return c.header_
 31834  }
 31835  
 31836  func (c *ProjectsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
 31837  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 31838  	var body io.Reader = nil
 31839  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 31840  	if err != nil {
 31841  		return nil, err
 31842  	}
 31843  	c.urlParams_.Set("alt", alt)
 31844  	c.urlParams_.Set("prettyPrint", "false")
 31845  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 31846  	urls += "?" + c.urlParams_.Encode()
 31847  	req, err := http.NewRequest("PUT", urls, body)
 31848  	if err != nil {
 31849  		return nil, err
 31850  	}
 31851  	req.Header = reqHeaders
 31852  	googleapi.Expand(req.URL, map[string]string{
 31853  		"sinkName": c.sinkNameid,
 31854  	})
 31855  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 31856  }
 31857  
 31858  // Do executes the "logging.projects.sinks.update" call.
 31859  // Any non-2xx status code is an error. Response headers are in either
 31860  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 31861  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 31862  // whether the returned error was because http.StatusNotModified was returned.
 31863  func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 31864  	gensupport.SetOptions(c.urlParams_, opts...)
 31865  	res, err := c.doRequest("json")
 31866  	if res != nil && res.StatusCode == http.StatusNotModified {
 31867  		if res.Body != nil {
 31868  			res.Body.Close()
 31869  		}
 31870  		return nil, gensupport.WrapError(&googleapi.Error{
 31871  			Code:   res.StatusCode,
 31872  			Header: res.Header,
 31873  		})
 31874  	}
 31875  	if err != nil {
 31876  		return nil, err
 31877  	}
 31878  	defer googleapi.CloseBody(res)
 31879  	if err := googleapi.CheckResponse(res); err != nil {
 31880  		return nil, gensupport.WrapError(err)
 31881  	}
 31882  	ret := &LogSink{
 31883  		ServerResponse: googleapi.ServerResponse{
 31884  			Header:         res.Header,
 31885  			HTTPStatusCode: res.StatusCode,
 31886  		},
 31887  	}
 31888  	target := &ret
 31889  	if err := gensupport.DecodeResponse(target, res); err != nil {
 31890  		return nil, err
 31891  	}
 31892  	return ret, nil
 31893  }
 31894  
 31895  type SinksCreateCall struct {
 31896  	s          *Service
 31897  	parent     string
 31898  	logsink    *LogSink
 31899  	urlParams_ gensupport.URLParams
 31900  	ctx_       context.Context
 31901  	header_    http.Header
 31902  }
 31903  
 31904  // Create: Creates a sink that exports specified log entries to a destination.
 31905  // The export begins upon ingress, unless the sink's writer_identity is not
 31906  // permitted to write to the destination. A sink can export log entries only
 31907  // from the resource owning the sink.
 31908  //
 31909  //   - parent: The resource in which to create the sink: "projects/[PROJECT_ID]"
 31910  //     "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]"
 31911  //     "folders/[FOLDER_ID]" For examples:"projects/my-project"
 31912  //     "organizations/123456789".
 31913  func (r *SinksService) Create(parent string, logsink *LogSink) *SinksCreateCall {
 31914  	c := &SinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 31915  	c.parent = parent
 31916  	c.logsink = logsink
 31917  	return c
 31918  }
 31919  
 31920  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 31921  // service account provided by the caller that will be used to write the log
 31922  // entries. The format must be serviceAccount:some@email. This field can only
 31923  // be specified if you are routing logs to a destination outside this sink's
 31924  // project. If not specified, a Logging service account will automatically be
 31925  // generated.
 31926  func (c *SinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *SinksCreateCall {
 31927  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 31928  	return c
 31929  }
 31930  
 31931  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity":
 31932  // Determines the kind of IAM identity returned as writer_identity in the new
 31933  // sink. If this value is omitted or set to false, and if the sink's parent is
 31934  // a project, then the value returned as writer_identity is the same group or
 31935  // service account used by Cloud Logging before the addition of writer
 31936  // identities to this API. The sink's destination must be in the same project
 31937  // as the sink itself.If this field is set to true, or if the sink is owned by
 31938  // a non-project resource such as an organization, then the value of
 31939  // writer_identity will be a service agent
 31940  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 31941  // used by the sinks with the same parent. For more information, see
 31942  // writer_identity in LogSink.
 31943  func (c *SinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *SinksCreateCall {
 31944  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 31945  	return c
 31946  }
 31947  
 31948  // Fields allows partial responses to be retrieved. See
 31949  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 31950  // details.
 31951  func (c *SinksCreateCall) Fields(s ...googleapi.Field) *SinksCreateCall {
 31952  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 31953  	return c
 31954  }
 31955  
 31956  // Context sets the context to be used in this call's Do method.
 31957  func (c *SinksCreateCall) Context(ctx context.Context) *SinksCreateCall {
 31958  	c.ctx_ = ctx
 31959  	return c
 31960  }
 31961  
 31962  // Header returns a http.Header that can be modified by the caller to add
 31963  // headers to the request.
 31964  func (c *SinksCreateCall) Header() http.Header {
 31965  	if c.header_ == nil {
 31966  		c.header_ = make(http.Header)
 31967  	}
 31968  	return c.header_
 31969  }
 31970  
 31971  func (c *SinksCreateCall) doRequest(alt string) (*http.Response, error) {
 31972  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 31973  	var body io.Reader = nil
 31974  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 31975  	if err != nil {
 31976  		return nil, err
 31977  	}
 31978  	c.urlParams_.Set("alt", alt)
 31979  	c.urlParams_.Set("prettyPrint", "false")
 31980  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
 31981  	urls += "?" + c.urlParams_.Encode()
 31982  	req, err := http.NewRequest("POST", urls, body)
 31983  	if err != nil {
 31984  		return nil, err
 31985  	}
 31986  	req.Header = reqHeaders
 31987  	googleapi.Expand(req.URL, map[string]string{
 31988  		"parent": c.parent,
 31989  	})
 31990  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 31991  }
 31992  
 31993  // Do executes the "logging.sinks.create" call.
 31994  // Any non-2xx status code is an error. Response headers are in either
 31995  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 31996  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 31997  // whether the returned error was because http.StatusNotModified was returned.
 31998  func (c *SinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 31999  	gensupport.SetOptions(c.urlParams_, opts...)
 32000  	res, err := c.doRequest("json")
 32001  	if res != nil && res.StatusCode == http.StatusNotModified {
 32002  		if res.Body != nil {
 32003  			res.Body.Close()
 32004  		}
 32005  		return nil, gensupport.WrapError(&googleapi.Error{
 32006  			Code:   res.StatusCode,
 32007  			Header: res.Header,
 32008  		})
 32009  	}
 32010  	if err != nil {
 32011  		return nil, err
 32012  	}
 32013  	defer googleapi.CloseBody(res)
 32014  	if err := googleapi.CheckResponse(res); err != nil {
 32015  		return nil, gensupport.WrapError(err)
 32016  	}
 32017  	ret := &LogSink{
 32018  		ServerResponse: googleapi.ServerResponse{
 32019  			Header:         res.Header,
 32020  			HTTPStatusCode: res.StatusCode,
 32021  		},
 32022  	}
 32023  	target := &ret
 32024  	if err := gensupport.DecodeResponse(target, res); err != nil {
 32025  		return nil, err
 32026  	}
 32027  	return ret, nil
 32028  }
 32029  
 32030  type SinksDeleteCall struct {
 32031  	s          *Service
 32032  	sinkNameid string
 32033  	urlParams_ gensupport.URLParams
 32034  	ctx_       context.Context
 32035  	header_    http.Header
 32036  }
 32037  
 32038  // Delete: Deletes a sink. If the sink has a unique writer_identity, then that
 32039  // service account is also deleted.
 32040  //
 32041  //   - sinkName: The full resource name of the sink to delete, including the
 32042  //     parent resource and the sink identifier:
 32043  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 32044  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 32045  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 32046  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 32047  //     example:"projects/my-project/sinks/my-sink".
 32048  func (r *SinksService) Delete(sinkNameid string) *SinksDeleteCall {
 32049  	c := &SinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 32050  	c.sinkNameid = sinkNameid
 32051  	return c
 32052  }
 32053  
 32054  // Fields allows partial responses to be retrieved. See
 32055  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 32056  // details.
 32057  func (c *SinksDeleteCall) Fields(s ...googleapi.Field) *SinksDeleteCall {
 32058  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 32059  	return c
 32060  }
 32061  
 32062  // Context sets the context to be used in this call's Do method.
 32063  func (c *SinksDeleteCall) Context(ctx context.Context) *SinksDeleteCall {
 32064  	c.ctx_ = ctx
 32065  	return c
 32066  }
 32067  
 32068  // Header returns a http.Header that can be modified by the caller to add
 32069  // headers to the request.
 32070  func (c *SinksDeleteCall) Header() http.Header {
 32071  	if c.header_ == nil {
 32072  		c.header_ = make(http.Header)
 32073  	}
 32074  	return c.header_
 32075  }
 32076  
 32077  func (c *SinksDeleteCall) doRequest(alt string) (*http.Response, error) {
 32078  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 32079  	var body io.Reader = nil
 32080  	c.urlParams_.Set("alt", alt)
 32081  	c.urlParams_.Set("prettyPrint", "false")
 32082  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 32083  	urls += "?" + c.urlParams_.Encode()
 32084  	req, err := http.NewRequest("DELETE", urls, body)
 32085  	if err != nil {
 32086  		return nil, err
 32087  	}
 32088  	req.Header = reqHeaders
 32089  	googleapi.Expand(req.URL, map[string]string{
 32090  		"sinkName": c.sinkNameid,
 32091  	})
 32092  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 32093  }
 32094  
 32095  // Do executes the "logging.sinks.delete" call.
 32096  // Any non-2xx status code is an error. Response headers are in either
 32097  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 32098  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 32099  // whether the returned error was because http.StatusNotModified was returned.
 32100  func (c *SinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 32101  	gensupport.SetOptions(c.urlParams_, opts...)
 32102  	res, err := c.doRequest("json")
 32103  	if res != nil && res.StatusCode == http.StatusNotModified {
 32104  		if res.Body != nil {
 32105  			res.Body.Close()
 32106  		}
 32107  		return nil, gensupport.WrapError(&googleapi.Error{
 32108  			Code:   res.StatusCode,
 32109  			Header: res.Header,
 32110  		})
 32111  	}
 32112  	if err != nil {
 32113  		return nil, err
 32114  	}
 32115  	defer googleapi.CloseBody(res)
 32116  	if err := googleapi.CheckResponse(res); err != nil {
 32117  		return nil, gensupport.WrapError(err)
 32118  	}
 32119  	ret := &Empty{
 32120  		ServerResponse: googleapi.ServerResponse{
 32121  			Header:         res.Header,
 32122  			HTTPStatusCode: res.StatusCode,
 32123  		},
 32124  	}
 32125  	target := &ret
 32126  	if err := gensupport.DecodeResponse(target, res); err != nil {
 32127  		return nil, err
 32128  	}
 32129  	return ret, nil
 32130  }
 32131  
 32132  type SinksGetCall struct {
 32133  	s            *Service
 32134  	sinkName     string
 32135  	urlParams_   gensupport.URLParams
 32136  	ifNoneMatch_ string
 32137  	ctx_         context.Context
 32138  	header_      http.Header
 32139  }
 32140  
 32141  // Get: Gets a sink.
 32142  //
 32143  //   - sinkName: The resource name of the sink:
 32144  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 32145  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 32146  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 32147  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 32148  //     example:"projects/my-project/sinks/my-sink".
 32149  func (r *SinksService) Get(sinkName string) *SinksGetCall {
 32150  	c := &SinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 32151  	c.sinkName = sinkName
 32152  	return c
 32153  }
 32154  
 32155  // Fields allows partial responses to be retrieved. See
 32156  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 32157  // details.
 32158  func (c *SinksGetCall) Fields(s ...googleapi.Field) *SinksGetCall {
 32159  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 32160  	return c
 32161  }
 32162  
 32163  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 32164  // object's ETag matches the given value. This is useful for getting updates
 32165  // only after the object has changed since the last request.
 32166  func (c *SinksGetCall) IfNoneMatch(entityTag string) *SinksGetCall {
 32167  	c.ifNoneMatch_ = entityTag
 32168  	return c
 32169  }
 32170  
 32171  // Context sets the context to be used in this call's Do method.
 32172  func (c *SinksGetCall) Context(ctx context.Context) *SinksGetCall {
 32173  	c.ctx_ = ctx
 32174  	return c
 32175  }
 32176  
 32177  // Header returns a http.Header that can be modified by the caller to add
 32178  // headers to the request.
 32179  func (c *SinksGetCall) Header() http.Header {
 32180  	if c.header_ == nil {
 32181  		c.header_ = make(http.Header)
 32182  	}
 32183  	return c.header_
 32184  }
 32185  
 32186  func (c *SinksGetCall) doRequest(alt string) (*http.Response, error) {
 32187  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 32188  	if c.ifNoneMatch_ != "" {
 32189  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 32190  	}
 32191  	var body io.Reader = nil
 32192  	c.urlParams_.Set("alt", alt)
 32193  	c.urlParams_.Set("prettyPrint", "false")
 32194  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 32195  	urls += "?" + c.urlParams_.Encode()
 32196  	req, err := http.NewRequest("GET", urls, body)
 32197  	if err != nil {
 32198  		return nil, err
 32199  	}
 32200  	req.Header = reqHeaders
 32201  	googleapi.Expand(req.URL, map[string]string{
 32202  		"sinkName": c.sinkName,
 32203  	})
 32204  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 32205  }
 32206  
 32207  // Do executes the "logging.sinks.get" call.
 32208  // Any non-2xx status code is an error. Response headers are in either
 32209  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 32210  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 32211  // whether the returned error was because http.StatusNotModified was returned.
 32212  func (c *SinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 32213  	gensupport.SetOptions(c.urlParams_, opts...)
 32214  	res, err := c.doRequest("json")
 32215  	if res != nil && res.StatusCode == http.StatusNotModified {
 32216  		if res.Body != nil {
 32217  			res.Body.Close()
 32218  		}
 32219  		return nil, gensupport.WrapError(&googleapi.Error{
 32220  			Code:   res.StatusCode,
 32221  			Header: res.Header,
 32222  		})
 32223  	}
 32224  	if err != nil {
 32225  		return nil, err
 32226  	}
 32227  	defer googleapi.CloseBody(res)
 32228  	if err := googleapi.CheckResponse(res); err != nil {
 32229  		return nil, gensupport.WrapError(err)
 32230  	}
 32231  	ret := &LogSink{
 32232  		ServerResponse: googleapi.ServerResponse{
 32233  			Header:         res.Header,
 32234  			HTTPStatusCode: res.StatusCode,
 32235  		},
 32236  	}
 32237  	target := &ret
 32238  	if err := gensupport.DecodeResponse(target, res); err != nil {
 32239  		return nil, err
 32240  	}
 32241  	return ret, nil
 32242  }
 32243  
 32244  type SinksListCall struct {
 32245  	s            *Service
 32246  	parent       string
 32247  	urlParams_   gensupport.URLParams
 32248  	ifNoneMatch_ string
 32249  	ctx_         context.Context
 32250  	header_      http.Header
 32251  }
 32252  
 32253  // List: Lists sinks.
 32254  //
 32255  //   - parent: The parent resource whose sinks are to be listed:
 32256  //     "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
 32257  //     "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]".
 32258  func (r *SinksService) List(parent string) *SinksListCall {
 32259  	c := &SinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 32260  	c.parent = parent
 32261  	return c
 32262  }
 32263  
 32264  // Filter sets the optional parameter "filter": A filter expression to
 32265  // constrain the sinks returned. Today, this only supports the following
 32266  // strings: ” 'in_scope("ALL")', 'in_scope("ANCESTOR")',
 32267  // 'in_scope("DEFAULT")'.Description of scopes below. ALL: Includes all of the
 32268  // sinks which can be returned in any other scope. ANCESTOR: Includes
 32269  // intercepting sinks owned by ancestor resources. DEFAULT: Includes sinks
 32270  // owned by parent.When the empty string is provided, then the filter
 32271  // 'in_scope("DEFAULT")' is applied.
 32272  func (c *SinksListCall) Filter(filter string) *SinksListCall {
 32273  	c.urlParams_.Set("filter", filter)
 32274  	return c
 32275  }
 32276  
 32277  // PageSize sets the optional parameter "pageSize": The maximum number of
 32278  // results to return from this request. Non-positive values are ignored. The
 32279  // presence of nextPageToken in the response indicates that more results might
 32280  // be available.
 32281  func (c *SinksListCall) PageSize(pageSize int64) *SinksListCall {
 32282  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 32283  	return c
 32284  }
 32285  
 32286  // PageToken sets the optional parameter "pageToken": If present, then retrieve
 32287  // the next batch of results from the preceding call to this method. pageToken
 32288  // must be the value of nextPageToken from the previous response. The values of
 32289  // other method parameters should be identical to those in the previous call.
 32290  func (c *SinksListCall) PageToken(pageToken string) *SinksListCall {
 32291  	c.urlParams_.Set("pageToken", pageToken)
 32292  	return c
 32293  }
 32294  
 32295  // Fields allows partial responses to be retrieved. See
 32296  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 32297  // details.
 32298  func (c *SinksListCall) Fields(s ...googleapi.Field) *SinksListCall {
 32299  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 32300  	return c
 32301  }
 32302  
 32303  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 32304  // object's ETag matches the given value. This is useful for getting updates
 32305  // only after the object has changed since the last request.
 32306  func (c *SinksListCall) IfNoneMatch(entityTag string) *SinksListCall {
 32307  	c.ifNoneMatch_ = entityTag
 32308  	return c
 32309  }
 32310  
 32311  // Context sets the context to be used in this call's Do method.
 32312  func (c *SinksListCall) Context(ctx context.Context) *SinksListCall {
 32313  	c.ctx_ = ctx
 32314  	return c
 32315  }
 32316  
 32317  // Header returns a http.Header that can be modified by the caller to add
 32318  // headers to the request.
 32319  func (c *SinksListCall) Header() http.Header {
 32320  	if c.header_ == nil {
 32321  		c.header_ = make(http.Header)
 32322  	}
 32323  	return c.header_
 32324  }
 32325  
 32326  func (c *SinksListCall) doRequest(alt string) (*http.Response, error) {
 32327  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 32328  	if c.ifNoneMatch_ != "" {
 32329  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 32330  	}
 32331  	var body io.Reader = nil
 32332  	c.urlParams_.Set("alt", alt)
 32333  	c.urlParams_.Set("prettyPrint", "false")
 32334  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks")
 32335  	urls += "?" + c.urlParams_.Encode()
 32336  	req, err := http.NewRequest("GET", urls, body)
 32337  	if err != nil {
 32338  		return nil, err
 32339  	}
 32340  	req.Header = reqHeaders
 32341  	googleapi.Expand(req.URL, map[string]string{
 32342  		"parent": c.parent,
 32343  	})
 32344  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 32345  }
 32346  
 32347  // Do executes the "logging.sinks.list" call.
 32348  // Any non-2xx status code is an error. Response headers are in either
 32349  // *ListSinksResponse.ServerResponse.Header or (if a response was returned at
 32350  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 32351  // check whether the returned error was because http.StatusNotModified was
 32352  // returned.
 32353  func (c *SinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) {
 32354  	gensupport.SetOptions(c.urlParams_, opts...)
 32355  	res, err := c.doRequest("json")
 32356  	if res != nil && res.StatusCode == http.StatusNotModified {
 32357  		if res.Body != nil {
 32358  			res.Body.Close()
 32359  		}
 32360  		return nil, gensupport.WrapError(&googleapi.Error{
 32361  			Code:   res.StatusCode,
 32362  			Header: res.Header,
 32363  		})
 32364  	}
 32365  	if err != nil {
 32366  		return nil, err
 32367  	}
 32368  	defer googleapi.CloseBody(res)
 32369  	if err := googleapi.CheckResponse(res); err != nil {
 32370  		return nil, gensupport.WrapError(err)
 32371  	}
 32372  	ret := &ListSinksResponse{
 32373  		ServerResponse: googleapi.ServerResponse{
 32374  			Header:         res.Header,
 32375  			HTTPStatusCode: res.StatusCode,
 32376  		},
 32377  	}
 32378  	target := &ret
 32379  	if err := gensupport.DecodeResponse(target, res); err != nil {
 32380  		return nil, err
 32381  	}
 32382  	return ret, nil
 32383  }
 32384  
 32385  // Pages invokes f for each page of results.
 32386  // A non-nil error returned from f will halt the iteration.
 32387  // The provided context supersedes any context provided to the Context method.
 32388  func (c *SinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error {
 32389  	c.ctx_ = ctx
 32390  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 32391  	for {
 32392  		x, err := c.Do()
 32393  		if err != nil {
 32394  			return err
 32395  		}
 32396  		if err := f(x); err != nil {
 32397  			return err
 32398  		}
 32399  		if x.NextPageToken == "" {
 32400  			return nil
 32401  		}
 32402  		c.PageToken(x.NextPageToken)
 32403  	}
 32404  }
 32405  
 32406  type SinksUpdateCall struct {
 32407  	s          *Service
 32408  	sinkNameid string
 32409  	logsink    *LogSink
 32410  	urlParams_ gensupport.URLParams
 32411  	ctx_       context.Context
 32412  	header_    http.Header
 32413  }
 32414  
 32415  // Update: Updates a sink. This method replaces the values of the destination
 32416  // and filter fields of the existing sink with the corresponding values from
 32417  // the new sink.The updated sink might also have a new writer_identity; see the
 32418  // unique_writer_identity field.
 32419  //
 32420  //   - sinkName: The full resource name of the sink to update, including the
 32421  //     parent resource and the sink identifier:
 32422  //     "projects/[PROJECT_ID]/sinks/[SINK_ID]"
 32423  //     "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
 32424  //     "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
 32425  //     "folders/[FOLDER_ID]/sinks/[SINK_ID]" For
 32426  //     example:"projects/my-project/sinks/my-sink".
 32427  func (r *SinksService) Update(sinkNameid string, logsink *LogSink) *SinksUpdateCall {
 32428  	c := &SinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 32429  	c.sinkNameid = sinkNameid
 32430  	c.logsink = logsink
 32431  	return c
 32432  }
 32433  
 32434  // CustomWriterIdentity sets the optional parameter "customWriterIdentity": A
 32435  // service account provided by the caller that will be used to write the log
 32436  // entries. The format must be serviceAccount:some@email. This field can only
 32437  // be specified if you are routing logs to a destination outside this sink's
 32438  // project. If not specified, a Logging service account will automatically be
 32439  // generated.
 32440  func (c *SinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *SinksUpdateCall {
 32441  	c.urlParams_.Set("customWriterIdentity", customWriterIdentity)
 32442  	return c
 32443  }
 32444  
 32445  // UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See
 32446  // sinks.create for a description of this field. When updating a sink, the
 32447  // effect of this field on the value of writer_identity in the updated sink
 32448  // depends on both the old and new values of this field: If the old and new
 32449  // values of this field are both false or both true, then there is no change to
 32450  // the sink's writer_identity. If the old value is false and the new value is
 32451  // true, then writer_identity is changed to a service agent
 32452  // (https://cloud.google.com/iam/docs/service-account-types#service-agents)
 32453  // owned by Cloud Logging. It is an error if the old value is true and the new
 32454  // value is set to false or defaulted to false.
 32455  func (c *SinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *SinksUpdateCall {
 32456  	c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity))
 32457  	return c
 32458  }
 32459  
 32460  // UpdateMask sets the optional parameter "updateMask": Field mask that
 32461  // specifies the fields in sink that need an update. A sink field will be
 32462  // overwritten if, and only if, it is in the update mask. name and output only
 32463  // fields cannot be updated.An empty updateMask is temporarily treated as using
 32464  // the following mask for backwards compatibility
 32465  // purposes:destination,filter,includeChildrenAt some point in the future,
 32466  // behavior will be removed and specifying an empty updateMask will be an
 32467  // error.For a detailed FieldMask definition, see
 32468  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor
 32469  // example: updateMask=filter
 32470  func (c *SinksUpdateCall) UpdateMask(updateMask string) *SinksUpdateCall {
 32471  	c.urlParams_.Set("updateMask", updateMask)
 32472  	return c
 32473  }
 32474  
 32475  // Fields allows partial responses to be retrieved. See
 32476  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 32477  // details.
 32478  func (c *SinksUpdateCall) Fields(s ...googleapi.Field) *SinksUpdateCall {
 32479  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 32480  	return c
 32481  }
 32482  
 32483  // Context sets the context to be used in this call's Do method.
 32484  func (c *SinksUpdateCall) Context(ctx context.Context) *SinksUpdateCall {
 32485  	c.ctx_ = ctx
 32486  	return c
 32487  }
 32488  
 32489  // Header returns a http.Header that can be modified by the caller to add
 32490  // headers to the request.
 32491  func (c *SinksUpdateCall) Header() http.Header {
 32492  	if c.header_ == nil {
 32493  		c.header_ = make(http.Header)
 32494  	}
 32495  	return c.header_
 32496  }
 32497  
 32498  func (c *SinksUpdateCall) doRequest(alt string) (*http.Response, error) {
 32499  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 32500  	var body io.Reader = nil
 32501  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
 32502  	if err != nil {
 32503  		return nil, err
 32504  	}
 32505  	c.urlParams_.Set("alt", alt)
 32506  	c.urlParams_.Set("prettyPrint", "false")
 32507  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}")
 32508  	urls += "?" + c.urlParams_.Encode()
 32509  	req, err := http.NewRequest("PUT", urls, body)
 32510  	if err != nil {
 32511  		return nil, err
 32512  	}
 32513  	req.Header = reqHeaders
 32514  	googleapi.Expand(req.URL, map[string]string{
 32515  		"sinkName": c.sinkNameid,
 32516  	})
 32517  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 32518  }
 32519  
 32520  // Do executes the "logging.sinks.update" call.
 32521  // Any non-2xx status code is an error. Response headers are in either
 32522  // *LogSink.ServerResponse.Header or (if a response was returned at all) in
 32523  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 32524  // whether the returned error was because http.StatusNotModified was returned.
 32525  func (c *SinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) {
 32526  	gensupport.SetOptions(c.urlParams_, opts...)
 32527  	res, err := c.doRequest("json")
 32528  	if res != nil && res.StatusCode == http.StatusNotModified {
 32529  		if res.Body != nil {
 32530  			res.Body.Close()
 32531  		}
 32532  		return nil, gensupport.WrapError(&googleapi.Error{
 32533  			Code:   res.StatusCode,
 32534  			Header: res.Header,
 32535  		})
 32536  	}
 32537  	if err != nil {
 32538  		return nil, err
 32539  	}
 32540  	defer googleapi.CloseBody(res)
 32541  	if err := googleapi.CheckResponse(res); err != nil {
 32542  		return nil, gensupport.WrapError(err)
 32543  	}
 32544  	ret := &LogSink{
 32545  		ServerResponse: googleapi.ServerResponse{
 32546  			Header:         res.Header,
 32547  			HTTPStatusCode: res.StatusCode,
 32548  		},
 32549  	}
 32550  	target := &ret
 32551  	if err := gensupport.DecodeResponse(target, res); err != nil {
 32552  		return nil, err
 32553  	}
 32554  	return ret, nil
 32555  }
 32556  
 32557  type V2GetCmekSettingsCall struct {
 32558  	s            *Service
 32559  	name         string
 32560  	urlParams_   gensupport.URLParams
 32561  	ifNoneMatch_ string
 32562  	ctx_         context.Context
 32563  	header_      http.Header
 32564  }
 32565  
 32566  // GetCmekSettings: Gets the Logging CMEK settings for the given resource.Note:
 32567  // CMEK for the Log Router can be configured for Google Cloud projects,
 32568  // folders, organizations, and billing accounts. Once configured for an
 32569  // organization, it applies to all projects and folders in the Google Cloud
 32570  // organization.See Enabling CMEK for Log Router
 32571  // (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
 32572  // information.
 32573  //
 32574  //   - name: The resource for which to retrieve CMEK settings.
 32575  //     "projects/[PROJECT_ID]/cmekSettings"
 32576  //     "organizations/[ORGANIZATION_ID]/cmekSettings"
 32577  //     "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
 32578  //     "folders/[FOLDER_ID]/cmekSettings" For
 32579  //     example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router
 32580  //     can be configured for Google Cloud projects, folders, organizations, and
 32581  //     billing accounts. Once configured for an organization, it applies to all
 32582  //     projects and folders in the Google Cloud organization.
 32583  func (r *V2Service) GetCmekSettings(name string) *V2GetCmekSettingsCall {
 32584  	c := &V2GetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 32585  	c.name = name
 32586  	return c
 32587  }
 32588  
 32589  // Fields allows partial responses to be retrieved. See
 32590  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 32591  // details.
 32592  func (c *V2GetCmekSettingsCall) Fields(s ...googleapi.Field) *V2GetCmekSettingsCall {
 32593  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 32594  	return c
 32595  }
 32596  
 32597  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 32598  // object's ETag matches the given value. This is useful for getting updates
 32599  // only after the object has changed since the last request.
 32600  func (c *V2GetCmekSettingsCall) IfNoneMatch(entityTag string) *V2GetCmekSettingsCall {
 32601  	c.ifNoneMatch_ = entityTag
 32602  	return c
 32603  }
 32604  
 32605  // Context sets the context to be used in this call's Do method.
 32606  func (c *V2GetCmekSettingsCall) Context(ctx context.Context) *V2GetCmekSettingsCall {
 32607  	c.ctx_ = ctx
 32608  	return c
 32609  }
 32610  
 32611  // Header returns a http.Header that can be modified by the caller to add
 32612  // headers to the request.
 32613  func (c *V2GetCmekSettingsCall) Header() http.Header {
 32614  	if c.header_ == nil {
 32615  		c.header_ = make(http.Header)
 32616  	}
 32617  	return c.header_
 32618  }
 32619  
 32620  func (c *V2GetCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
 32621  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 32622  	if c.ifNoneMatch_ != "" {
 32623  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 32624  	}
 32625  	var body io.Reader = nil
 32626  	c.urlParams_.Set("alt", alt)
 32627  	c.urlParams_.Set("prettyPrint", "false")
 32628  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
 32629  	urls += "?" + c.urlParams_.Encode()
 32630  	req, err := http.NewRequest("GET", urls, body)
 32631  	if err != nil {
 32632  		return nil, err
 32633  	}
 32634  	req.Header = reqHeaders
 32635  	googleapi.Expand(req.URL, map[string]string{
 32636  		"name": c.name,
 32637  	})
 32638  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 32639  }
 32640  
 32641  // Do executes the "logging.getCmekSettings" call.
 32642  // Any non-2xx status code is an error. Response headers are in either
 32643  // *CmekSettings.ServerResponse.Header or (if a response was returned at all)
 32644  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 32645  // whether the returned error was because http.StatusNotModified was returned.
 32646  func (c *V2GetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
 32647  	gensupport.SetOptions(c.urlParams_, opts...)
 32648  	res, err := c.doRequest("json")
 32649  	if res != nil && res.StatusCode == http.StatusNotModified {
 32650  		if res.Body != nil {
 32651  			res.Body.Close()
 32652  		}
 32653  		return nil, gensupport.WrapError(&googleapi.Error{
 32654  			Code:   res.StatusCode,
 32655  			Header: res.Header,
 32656  		})
 32657  	}
 32658  	if err != nil {
 32659  		return nil, err
 32660  	}
 32661  	defer googleapi.CloseBody(res)
 32662  	if err := googleapi.CheckResponse(res); err != nil {
 32663  		return nil, gensupport.WrapError(err)
 32664  	}
 32665  	ret := &CmekSettings{
 32666  		ServerResponse: googleapi.ServerResponse{
 32667  			Header:         res.Header,
 32668  			HTTPStatusCode: res.StatusCode,
 32669  		},
 32670  	}
 32671  	target := &ret
 32672  	if err := gensupport.DecodeResponse(target, res); err != nil {
 32673  		return nil, err
 32674  	}
 32675  	return ret, nil
 32676  }
 32677  
 32678  type V2GetSettingsCall struct {
 32679  	s            *Service
 32680  	name         string
 32681  	urlParams_   gensupport.URLParams
 32682  	ifNoneMatch_ string
 32683  	ctx_         context.Context
 32684  	header_      http.Header
 32685  }
 32686  
 32687  // GetSettings: Gets the settings for the given resource.Note: Settings can be
 32688  // retrieved for Google Cloud projects, folders, organizations, and billing
 32689  // accounts.See View default resource settings for Logging
 32690  // (https://cloud.google.com/logging/docs/default-settings#view-org-settings)
 32691  // for more information.
 32692  //
 32693  //   - name: The resource for which to retrieve settings.
 32694  //     "projects/[PROJECT_ID]/settings"
 32695  //     "organizations/[ORGANIZATION_ID]/settings"
 32696  //     "billingAccounts/[BILLING_ACCOUNT_ID]/settings"
 32697  //     "folders/[FOLDER_ID]/settings" For
 32698  //     example:"organizations/12345/settings"Note: Settings can be retrieved for
 32699  //     Google Cloud projects, folders, organizations, and billing accounts.
 32700  func (r *V2Service) GetSettings(name string) *V2GetSettingsCall {
 32701  	c := &V2GetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 32702  	c.name = name
 32703  	return c
 32704  }
 32705  
 32706  // Fields allows partial responses to be retrieved. See
 32707  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 32708  // details.
 32709  func (c *V2GetSettingsCall) Fields(s ...googleapi.Field) *V2GetSettingsCall {
 32710  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 32711  	return c
 32712  }
 32713  
 32714  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 32715  // object's ETag matches the given value. This is useful for getting updates
 32716  // only after the object has changed since the last request.
 32717  func (c *V2GetSettingsCall) IfNoneMatch(entityTag string) *V2GetSettingsCall {
 32718  	c.ifNoneMatch_ = entityTag
 32719  	return c
 32720  }
 32721  
 32722  // Context sets the context to be used in this call's Do method.
 32723  func (c *V2GetSettingsCall) Context(ctx context.Context) *V2GetSettingsCall {
 32724  	c.ctx_ = ctx
 32725  	return c
 32726  }
 32727  
 32728  // Header returns a http.Header that can be modified by the caller to add
 32729  // headers to the request.
 32730  func (c *V2GetSettingsCall) Header() http.Header {
 32731  	if c.header_ == nil {
 32732  		c.header_ = make(http.Header)
 32733  	}
 32734  	return c.header_
 32735  }
 32736  
 32737  func (c *V2GetSettingsCall) doRequest(alt string) (*http.Response, error) {
 32738  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 32739  	if c.ifNoneMatch_ != "" {
 32740  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 32741  	}
 32742  	var body io.Reader = nil
 32743  	c.urlParams_.Set("alt", alt)
 32744  	c.urlParams_.Set("prettyPrint", "false")
 32745  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
 32746  	urls += "?" + c.urlParams_.Encode()
 32747  	req, err := http.NewRequest("GET", urls, body)
 32748  	if err != nil {
 32749  		return nil, err
 32750  	}
 32751  	req.Header = reqHeaders
 32752  	googleapi.Expand(req.URL, map[string]string{
 32753  		"name": c.name,
 32754  	})
 32755  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 32756  }
 32757  
 32758  // Do executes the "logging.getSettings" call.
 32759  // Any non-2xx status code is an error. Response headers are in either
 32760  // *Settings.ServerResponse.Header or (if a response was returned at all) in
 32761  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 32762  // whether the returned error was because http.StatusNotModified was returned.
 32763  func (c *V2GetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
 32764  	gensupport.SetOptions(c.urlParams_, opts...)
 32765  	res, err := c.doRequest("json")
 32766  	if res != nil && res.StatusCode == http.StatusNotModified {
 32767  		if res.Body != nil {
 32768  			res.Body.Close()
 32769  		}
 32770  		return nil, gensupport.WrapError(&googleapi.Error{
 32771  			Code:   res.StatusCode,
 32772  			Header: res.Header,
 32773  		})
 32774  	}
 32775  	if err != nil {
 32776  		return nil, err
 32777  	}
 32778  	defer googleapi.CloseBody(res)
 32779  	if err := googleapi.CheckResponse(res); err != nil {
 32780  		return nil, gensupport.WrapError(err)
 32781  	}
 32782  	ret := &Settings{
 32783  		ServerResponse: googleapi.ServerResponse{
 32784  			Header:         res.Header,
 32785  			HTTPStatusCode: res.StatusCode,
 32786  		},
 32787  	}
 32788  	target := &ret
 32789  	if err := gensupport.DecodeResponse(target, res); err != nil {
 32790  		return nil, err
 32791  	}
 32792  	return ret, nil
 32793  }
 32794  
 32795  type V2UpdateCmekSettingsCall struct {
 32796  	s            *Service
 32797  	name         string
 32798  	cmeksettings *CmekSettings
 32799  	urlParams_   gensupport.URLParams
 32800  	ctx_         context.Context
 32801  	header_      http.Header
 32802  }
 32803  
 32804  // UpdateCmekSettings: Updates the Log Router CMEK settings for the given
 32805  // resource.Note: CMEK for the Log Router can currently only be configured for
 32806  // Google Cloud organizations. Once configured, it applies to all projects and
 32807  // folders in the Google Cloud organization.UpdateCmekSettings fails when any
 32808  // of the following are true: The value of kms_key_name is invalid. The
 32809  // associated service account doesn't have the required
 32810  // roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access
 32811  // to the key is disabled.See Enabling CMEK for Log Router
 32812  // (https://cloud.google.com/logging/docs/routing/managed-encryption) for more
 32813  // information.
 32814  //
 32815  //   - name: The resource name for the CMEK settings to update.
 32816  //     "projects/[PROJECT_ID]/cmekSettings"
 32817  //     "organizations/[ORGANIZATION_ID]/cmekSettings"
 32818  //     "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
 32819  //     "folders/[FOLDER_ID]/cmekSettings" For
 32820  //     example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router
 32821  //     can currently only be configured for Google Cloud organizations. Once
 32822  //     configured, it applies to all projects and folders in the Google Cloud
 32823  //     organization.
 32824  func (r *V2Service) UpdateCmekSettings(name string, cmeksettings *CmekSettings) *V2UpdateCmekSettingsCall {
 32825  	c := &V2UpdateCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 32826  	c.name = name
 32827  	c.cmeksettings = cmeksettings
 32828  	return c
 32829  }
 32830  
 32831  // UpdateMask sets the optional parameter "updateMask": Field mask identifying
 32832  // which fields from cmek_settings should be updated. A field will be
 32833  // overwritten if and only if it is in the update mask. Output only fields
 32834  // cannot be updated.See FieldMask for more information.For example:
 32835  // "updateMask=kmsKeyName"
 32836  func (c *V2UpdateCmekSettingsCall) UpdateMask(updateMask string) *V2UpdateCmekSettingsCall {
 32837  	c.urlParams_.Set("updateMask", updateMask)
 32838  	return c
 32839  }
 32840  
 32841  // Fields allows partial responses to be retrieved. See
 32842  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 32843  // details.
 32844  func (c *V2UpdateCmekSettingsCall) Fields(s ...googleapi.Field) *V2UpdateCmekSettingsCall {
 32845  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 32846  	return c
 32847  }
 32848  
 32849  // Context sets the context to be used in this call's Do method.
 32850  func (c *V2UpdateCmekSettingsCall) Context(ctx context.Context) *V2UpdateCmekSettingsCall {
 32851  	c.ctx_ = ctx
 32852  	return c
 32853  }
 32854  
 32855  // Header returns a http.Header that can be modified by the caller to add
 32856  // headers to the request.
 32857  func (c *V2UpdateCmekSettingsCall) Header() http.Header {
 32858  	if c.header_ == nil {
 32859  		c.header_ = make(http.Header)
 32860  	}
 32861  	return c.header_
 32862  }
 32863  
 32864  func (c *V2UpdateCmekSettingsCall) doRequest(alt string) (*http.Response, error) {
 32865  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 32866  	var body io.Reader = nil
 32867  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cmeksettings)
 32868  	if err != nil {
 32869  		return nil, err
 32870  	}
 32871  	c.urlParams_.Set("alt", alt)
 32872  	c.urlParams_.Set("prettyPrint", "false")
 32873  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings")
 32874  	urls += "?" + c.urlParams_.Encode()
 32875  	req, err := http.NewRequest("PATCH", urls, body)
 32876  	if err != nil {
 32877  		return nil, err
 32878  	}
 32879  	req.Header = reqHeaders
 32880  	googleapi.Expand(req.URL, map[string]string{
 32881  		"name": c.name,
 32882  	})
 32883  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 32884  }
 32885  
 32886  // Do executes the "logging.updateCmekSettings" call.
 32887  // Any non-2xx status code is an error. Response headers are in either
 32888  // *CmekSettings.ServerResponse.Header or (if a response was returned at all)
 32889  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 32890  // whether the returned error was because http.StatusNotModified was returned.
 32891  func (c *V2UpdateCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) {
 32892  	gensupport.SetOptions(c.urlParams_, opts...)
 32893  	res, err := c.doRequest("json")
 32894  	if res != nil && res.StatusCode == http.StatusNotModified {
 32895  		if res.Body != nil {
 32896  			res.Body.Close()
 32897  		}
 32898  		return nil, gensupport.WrapError(&googleapi.Error{
 32899  			Code:   res.StatusCode,
 32900  			Header: res.Header,
 32901  		})
 32902  	}
 32903  	if err != nil {
 32904  		return nil, err
 32905  	}
 32906  	defer googleapi.CloseBody(res)
 32907  	if err := googleapi.CheckResponse(res); err != nil {
 32908  		return nil, gensupport.WrapError(err)
 32909  	}
 32910  	ret := &CmekSettings{
 32911  		ServerResponse: googleapi.ServerResponse{
 32912  			Header:         res.Header,
 32913  			HTTPStatusCode: res.StatusCode,
 32914  		},
 32915  	}
 32916  	target := &ret
 32917  	if err := gensupport.DecodeResponse(target, res); err != nil {
 32918  		return nil, err
 32919  	}
 32920  	return ret, nil
 32921  }
 32922  
 32923  type V2UpdateSettingsCall struct {
 32924  	s          *Service
 32925  	name       string
 32926  	settings   *Settings
 32927  	urlParams_ gensupport.URLParams
 32928  	ctx_       context.Context
 32929  	header_    http.Header
 32930  }
 32931  
 32932  // UpdateSettings: Updates the settings for the given resource. This method
 32933  // applies to all feature configurations for organization and
 32934  // folders.UpdateSettings fails when any of the following are true: The value
 32935  // of storage_location either isn't supported by Logging or violates the
 32936  // location OrgPolicy. The default_sink_config field is set, but it has an
 32937  // unspecified filter write mode. The value of kms_key_name is invalid. The
 32938  // associated service account doesn't have the required
 32939  // roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access
 32940  // to the key is disabled.See Configure default settings for organizations and
 32941  // folders (https://cloud.google.com/logging/docs/default-settings) for more
 32942  // information.
 32943  //
 32944  //   - name: The resource name for the settings to update.
 32945  //     "organizations/[ORGANIZATION_ID]/settings" For
 32946  //     example:"organizations/12345/settings".
 32947  func (r *V2Service) UpdateSettings(name string, settings *Settings) *V2UpdateSettingsCall {
 32948  	c := &V2UpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 32949  	c.name = name
 32950  	c.settings = settings
 32951  	return c
 32952  }
 32953  
 32954  // UpdateMask sets the optional parameter "updateMask": Field mask identifying
 32955  // which fields from settings should be updated. A field will be overwritten if
 32956  // and only if it is in the update mask. Output only fields cannot be
 32957  // updated.See FieldMask for more information.For example:
 32958  // "updateMask=kmsKeyName"
 32959  func (c *V2UpdateSettingsCall) UpdateMask(updateMask string) *V2UpdateSettingsCall {
 32960  	c.urlParams_.Set("updateMask", updateMask)
 32961  	return c
 32962  }
 32963  
 32964  // Fields allows partial responses to be retrieved. See
 32965  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 32966  // details.
 32967  func (c *V2UpdateSettingsCall) Fields(s ...googleapi.Field) *V2UpdateSettingsCall {
 32968  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 32969  	return c
 32970  }
 32971  
 32972  // Context sets the context to be used in this call's Do method.
 32973  func (c *V2UpdateSettingsCall) Context(ctx context.Context) *V2UpdateSettingsCall {
 32974  	c.ctx_ = ctx
 32975  	return c
 32976  }
 32977  
 32978  // Header returns a http.Header that can be modified by the caller to add
 32979  // headers to the request.
 32980  func (c *V2UpdateSettingsCall) Header() http.Header {
 32981  	if c.header_ == nil {
 32982  		c.header_ = make(http.Header)
 32983  	}
 32984  	return c.header_
 32985  }
 32986  
 32987  func (c *V2UpdateSettingsCall) doRequest(alt string) (*http.Response, error) {
 32988  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 32989  	var body io.Reader = nil
 32990  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.settings)
 32991  	if err != nil {
 32992  		return nil, err
 32993  	}
 32994  	c.urlParams_.Set("alt", alt)
 32995  	c.urlParams_.Set("prettyPrint", "false")
 32996  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings")
 32997  	urls += "?" + c.urlParams_.Encode()
 32998  	req, err := http.NewRequest("PATCH", urls, body)
 32999  	if err != nil {
 33000  		return nil, err
 33001  	}
 33002  	req.Header = reqHeaders
 33003  	googleapi.Expand(req.URL, map[string]string{
 33004  		"name": c.name,
 33005  	})
 33006  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 33007  }
 33008  
 33009  // Do executes the "logging.updateSettings" call.
 33010  // Any non-2xx status code is an error. Response headers are in either
 33011  // *Settings.ServerResponse.Header or (if a response was returned at all) in
 33012  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 33013  // whether the returned error was because http.StatusNotModified was returned.
 33014  func (c *V2UpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
 33015  	gensupport.SetOptions(c.urlParams_, opts...)
 33016  	res, err := c.doRequest("json")
 33017  	if res != nil && res.StatusCode == http.StatusNotModified {
 33018  		if res.Body != nil {
 33019  			res.Body.Close()
 33020  		}
 33021  		return nil, gensupport.WrapError(&googleapi.Error{
 33022  			Code:   res.StatusCode,
 33023  			Header: res.Header,
 33024  		})
 33025  	}
 33026  	if err != nil {
 33027  		return nil, err
 33028  	}
 33029  	defer googleapi.CloseBody(res)
 33030  	if err := googleapi.CheckResponse(res); err != nil {
 33031  		return nil, gensupport.WrapError(err)
 33032  	}
 33033  	ret := &Settings{
 33034  		ServerResponse: googleapi.ServerResponse{
 33035  			Header:         res.Header,
 33036  			HTTPStatusCode: res.StatusCode,
 33037  		},
 33038  	}
 33039  	target := &ret
 33040  	if err := gensupport.DecodeResponse(target, res); err != nil {
 33041  		return nil, err
 33042  	}
 33043  	return ret, nil
 33044  }
 33045  

View as plain text