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 bigquery provides access to the BigQuery API. 8 // 9 // This package is DEPRECATED. Use package cloud.google.com/go/bigquery instead. 10 // 11 // For product documentation, see: https://cloud.google.com/bigquery/ 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/bigquery/v2" 29 // ... 30 // ctx := context.Background() 31 // bigqueryService, err := bigquery.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 // bigqueryService, err := bigquery.NewService(ctx, option.WithScopes(bigquery.DevstorageReadWriteScope)) 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 // bigqueryService, err := bigquery.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 // bigqueryService, err := bigquery.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 56 // 57 // See [google.golang.org/api/option.ClientOption] for details on options. 58 package bigquery // import "google.golang.org/api/bigquery/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 = "bigquery:v2" 97 const apiName = "bigquery" 98 const apiVersion = "v2" 99 const basePath = "https://bigquery.googleapis.com/bigquery/v2/" 100 const basePathTemplate = "https://bigquery.UNIVERSE_DOMAIN/bigquery/v2/" 101 const mtlsBasePath = "https://bigquery.mtls.googleapis.com/bigquery/v2/" 102 103 // OAuth2 scopes used by this API. 104 const ( 105 // View and manage your data in Google BigQuery and see the email address for 106 // your Google Account 107 BigqueryScope = "https://www.googleapis.com/auth/bigquery" 108 109 // Insert data into Google BigQuery 110 BigqueryInsertdataScope = "https://www.googleapis.com/auth/bigquery.insertdata" 111 112 // See, edit, configure, and delete your Google Cloud data and see the email 113 // address for your Google Account. 114 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 115 116 // View your data across Google Cloud services and see the email address of 117 // your Google Account 118 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" 119 120 // Manage your data and permissions in Cloud Storage and see the email address 121 // for your Google Account 122 DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control" 123 124 // View your data in Google Cloud Storage 125 DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only" 126 127 // Manage your data in Cloud Storage and see the email address of your Google 128 // Account 129 DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" 130 ) 131 132 // NewService creates a new Service. 133 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 134 scopesOption := internaloption.WithDefaultScopes( 135 "https://www.googleapis.com/auth/bigquery", 136 "https://www.googleapis.com/auth/bigquery.insertdata", 137 "https://www.googleapis.com/auth/cloud-platform", 138 "https://www.googleapis.com/auth/cloud-platform.read-only", 139 "https://www.googleapis.com/auth/devstorage.full_control", 140 "https://www.googleapis.com/auth/devstorage.read_only", 141 "https://www.googleapis.com/auth/devstorage.read_write", 142 ) 143 // NOTE: prepend, so we don't override user-specified scopes. 144 opts = append([]option.ClientOption{scopesOption}, opts...) 145 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 146 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 147 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 148 client, endpoint, err := htransport.NewClient(ctx, opts...) 149 if err != nil { 150 return nil, err 151 } 152 s, err := New(client) 153 if err != nil { 154 return nil, err 155 } 156 if endpoint != "" { 157 s.BasePath = endpoint 158 } 159 return s, nil 160 } 161 162 // New creates a new Service. It uses the provided http.Client for requests. 163 // 164 // Deprecated: please use NewService instead. 165 // To provide a custom HTTP client, use option.WithHTTPClient. 166 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 167 func New(client *http.Client) (*Service, error) { 168 if client == nil { 169 return nil, errors.New("client is nil") 170 } 171 s := &Service{client: client, BasePath: basePath} 172 s.Datasets = NewDatasetsService(s) 173 s.Jobs = NewJobsService(s) 174 s.Models = NewModelsService(s) 175 s.Projects = NewProjectsService(s) 176 s.Routines = NewRoutinesService(s) 177 s.RowAccessPolicies = NewRowAccessPoliciesService(s) 178 s.Tabledata = NewTabledataService(s) 179 s.Tables = NewTablesService(s) 180 return s, nil 181 } 182 183 type Service struct { 184 client *http.Client 185 BasePath string // API endpoint base URL 186 UserAgent string // optional additional User-Agent fragment 187 188 Datasets *DatasetsService 189 190 Jobs *JobsService 191 192 Models *ModelsService 193 194 Projects *ProjectsService 195 196 Routines *RoutinesService 197 198 RowAccessPolicies *RowAccessPoliciesService 199 200 Tabledata *TabledataService 201 202 Tables *TablesService 203 } 204 205 func (s *Service) userAgent() string { 206 if s.UserAgent == "" { 207 return googleapi.UserAgent 208 } 209 return googleapi.UserAgent + " " + s.UserAgent 210 } 211 212 func NewDatasetsService(s *Service) *DatasetsService { 213 rs := &DatasetsService{s: s} 214 return rs 215 } 216 217 type DatasetsService struct { 218 s *Service 219 } 220 221 func NewJobsService(s *Service) *JobsService { 222 rs := &JobsService{s: s} 223 return rs 224 } 225 226 type JobsService struct { 227 s *Service 228 } 229 230 func NewModelsService(s *Service) *ModelsService { 231 rs := &ModelsService{s: s} 232 return rs 233 } 234 235 type ModelsService struct { 236 s *Service 237 } 238 239 func NewProjectsService(s *Service) *ProjectsService { 240 rs := &ProjectsService{s: s} 241 return rs 242 } 243 244 type ProjectsService struct { 245 s *Service 246 } 247 248 func NewRoutinesService(s *Service) *RoutinesService { 249 rs := &RoutinesService{s: s} 250 return rs 251 } 252 253 type RoutinesService struct { 254 s *Service 255 } 256 257 func NewRowAccessPoliciesService(s *Service) *RowAccessPoliciesService { 258 rs := &RowAccessPoliciesService{s: s} 259 return rs 260 } 261 262 type RowAccessPoliciesService struct { 263 s *Service 264 } 265 266 func NewTabledataService(s *Service) *TabledataService { 267 rs := &TabledataService{s: s} 268 return rs 269 } 270 271 type TabledataService struct { 272 s *Service 273 } 274 275 func NewTablesService(s *Service) *TablesService { 276 rs := &TablesService{s: s} 277 return rs 278 } 279 280 type TablesService struct { 281 s *Service 282 } 283 284 // AggregateClassificationMetrics: Aggregate metrics for 285 // classification/classifier models. For multi-class models, the metrics are 286 // either macro-averaged or micro-averaged. When macro-averaged, the metrics 287 // are calculated for each label and then an unweighted average is taken of 288 // those values. When micro-averaged, the metric is calculated globally by 289 // counting the total number of correctly predicted rows. 290 type AggregateClassificationMetrics struct { 291 // Accuracy: Accuracy is the fraction of predictions given the correct label. 292 // For multiclass this is a micro-averaged metric. 293 Accuracy float64 `json:"accuracy,omitempty"` 294 // F1Score: The F1 score is an average of recall and precision. For multiclass 295 // this is a macro-averaged metric. 296 F1Score float64 `json:"f1Score,omitempty"` 297 // LogLoss: Logarithmic Loss. For multiclass this is a macro-averaged metric. 298 LogLoss float64 `json:"logLoss,omitempty"` 299 // Precision: Precision is the fraction of actual positive predictions that had 300 // positive actual labels. For multiclass this is a macro-averaged metric 301 // treating each class as a binary classifier. 302 Precision float64 `json:"precision,omitempty"` 303 // Recall: Recall is the fraction of actual positive labels that were given a 304 // positive prediction. For multiclass this is a macro-averaged metric. 305 Recall float64 `json:"recall,omitempty"` 306 // RocAuc: Area Under a ROC Curve. For multiclass this is a macro-averaged 307 // metric. 308 RocAuc float64 `json:"rocAuc,omitempty"` 309 // Threshold: Threshold at which the metrics are computed. For binary 310 // classification models this is the positive class threshold. For multi-class 311 // classfication models this is the confidence threshold. 312 Threshold float64 `json:"threshold,omitempty"` 313 // ForceSendFields is a list of field names (e.g. "Accuracy") to 314 // unconditionally include in API requests. By default, fields with empty or 315 // default values are omitted from API requests. See 316 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 317 // details. 318 ForceSendFields []string `json:"-"` 319 // NullFields is a list of field names (e.g. "Accuracy") to include in API 320 // requests with the JSON null value. By default, fields with empty values are 321 // omitted from API requests. See 322 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 323 NullFields []string `json:"-"` 324 } 325 326 func (s *AggregateClassificationMetrics) MarshalJSON() ([]byte, error) { 327 type NoMethod AggregateClassificationMetrics 328 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 329 } 330 331 func (s *AggregateClassificationMetrics) UnmarshalJSON(data []byte) error { 332 type NoMethod AggregateClassificationMetrics 333 var s1 struct { 334 Accuracy gensupport.JSONFloat64 `json:"accuracy"` 335 F1Score gensupport.JSONFloat64 `json:"f1Score"` 336 LogLoss gensupport.JSONFloat64 `json:"logLoss"` 337 Precision gensupport.JSONFloat64 `json:"precision"` 338 Recall gensupport.JSONFloat64 `json:"recall"` 339 RocAuc gensupport.JSONFloat64 `json:"rocAuc"` 340 Threshold gensupport.JSONFloat64 `json:"threshold"` 341 *NoMethod 342 } 343 s1.NoMethod = (*NoMethod)(s) 344 if err := json.Unmarshal(data, &s1); err != nil { 345 return err 346 } 347 s.Accuracy = float64(s1.Accuracy) 348 s.F1Score = float64(s1.F1Score) 349 s.LogLoss = float64(s1.LogLoss) 350 s.Precision = float64(s1.Precision) 351 s.Recall = float64(s1.Recall) 352 s.RocAuc = float64(s1.RocAuc) 353 s.Threshold = float64(s1.Threshold) 354 return nil 355 } 356 357 // AggregationThresholdPolicy: Represents privacy policy associated with 358 // "aggregation threshold" method. 359 type AggregationThresholdPolicy struct { 360 // PrivacyUnitColumns: Optional. The privacy unit column(s) associated with 361 // this policy. For now, only one column per data source object (table, view) 362 // is allowed as a privacy unit column. Representing as a repeated field in 363 // metadata for extensibility to multiple columns in future. Duplicates and 364 // Repeated struct fields are not allowed. For nested fields, use dot notation 365 // ("outer.inner") 366 PrivacyUnitColumns []string `json:"privacyUnitColumns,omitempty"` 367 // Threshold: Optional. The threshold for the "aggregation threshold" policy. 368 Threshold int64 `json:"threshold,omitempty,string"` 369 // ForceSendFields is a list of field names (e.g. "PrivacyUnitColumns") to 370 // unconditionally include in API requests. By default, fields with empty or 371 // default values are omitted from API requests. See 372 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 373 // details. 374 ForceSendFields []string `json:"-"` 375 // NullFields is a list of field names (e.g. "PrivacyUnitColumns") to include 376 // in API requests with the JSON null value. By default, fields with empty 377 // values are omitted from API requests. See 378 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 379 NullFields []string `json:"-"` 380 } 381 382 func (s *AggregationThresholdPolicy) MarshalJSON() ([]byte, error) { 383 type NoMethod AggregationThresholdPolicy 384 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 385 } 386 387 // Argument: Input/output argument of a function or a stored procedure. 388 type Argument struct { 389 // ArgumentKind: Optional. Defaults to FIXED_TYPE. 390 // 391 // Possible values: 392 // "ARGUMENT_KIND_UNSPECIFIED" - Default value. 393 // "FIXED_TYPE" - The argument is a variable with fully specified type, which 394 // can be a struct or an array, but not a table. 395 // "ANY_TYPE" - The argument is any type, including struct or array, but not 396 // a table. To be added: FIXED_TABLE, ANY_TABLE 397 ArgumentKind string `json:"argumentKind,omitempty"` 398 // DataType: Required unless argument_kind = ANY_TYPE. 399 DataType *StandardSqlDataType `json:"dataType,omitempty"` 400 // IsAggregate: Optional. Whether the argument is an aggregate function 401 // parameter. Must be Unset for routine types other than AGGREGATE_FUNCTION. 402 // For AGGREGATE_FUNCTION, if set to false, it is equivalent to adding "NOT 403 // AGGREGATE" clause in DDL; Otherwise, it is equivalent to omitting "NOT 404 // AGGREGATE" clause in DDL. 405 IsAggregate bool `json:"isAggregate,omitempty"` 406 // Mode: Optional. Specifies whether the argument is input or output. Can be 407 // set for procedures only. 408 // 409 // Possible values: 410 // "MODE_UNSPECIFIED" - Default value. 411 // "IN" - The argument is input-only. 412 // "OUT" - The argument is output-only. 413 // "INOUT" - The argument is both an input and an output. 414 Mode string `json:"mode,omitempty"` 415 // Name: Optional. The name of this argument. Can be absent for function return 416 // argument. 417 Name string `json:"name,omitempty"` 418 // ForceSendFields is a list of field names (e.g. "ArgumentKind") to 419 // unconditionally include in API requests. By default, fields with empty or 420 // default values are omitted from API requests. See 421 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 422 // details. 423 ForceSendFields []string `json:"-"` 424 // NullFields is a list of field names (e.g. "ArgumentKind") to include in API 425 // requests with the JSON null value. By default, fields with empty values are 426 // omitted from API requests. See 427 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 428 NullFields []string `json:"-"` 429 } 430 431 func (s *Argument) MarshalJSON() ([]byte, error) { 432 type NoMethod Argument 433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 434 } 435 436 // ArimaCoefficients: Arima coefficients. 437 type ArimaCoefficients struct { 438 // AutoRegressiveCoefficients: Auto-regressive coefficients, an array of 439 // double. 440 AutoRegressiveCoefficients []float64 `json:"autoRegressiveCoefficients,omitempty"` 441 // InterceptCoefficient: Intercept coefficient, just a double not an array. 442 InterceptCoefficient float64 `json:"interceptCoefficient,omitempty"` 443 // MovingAverageCoefficients: Moving-average coefficients, an array of double. 444 MovingAverageCoefficients []float64 `json:"movingAverageCoefficients,omitempty"` 445 // ForceSendFields is a list of field names (e.g. "AutoRegressiveCoefficients") 446 // to unconditionally include in API requests. By default, fields with empty or 447 // default values are omitted from API requests. See 448 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 449 // details. 450 ForceSendFields []string `json:"-"` 451 // NullFields is a list of field names (e.g. "AutoRegressiveCoefficients") to 452 // include in API requests with the JSON null value. By default, fields with 453 // empty values are omitted from API requests. See 454 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 455 NullFields []string `json:"-"` 456 } 457 458 func (s *ArimaCoefficients) MarshalJSON() ([]byte, error) { 459 type NoMethod ArimaCoefficients 460 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 461 } 462 463 func (s *ArimaCoefficients) UnmarshalJSON(data []byte) error { 464 type NoMethod ArimaCoefficients 465 var s1 struct { 466 AutoRegressiveCoefficients []gensupport.JSONFloat64 `json:"autoRegressiveCoefficients"` 467 InterceptCoefficient gensupport.JSONFloat64 `json:"interceptCoefficient"` 468 MovingAverageCoefficients []gensupport.JSONFloat64 `json:"movingAverageCoefficients"` 469 *NoMethod 470 } 471 s1.NoMethod = (*NoMethod)(s) 472 if err := json.Unmarshal(data, &s1); err != nil { 473 return err 474 } 475 s.AutoRegressiveCoefficients = make([]float64, len(s1.AutoRegressiveCoefficients)) 476 for i := range s1.AutoRegressiveCoefficients { 477 s.AutoRegressiveCoefficients[i] = float64(s1.AutoRegressiveCoefficients[i]) 478 } 479 s.InterceptCoefficient = float64(s1.InterceptCoefficient) 480 s.MovingAverageCoefficients = make([]float64, len(s1.MovingAverageCoefficients)) 481 for i := range s1.MovingAverageCoefficients { 482 s.MovingAverageCoefficients[i] = float64(s1.MovingAverageCoefficients[i]) 483 } 484 return nil 485 } 486 487 // ArimaFittingMetrics: ARIMA model fitting metrics. 488 type ArimaFittingMetrics struct { 489 // Aic: AIC. 490 Aic float64 `json:"aic,omitempty"` 491 // LogLikelihood: Log-likelihood. 492 LogLikelihood float64 `json:"logLikelihood,omitempty"` 493 // Variance: Variance. 494 Variance float64 `json:"variance,omitempty"` 495 // ForceSendFields is a list of field names (e.g. "Aic") to unconditionally 496 // include in API requests. By default, fields with empty or default values are 497 // omitted from API requests. See 498 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 499 // details. 500 ForceSendFields []string `json:"-"` 501 // NullFields is a list of field names (e.g. "Aic") to include in API requests 502 // with the JSON null value. By default, fields with empty values are omitted 503 // from API requests. See 504 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 505 NullFields []string `json:"-"` 506 } 507 508 func (s *ArimaFittingMetrics) MarshalJSON() ([]byte, error) { 509 type NoMethod ArimaFittingMetrics 510 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 511 } 512 513 func (s *ArimaFittingMetrics) UnmarshalJSON(data []byte) error { 514 type NoMethod ArimaFittingMetrics 515 var s1 struct { 516 Aic gensupport.JSONFloat64 `json:"aic"` 517 LogLikelihood gensupport.JSONFloat64 `json:"logLikelihood"` 518 Variance gensupport.JSONFloat64 `json:"variance"` 519 *NoMethod 520 } 521 s1.NoMethod = (*NoMethod)(s) 522 if err := json.Unmarshal(data, &s1); err != nil { 523 return err 524 } 525 s.Aic = float64(s1.Aic) 526 s.LogLikelihood = float64(s1.LogLikelihood) 527 s.Variance = float64(s1.Variance) 528 return nil 529 } 530 531 // ArimaForecastingMetrics: Model evaluation metrics for ARIMA forecasting 532 // models. 533 type ArimaForecastingMetrics struct { 534 // ArimaFittingMetrics: Arima model fitting metrics. 535 ArimaFittingMetrics []*ArimaFittingMetrics `json:"arimaFittingMetrics,omitempty"` 536 // ArimaSingleModelForecastingMetrics: Repeated as there can be many metric 537 // sets (one for each model) in auto-arima and the large-scale case. 538 ArimaSingleModelForecastingMetrics []*ArimaSingleModelForecastingMetrics `json:"arimaSingleModelForecastingMetrics,omitempty"` 539 // HasDrift: Whether Arima model fitted with drift or not. It is always false 540 // when d is not 1. 541 HasDrift []bool `json:"hasDrift,omitempty"` 542 // NonSeasonalOrder: Non-seasonal order. 543 NonSeasonalOrder []*ArimaOrder `json:"nonSeasonalOrder,omitempty"` 544 // SeasonalPeriods: Seasonal periods. Repeated because multiple periods are 545 // supported for one time series. 546 // 547 // Possible values: 548 // "SEASONAL_PERIOD_TYPE_UNSPECIFIED" - Unspecified seasonal period. 549 // "NO_SEASONALITY" - No seasonality 550 // "DAILY" - Daily period, 24 hours. 551 // "WEEKLY" - Weekly period, 7 days. 552 // "MONTHLY" - Monthly period, 30 days or irregular. 553 // "QUARTERLY" - Quarterly period, 90 days or irregular. 554 // "YEARLY" - Yearly period, 365 days or irregular. 555 SeasonalPeriods []string `json:"seasonalPeriods,omitempty"` 556 // TimeSeriesId: Id to differentiate different time series for the large-scale 557 // case. 558 TimeSeriesId []string `json:"timeSeriesId,omitempty"` 559 // ForceSendFields is a list of field names (e.g. "ArimaFittingMetrics") to 560 // unconditionally include in API requests. By default, fields with empty or 561 // default values are omitted from API requests. See 562 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 563 // details. 564 ForceSendFields []string `json:"-"` 565 // NullFields is a list of field names (e.g. "ArimaFittingMetrics") to include 566 // in API requests with the JSON null value. By default, fields with empty 567 // values are omitted from API requests. See 568 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 569 NullFields []string `json:"-"` 570 } 571 572 func (s *ArimaForecastingMetrics) MarshalJSON() ([]byte, error) { 573 type NoMethod ArimaForecastingMetrics 574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 575 } 576 577 // ArimaModelInfo: Arima model information. 578 type ArimaModelInfo struct { 579 // ArimaCoefficients: Arima coefficients. 580 ArimaCoefficients *ArimaCoefficients `json:"arimaCoefficients,omitempty"` 581 // ArimaFittingMetrics: Arima fitting metrics. 582 ArimaFittingMetrics *ArimaFittingMetrics `json:"arimaFittingMetrics,omitempty"` 583 // HasDrift: Whether Arima model fitted with drift or not. It is always false 584 // when d is not 1. 585 HasDrift bool `json:"hasDrift,omitempty"` 586 // HasHolidayEffect: If true, holiday_effect is a part of time series 587 // decomposition result. 588 HasHolidayEffect bool `json:"hasHolidayEffect,omitempty"` 589 // HasSpikesAndDips: If true, spikes_and_dips is a part of time series 590 // decomposition result. 591 HasSpikesAndDips bool `json:"hasSpikesAndDips,omitempty"` 592 // HasStepChanges: If true, step_changes is a part of time series decomposition 593 // result. 594 HasStepChanges bool `json:"hasStepChanges,omitempty"` 595 // NonSeasonalOrder: Non-seasonal order. 596 NonSeasonalOrder *ArimaOrder `json:"nonSeasonalOrder,omitempty"` 597 // SeasonalPeriods: Seasonal periods. Repeated because multiple periods are 598 // supported for one time series. 599 // 600 // Possible values: 601 // "SEASONAL_PERIOD_TYPE_UNSPECIFIED" - Unspecified seasonal period. 602 // "NO_SEASONALITY" - No seasonality 603 // "DAILY" - Daily period, 24 hours. 604 // "WEEKLY" - Weekly period, 7 days. 605 // "MONTHLY" - Monthly period, 30 days or irregular. 606 // "QUARTERLY" - Quarterly period, 90 days or irregular. 607 // "YEARLY" - Yearly period, 365 days or irregular. 608 SeasonalPeriods []string `json:"seasonalPeriods,omitempty"` 609 // TimeSeriesId: The time_series_id value for this time series. It will be one 610 // of the unique values from the time_series_id_column specified during ARIMA 611 // model training. Only present when time_series_id_column training option was 612 // used. 613 TimeSeriesId string `json:"timeSeriesId,omitempty"` 614 // TimeSeriesIds: The tuple of time_series_ids identifying this time series. It 615 // will be one of the unique tuples of values present in the 616 // time_series_id_columns specified during ARIMA model training. Only present 617 // when time_series_id_columns training option was used and the order of values 618 // here are same as the order of time_series_id_columns. 619 TimeSeriesIds []string `json:"timeSeriesIds,omitempty"` 620 // ForceSendFields is a list of field names (e.g. "ArimaCoefficients") to 621 // unconditionally include in API requests. By default, fields with empty or 622 // default values are omitted from API requests. See 623 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 624 // details. 625 ForceSendFields []string `json:"-"` 626 // NullFields is a list of field names (e.g. "ArimaCoefficients") to include in 627 // API requests with the JSON null value. By default, fields with empty values 628 // are omitted from API requests. See 629 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 630 NullFields []string `json:"-"` 631 } 632 633 func (s *ArimaModelInfo) MarshalJSON() ([]byte, error) { 634 type NoMethod ArimaModelInfo 635 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 636 } 637 638 // ArimaOrder: Arima order, can be used for both non-seasonal and seasonal 639 // parts. 640 type ArimaOrder struct { 641 // D: Order of the differencing part. 642 D int64 `json:"d,omitempty,string"` 643 // P: Order of the autoregressive part. 644 P int64 `json:"p,omitempty,string"` 645 // Q: Order of the moving-average part. 646 Q int64 `json:"q,omitempty,string"` 647 // ForceSendFields is a list of field names (e.g. "D") to unconditionally 648 // include in API requests. By default, fields with empty or default values are 649 // omitted from API requests. See 650 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 651 // details. 652 ForceSendFields []string `json:"-"` 653 // NullFields is a list of field names (e.g. "D") to include in API requests 654 // with the JSON null value. By default, fields with empty values are omitted 655 // from API requests. See 656 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 657 NullFields []string `json:"-"` 658 } 659 660 func (s *ArimaOrder) MarshalJSON() ([]byte, error) { 661 type NoMethod ArimaOrder 662 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 663 } 664 665 // ArimaResult: (Auto-)arima fitting result. Wrap everything in ArimaResult for 666 // easier refactoring if we want to use model-specific iteration results. 667 type ArimaResult struct { 668 // ArimaModelInfo: This message is repeated because there are multiple arima 669 // models fitted in auto-arima. For non-auto-arima model, its size is one. 670 ArimaModelInfo []*ArimaModelInfo `json:"arimaModelInfo,omitempty"` 671 // SeasonalPeriods: Seasonal periods. Repeated because multiple periods are 672 // supported for one time series. 673 // 674 // Possible values: 675 // "SEASONAL_PERIOD_TYPE_UNSPECIFIED" - Unspecified seasonal period. 676 // "NO_SEASONALITY" - No seasonality 677 // "DAILY" - Daily period, 24 hours. 678 // "WEEKLY" - Weekly period, 7 days. 679 // "MONTHLY" - Monthly period, 30 days or irregular. 680 // "QUARTERLY" - Quarterly period, 90 days or irregular. 681 // "YEARLY" - Yearly period, 365 days or irregular. 682 SeasonalPeriods []string `json:"seasonalPeriods,omitempty"` 683 // ForceSendFields is a list of field names (e.g. "ArimaModelInfo") to 684 // unconditionally include in API requests. By default, fields with empty or 685 // default values are omitted from API requests. See 686 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 687 // details. 688 ForceSendFields []string `json:"-"` 689 // NullFields is a list of field names (e.g. "ArimaModelInfo") to include in 690 // API requests with the JSON null value. By default, fields with empty values 691 // are omitted from API requests. See 692 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 693 NullFields []string `json:"-"` 694 } 695 696 func (s *ArimaResult) MarshalJSON() ([]byte, error) { 697 type NoMethod ArimaResult 698 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 699 } 700 701 // ArimaSingleModelForecastingMetrics: Model evaluation metrics for a single 702 // ARIMA forecasting model. 703 type ArimaSingleModelForecastingMetrics struct { 704 // ArimaFittingMetrics: Arima fitting metrics. 705 ArimaFittingMetrics *ArimaFittingMetrics `json:"arimaFittingMetrics,omitempty"` 706 // HasDrift: Is arima model fitted with drift or not. It is always false when d 707 // is not 1. 708 HasDrift bool `json:"hasDrift,omitempty"` 709 // HasHolidayEffect: If true, holiday_effect is a part of time series 710 // decomposition result. 711 HasHolidayEffect bool `json:"hasHolidayEffect,omitempty"` 712 // HasSpikesAndDips: If true, spikes_and_dips is a part of time series 713 // decomposition result. 714 HasSpikesAndDips bool `json:"hasSpikesAndDips,omitempty"` 715 // HasStepChanges: If true, step_changes is a part of time series decomposition 716 // result. 717 HasStepChanges bool `json:"hasStepChanges,omitempty"` 718 // NonSeasonalOrder: Non-seasonal order. 719 NonSeasonalOrder *ArimaOrder `json:"nonSeasonalOrder,omitempty"` 720 // SeasonalPeriods: Seasonal periods. Repeated because multiple periods are 721 // supported for one time series. 722 // 723 // Possible values: 724 // "SEASONAL_PERIOD_TYPE_UNSPECIFIED" - Unspecified seasonal period. 725 // "NO_SEASONALITY" - No seasonality 726 // "DAILY" - Daily period, 24 hours. 727 // "WEEKLY" - Weekly period, 7 days. 728 // "MONTHLY" - Monthly period, 30 days or irregular. 729 // "QUARTERLY" - Quarterly period, 90 days or irregular. 730 // "YEARLY" - Yearly period, 365 days or irregular. 731 SeasonalPeriods []string `json:"seasonalPeriods,omitempty"` 732 // TimeSeriesId: The time_series_id value for this time series. It will be one 733 // of the unique values from the time_series_id_column specified during ARIMA 734 // model training. Only present when time_series_id_column training option was 735 // used. 736 TimeSeriesId string `json:"timeSeriesId,omitempty"` 737 // TimeSeriesIds: The tuple of time_series_ids identifying this time series. It 738 // will be one of the unique tuples of values present in the 739 // time_series_id_columns specified during ARIMA model training. Only present 740 // when time_series_id_columns training option was used and the order of values 741 // here are same as the order of time_series_id_columns. 742 TimeSeriesIds []string `json:"timeSeriesIds,omitempty"` 743 // ForceSendFields is a list of field names (e.g. "ArimaFittingMetrics") to 744 // unconditionally include in API requests. By default, fields with empty or 745 // default values are omitted from API requests. See 746 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 747 // details. 748 ForceSendFields []string `json:"-"` 749 // NullFields is a list of field names (e.g. "ArimaFittingMetrics") to include 750 // in API requests with the JSON null value. By default, fields with empty 751 // values are omitted from API requests. See 752 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 753 NullFields []string `json:"-"` 754 } 755 756 func (s *ArimaSingleModelForecastingMetrics) MarshalJSON() ([]byte, error) { 757 type NoMethod ArimaSingleModelForecastingMetrics 758 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 759 } 760 761 // AuditConfig: Specifies the audit configuration for a service. The 762 // configuration determines which permission types are logged, and what 763 // identities, if any, are exempted from logging. An AuditConfig must have one 764 // or more AuditLogConfigs. If there are AuditConfigs for both `allServices` 765 // and a specific service, the union of the two AuditConfigs is used for that 766 // service: the log_types specified in each AuditConfig are enabled, and the 767 // exempted_members in each AuditLogConfig are exempted. Example Policy with 768 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", 769 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ 770 // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": 771 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", 772 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": 773 // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For 774 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ 775 // logging. It also exempts `jose@example.com` from DATA_READ logging, and 776 // `aliya@example.com` from DATA_WRITE logging. 777 type AuditConfig struct { 778 // AuditLogConfigs: The configuration for logging of each type of permission. 779 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 780 // Service: Specifies a service that will be enabled for audit logging. For 781 // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` 782 // is a special value that covers all services. 783 Service string `json:"service,omitempty"` 784 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 785 // unconditionally include in API requests. By default, fields with empty or 786 // default values are omitted from API requests. See 787 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 788 // details. 789 ForceSendFields []string `json:"-"` 790 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in 791 // API requests with the JSON null value. By default, fields with empty values 792 // are omitted from API requests. See 793 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 794 NullFields []string `json:"-"` 795 } 796 797 func (s *AuditConfig) MarshalJSON() ([]byte, error) { 798 type NoMethod AuditConfig 799 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 800 } 801 802 // AuditLogConfig: Provides the configuration for logging a type of 803 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", 804 // "exempted_members": [ "user:jose@example.com" ] }, { "log_type": 805 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while 806 // exempting jose@example.com from DATA_READ logging. 807 type AuditLogConfig struct { 808 // ExemptedMembers: Specifies the identities that do not cause logging for this 809 // type of permission. Follows the same format of Binding.members. 810 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 811 // LogType: The log type that this config enables. 812 // 813 // Possible values: 814 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 815 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 816 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 817 // "DATA_READ" - Data reads. Example: CloudSQL Users list 818 LogType string `json:"logType,omitempty"` 819 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 820 // unconditionally include in API requests. By default, fields with empty or 821 // default values are omitted from API requests. See 822 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 823 // details. 824 ForceSendFields []string `json:"-"` 825 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in 826 // API requests with the JSON null value. By default, fields with empty values 827 // are omitted from API requests. See 828 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 829 NullFields []string `json:"-"` 830 } 831 832 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 833 type NoMethod AuditLogConfig 834 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 835 } 836 837 // AvroOptions: Options for external data sources. 838 type AvroOptions struct { 839 // UseAvroLogicalTypes: Optional. If sourceFormat is set to "AVRO", indicates 840 // whether to interpret logical types as the corresponding BigQuery data type 841 // (for example, TIMESTAMP), instead of using the raw type (for example, 842 // INTEGER). 843 UseAvroLogicalTypes bool `json:"useAvroLogicalTypes,omitempty"` 844 // ForceSendFields is a list of field names (e.g. "UseAvroLogicalTypes") to 845 // unconditionally include in API requests. By default, fields with empty or 846 // default values are omitted from API requests. See 847 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 848 // details. 849 ForceSendFields []string `json:"-"` 850 // NullFields is a list of field names (e.g. "UseAvroLogicalTypes") to include 851 // in API requests with the JSON null value. By default, fields with empty 852 // values are omitted from API requests. See 853 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 854 NullFields []string `json:"-"` 855 } 856 857 func (s *AvroOptions) MarshalJSON() ([]byte, error) { 858 type NoMethod AvroOptions 859 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 860 } 861 862 // BiEngineReason: Reason why BI Engine didn't accelerate the query (or 863 // sub-query). 864 type BiEngineReason struct { 865 // Code: Output only. High-level BI Engine reason for partial or disabled 866 // acceleration 867 // 868 // Possible values: 869 // "CODE_UNSPECIFIED" - BiEngineReason not specified. 870 // "NO_RESERVATION" - No reservation available for BI Engine acceleration. 871 // "INSUFFICIENT_RESERVATION" - Not enough memory available for BI Engine 872 // acceleration. 873 // "UNSUPPORTED_SQL_TEXT" - This particular SQL text is not supported for 874 // acceleration by BI Engine. 875 // "INPUT_TOO_LARGE" - Input too large for acceleration by BI Engine. 876 // "OTHER_REASON" - Catch-all code for all other cases for partial or 877 // disabled acceleration. 878 // "TABLE_EXCLUDED" - One or more tables were not eligible for BI Engine 879 // acceleration. 880 Code string `json:"code,omitempty"` 881 // Message: Output only. Free form human-readable reason for partial or 882 // disabled acceleration. 883 Message string `json:"message,omitempty"` 884 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 885 // include in API requests. By default, fields with empty or default values are 886 // omitted from API requests. See 887 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 888 // details. 889 ForceSendFields []string `json:"-"` 890 // NullFields is a list of field names (e.g. "Code") to include in API requests 891 // with the JSON null value. By default, fields with empty values are omitted 892 // from API requests. See 893 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 894 NullFields []string `json:"-"` 895 } 896 897 func (s *BiEngineReason) MarshalJSON() ([]byte, error) { 898 type NoMethod BiEngineReason 899 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 900 } 901 902 // BiEngineStatistics: Statistics for a BI Engine specific query. Populated as 903 // part of JobStatistics2 904 type BiEngineStatistics struct { 905 // AccelerationMode: Output only. Specifies which mode of BI Engine 906 // acceleration was performed (if any). 907 // 908 // Possible values: 909 // "BI_ENGINE_ACCELERATION_MODE_UNSPECIFIED" - BiEngineMode type not 910 // specified. 911 // "BI_ENGINE_DISABLED" - BI Engine acceleration was attempted but disabled. 912 // bi_engine_reasons specifies a more detailed reason. 913 // "PARTIAL_INPUT" - Some inputs were accelerated using BI Engine. See 914 // bi_engine_reasons for why parts of the query were not accelerated. 915 // "FULL_INPUT" - All of the query inputs were accelerated using BI Engine. 916 // "FULL_QUERY" - All of the query was accelerated using BI Engine. 917 AccelerationMode string `json:"accelerationMode,omitempty"` 918 // BiEngineMode: Output only. Specifies which mode of BI Engine acceleration 919 // was performed (if any). 920 // 921 // Possible values: 922 // "ACCELERATION_MODE_UNSPECIFIED" - BiEngineMode type not specified. 923 // "DISABLED" - BI Engine disabled the acceleration. bi_engine_reasons 924 // specifies a more detailed reason. 925 // "PARTIAL" - Part of the query was accelerated using BI Engine. See 926 // bi_engine_reasons for why parts of the query were not accelerated. 927 // "FULL" - All of the query was accelerated using BI Engine. 928 BiEngineMode string `json:"biEngineMode,omitempty"` 929 // BiEngineReasons: In case of DISABLED or PARTIAL bi_engine_mode, these 930 // contain the explanatory reasons as to why BI Engine could not accelerate. In 931 // case the full query was accelerated, this field is not populated. 932 BiEngineReasons []*BiEngineReason `json:"biEngineReasons,omitempty"` 933 // ForceSendFields is a list of field names (e.g. "AccelerationMode") to 934 // unconditionally include in API requests. By default, fields with empty or 935 // default values are omitted from API requests. See 936 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 937 // details. 938 ForceSendFields []string `json:"-"` 939 // NullFields is a list of field names (e.g. "AccelerationMode") to include in 940 // API requests with the JSON null value. By default, fields with empty values 941 // are omitted from API requests. See 942 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 943 NullFields []string `json:"-"` 944 } 945 946 func (s *BiEngineStatistics) MarshalJSON() ([]byte, error) { 947 type NoMethod BiEngineStatistics 948 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 949 } 950 951 // BigLakeConfiguration: Configuration for BigLake managed tables. 952 type BigLakeConfiguration struct { 953 // ConnectionId: Required. The connection specifying the credentials to be used 954 // to read and write to external storage, such as Cloud Storage. The 955 // connection_id can have the form 956 // "<project\_id>.<location\_id>.<connection\_id>" or 957 // "projects/<project\_id>/locations/<location\_id>/connections/<connection\_id> 958 // ". 959 ConnectionId string `json:"connectionId,omitempty"` 960 // FileFormat: Required. The file format the table data is stored in. 961 // 962 // Possible values: 963 // "FILE_FORMAT_UNSPECIFIED" - Default Value. 964 // "PARQUET" - Apache Parquet format. 965 FileFormat string `json:"fileFormat,omitempty"` 966 // StorageUri: Required. The fully qualified location prefix of the external 967 // folder where table data is stored. The '*' wildcard character is not 968 // allowed. The URI should be in the format "gs://bucket/path_to_table/" 969 StorageUri string `json:"storageUri,omitempty"` 970 // TableFormat: Required. The table format the metadata only snapshots are 971 // stored in. 972 // 973 // Possible values: 974 // "TABLE_FORMAT_UNSPECIFIED" - Default Value. 975 // "ICEBERG" - Apache Iceberg format. 976 TableFormat string `json:"tableFormat,omitempty"` 977 // ForceSendFields is a list of field names (e.g. "ConnectionId") to 978 // unconditionally include in API requests. By default, fields with empty or 979 // default values are omitted from API requests. See 980 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 981 // details. 982 ForceSendFields []string `json:"-"` 983 // NullFields is a list of field names (e.g. "ConnectionId") to include in API 984 // requests with the JSON null value. By default, fields with empty values are 985 // omitted from API requests. See 986 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 987 NullFields []string `json:"-"` 988 } 989 990 func (s *BigLakeConfiguration) MarshalJSON() ([]byte, error) { 991 type NoMethod BigLakeConfiguration 992 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 993 } 994 995 type BigQueryModelTraining struct { 996 // CurrentIteration: Deprecated. 997 CurrentIteration int64 `json:"currentIteration,omitempty"` 998 // ExpectedTotalIterations: Deprecated. 999 ExpectedTotalIterations int64 `json:"expectedTotalIterations,omitempty,string"` 1000 // ForceSendFields is a list of field names (e.g. "CurrentIteration") to 1001 // unconditionally include in API requests. By default, fields with empty or 1002 // default values are omitted from API requests. See 1003 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1004 // details. 1005 ForceSendFields []string `json:"-"` 1006 // NullFields is a list of field names (e.g. "CurrentIteration") to include in 1007 // API requests with the JSON null value. By default, fields with empty values 1008 // are omitted from API requests. See 1009 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1010 NullFields []string `json:"-"` 1011 } 1012 1013 func (s *BigQueryModelTraining) MarshalJSON() ([]byte, error) { 1014 type NoMethod BigQueryModelTraining 1015 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1016 } 1017 1018 // BigtableColumn: Information related to a Bigtable column. 1019 type BigtableColumn struct { 1020 // Encoding: Optional. The encoding of the values when the type is not STRING. 1021 // Acceptable encoding values are: TEXT - indicates values are alphanumeric 1022 // text strings. BINARY - indicates values are encoded using HBase 1023 // Bytes.toBytes family of functions. 'encoding' can also be set at the column 1024 // family level. However, the setting at this level takes precedence if 1025 // 'encoding' is set at both levels. 1026 Encoding string `json:"encoding,omitempty"` 1027 // FieldName: Optional. If the qualifier is not a valid BigQuery field 1028 // identifier i.e. does not match a-zA-Z*, a valid identifier must be provided 1029 // as the column field name and is used as field name in queries. 1030 FieldName string `json:"fieldName,omitempty"` 1031 // OnlyReadLatest: Optional. If this is set, only the latest version of value 1032 // in this column are exposed. 'onlyReadLatest' can also be set at the column 1033 // family level. However, the setting at this level takes precedence if 1034 // 'onlyReadLatest' is set at both levels. 1035 OnlyReadLatest bool `json:"onlyReadLatest,omitempty"` 1036 // QualifierEncoded: [Required] Qualifier of the column. Columns in the parent 1037 // column family that has this exact qualifier are exposed as . field. If the 1038 // qualifier is valid UTF-8 string, it can be specified in the qualifier_string 1039 // field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. 1040 // The column field name is the same as the column qualifier. However, if the 1041 // qualifier is not a valid BigQuery field identifier i.e. does not match 1042 // a-zA-Z*, a valid identifier must be provided as field_name. 1043 QualifierEncoded string `json:"qualifierEncoded,omitempty"` 1044 // QualifierString: Qualifier string. 1045 QualifierString string `json:"qualifierString,omitempty"` 1046 // Type: Optional. The type to convert the value in cells of this column. The 1047 // values are expected to be encoded using HBase Bytes.toBytes function when 1048 // using the BINARY encoding value. Following BigQuery types are allowed 1049 // (case-sensitive): * BYTES * STRING * INTEGER * FLOAT * BOOLEAN * JSON 1050 // Default type is BYTES. 'type' can also be set at the column family level. 1051 // However, the setting at this level takes precedence if 'type' is set at both 1052 // levels. 1053 Type string `json:"type,omitempty"` 1054 // ForceSendFields is a list of field names (e.g. "Encoding") to 1055 // unconditionally include in API requests. By default, fields with empty or 1056 // default values are omitted from API requests. See 1057 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1058 // details. 1059 ForceSendFields []string `json:"-"` 1060 // NullFields is a list of field names (e.g. "Encoding") to include in API 1061 // requests with the JSON null value. By default, fields with empty values are 1062 // omitted from API requests. See 1063 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1064 NullFields []string `json:"-"` 1065 } 1066 1067 func (s *BigtableColumn) MarshalJSON() ([]byte, error) { 1068 type NoMethod BigtableColumn 1069 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1070 } 1071 1072 // BigtableColumnFamily: Information related to a Bigtable column family. 1073 type BigtableColumnFamily struct { 1074 // Columns: Optional. Lists of columns that should be exposed as individual 1075 // fields as opposed to a list of (column name, value) pairs. All columns whose 1076 // qualifier matches a qualifier in this list can be accessed as .. Other 1077 // columns can be accessed as a list through .Column field. 1078 Columns []*BigtableColumn `json:"columns,omitempty"` 1079 // Encoding: Optional. The encoding of the values when the type is not STRING. 1080 // Acceptable encoding values are: TEXT - indicates values are alphanumeric 1081 // text strings. BINARY - indicates values are encoded using HBase 1082 // Bytes.toBytes family of functions. This can be overridden for a specific 1083 // column by listing that column in 'columns' and specifying an encoding for 1084 // it. 1085 Encoding string `json:"encoding,omitempty"` 1086 // FamilyId: Identifier of the column family. 1087 FamilyId string `json:"familyId,omitempty"` 1088 // OnlyReadLatest: Optional. If this is set only the latest version of value 1089 // are exposed for all columns in this column family. This can be overridden 1090 // for a specific column by listing that column in 'columns' and specifying a 1091 // different setting for that column. 1092 OnlyReadLatest bool `json:"onlyReadLatest,omitempty"` 1093 // Type: Optional. The type to convert the value in cells of this column 1094 // family. The values are expected to be encoded using HBase Bytes.toBytes 1095 // function when using the BINARY encoding value. Following BigQuery types are 1096 // allowed (case-sensitive): * BYTES * STRING * INTEGER * FLOAT * BOOLEAN * 1097 // JSON Default type is BYTES. This can be overridden for a specific column by 1098 // listing that column in 'columns' and specifying a type for it. 1099 Type string `json:"type,omitempty"` 1100 // ForceSendFields is a list of field names (e.g. "Columns") to unconditionally 1101 // include in API requests. By default, fields with empty or default values are 1102 // omitted from API requests. See 1103 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1104 // details. 1105 ForceSendFields []string `json:"-"` 1106 // NullFields is a list of field names (e.g. "Columns") to include in API 1107 // requests with the JSON null value. By default, fields with empty values are 1108 // omitted from API requests. See 1109 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1110 NullFields []string `json:"-"` 1111 } 1112 1113 func (s *BigtableColumnFamily) MarshalJSON() ([]byte, error) { 1114 type NoMethod BigtableColumnFamily 1115 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1116 } 1117 1118 // BigtableOptions: Options specific to Google Cloud Bigtable data sources. 1119 type BigtableOptions struct { 1120 // ColumnFamilies: Optional. List of column families to expose in the table 1121 // schema along with their types. This list restricts the column families that 1122 // can be referenced in queries and specifies their value types. You can use 1123 // this list to do type conversions - see the 'type' field for more details. If 1124 // you leave this list empty, all column families are present in the table 1125 // schema and their values are read as BYTES. During a query only the column 1126 // families referenced in that query are read from Bigtable. 1127 ColumnFamilies []*BigtableColumnFamily `json:"columnFamilies,omitempty"` 1128 // IgnoreUnspecifiedColumnFamilies: Optional. If field is true, then the column 1129 // families that are not specified in columnFamilies list are not exposed in 1130 // the table schema. Otherwise, they are read with BYTES type values. The 1131 // default value is false. 1132 IgnoreUnspecifiedColumnFamilies bool `json:"ignoreUnspecifiedColumnFamilies,omitempty"` 1133 // OutputColumnFamiliesAsJson: Optional. If field is true, then each column 1134 // family will be read as a single JSON column. Otherwise they are read as a 1135 // repeated cell structure containing timestamp/value tuples. The default value 1136 // is false. 1137 OutputColumnFamiliesAsJson bool `json:"outputColumnFamiliesAsJson,omitempty"` 1138 // ReadRowkeyAsString: Optional. If field is true, then the rowkey column 1139 // families will be read and converted to string. Otherwise they are read with 1140 // BYTES type values and users need to manually cast them with CAST if 1141 // necessary. The default value is false. 1142 ReadRowkeyAsString bool `json:"readRowkeyAsString,omitempty"` 1143 // ForceSendFields is a list of field names (e.g. "ColumnFamilies") to 1144 // unconditionally include in API requests. By default, fields with empty or 1145 // default values are omitted from API requests. See 1146 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1147 // details. 1148 ForceSendFields []string `json:"-"` 1149 // NullFields is a list of field names (e.g. "ColumnFamilies") to include in 1150 // API requests with the JSON null value. By default, fields with empty values 1151 // are omitted from API requests. See 1152 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1153 NullFields []string `json:"-"` 1154 } 1155 1156 func (s *BigtableOptions) MarshalJSON() ([]byte, error) { 1157 type NoMethod BigtableOptions 1158 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1159 } 1160 1161 // BinaryClassificationMetrics: Evaluation metrics for binary 1162 // classification/classifier models. 1163 type BinaryClassificationMetrics struct { 1164 // AggregateClassificationMetrics: Aggregate classification metrics. 1165 AggregateClassificationMetrics *AggregateClassificationMetrics `json:"aggregateClassificationMetrics,omitempty"` 1166 // BinaryConfusionMatrixList: Binary confusion matrix at multiple thresholds. 1167 BinaryConfusionMatrixList []*BinaryConfusionMatrix `json:"binaryConfusionMatrixList,omitempty"` 1168 // NegativeLabel: Label representing the negative class. 1169 NegativeLabel string `json:"negativeLabel,omitempty"` 1170 // PositiveLabel: Label representing the positive class. 1171 PositiveLabel string `json:"positiveLabel,omitempty"` 1172 // ForceSendFields is a list of field names (e.g. 1173 // "AggregateClassificationMetrics") to unconditionally include in API 1174 // requests. By default, fields with empty or default values are omitted from 1175 // API requests. See 1176 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1177 // details. 1178 ForceSendFields []string `json:"-"` 1179 // NullFields is a list of field names (e.g. "AggregateClassificationMetrics") 1180 // to include in API requests with the JSON null value. By default, fields with 1181 // empty values are omitted from API requests. See 1182 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1183 NullFields []string `json:"-"` 1184 } 1185 1186 func (s *BinaryClassificationMetrics) MarshalJSON() ([]byte, error) { 1187 type NoMethod BinaryClassificationMetrics 1188 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1189 } 1190 1191 // BinaryConfusionMatrix: Confusion matrix for binary classification models. 1192 type BinaryConfusionMatrix struct { 1193 // Accuracy: The fraction of predictions given the correct label. 1194 Accuracy float64 `json:"accuracy,omitempty"` 1195 // F1Score: The equally weighted average of recall and precision. 1196 F1Score float64 `json:"f1Score,omitempty"` 1197 // FalseNegatives: Number of false samples predicted as false. 1198 FalseNegatives int64 `json:"falseNegatives,omitempty,string"` 1199 // FalsePositives: Number of false samples predicted as true. 1200 FalsePositives int64 `json:"falsePositives,omitempty,string"` 1201 // PositiveClassThreshold: Threshold value used when computing each of the 1202 // following metric. 1203 PositiveClassThreshold float64 `json:"positiveClassThreshold,omitempty"` 1204 // Precision: The fraction of actual positive predictions that had positive 1205 // actual labels. 1206 Precision float64 `json:"precision,omitempty"` 1207 // Recall: The fraction of actual positive labels that were given a positive 1208 // prediction. 1209 Recall float64 `json:"recall,omitempty"` 1210 // TrueNegatives: Number of true samples predicted as false. 1211 TrueNegatives int64 `json:"trueNegatives,omitempty,string"` 1212 // TruePositives: Number of true samples predicted as true. 1213 TruePositives int64 `json:"truePositives,omitempty,string"` 1214 // ForceSendFields is a list of field names (e.g. "Accuracy") to 1215 // unconditionally include in API requests. By default, fields with empty or 1216 // default values are omitted from API requests. See 1217 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1218 // details. 1219 ForceSendFields []string `json:"-"` 1220 // NullFields is a list of field names (e.g. "Accuracy") to include in API 1221 // requests with the JSON null value. By default, fields with empty values are 1222 // omitted from API requests. See 1223 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1224 NullFields []string `json:"-"` 1225 } 1226 1227 func (s *BinaryConfusionMatrix) MarshalJSON() ([]byte, error) { 1228 type NoMethod BinaryConfusionMatrix 1229 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1230 } 1231 1232 func (s *BinaryConfusionMatrix) UnmarshalJSON(data []byte) error { 1233 type NoMethod BinaryConfusionMatrix 1234 var s1 struct { 1235 Accuracy gensupport.JSONFloat64 `json:"accuracy"` 1236 F1Score gensupport.JSONFloat64 `json:"f1Score"` 1237 PositiveClassThreshold gensupport.JSONFloat64 `json:"positiveClassThreshold"` 1238 Precision gensupport.JSONFloat64 `json:"precision"` 1239 Recall gensupport.JSONFloat64 `json:"recall"` 1240 *NoMethod 1241 } 1242 s1.NoMethod = (*NoMethod)(s) 1243 if err := json.Unmarshal(data, &s1); err != nil { 1244 return err 1245 } 1246 s.Accuracy = float64(s1.Accuracy) 1247 s.F1Score = float64(s1.F1Score) 1248 s.PositiveClassThreshold = float64(s1.PositiveClassThreshold) 1249 s.Precision = float64(s1.Precision) 1250 s.Recall = float64(s1.Recall) 1251 return nil 1252 } 1253 1254 // Binding: Associates `members`, or principals, with a `role`. 1255 type Binding struct { 1256 // Condition: The condition that is associated with this binding. If the 1257 // condition evaluates to `true`, then this binding applies to the current 1258 // request. If the condition evaluates to `false`, then this binding does not 1259 // apply to the current request. However, a different role binding might grant 1260 // the same role to one or more of the principals in this binding. To learn 1261 // which resources support conditions in their IAM policies, see the IAM 1262 // documentation 1263 // (https://cloud.google.com/iam/help/conditions/resource-policies). 1264 Condition *Expr `json:"condition,omitempty"` 1265 // Members: Specifies the principals requesting access for a Google Cloud 1266 // resource. `members` can have the following values: * `allUsers`: A special 1267 // identifier that represents anyone who is on the internet; with or without a 1268 // Google account. * `allAuthenticatedUsers`: A special identifier that 1269 // represents anyone who is authenticated with a Google account or a service 1270 // account. Does not include identities that come from external identity 1271 // providers (IdPs) through identity federation. * `user:{emailid}`: An email 1272 // address that represents a specific Google account. For example, 1273 // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that 1274 // represents a Google service account. For example, 1275 // `my-other-app@appspot.gserviceaccount.com`. * 1276 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An 1277 // identifier for a Kubernetes service account 1278 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). 1279 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * 1280 // `group:{emailid}`: An email address that represents a Google group. For 1281 // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain 1282 // (primary) that represents all the users of that domain. For example, 1283 // `google.com` or `example.com`. * 1284 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub 1285 // ject/{subject_attribute_value}`: A single identity in a workforce identity 1286 // pool. * 1287 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 1288 // group/{group_id}`: All workforce identities in a group. * 1289 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 1290 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with 1291 // a specific attribute value. * 1292 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 1293 // *`: All identities in a workforce identity pool. * 1294 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo 1295 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single 1296 // identity in a workload identity pool. * 1297 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 1298 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool 1299 // group. * 1300 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 1301 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} 1302 // `: All identities in a workload identity pool with a certain attribute. * 1303 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 1304 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity 1305 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 1306 // unique identifier) representing a user that has been recently deleted. For 1307 // example, `alice@example.com?uid=123456789012345678901`. If the user is 1308 // recovered, this value reverts to `user:{emailid}` and the recovered user 1309 // retains the role in the binding. * 1310 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus 1311 // unique identifier) representing a service account that has been recently 1312 // deleted. For example, 1313 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the 1314 // service account is undeleted, this value reverts to 1315 // `serviceAccount:{emailid}` and the undeleted service account retains the 1316 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email 1317 // address (plus unique identifier) representing a Google group that has been 1318 // recently deleted. For example, 1319 // `admins@example.com?uid=123456789012345678901`. If the group is recovered, 1320 // this value reverts to `group:{emailid}` and the recovered group retains the 1321 // role in the binding. * 1322 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool 1323 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a 1324 // workforce identity pool. For example, 1325 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po 1326 // ol-id/subject/my-subject-attribute-value`. 1327 Members []string `json:"members,omitempty"` 1328 // Role: Role that is assigned to the list of `members`, or principals. For 1329 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview 1330 // of the IAM roles and permissions, see the IAM documentation 1331 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the 1332 // available pre-defined roles, see here 1333 // (https://cloud.google.com/iam/docs/understanding-roles). 1334 Role string `json:"role,omitempty"` 1335 // ForceSendFields is a list of field names (e.g. "Condition") to 1336 // unconditionally include in API requests. By default, fields with empty or 1337 // default values are omitted from API requests. See 1338 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1339 // details. 1340 ForceSendFields []string `json:"-"` 1341 // NullFields is a list of field names (e.g. "Condition") to include in API 1342 // requests with the JSON null value. By default, fields with empty values are 1343 // omitted from API requests. See 1344 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1345 NullFields []string `json:"-"` 1346 } 1347 1348 func (s *Binding) MarshalJSON() ([]byte, error) { 1349 type NoMethod Binding 1350 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1351 } 1352 1353 type BqmlIterationResult struct { 1354 // DurationMs: Deprecated. 1355 DurationMs int64 `json:"durationMs,omitempty,string"` 1356 // EvalLoss: Deprecated. 1357 EvalLoss float64 `json:"evalLoss,omitempty"` 1358 // Index: Deprecated. 1359 Index int64 `json:"index,omitempty"` 1360 // LearnRate: Deprecated. 1361 LearnRate float64 `json:"learnRate,omitempty"` 1362 // TrainingLoss: Deprecated. 1363 TrainingLoss float64 `json:"trainingLoss,omitempty"` 1364 // ForceSendFields is a list of field names (e.g. "DurationMs") to 1365 // unconditionally include in API requests. By default, fields with empty or 1366 // default values are omitted from API requests. See 1367 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1368 // details. 1369 ForceSendFields []string `json:"-"` 1370 // NullFields is a list of field names (e.g. "DurationMs") to include in API 1371 // requests with the JSON null value. By default, fields with empty values are 1372 // omitted from API requests. See 1373 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1374 NullFields []string `json:"-"` 1375 } 1376 1377 func (s *BqmlIterationResult) MarshalJSON() ([]byte, error) { 1378 type NoMethod BqmlIterationResult 1379 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1380 } 1381 1382 func (s *BqmlIterationResult) UnmarshalJSON(data []byte) error { 1383 type NoMethod BqmlIterationResult 1384 var s1 struct { 1385 EvalLoss gensupport.JSONFloat64 `json:"evalLoss"` 1386 LearnRate gensupport.JSONFloat64 `json:"learnRate"` 1387 TrainingLoss gensupport.JSONFloat64 `json:"trainingLoss"` 1388 *NoMethod 1389 } 1390 s1.NoMethod = (*NoMethod)(s) 1391 if err := json.Unmarshal(data, &s1); err != nil { 1392 return err 1393 } 1394 s.EvalLoss = float64(s1.EvalLoss) 1395 s.LearnRate = float64(s1.LearnRate) 1396 s.TrainingLoss = float64(s1.TrainingLoss) 1397 return nil 1398 } 1399 1400 type BqmlTrainingRun struct { 1401 // IterationResults: Deprecated. 1402 IterationResults []*BqmlIterationResult `json:"iterationResults,omitempty"` 1403 // StartTime: Deprecated. 1404 StartTime string `json:"startTime,omitempty"` 1405 // State: Deprecated. 1406 State string `json:"state,omitempty"` 1407 // TrainingOptions: Deprecated. 1408 TrainingOptions *BqmlTrainingRunTrainingOptions `json:"trainingOptions,omitempty"` 1409 // ForceSendFields is a list of field names (e.g. "IterationResults") to 1410 // unconditionally include in API requests. By default, fields with empty or 1411 // default values are omitted from API requests. See 1412 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1413 // details. 1414 ForceSendFields []string `json:"-"` 1415 // NullFields is a list of field names (e.g. "IterationResults") to include in 1416 // API requests with the JSON null value. By default, fields with empty values 1417 // are omitted from API requests. See 1418 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1419 NullFields []string `json:"-"` 1420 } 1421 1422 func (s *BqmlTrainingRun) MarshalJSON() ([]byte, error) { 1423 type NoMethod BqmlTrainingRun 1424 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1425 } 1426 1427 // BqmlTrainingRunTrainingOptions: Deprecated. 1428 type BqmlTrainingRunTrainingOptions struct { 1429 EarlyStop bool `json:"earlyStop,omitempty"` 1430 L1Reg float64 `json:"l1Reg,omitempty"` 1431 L2Reg float64 `json:"l2Reg,omitempty"` 1432 LearnRate float64 `json:"learnRate,omitempty"` 1433 LearnRateStrategy string `json:"learnRateStrategy,omitempty"` 1434 LineSearchInitLearnRate float64 `json:"lineSearchInitLearnRate,omitempty"` 1435 MaxIteration int64 `json:"maxIteration,omitempty,string"` 1436 MinRelProgress float64 `json:"minRelProgress,omitempty"` 1437 WarmStart bool `json:"warmStart,omitempty"` 1438 // ForceSendFields is a list of field names (e.g. "EarlyStop") to 1439 // unconditionally include in API requests. By default, fields with empty or 1440 // default values are omitted from API requests. See 1441 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1442 // details. 1443 ForceSendFields []string `json:"-"` 1444 // NullFields is a list of field names (e.g. "EarlyStop") to include in API 1445 // requests with the JSON null value. By default, fields with empty values are 1446 // omitted from API requests. See 1447 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1448 NullFields []string `json:"-"` 1449 } 1450 1451 func (s *BqmlTrainingRunTrainingOptions) MarshalJSON() ([]byte, error) { 1452 type NoMethod BqmlTrainingRunTrainingOptions 1453 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1454 } 1455 1456 func (s *BqmlTrainingRunTrainingOptions) UnmarshalJSON(data []byte) error { 1457 type NoMethod BqmlTrainingRunTrainingOptions 1458 var s1 struct { 1459 L1Reg gensupport.JSONFloat64 `json:"l1Reg"` 1460 L2Reg gensupport.JSONFloat64 `json:"l2Reg"` 1461 LearnRate gensupport.JSONFloat64 `json:"learnRate"` 1462 LineSearchInitLearnRate gensupport.JSONFloat64 `json:"lineSearchInitLearnRate"` 1463 MinRelProgress gensupport.JSONFloat64 `json:"minRelProgress"` 1464 *NoMethod 1465 } 1466 s1.NoMethod = (*NoMethod)(s) 1467 if err := json.Unmarshal(data, &s1); err != nil { 1468 return err 1469 } 1470 s.L1Reg = float64(s1.L1Reg) 1471 s.L2Reg = float64(s1.L2Reg) 1472 s.LearnRate = float64(s1.LearnRate) 1473 s.LineSearchInitLearnRate = float64(s1.LineSearchInitLearnRate) 1474 s.MinRelProgress = float64(s1.MinRelProgress) 1475 return nil 1476 } 1477 1478 // CategoricalValue: Representative value of a categorical feature. 1479 type CategoricalValue struct { 1480 // CategoryCounts: Counts of all categories for the categorical feature. If 1481 // there are more than ten categories, we return top ten (by count) and return 1482 // one more CategoryCount with category "_OTHER_" and count as aggregate counts 1483 // of remaining categories. 1484 CategoryCounts []*CategoryCount `json:"categoryCounts,omitempty"` 1485 // ForceSendFields is a list of field names (e.g. "CategoryCounts") to 1486 // unconditionally include in API requests. By default, fields with empty or 1487 // default values are omitted from API requests. See 1488 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1489 // details. 1490 ForceSendFields []string `json:"-"` 1491 // NullFields is a list of field names (e.g. "CategoryCounts") to include in 1492 // API requests with the JSON null value. By default, fields with empty values 1493 // are omitted from API requests. See 1494 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1495 NullFields []string `json:"-"` 1496 } 1497 1498 func (s *CategoricalValue) MarshalJSON() ([]byte, error) { 1499 type NoMethod CategoricalValue 1500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1501 } 1502 1503 // CategoryCount: Represents the count of a single category within the cluster. 1504 type CategoryCount struct { 1505 // Category: The name of category. 1506 Category string `json:"category,omitempty"` 1507 // Count: The count of training samples matching the category within the 1508 // cluster. 1509 Count int64 `json:"count,omitempty,string"` 1510 // ForceSendFields is a list of field names (e.g. "Category") to 1511 // unconditionally include in API requests. By default, fields with empty or 1512 // default values are omitted from API requests. See 1513 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1514 // details. 1515 ForceSendFields []string `json:"-"` 1516 // NullFields is a list of field names (e.g. "Category") to include in API 1517 // requests with the JSON null value. By default, fields with empty values are 1518 // omitted from API requests. See 1519 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1520 NullFields []string `json:"-"` 1521 } 1522 1523 func (s *CategoryCount) MarshalJSON() ([]byte, error) { 1524 type NoMethod CategoryCount 1525 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1526 } 1527 1528 // CloneDefinition: Information about base table and clone time of a table 1529 // clone. 1530 type CloneDefinition struct { 1531 // BaseTableReference: Required. Reference describing the ID of the table that 1532 // was cloned. 1533 BaseTableReference *TableReference `json:"baseTableReference,omitempty"` 1534 // CloneTime: Required. The time at which the base table was cloned. This value 1535 // is reported in the JSON response using RFC3339 format. 1536 CloneTime string `json:"cloneTime,omitempty"` 1537 // ForceSendFields is a list of field names (e.g. "BaseTableReference") to 1538 // unconditionally include in API requests. By default, fields with empty or 1539 // default values are omitted from API requests. See 1540 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1541 // details. 1542 ForceSendFields []string `json:"-"` 1543 // NullFields is a list of field names (e.g. "BaseTableReference") to include 1544 // in API requests with the JSON null value. By default, fields with empty 1545 // values are omitted from API requests. See 1546 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1547 NullFields []string `json:"-"` 1548 } 1549 1550 func (s *CloneDefinition) MarshalJSON() ([]byte, error) { 1551 type NoMethod CloneDefinition 1552 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1553 } 1554 1555 // Cluster: Message containing the information about one cluster. 1556 type Cluster struct { 1557 // CentroidId: Centroid id. 1558 CentroidId int64 `json:"centroidId,omitempty,string"` 1559 // Count: Count of training data rows that were assigned to this cluster. 1560 Count int64 `json:"count,omitempty,string"` 1561 // FeatureValues: Values of highly variant features for this cluster. 1562 FeatureValues []*FeatureValue `json:"featureValues,omitempty"` 1563 // ForceSendFields is a list of field names (e.g. "CentroidId") to 1564 // unconditionally include in API requests. By default, fields with empty or 1565 // default values are omitted from API requests. See 1566 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1567 // details. 1568 ForceSendFields []string `json:"-"` 1569 // NullFields is a list of field names (e.g. "CentroidId") to include in API 1570 // requests with the JSON null value. By default, fields with empty values are 1571 // omitted from API requests. See 1572 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1573 NullFields []string `json:"-"` 1574 } 1575 1576 func (s *Cluster) MarshalJSON() ([]byte, error) { 1577 type NoMethod Cluster 1578 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1579 } 1580 1581 // ClusterInfo: Information about a single cluster for clustering model. 1582 type ClusterInfo struct { 1583 // CentroidId: Centroid id. 1584 CentroidId int64 `json:"centroidId,omitempty,string"` 1585 // ClusterRadius: Cluster radius, the average distance from centroid to each 1586 // point assigned to the cluster. 1587 ClusterRadius float64 `json:"clusterRadius,omitempty"` 1588 // ClusterSize: Cluster size, the total number of points assigned to the 1589 // cluster. 1590 ClusterSize int64 `json:"clusterSize,omitempty,string"` 1591 // ForceSendFields is a list of field names (e.g. "CentroidId") to 1592 // unconditionally include in API requests. By default, fields with empty or 1593 // default values are omitted from API requests. See 1594 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1595 // details. 1596 ForceSendFields []string `json:"-"` 1597 // NullFields is a list of field names (e.g. "CentroidId") to include in API 1598 // requests with the JSON null value. By default, fields with empty values are 1599 // omitted from API requests. See 1600 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1601 NullFields []string `json:"-"` 1602 } 1603 1604 func (s *ClusterInfo) MarshalJSON() ([]byte, error) { 1605 type NoMethod ClusterInfo 1606 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1607 } 1608 1609 func (s *ClusterInfo) UnmarshalJSON(data []byte) error { 1610 type NoMethod ClusterInfo 1611 var s1 struct { 1612 ClusterRadius gensupport.JSONFloat64 `json:"clusterRadius"` 1613 *NoMethod 1614 } 1615 s1.NoMethod = (*NoMethod)(s) 1616 if err := json.Unmarshal(data, &s1); err != nil { 1617 return err 1618 } 1619 s.ClusterRadius = float64(s1.ClusterRadius) 1620 return nil 1621 } 1622 1623 // Clustering: Configures table clustering. 1624 type Clustering struct { 1625 // Fields: One or more fields on which data should be clustered. Only 1626 // top-level, non-repeated, simple-type fields are supported. The ordering of 1627 // the clustering fields should be prioritized from most to least important for 1628 // filtering purposes. Additional information on limitations can be found here: 1629 // https://cloud.google.com/bigquery/docs/creating-clustered-tables#limitations 1630 Fields []string `json:"fields,omitempty"` 1631 // ForceSendFields is a list of field names (e.g. "Fields") to unconditionally 1632 // include in API requests. By default, fields with empty or default values are 1633 // omitted from API requests. See 1634 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1635 // details. 1636 ForceSendFields []string `json:"-"` 1637 // NullFields is a list of field names (e.g. "Fields") to include in API 1638 // requests with the JSON null value. By default, fields with empty values are 1639 // omitted from API requests. See 1640 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1641 NullFields []string `json:"-"` 1642 } 1643 1644 func (s *Clustering) MarshalJSON() ([]byte, error) { 1645 type NoMethod Clustering 1646 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1647 } 1648 1649 // ClusteringMetrics: Evaluation metrics for clustering models. 1650 type ClusteringMetrics struct { 1651 // Clusters: Information for all clusters. 1652 Clusters []*Cluster `json:"clusters,omitempty"` 1653 // DaviesBouldinIndex: Davies-Bouldin index. 1654 DaviesBouldinIndex float64 `json:"daviesBouldinIndex,omitempty"` 1655 // MeanSquaredDistance: Mean of squared distances between each sample to its 1656 // cluster centroid. 1657 MeanSquaredDistance float64 `json:"meanSquaredDistance,omitempty"` 1658 // ForceSendFields is a list of field names (e.g. "Clusters") to 1659 // unconditionally include in API requests. By default, fields with empty or 1660 // default values are omitted from API requests. See 1661 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1662 // details. 1663 ForceSendFields []string `json:"-"` 1664 // NullFields is a list of field names (e.g. "Clusters") to include in API 1665 // requests with the JSON null value. By default, fields with empty values are 1666 // omitted from API requests. See 1667 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1668 NullFields []string `json:"-"` 1669 } 1670 1671 func (s *ClusteringMetrics) MarshalJSON() ([]byte, error) { 1672 type NoMethod ClusteringMetrics 1673 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1674 } 1675 1676 func (s *ClusteringMetrics) UnmarshalJSON(data []byte) error { 1677 type NoMethod ClusteringMetrics 1678 var s1 struct { 1679 DaviesBouldinIndex gensupport.JSONFloat64 `json:"daviesBouldinIndex"` 1680 MeanSquaredDistance gensupport.JSONFloat64 `json:"meanSquaredDistance"` 1681 *NoMethod 1682 } 1683 s1.NoMethod = (*NoMethod)(s) 1684 if err := json.Unmarshal(data, &s1); err != nil { 1685 return err 1686 } 1687 s.DaviesBouldinIndex = float64(s1.DaviesBouldinIndex) 1688 s.MeanSquaredDistance = float64(s1.MeanSquaredDistance) 1689 return nil 1690 } 1691 1692 // ConfusionMatrix: Confusion matrix for multi-class classification models. 1693 type ConfusionMatrix struct { 1694 // ConfidenceThreshold: Confidence threshold used when computing the entries of 1695 // the confusion matrix. 1696 ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` 1697 // Rows: One row per actual label. 1698 Rows []*Row `json:"rows,omitempty"` 1699 // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") to 1700 // unconditionally include in API requests. By default, fields with empty or 1701 // default values are omitted from API requests. See 1702 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1703 // details. 1704 ForceSendFields []string `json:"-"` 1705 // NullFields is a list of field names (e.g. "ConfidenceThreshold") to include 1706 // in API requests with the JSON null value. By default, fields with empty 1707 // values are omitted from API requests. See 1708 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1709 NullFields []string `json:"-"` 1710 } 1711 1712 func (s *ConfusionMatrix) MarshalJSON() ([]byte, error) { 1713 type NoMethod ConfusionMatrix 1714 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1715 } 1716 1717 func (s *ConfusionMatrix) UnmarshalJSON(data []byte) error { 1718 type NoMethod ConfusionMatrix 1719 var s1 struct { 1720 ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` 1721 *NoMethod 1722 } 1723 s1.NoMethod = (*NoMethod)(s) 1724 if err := json.Unmarshal(data, &s1); err != nil { 1725 return err 1726 } 1727 s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) 1728 return nil 1729 } 1730 1731 // ConnectionProperty: A connection-level property to customize query behavior. 1732 // Under JDBC, these correspond directly to connection properties passed to the 1733 // DriverManager. Under ODBC, these correspond to properties in the connection 1734 // string. Currently supported connection properties: * **dataset_project_id**: 1735 // represents the default project for datasets that are used in the query. 1736 // Setting the system variable `@@dataset_project_id` achieves the same 1737 // behavior. For more information about system variables, see: 1738 // https://cloud.google.com/bigquery/docs/reference/system-variables * 1739 // **time_zone**: represents the default timezone used to run the query. * 1740 // **session_id**: associates the query with a given session. * 1741 // **query_label**: associates the query with a given job label. If set, all 1742 // subsequent queries in a script or session will have this label. For the 1743 // format in which a you can specify a query label, see labels in the 1744 // JobConfiguration resource type: 1745 // https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfiguration 1746 // Additional properties are allowed, but ignored. Specifying multiple 1747 // connection properties with the same key returns an error. 1748 type ConnectionProperty struct { 1749 // Key: The key of the property to set. 1750 Key string `json:"key,omitempty"` 1751 // Value: The value of the property to set. 1752 Value string `json:"value,omitempty"` 1753 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 1754 // include in API requests. By default, fields with empty or default values are 1755 // omitted from API requests. See 1756 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1757 // details. 1758 ForceSendFields []string `json:"-"` 1759 // NullFields is a list of field names (e.g. "Key") to include in API requests 1760 // with the JSON null value. By default, fields with empty values are omitted 1761 // from API requests. See 1762 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1763 NullFields []string `json:"-"` 1764 } 1765 1766 func (s *ConnectionProperty) MarshalJSON() ([]byte, error) { 1767 type NoMethod ConnectionProperty 1768 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1769 } 1770 1771 // CsvOptions: Information related to a CSV data source. 1772 type CsvOptions struct { 1773 // AllowJaggedRows: Optional. Indicates if BigQuery should accept rows that are 1774 // missing trailing optional columns. If true, BigQuery treats missing trailing 1775 // columns as null values. If false, records with missing trailing columns are 1776 // treated as bad records, and if there are too many bad records, an invalid 1777 // error is returned in the job result. The default value is false. 1778 AllowJaggedRows bool `json:"allowJaggedRows,omitempty"` 1779 // AllowQuotedNewlines: Optional. Indicates if BigQuery should allow quoted 1780 // data sections that contain newline characters in a CSV file. The default 1781 // value is false. 1782 AllowQuotedNewlines bool `json:"allowQuotedNewlines,omitempty"` 1783 // Encoding: Optional. The character encoding of the data. The supported values 1784 // are UTF-8, ISO-8859-1, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. The 1785 // default value is UTF-8. BigQuery decodes the data after the raw, binary data 1786 // has been split using the values of the quote and fieldDelimiter properties. 1787 Encoding string `json:"encoding,omitempty"` 1788 // FieldDelimiter: Optional. The separator character for fields in a CSV file. 1789 // The separator is interpreted as a single byte. For files encoded in 1790 // ISO-8859-1, any single character can be used as a separator. For files 1791 // encoded in UTF-8, characters represented in decimal range 1-127 1792 // (U+0001-U+007F) can be used without any modification. UTF-8 characters 1793 // encoded with multiple bytes (i.e. U+0080 and above) will have only the first 1794 // byte used for separating fields. The remaining bytes will be treated as a 1795 // part of the field. BigQuery also supports the escape sequence "\t" (U+0009) 1796 // to specify a tab separator. The default value is comma (",", U+002C). 1797 FieldDelimiter string `json:"fieldDelimiter,omitempty"` 1798 // NullMarker: Optional. Specifies a string that represents a null value in a 1799 // CSV file. For example, if you specify "\N", BigQuery interprets "\N" as a 1800 // null value when querying a CSV file. The default value is the empty string. 1801 // If you set this property to a custom value, BigQuery throws an error if an 1802 // empty string is present for all data types except for STRING and BYTE. For 1803 // STRING and BYTE columns, BigQuery interprets the empty string as an empty 1804 // value. 1805 NullMarker string `json:"nullMarker,omitempty"` 1806 // PreserveAsciiControlCharacters: Optional. Indicates if the embedded ASCII 1807 // control characters (the first 32 characters in the ASCII-table, from '\x00' 1808 // to '\x1F') are preserved. 1809 PreserveAsciiControlCharacters bool `json:"preserveAsciiControlCharacters,omitempty"` 1810 // Quote: Optional. The value that is used to quote data sections in a CSV 1811 // file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the 1812 // first byte of the encoded string to split the data in its raw, binary state. 1813 // The default value is a double-quote ("). If your data does not contain 1814 // quoted sections, set the property value to an empty string. If your data 1815 // contains quoted newline characters, you must also set the 1816 // allowQuotedNewlines property to true. To include the specific quote 1817 // character within a quoted value, precede it with an additional matching 1818 // quote character. For example, if you want to escape the default character ' 1819 // " ', use ' "" '. 1820 // 1821 // Default: " 1822 Quote *string `json:"quote,omitempty"` 1823 // SkipLeadingRows: Optional. The number of rows at the top of a CSV file that 1824 // BigQuery will skip when reading the data. The default value is 0. This 1825 // property is useful if you have header rows in the file that should be 1826 // skipped. When autodetect is on, the behavior is the following: * 1827 // skipLeadingRows unspecified - Autodetect tries to detect headers in the 1828 // first row. If they are not detected, the row is read as data. Otherwise data 1829 // is read starting from the second row. * skipLeadingRows is 0 - Instructs 1830 // autodetect that there are no headers and data should be read starting from 1831 // the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and 1832 // tries to detect headers in row N. If headers are not detected, row N is just 1833 // skipped. Otherwise row N is used to extract column names for the detected 1834 // schema. 1835 SkipLeadingRows int64 `json:"skipLeadingRows,omitempty,string"` 1836 // ForceSendFields is a list of field names (e.g. "AllowJaggedRows") to 1837 // unconditionally include in API requests. By default, fields with empty or 1838 // default values are omitted from API requests. See 1839 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1840 // details. 1841 ForceSendFields []string `json:"-"` 1842 // NullFields is a list of field names (e.g. "AllowJaggedRows") to include in 1843 // API requests with the JSON null value. By default, fields with empty values 1844 // are omitted from API requests. See 1845 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1846 NullFields []string `json:"-"` 1847 } 1848 1849 func (s *CsvOptions) MarshalJSON() ([]byte, error) { 1850 type NoMethod CsvOptions 1851 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1852 } 1853 1854 // DataFormatOptions: Options for data format adjustments. 1855 type DataFormatOptions struct { 1856 // UseInt64Timestamp: Optional. Output timestamp as usec int64. Default is 1857 // false. 1858 UseInt64Timestamp bool `json:"useInt64Timestamp,omitempty"` 1859 // ForceSendFields is a list of field names (e.g. "UseInt64Timestamp") to 1860 // unconditionally include in API requests. By default, fields with empty or 1861 // default values are omitted from API requests. See 1862 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1863 // details. 1864 ForceSendFields []string `json:"-"` 1865 // NullFields is a list of field names (e.g. "UseInt64Timestamp") to include in 1866 // API requests with the JSON null value. By default, fields with empty values 1867 // are omitted from API requests. See 1868 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1869 NullFields []string `json:"-"` 1870 } 1871 1872 func (s *DataFormatOptions) MarshalJSON() ([]byte, error) { 1873 type NoMethod DataFormatOptions 1874 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1875 } 1876 1877 // DataMaskingStatistics: Statistics for data-masking. 1878 type DataMaskingStatistics struct { 1879 // DataMaskingApplied: Whether any accessed data was protected by the data 1880 // masking. 1881 DataMaskingApplied bool `json:"dataMaskingApplied,omitempty"` 1882 // ForceSendFields is a list of field names (e.g. "DataMaskingApplied") to 1883 // unconditionally include in API requests. By default, fields with empty or 1884 // default values are omitted from API requests. See 1885 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1886 // details. 1887 ForceSendFields []string `json:"-"` 1888 // NullFields is a list of field names (e.g. "DataMaskingApplied") to include 1889 // in API requests with the JSON null value. By default, fields with empty 1890 // values are omitted from API requests. See 1891 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1892 NullFields []string `json:"-"` 1893 } 1894 1895 func (s *DataMaskingStatistics) MarshalJSON() ([]byte, error) { 1896 type NoMethod DataMaskingStatistics 1897 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1898 } 1899 1900 // DataSplitResult: Data split result. This contains references to the training 1901 // and evaluation data tables that were used to train the model. 1902 type DataSplitResult struct { 1903 // EvaluationTable: Table reference of the evaluation data after split. 1904 EvaluationTable *TableReference `json:"evaluationTable,omitempty"` 1905 // TestTable: Table reference of the test data after split. 1906 TestTable *TableReference `json:"testTable,omitempty"` 1907 // TrainingTable: Table reference of the training data after split. 1908 TrainingTable *TableReference `json:"trainingTable,omitempty"` 1909 // ForceSendFields is a list of field names (e.g. "EvaluationTable") to 1910 // unconditionally include in API requests. By default, fields with empty or 1911 // default values are omitted from API requests. See 1912 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1913 // details. 1914 ForceSendFields []string `json:"-"` 1915 // NullFields is a list of field names (e.g. "EvaluationTable") to include in 1916 // API requests with the JSON null value. By default, fields with empty values 1917 // are omitted from API requests. See 1918 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1919 NullFields []string `json:"-"` 1920 } 1921 1922 func (s *DataSplitResult) MarshalJSON() ([]byte, error) { 1923 type NoMethod DataSplitResult 1924 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1925 } 1926 1927 type Dataset struct { 1928 // Access: Optional. An array of objects that define dataset access for one or 1929 // more entities. You can set this property when inserting or updating a 1930 // dataset in order to control who is allowed to access the data. If 1931 // unspecified at dataset creation time, BigQuery adds default dataset access 1932 // for the following entities: access.specialGroup: projectReaders; 1933 // access.role: READER; access.specialGroup: projectWriters; access.role: 1934 // WRITER; access.specialGroup: projectOwners; access.role: OWNER; 1935 // access.userByEmail: [dataset creator email]; access.role: OWNER; 1936 Access []*DatasetAccess `json:"access,omitempty"` 1937 // CreationTime: Output only. The time when this dataset was created, in 1938 // milliseconds since the epoch. 1939 CreationTime int64 `json:"creationTime,omitempty,string"` 1940 // DatasetReference: Required. A reference that identifies the dataset. 1941 DatasetReference *DatasetReference `json:"datasetReference,omitempty"` 1942 // DefaultCollation: Optional. Defines the default collation specification of 1943 // future tables created in the dataset. If a table is created in this dataset 1944 // without table-level default collation, then the table inherits the dataset 1945 // default collation, which is applied to the string fields that do not have 1946 // explicit collation specified. A change to this field affects only tables 1947 // created afterwards, and does not alter the existing tables. The following 1948 // values are supported: * 'und:ci': undetermined locale, case insensitive. * 1949 // '': empty string. Default to case-sensitive behavior. 1950 DefaultCollation string `json:"defaultCollation,omitempty"` 1951 // DefaultEncryptionConfiguration: The default encryption key for all tables in 1952 // the dataset. Once this property is set, all newly-created partitioned tables 1953 // in the dataset will have encryption key set to this value, unless table 1954 // creation request (or query) overrides the key. 1955 DefaultEncryptionConfiguration *EncryptionConfiguration `json:"defaultEncryptionConfiguration,omitempty"` 1956 // DefaultPartitionExpirationMs: This default partition expiration, expressed 1957 // in milliseconds. When new time-partitioned tables are created in a dataset 1958 // where this property is set, the table will inherit this value, propagated as 1959 // the `TimePartitioning.expirationMs` property on the new table. If you set 1960 // `TimePartitioning.expirationMs` explicitly when creating a table, the 1961 // `defaultPartitionExpirationMs` of the containing dataset is ignored. When 1962 // creating a partitioned table, if `defaultPartitionExpirationMs` is set, the 1963 // `defaultTableExpirationMs` value is ignored and the table will not be 1964 // inherit a table expiration deadline. 1965 DefaultPartitionExpirationMs int64 `json:"defaultPartitionExpirationMs,omitempty,string"` 1966 // DefaultRoundingMode: Optional. Defines the default rounding mode 1967 // specification of new tables created within this dataset. During table 1968 // creation, if this field is specified, the table within this dataset will 1969 // inherit the default rounding mode of the dataset. Setting the default 1970 // rounding mode on a table overrides this option. Existing tables in the 1971 // dataset are unaffected. If columns are defined during that table creation, 1972 // they will immediately inherit the table's default rounding mode, unless 1973 // otherwise specified. 1974 // 1975 // Possible values: 1976 // "ROUNDING_MODE_UNSPECIFIED" - Unspecified will default to using 1977 // ROUND_HALF_AWAY_FROM_ZERO. 1978 // "ROUND_HALF_AWAY_FROM_ZERO" - ROUND_HALF_AWAY_FROM_ZERO rounds half values 1979 // away from zero when applying precision and scale upon writing of NUMERIC and 1980 // BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 1981 // 1.9 => 2 1982 // "ROUND_HALF_EVEN" - ROUND_HALF_EVEN rounds half values to the nearest even 1983 // value when applying precision and scale upon writing of NUMERIC and 1984 // BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 1985 // 1.8, 1.9 => 2 2.5 => 2 1986 DefaultRoundingMode string `json:"defaultRoundingMode,omitempty"` 1987 // DefaultTableExpirationMs: Optional. The default lifetime of all tables in 1988 // the dataset, in milliseconds. The minimum lifetime value is 3600000 1989 // milliseconds (one hour). To clear an existing default expiration with a 1990 // PATCH request, set to 0. Once this property is set, all newly-created tables 1991 // in the dataset will have an expirationTime property set to the creation time 1992 // plus the value in this property, and changing the value will only affect new 1993 // tables, not existing ones. When the expirationTime for a given table is 1994 // reached, that table will be deleted automatically. If a table's 1995 // expirationTime is modified or removed before the table expires, or if you 1996 // provide an explicit expirationTime when creating a table, that value takes 1997 // precedence over the default expiration time indicated by this property. 1998 DefaultTableExpirationMs int64 `json:"defaultTableExpirationMs,omitempty,string"` 1999 // Description: Optional. A user-friendly description of the dataset. 2000 Description string `json:"description,omitempty"` 2001 // Etag: Output only. A hash of the resource. 2002 Etag string `json:"etag,omitempty"` 2003 // ExternalCatalogDatasetOptions: Optional. Options defining open source 2004 // compatible datasets living in the BigQuery catalog. Contains metadata of 2005 // open source database, schema or namespace represented by the current 2006 // dataset. 2007 ExternalCatalogDatasetOptions *ExternalCatalogDatasetOptions `json:"externalCatalogDatasetOptions,omitempty"` 2008 // ExternalDatasetReference: Optional. Reference to a read-only external 2009 // dataset defined in data catalogs outside of BigQuery. Filled out when the 2010 // dataset type is EXTERNAL. 2011 ExternalDatasetReference *ExternalDatasetReference `json:"externalDatasetReference,omitempty"` 2012 // FriendlyName: Optional. A descriptive name for the dataset. 2013 FriendlyName string `json:"friendlyName,omitempty"` 2014 // Id: Output only. The fully-qualified unique name of the dataset in the 2015 // format projectId:datasetId. The dataset name without the project name is 2016 // given in the datasetId field. When creating a new dataset, leave this field 2017 // blank, and instead specify the datasetId field. 2018 Id string `json:"id,omitempty"` 2019 // IsCaseInsensitive: Optional. TRUE if the dataset and its table names are 2020 // case-insensitive, otherwise FALSE. By default, this is FALSE, which means 2021 // the dataset and its table names are case-sensitive. This field does not 2022 // affect routine references. 2023 IsCaseInsensitive bool `json:"isCaseInsensitive,omitempty"` 2024 // Kind: Output only. The resource type. 2025 Kind string `json:"kind,omitempty"` 2026 // Labels: The labels associated with this dataset. You can use these to 2027 // organize and group your datasets. You can set this property when inserting 2028 // or updating a dataset. See Creating and Updating Dataset Labels for more 2029 // information. 2030 Labels map[string]string `json:"labels,omitempty"` 2031 // LastModifiedTime: Output only. The date when this dataset was last modified, 2032 // in milliseconds since the epoch. 2033 LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"` 2034 // LinkedDatasetMetadata: Output only. Metadata about the LinkedDataset. Filled 2035 // out when the dataset type is LINKED. 2036 LinkedDatasetMetadata *LinkedDatasetMetadata `json:"linkedDatasetMetadata,omitempty"` 2037 // LinkedDatasetSource: Optional. The source dataset reference when the dataset 2038 // is of type LINKED. For all other dataset types it is not set. This field 2039 // cannot be updated once it is set. Any attempt to update this field using 2040 // Update and Patch API Operations will be ignored. 2041 LinkedDatasetSource *LinkedDatasetSource `json:"linkedDatasetSource,omitempty"` 2042 // Location: The geographic location where the dataset should reside. See 2043 // https://cloud.google.com/bigquery/docs/locations for supported locations. 2044 Location string `json:"location,omitempty"` 2045 // MaxTimeTravelHours: Optional. Defines the time travel window in hours. The 2046 // value can be from 48 to 168 hours (2 to 7 days). The default value is 168 2047 // hours if this is not set. 2048 MaxTimeTravelHours int64 `json:"maxTimeTravelHours,omitempty,string"` 2049 // Restrictions: Optional. Output only. Restriction config for all tables and 2050 // dataset. If set, restrict certain accesses on the dataset and all its tables 2051 // based on the config. See Data egress 2052 // (/bigquery/docs/analytics-hub-introduction#data_egress) for more details. 2053 Restrictions *RestrictionConfig `json:"restrictions,omitempty"` 2054 // SatisfiesPzi: Output only. Reserved for future use. 2055 SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` 2056 // SatisfiesPzs: Output only. Reserved for future use. 2057 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` 2058 // SelfLink: Output only. A URL that can be used to access the resource again. 2059 // You can use this URL in Get or Update requests to the resource. 2060 SelfLink string `json:"selfLink,omitempty"` 2061 // StorageBillingModel: Optional. Updates storage_billing_model for the 2062 // dataset. 2063 // 2064 // Possible values: 2065 // "STORAGE_BILLING_MODEL_UNSPECIFIED" - Value not set. 2066 // "LOGICAL" - Billing for logical bytes. 2067 // "PHYSICAL" - Billing for physical bytes. 2068 StorageBillingModel string `json:"storageBillingModel,omitempty"` 2069 // Tags: Output only. Tags for the Dataset. 2070 Tags []*DatasetTags `json:"tags,omitempty"` 2071 // Type: Output only. Same as `type` in `ListFormatDataset`. The type of the 2072 // dataset, one of: * DEFAULT - only accessible by owner and authorized 2073 // accounts, * PUBLIC - accessible by everyone, * LINKED - linked dataset, * 2074 // EXTERNAL - dataset with definition in external metadata catalog. 2075 Type string `json:"type,omitempty"` 2076 2077 // ServerResponse contains the HTTP response code and headers from the server. 2078 googleapi.ServerResponse `json:"-"` 2079 // ForceSendFields is a list of field names (e.g. "Access") to unconditionally 2080 // include in API requests. By default, fields with empty or default values are 2081 // omitted from API requests. See 2082 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2083 // details. 2084 ForceSendFields []string `json:"-"` 2085 // NullFields is a list of field names (e.g. "Access") to include in API 2086 // requests with the JSON null value. By default, fields with empty values are 2087 // omitted from API requests. See 2088 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2089 NullFields []string `json:"-"` 2090 } 2091 2092 func (s *Dataset) MarshalJSON() ([]byte, error) { 2093 type NoMethod Dataset 2094 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2095 } 2096 2097 // DatasetAccess: An object that defines dataset access for an entity. 2098 type DatasetAccess struct { 2099 // Dataset: [Pick one] A grant authorizing all resources of a particular type 2100 // in a particular dataset access to this dataset. Only views are supported for 2101 // now. The role field is not required when this field is set. If that dataset 2102 // is deleted and re-created, its access needs to be granted again via an 2103 // update operation. 2104 Dataset *DatasetAccessEntry `json:"dataset,omitempty"` 2105 // Domain: [Pick one] A domain to grant access to. Any users signed in with the 2106 // domain specified will be granted the specified access. Example: 2107 // "example.com". Maps to IAM policy member "domain:DOMAIN". 2108 Domain string `json:"domain,omitempty"` 2109 // GroupByEmail: [Pick one] An email address of a Google Group to grant access 2110 // to. Maps to IAM policy member "group:GROUP". 2111 GroupByEmail string `json:"groupByEmail,omitempty"` 2112 // IamMember: [Pick one] Some other type of member that appears in the IAM 2113 // Policy but isn't a user, group, domain, or special group. 2114 IamMember string `json:"iamMember,omitempty"` 2115 // Role: An IAM role ID that should be granted to the user, group, or domain 2116 // specified in this access entry. The following legacy mappings will be 2117 // applied: OWNER <=> roles/bigquery.dataOwner WRITER <=> 2118 // roles/bigquery.dataEditor READER <=> roles/bigquery.dataViewer This field 2119 // will accept any of the above formats, but will return only the legacy 2120 // format. For example, if you set this field to "roles/bigquery.dataOwner", it 2121 // will be returned back as "OWNER". 2122 Role string `json:"role,omitempty"` 2123 // Routine: [Pick one] A routine from a different dataset to grant access to. 2124 // Queries executed against that routine will have read access to 2125 // views/tables/routines in this dataset. Only UDF is supported for now. The 2126 // role field is not required when this field is set. If that routine is 2127 // updated by any user, access to the routine needs to be granted again via an 2128 // update operation. 2129 Routine *RoutineReference `json:"routine,omitempty"` 2130 // SpecialGroup: [Pick one] A special group to grant access to. Possible values 2131 // include: projectOwners: Owners of the enclosing project. projectReaders: 2132 // Readers of the enclosing project. projectWriters: Writers of the enclosing 2133 // project. allAuthenticatedUsers: All authenticated BigQuery users. Maps to 2134 // similarly-named IAM members. 2135 SpecialGroup string `json:"specialGroup,omitempty"` 2136 // UserByEmail: [Pick one] An email address of a user to grant access to. For 2137 // example: fred@example.com. Maps to IAM policy member "user:EMAIL" or 2138 // "serviceAccount:EMAIL". 2139 UserByEmail string `json:"userByEmail,omitempty"` 2140 // View: [Pick one] A view from a different dataset to grant access to. Queries 2141 // executed against that view will have read access to views/tables/routines in 2142 // this dataset. The role field is not required when this field is set. If that 2143 // view is updated by any user, access to the view needs to be granted again 2144 // via an update operation. 2145 View *TableReference `json:"view,omitempty"` 2146 // ForceSendFields is a list of field names (e.g. "Dataset") to unconditionally 2147 // include in API requests. By default, fields with empty or default values are 2148 // omitted from API requests. See 2149 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2150 // details. 2151 ForceSendFields []string `json:"-"` 2152 // NullFields is a list of field names (e.g. "Dataset") to include in API 2153 // requests with the JSON null value. By default, fields with empty values are 2154 // omitted from API requests. See 2155 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2156 NullFields []string `json:"-"` 2157 } 2158 2159 func (s *DatasetAccess) MarshalJSON() ([]byte, error) { 2160 type NoMethod DatasetAccess 2161 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2162 } 2163 2164 // DatasetTags: A global tag managed by Resource Manager. 2165 // https://cloud.google.com/iam/docs/tags-access-control#definitions 2166 type DatasetTags struct { 2167 // TagKey: Required. The namespaced friendly name of the tag key, e.g. 2168 // "12345/environment" where 12345 is org id. 2169 TagKey string `json:"tagKey,omitempty"` 2170 // TagValue: Required. The friendly short name of the tag value, e.g. 2171 // "production". 2172 TagValue string `json:"tagValue,omitempty"` 2173 // ForceSendFields is a list of field names (e.g. "TagKey") to unconditionally 2174 // include in API requests. By default, fields with empty or default values are 2175 // omitted from API requests. See 2176 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2177 // details. 2178 ForceSendFields []string `json:"-"` 2179 // NullFields is a list of field names (e.g. "TagKey") to include in API 2180 // requests with the JSON null value. By default, fields with empty values are 2181 // omitted from API requests. See 2182 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2183 NullFields []string `json:"-"` 2184 } 2185 2186 func (s *DatasetTags) MarshalJSON() ([]byte, error) { 2187 type NoMethod DatasetTags 2188 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2189 } 2190 2191 // DatasetAccessEntry: Grants all resources of particular types in a particular 2192 // dataset read access to the current dataset. Similar to how individually 2193 // authorized views work, updates to any resource granted through its dataset 2194 // (including creation of new resources) requires read permission to referenced 2195 // resources, plus write permission to the authorizing dataset. 2196 type DatasetAccessEntry struct { 2197 // Dataset: The dataset this entry applies to 2198 Dataset *DatasetReference `json:"dataset,omitempty"` 2199 // TargetTypes: Which resources in the dataset this entry applies to. 2200 // Currently, only views are supported, but additional target types may be 2201 // added in the future. 2202 // 2203 // Possible values: 2204 // "TARGET_TYPE_UNSPECIFIED" - Do not use. You must set a target type 2205 // explicitly. 2206 // "VIEWS" - This entry applies to views in the dataset. 2207 // "ROUTINES" - This entry applies to routines in the dataset. 2208 TargetTypes []string `json:"targetTypes,omitempty"` 2209 // ForceSendFields is a list of field names (e.g. "Dataset") to unconditionally 2210 // include in API requests. By default, fields with empty or default values are 2211 // omitted from API requests. See 2212 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2213 // details. 2214 ForceSendFields []string `json:"-"` 2215 // NullFields is a list of field names (e.g. "Dataset") to include in API 2216 // requests with the JSON null value. By default, fields with empty values are 2217 // omitted from API requests. See 2218 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2219 NullFields []string `json:"-"` 2220 } 2221 2222 func (s *DatasetAccessEntry) MarshalJSON() ([]byte, error) { 2223 type NoMethod DatasetAccessEntry 2224 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2225 } 2226 2227 // DatasetList: Response format for a page of results when listing datasets. 2228 type DatasetList struct { 2229 // Datasets: An array of the dataset resources in the project. Each resource 2230 // contains basic information. For full information about a particular dataset 2231 // resource, use the Datasets: get method. This property is omitted when there 2232 // are no datasets in the project. 2233 Datasets []*DatasetListDatasets `json:"datasets,omitempty"` 2234 // Etag: Output only. A hash value of the results page. You can use this 2235 // property to determine if the page has changed since the last request. 2236 Etag string `json:"etag,omitempty"` 2237 // Kind: Output only. The resource type. This property always returns the value 2238 // "bigquery#datasetList" 2239 Kind string `json:"kind,omitempty"` 2240 // NextPageToken: A token that can be used to request the next results page. 2241 // This property is omitted on the final results page. 2242 NextPageToken string `json:"nextPageToken,omitempty"` 2243 // Unreachable: A list of skipped locations that were unreachable. For more 2244 // information about BigQuery locations, see: 2245 // https://cloud.google.com/bigquery/docs/locations. Example: "europe-west5" 2246 Unreachable []string `json:"unreachable,omitempty"` 2247 2248 // ServerResponse contains the HTTP response code and headers from the server. 2249 googleapi.ServerResponse `json:"-"` 2250 // ForceSendFields is a list of field names (e.g. "Datasets") to 2251 // unconditionally include in API requests. By default, fields with empty or 2252 // default values are omitted from API requests. See 2253 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2254 // details. 2255 ForceSendFields []string `json:"-"` 2256 // NullFields is a list of field names (e.g. "Datasets") to include in API 2257 // requests with the JSON null value. By default, fields with empty values are 2258 // omitted from API requests. See 2259 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2260 NullFields []string `json:"-"` 2261 } 2262 2263 func (s *DatasetList) MarshalJSON() ([]byte, error) { 2264 type NoMethod DatasetList 2265 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2266 } 2267 2268 // DatasetListDatasets: A dataset resource with only a subset of fields, to be 2269 // returned in a list of datasets. 2270 type DatasetListDatasets struct { 2271 // DatasetReference: The dataset reference. Use this property to access 2272 // specific parts of the dataset's ID, such as project ID or dataset ID. 2273 DatasetReference *DatasetReference `json:"datasetReference,omitempty"` 2274 // FriendlyName: An alternate name for the dataset. The friendly name is purely 2275 // decorative in nature. 2276 FriendlyName string `json:"friendlyName,omitempty"` 2277 // Id: The fully-qualified, unique, opaque ID of the dataset. 2278 Id string `json:"id,omitempty"` 2279 // Kind: The resource type. This property always returns the value 2280 // "bigquery#dataset" 2281 Kind string `json:"kind,omitempty"` 2282 // Labels: The labels associated with this dataset. You can use these to 2283 // organize and group your datasets. 2284 Labels map[string]string `json:"labels,omitempty"` 2285 // Location: The geographic location where the dataset resides. 2286 Location string `json:"location,omitempty"` 2287 // ForceSendFields is a list of field names (e.g. "DatasetReference") to 2288 // unconditionally include in API requests. By default, fields with empty or 2289 // default values are omitted from API requests. See 2290 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2291 // details. 2292 ForceSendFields []string `json:"-"` 2293 // NullFields is a list of field names (e.g. "DatasetReference") to include in 2294 // API requests with the JSON null value. By default, fields with empty values 2295 // are omitted from API requests. See 2296 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2297 NullFields []string `json:"-"` 2298 } 2299 2300 func (s *DatasetListDatasets) MarshalJSON() ([]byte, error) { 2301 type NoMethod DatasetListDatasets 2302 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2303 } 2304 2305 type DatasetReference struct { 2306 // DatasetId: Required. A unique ID for this dataset, without the project name. 2307 // The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores 2308 // (_). The maximum length is 1,024 characters. 2309 DatasetId string `json:"datasetId,omitempty"` 2310 // ProjectId: Optional. The ID of the project containing this dataset. 2311 ProjectId string `json:"projectId,omitempty"` 2312 // ForceSendFields is a list of field names (e.g. "DatasetId") to 2313 // unconditionally include in API requests. By default, fields with empty or 2314 // default values are omitted from API requests. See 2315 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2316 // details. 2317 ForceSendFields []string `json:"-"` 2318 // NullFields is a list of field names (e.g. "DatasetId") to include in API 2319 // requests with the JSON null value. By default, fields with empty values are 2320 // omitted from API requests. See 2321 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2322 NullFields []string `json:"-"` 2323 } 2324 2325 func (s *DatasetReference) MarshalJSON() ([]byte, error) { 2326 type NoMethod DatasetReference 2327 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2328 } 2329 2330 // DestinationTableProperties: Properties for the destination table. 2331 type DestinationTableProperties struct { 2332 // Description: Optional. The description for the destination table. This will 2333 // only be used if the destination table is newly created. If the table already 2334 // exists and a value different than the current description is provided, the 2335 // job will fail. 2336 Description string `json:"description,omitempty"` 2337 // ExpirationTime: Internal use only. 2338 ExpirationTime string `json:"expirationTime,omitempty"` 2339 // FriendlyName: Optional. Friendly name for the destination table. If the 2340 // table already exists, it should be same as the existing friendly name. 2341 FriendlyName string `json:"friendlyName,omitempty"` 2342 // Labels: Optional. The labels associated with this table. You can use these 2343 // to organize and group your tables. This will only be used if the destination 2344 // table is newly created. If the table already exists and labels are different 2345 // than the current labels are provided, the job will fail. 2346 Labels map[string]string `json:"labels,omitempty"` 2347 // ForceSendFields is a list of field names (e.g. "Description") to 2348 // unconditionally include in API requests. By default, fields with empty or 2349 // default values are omitted from API requests. See 2350 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2351 // details. 2352 ForceSendFields []string `json:"-"` 2353 // NullFields is a list of field names (e.g. "Description") to include in API 2354 // requests with the JSON null value. By default, fields with empty values are 2355 // omitted from API requests. See 2356 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2357 NullFields []string `json:"-"` 2358 } 2359 2360 func (s *DestinationTableProperties) MarshalJSON() ([]byte, error) { 2361 type NoMethod DestinationTableProperties 2362 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2363 } 2364 2365 // DifferentialPrivacyPolicy: Represents privacy policy associated with 2366 // "differential privacy" method. 2367 type DifferentialPrivacyPolicy struct { 2368 // DeltaBudget: Optional. The total delta budget for all queries against the 2369 // privacy-protected view. Each subscriber query against this view charges the 2370 // amount of delta that is pre-defined by the contributor through the privacy 2371 // policy delta_per_query field. If there is sufficient budget, then the 2372 // subscriber query attempts to complete. It might still fail due to other 2373 // reasons, in which case the charge is refunded. If there is insufficient 2374 // budget the query is rejected. There might be multiple charge attempts if a 2375 // single query references multiple views. In this case there must be 2376 // sufficient budget for all charges or the query is rejected and charges are 2377 // refunded in best effort. The budget does not have a refresh policy and can 2378 // only be updated via ALTER VIEW or circumvented by creating a new view that 2379 // can be queried with a fresh budget. 2380 DeltaBudget float64 `json:"deltaBudget,omitempty"` 2381 // DeltaBudgetRemaining: Output only. The delta budget remaining. If budget is 2382 // exhausted, no more queries are allowed. Note that the budget for queries 2383 // that are in progress is deducted before the query executes. If the query 2384 // fails or is cancelled then the budget is refunded. In this case the amount 2385 // of budget remaining can increase. 2386 DeltaBudgetRemaining float64 `json:"deltaBudgetRemaining,omitempty"` 2387 // DeltaPerQuery: Optional. The delta value that is used per query. Delta 2388 // represents the probability that any row will fail to be epsilon 2389 // differentially private. Indicates the risk associated with exposing 2390 // aggregate rows in the result of a query. 2391 DeltaPerQuery float64 `json:"deltaPerQuery,omitempty"` 2392 // EpsilonBudget: Optional. The total epsilon budget for all queries against 2393 // the privacy-protected view. Each subscriber query against this view charges 2394 // the amount of epsilon they request in their query. If there is sufficient 2395 // budget, then the subscriber query attempts to complete. It might still fail 2396 // due to other reasons, in which case the charge is refunded. If there is 2397 // insufficient budget the query is rejected. There might be multiple charge 2398 // attempts if a single query references multiple views. In this case there 2399 // must be sufficient budget for all charges or the query is rejected and 2400 // charges are refunded in best effort. The budget does not have a refresh 2401 // policy and can only be updated via ALTER VIEW or circumvented by creating a 2402 // new view that can be queried with a fresh budget. 2403 EpsilonBudget float64 `json:"epsilonBudget,omitempty"` 2404 // EpsilonBudgetRemaining: Output only. The epsilon budget remaining. If budget 2405 // is exhausted, no more queries are allowed. Note that the budget for queries 2406 // that are in progress is deducted before the query executes. If the query 2407 // fails or is cancelled then the budget is refunded. In this case the amount 2408 // of budget remaining can increase. 2409 EpsilonBudgetRemaining float64 `json:"epsilonBudgetRemaining,omitempty"` 2410 // MaxEpsilonPerQuery: Optional. The maximum epsilon value that a query can 2411 // consume. If the subscriber specifies epsilon as a parameter in a SELECT 2412 // query, it must be less than or equal to this value. The epsilon parameter 2413 // controls the amount of noise that is added to the groups — a higher 2414 // epsilon means less noise. 2415 MaxEpsilonPerQuery float64 `json:"maxEpsilonPerQuery,omitempty"` 2416 // MaxGroupsContributed: Optional. The maximum groups contributed value that is 2417 // used per query. Represents the maximum number of groups to which each 2418 // protected entity can contribute. Changing this value does not improve or 2419 // worsen privacy. The best value for accuracy and utility depends on the query 2420 // and data. 2421 MaxGroupsContributed int64 `json:"maxGroupsContributed,omitempty,string"` 2422 // PrivacyUnitColumn: Optional. The privacy unit column associated with this 2423 // policy. Differential privacy policies can only have one privacy unit column 2424 // per data source object (table, view). 2425 PrivacyUnitColumn string `json:"privacyUnitColumn,omitempty"` 2426 // ForceSendFields is a list of field names (e.g. "DeltaBudget") to 2427 // unconditionally include in API requests. By default, fields with empty or 2428 // default values are omitted from API requests. See 2429 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2430 // details. 2431 ForceSendFields []string `json:"-"` 2432 // NullFields is a list of field names (e.g. "DeltaBudget") to include in API 2433 // requests with the JSON null value. By default, fields with empty values are 2434 // omitted from API requests. See 2435 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2436 NullFields []string `json:"-"` 2437 } 2438 2439 func (s *DifferentialPrivacyPolicy) MarshalJSON() ([]byte, error) { 2440 type NoMethod DifferentialPrivacyPolicy 2441 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2442 } 2443 2444 func (s *DifferentialPrivacyPolicy) UnmarshalJSON(data []byte) error { 2445 type NoMethod DifferentialPrivacyPolicy 2446 var s1 struct { 2447 DeltaBudget gensupport.JSONFloat64 `json:"deltaBudget"` 2448 DeltaBudgetRemaining gensupport.JSONFloat64 `json:"deltaBudgetRemaining"` 2449 DeltaPerQuery gensupport.JSONFloat64 `json:"deltaPerQuery"` 2450 EpsilonBudget gensupport.JSONFloat64 `json:"epsilonBudget"` 2451 EpsilonBudgetRemaining gensupport.JSONFloat64 `json:"epsilonBudgetRemaining"` 2452 MaxEpsilonPerQuery gensupport.JSONFloat64 `json:"maxEpsilonPerQuery"` 2453 *NoMethod 2454 } 2455 s1.NoMethod = (*NoMethod)(s) 2456 if err := json.Unmarshal(data, &s1); err != nil { 2457 return err 2458 } 2459 s.DeltaBudget = float64(s1.DeltaBudget) 2460 s.DeltaBudgetRemaining = float64(s1.DeltaBudgetRemaining) 2461 s.DeltaPerQuery = float64(s1.DeltaPerQuery) 2462 s.EpsilonBudget = float64(s1.EpsilonBudget) 2463 s.EpsilonBudgetRemaining = float64(s1.EpsilonBudgetRemaining) 2464 s.MaxEpsilonPerQuery = float64(s1.MaxEpsilonPerQuery) 2465 return nil 2466 } 2467 2468 // DimensionalityReductionMetrics: Model evaluation metrics for dimensionality 2469 // reduction models. 2470 type DimensionalityReductionMetrics struct { 2471 // TotalExplainedVarianceRatio: Total percentage of variance explained by the 2472 // selected principal components. 2473 TotalExplainedVarianceRatio float64 `json:"totalExplainedVarianceRatio,omitempty"` 2474 // ForceSendFields is a list of field names (e.g. 2475 // "TotalExplainedVarianceRatio") to unconditionally include in API requests. 2476 // By default, fields with empty or default values are omitted from API 2477 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 2478 // for more details. 2479 ForceSendFields []string `json:"-"` 2480 // NullFields is a list of field names (e.g. "TotalExplainedVarianceRatio") to 2481 // include in API requests with the JSON null value. By default, fields with 2482 // empty values are omitted from API requests. See 2483 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2484 NullFields []string `json:"-"` 2485 } 2486 2487 func (s *DimensionalityReductionMetrics) MarshalJSON() ([]byte, error) { 2488 type NoMethod DimensionalityReductionMetrics 2489 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2490 } 2491 2492 func (s *DimensionalityReductionMetrics) UnmarshalJSON(data []byte) error { 2493 type NoMethod DimensionalityReductionMetrics 2494 var s1 struct { 2495 TotalExplainedVarianceRatio gensupport.JSONFloat64 `json:"totalExplainedVarianceRatio"` 2496 *NoMethod 2497 } 2498 s1.NoMethod = (*NoMethod)(s) 2499 if err := json.Unmarshal(data, &s1); err != nil { 2500 return err 2501 } 2502 s.TotalExplainedVarianceRatio = float64(s1.TotalExplainedVarianceRatio) 2503 return nil 2504 } 2505 2506 // DmlStatistics: Detailed statistics for DML statements 2507 type DmlStatistics struct { 2508 // DeletedRowCount: Output only. Number of deleted Rows. populated by DML 2509 // DELETE, MERGE and TRUNCATE statements. 2510 DeletedRowCount int64 `json:"deletedRowCount,omitempty,string"` 2511 // InsertedRowCount: Output only. Number of inserted Rows. Populated by DML 2512 // INSERT and MERGE statements 2513 InsertedRowCount int64 `json:"insertedRowCount,omitempty,string"` 2514 // UpdatedRowCount: Output only. Number of updated Rows. Populated by DML 2515 // UPDATE and MERGE statements. 2516 UpdatedRowCount int64 `json:"updatedRowCount,omitempty,string"` 2517 // ForceSendFields is a list of field names (e.g. "DeletedRowCount") to 2518 // unconditionally include in API requests. By default, fields with empty or 2519 // default values are omitted from API requests. See 2520 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2521 // details. 2522 ForceSendFields []string `json:"-"` 2523 // NullFields is a list of field names (e.g. "DeletedRowCount") to include in 2524 // API requests with the JSON null value. By default, fields with empty values 2525 // are omitted from API requests. See 2526 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2527 NullFields []string `json:"-"` 2528 } 2529 2530 func (s *DmlStatistics) MarshalJSON() ([]byte, error) { 2531 type NoMethod DmlStatistics 2532 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2533 } 2534 2535 // DoubleCandidates: Discrete candidates of a double hyperparameter. 2536 type DoubleCandidates struct { 2537 // Candidates: Candidates for the double parameter in increasing order. 2538 Candidates []float64 `json:"candidates,omitempty"` 2539 // ForceSendFields is a list of field names (e.g. "Candidates") to 2540 // unconditionally include in API requests. By default, fields with empty or 2541 // default values are omitted from API requests. See 2542 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2543 // details. 2544 ForceSendFields []string `json:"-"` 2545 // NullFields is a list of field names (e.g. "Candidates") to include in API 2546 // requests with the JSON null value. By default, fields with empty values are 2547 // omitted from API requests. See 2548 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2549 NullFields []string `json:"-"` 2550 } 2551 2552 func (s *DoubleCandidates) MarshalJSON() ([]byte, error) { 2553 type NoMethod DoubleCandidates 2554 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2555 } 2556 2557 func (s *DoubleCandidates) UnmarshalJSON(data []byte) error { 2558 type NoMethod DoubleCandidates 2559 var s1 struct { 2560 Candidates []gensupport.JSONFloat64 `json:"candidates"` 2561 *NoMethod 2562 } 2563 s1.NoMethod = (*NoMethod)(s) 2564 if err := json.Unmarshal(data, &s1); err != nil { 2565 return err 2566 } 2567 s.Candidates = make([]float64, len(s1.Candidates)) 2568 for i := range s1.Candidates { 2569 s.Candidates[i] = float64(s1.Candidates[i]) 2570 } 2571 return nil 2572 } 2573 2574 // DoubleHparamSearchSpace: Search space for a double hyperparameter. 2575 type DoubleHparamSearchSpace struct { 2576 // Candidates: Candidates of the double hyperparameter. 2577 Candidates *DoubleCandidates `json:"candidates,omitempty"` 2578 // Range: Range of the double hyperparameter. 2579 Range *DoubleRange `json:"range,omitempty"` 2580 // ForceSendFields is a list of field names (e.g. "Candidates") to 2581 // unconditionally include in API requests. By default, fields with empty or 2582 // default values are omitted from API requests. See 2583 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2584 // details. 2585 ForceSendFields []string `json:"-"` 2586 // NullFields is a list of field names (e.g. "Candidates") to include in API 2587 // requests with the JSON null value. By default, fields with empty values are 2588 // omitted from API requests. See 2589 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2590 NullFields []string `json:"-"` 2591 } 2592 2593 func (s *DoubleHparamSearchSpace) MarshalJSON() ([]byte, error) { 2594 type NoMethod DoubleHparamSearchSpace 2595 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2596 } 2597 2598 // DoubleRange: Range of a double hyperparameter. 2599 type DoubleRange struct { 2600 // Max: Max value of the double parameter. 2601 Max float64 `json:"max,omitempty"` 2602 // Min: Min value of the double parameter. 2603 Min float64 `json:"min,omitempty"` 2604 // ForceSendFields is a list of field names (e.g. "Max") to unconditionally 2605 // include in API requests. By default, fields with empty or default values are 2606 // omitted from API requests. See 2607 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2608 // details. 2609 ForceSendFields []string `json:"-"` 2610 // NullFields is a list of field names (e.g. "Max") to include in API requests 2611 // with the JSON null value. By default, fields with empty values are omitted 2612 // from API requests. See 2613 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2614 NullFields []string `json:"-"` 2615 } 2616 2617 func (s *DoubleRange) MarshalJSON() ([]byte, error) { 2618 type NoMethod DoubleRange 2619 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2620 } 2621 2622 func (s *DoubleRange) UnmarshalJSON(data []byte) error { 2623 type NoMethod DoubleRange 2624 var s1 struct { 2625 Max gensupport.JSONFloat64 `json:"max"` 2626 Min gensupport.JSONFloat64 `json:"min"` 2627 *NoMethod 2628 } 2629 s1.NoMethod = (*NoMethod)(s) 2630 if err := json.Unmarshal(data, &s1); err != nil { 2631 return err 2632 } 2633 s.Max = float64(s1.Max) 2634 s.Min = float64(s1.Min) 2635 return nil 2636 } 2637 2638 type EncryptionConfiguration struct { 2639 // KmsKeyName: Optional. Describes the Cloud KMS encryption key that will be 2640 // used to protect destination BigQuery table. The BigQuery Service Account 2641 // associated with your project requires access to this encryption key. 2642 KmsKeyName string `json:"kmsKeyName,omitempty"` 2643 // ForceSendFields is a list of field names (e.g. "KmsKeyName") to 2644 // unconditionally include in API requests. By default, fields with empty or 2645 // default values are omitted from API requests. See 2646 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2647 // details. 2648 ForceSendFields []string `json:"-"` 2649 // NullFields is a list of field names (e.g. "KmsKeyName") to include in API 2650 // requests with the JSON null value. By default, fields with empty values are 2651 // omitted from API requests. See 2652 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2653 NullFields []string `json:"-"` 2654 } 2655 2656 func (s *EncryptionConfiguration) MarshalJSON() ([]byte, error) { 2657 type NoMethod EncryptionConfiguration 2658 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2659 } 2660 2661 // Entry: A single entry in the confusion matrix. 2662 type Entry struct { 2663 // ItemCount: Number of items being predicted as this label. 2664 ItemCount int64 `json:"itemCount,omitempty,string"` 2665 // PredictedLabel: The predicted label. For confidence_threshold > 0, we will 2666 // also add an entry indicating the number of items under the confidence 2667 // threshold. 2668 PredictedLabel string `json:"predictedLabel,omitempty"` 2669 // ForceSendFields is a list of field names (e.g. "ItemCount") to 2670 // unconditionally include in API requests. By default, fields with empty or 2671 // default values are omitted from API requests. See 2672 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2673 // details. 2674 ForceSendFields []string `json:"-"` 2675 // NullFields is a list of field names (e.g. "ItemCount") to include in API 2676 // requests with the JSON null value. By default, fields with empty values are 2677 // omitted from API requests. See 2678 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2679 NullFields []string `json:"-"` 2680 } 2681 2682 func (s *Entry) MarshalJSON() ([]byte, error) { 2683 type NoMethod Entry 2684 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2685 } 2686 2687 // ErrorProto: Error details. 2688 type ErrorProto struct { 2689 // DebugInfo: Debugging information. This property is internal to Google and 2690 // should not be used. 2691 DebugInfo string `json:"debugInfo,omitempty"` 2692 // Location: Specifies where the error occurred, if present. 2693 Location string `json:"location,omitempty"` 2694 // Message: A human-readable description of the error. 2695 Message string `json:"message,omitempty"` 2696 // Reason: A short error code that summarizes the error. 2697 Reason string `json:"reason,omitempty"` 2698 // ForceSendFields is a list of field names (e.g. "DebugInfo") to 2699 // unconditionally include in API requests. By default, fields with empty or 2700 // default values are omitted from API requests. See 2701 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2702 // details. 2703 ForceSendFields []string `json:"-"` 2704 // NullFields is a list of field names (e.g. "DebugInfo") to include in API 2705 // requests with the JSON null value. By default, fields with empty values are 2706 // omitted from API requests. See 2707 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2708 NullFields []string `json:"-"` 2709 } 2710 2711 func (s *ErrorProto) MarshalJSON() ([]byte, error) { 2712 type NoMethod ErrorProto 2713 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2714 } 2715 2716 // EvaluationMetrics: Evaluation metrics of a model. These are either computed 2717 // on all training data or just the eval data based on whether eval data was 2718 // used during training. These are not present for imported models. 2719 type EvaluationMetrics struct { 2720 // ArimaForecastingMetrics: Populated for ARIMA models. 2721 ArimaForecastingMetrics *ArimaForecastingMetrics `json:"arimaForecastingMetrics,omitempty"` 2722 // BinaryClassificationMetrics: Populated for binary classification/classifier 2723 // models. 2724 BinaryClassificationMetrics *BinaryClassificationMetrics `json:"binaryClassificationMetrics,omitempty"` 2725 // ClusteringMetrics: Populated for clustering models. 2726 ClusteringMetrics *ClusteringMetrics `json:"clusteringMetrics,omitempty"` 2727 // DimensionalityReductionMetrics: Evaluation metrics when the model is a 2728 // dimensionality reduction model, which currently includes PCA. 2729 DimensionalityReductionMetrics *DimensionalityReductionMetrics `json:"dimensionalityReductionMetrics,omitempty"` 2730 // MultiClassClassificationMetrics: Populated for multi-class 2731 // classification/classifier models. 2732 MultiClassClassificationMetrics *MultiClassClassificationMetrics `json:"multiClassClassificationMetrics,omitempty"` 2733 // RankingMetrics: Populated for implicit feedback type matrix factorization 2734 // models. 2735 RankingMetrics *RankingMetrics `json:"rankingMetrics,omitempty"` 2736 // RegressionMetrics: Populated for regression models and explicit feedback 2737 // type matrix factorization models. 2738 RegressionMetrics *RegressionMetrics `json:"regressionMetrics,omitempty"` 2739 // ForceSendFields is a list of field names (e.g. "ArimaForecastingMetrics") to 2740 // unconditionally include in API requests. By default, fields with empty or 2741 // default values are omitted from API requests. See 2742 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2743 // details. 2744 ForceSendFields []string `json:"-"` 2745 // NullFields is a list of field names (e.g. "ArimaForecastingMetrics") to 2746 // include in API requests with the JSON null value. By default, fields with 2747 // empty values are omitted from API requests. See 2748 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2749 NullFields []string `json:"-"` 2750 } 2751 2752 func (s *EvaluationMetrics) MarshalJSON() ([]byte, error) { 2753 type NoMethod EvaluationMetrics 2754 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2755 } 2756 2757 // ExplainQueryStage: A single stage of query execution. 2758 type ExplainQueryStage struct { 2759 // CompletedParallelInputs: Number of parallel input segments completed. 2760 CompletedParallelInputs int64 `json:"completedParallelInputs,omitempty,string"` 2761 // ComputeMode: Output only. Compute mode for this stage. 2762 // 2763 // Possible values: 2764 // "COMPUTE_MODE_UNSPECIFIED" - ComputeMode type not specified. 2765 // "BIGQUERY" - This stage was processed using BigQuery slots. 2766 // "BI_ENGINE" - This stage was processed using BI Engine compute. 2767 ComputeMode string `json:"computeMode,omitempty"` 2768 // ComputeMsAvg: Milliseconds the average shard spent on CPU-bound tasks. 2769 ComputeMsAvg int64 `json:"computeMsAvg,omitempty,string"` 2770 // ComputeMsMax: Milliseconds the slowest shard spent on CPU-bound tasks. 2771 ComputeMsMax int64 `json:"computeMsMax,omitempty,string"` 2772 // ComputeRatioAvg: Relative amount of time the average shard spent on 2773 // CPU-bound tasks. 2774 ComputeRatioAvg float64 `json:"computeRatioAvg,omitempty"` 2775 // ComputeRatioMax: Relative amount of time the slowest shard spent on 2776 // CPU-bound tasks. 2777 ComputeRatioMax float64 `json:"computeRatioMax,omitempty"` 2778 // EndMs: Stage end time represented as milliseconds since the epoch. 2779 EndMs int64 `json:"endMs,omitempty,string"` 2780 // Id: Unique ID for the stage within the plan. 2781 Id int64 `json:"id,omitempty,string"` 2782 // InputStages: IDs for stages that are inputs to this stage. 2783 InputStages googleapi.Int64s `json:"inputStages,omitempty"` 2784 // Name: Human-readable name for the stage. 2785 Name string `json:"name,omitempty"` 2786 // ParallelInputs: Number of parallel input segments to be processed 2787 ParallelInputs int64 `json:"parallelInputs,omitempty,string"` 2788 // ReadMsAvg: Milliseconds the average shard spent reading input. 2789 ReadMsAvg int64 `json:"readMsAvg,omitempty,string"` 2790 // ReadMsMax: Milliseconds the slowest shard spent reading input. 2791 ReadMsMax int64 `json:"readMsMax,omitempty,string"` 2792 // ReadRatioAvg: Relative amount of time the average shard spent reading input. 2793 ReadRatioAvg float64 `json:"readRatioAvg,omitempty"` 2794 // ReadRatioMax: Relative amount of time the slowest shard spent reading input. 2795 ReadRatioMax float64 `json:"readRatioMax,omitempty"` 2796 // RecordsRead: Number of records read into the stage. 2797 RecordsRead int64 `json:"recordsRead,omitempty,string"` 2798 // RecordsWritten: Number of records written by the stage. 2799 RecordsWritten int64 `json:"recordsWritten,omitempty,string"` 2800 // ShuffleOutputBytes: Total number of bytes written to shuffle. 2801 ShuffleOutputBytes int64 `json:"shuffleOutputBytes,omitempty,string"` 2802 // ShuffleOutputBytesSpilled: Total number of bytes written to shuffle and 2803 // spilled to disk. 2804 ShuffleOutputBytesSpilled int64 `json:"shuffleOutputBytesSpilled,omitempty,string"` 2805 // SlotMs: Slot-milliseconds used by the stage. 2806 SlotMs int64 `json:"slotMs,omitempty,string"` 2807 // StartMs: Stage start time represented as milliseconds since the epoch. 2808 StartMs int64 `json:"startMs,omitempty,string"` 2809 // Status: Current status for this stage. 2810 Status string `json:"status,omitempty"` 2811 // Steps: List of operations within the stage in dependency order 2812 // (approximately chronological). 2813 Steps []*ExplainQueryStep `json:"steps,omitempty"` 2814 // WaitMsAvg: Milliseconds the average shard spent waiting to be scheduled. 2815 WaitMsAvg int64 `json:"waitMsAvg,omitempty,string"` 2816 // WaitMsMax: Milliseconds the slowest shard spent waiting to be scheduled. 2817 WaitMsMax int64 `json:"waitMsMax,omitempty,string"` 2818 // WaitRatioAvg: Relative amount of time the average shard spent waiting to be 2819 // scheduled. 2820 WaitRatioAvg float64 `json:"waitRatioAvg,omitempty"` 2821 // WaitRatioMax: Relative amount of time the slowest shard spent waiting to be 2822 // scheduled. 2823 WaitRatioMax float64 `json:"waitRatioMax,omitempty"` 2824 // WriteMsAvg: Milliseconds the average shard spent on writing output. 2825 WriteMsAvg int64 `json:"writeMsAvg,omitempty,string"` 2826 // WriteMsMax: Milliseconds the slowest shard spent on writing output. 2827 WriteMsMax int64 `json:"writeMsMax,omitempty,string"` 2828 // WriteRatioAvg: Relative amount of time the average shard spent on writing 2829 // output. 2830 WriteRatioAvg float64 `json:"writeRatioAvg,omitempty"` 2831 // WriteRatioMax: Relative amount of time the slowest shard spent on writing 2832 // output. 2833 WriteRatioMax float64 `json:"writeRatioMax,omitempty"` 2834 // ForceSendFields is a list of field names (e.g. "CompletedParallelInputs") to 2835 // unconditionally include in API requests. By default, fields with empty or 2836 // default values are omitted from API requests. See 2837 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2838 // details. 2839 ForceSendFields []string `json:"-"` 2840 // NullFields is a list of field names (e.g. "CompletedParallelInputs") to 2841 // include in API requests with the JSON null value. By default, fields with 2842 // empty values are omitted from API requests. See 2843 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2844 NullFields []string `json:"-"` 2845 } 2846 2847 func (s *ExplainQueryStage) MarshalJSON() ([]byte, error) { 2848 type NoMethod ExplainQueryStage 2849 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2850 } 2851 2852 func (s *ExplainQueryStage) UnmarshalJSON(data []byte) error { 2853 type NoMethod ExplainQueryStage 2854 var s1 struct { 2855 ComputeRatioAvg gensupport.JSONFloat64 `json:"computeRatioAvg"` 2856 ComputeRatioMax gensupport.JSONFloat64 `json:"computeRatioMax"` 2857 ReadRatioAvg gensupport.JSONFloat64 `json:"readRatioAvg"` 2858 ReadRatioMax gensupport.JSONFloat64 `json:"readRatioMax"` 2859 WaitRatioAvg gensupport.JSONFloat64 `json:"waitRatioAvg"` 2860 WaitRatioMax gensupport.JSONFloat64 `json:"waitRatioMax"` 2861 WriteRatioAvg gensupport.JSONFloat64 `json:"writeRatioAvg"` 2862 WriteRatioMax gensupport.JSONFloat64 `json:"writeRatioMax"` 2863 *NoMethod 2864 } 2865 s1.NoMethod = (*NoMethod)(s) 2866 if err := json.Unmarshal(data, &s1); err != nil { 2867 return err 2868 } 2869 s.ComputeRatioAvg = float64(s1.ComputeRatioAvg) 2870 s.ComputeRatioMax = float64(s1.ComputeRatioMax) 2871 s.ReadRatioAvg = float64(s1.ReadRatioAvg) 2872 s.ReadRatioMax = float64(s1.ReadRatioMax) 2873 s.WaitRatioAvg = float64(s1.WaitRatioAvg) 2874 s.WaitRatioMax = float64(s1.WaitRatioMax) 2875 s.WriteRatioAvg = float64(s1.WriteRatioAvg) 2876 s.WriteRatioMax = float64(s1.WriteRatioMax) 2877 return nil 2878 } 2879 2880 // ExplainQueryStep: An operation within a stage. 2881 type ExplainQueryStep struct { 2882 // Kind: Machine-readable operation type. 2883 Kind string `json:"kind,omitempty"` 2884 // Substeps: Human-readable description of the step(s). 2885 Substeps []string `json:"substeps,omitempty"` 2886 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally 2887 // include in API requests. By default, fields with empty or default values are 2888 // omitted from API requests. See 2889 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2890 // details. 2891 ForceSendFields []string `json:"-"` 2892 // NullFields is a list of field names (e.g. "Kind") to include in API requests 2893 // with the JSON null value. By default, fields with empty values are omitted 2894 // from API requests. See 2895 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2896 NullFields []string `json:"-"` 2897 } 2898 2899 func (s *ExplainQueryStep) MarshalJSON() ([]byte, error) { 2900 type NoMethod ExplainQueryStep 2901 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2902 } 2903 2904 // Explanation: Explanation for a single feature. 2905 type Explanation struct { 2906 // Attribution: Attribution of feature. 2907 Attribution float64 `json:"attribution,omitempty"` 2908 // FeatureName: The full feature name. For non-numerical features, will be 2909 // formatted like `.`. Overall size of feature name will always be truncated to 2910 // first 120 characters. 2911 FeatureName string `json:"featureName,omitempty"` 2912 // ForceSendFields is a list of field names (e.g. "Attribution") to 2913 // unconditionally include in API requests. By default, fields with empty or 2914 // default values are omitted from API requests. See 2915 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2916 // details. 2917 ForceSendFields []string `json:"-"` 2918 // NullFields is a list of field names (e.g. "Attribution") to include in API 2919 // requests with the JSON null value. By default, fields with empty values are 2920 // omitted from API requests. See 2921 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2922 NullFields []string `json:"-"` 2923 } 2924 2925 func (s *Explanation) MarshalJSON() ([]byte, error) { 2926 type NoMethod Explanation 2927 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2928 } 2929 2930 func (s *Explanation) UnmarshalJSON(data []byte) error { 2931 type NoMethod Explanation 2932 var s1 struct { 2933 Attribution gensupport.JSONFloat64 `json:"attribution"` 2934 *NoMethod 2935 } 2936 s1.NoMethod = (*NoMethod)(s) 2937 if err := json.Unmarshal(data, &s1); err != nil { 2938 return err 2939 } 2940 s.Attribution = float64(s1.Attribution) 2941 return nil 2942 } 2943 2944 // ExportDataStatistics: Statistics for the EXPORT DATA statement as part of 2945 // Query Job. EXTRACT JOB statistics are populated in JobStatistics4. 2946 type ExportDataStatistics struct { 2947 // FileCount: Number of destination files generated in case of EXPORT DATA 2948 // statement only. 2949 FileCount int64 `json:"fileCount,omitempty,string"` 2950 // RowCount: [Alpha] Number of destination rows generated in case of EXPORT 2951 // DATA statement only. 2952 RowCount int64 `json:"rowCount,omitempty,string"` 2953 // ForceSendFields is a list of field names (e.g. "FileCount") to 2954 // unconditionally include in API requests. By default, fields with empty or 2955 // default values are omitted from API requests. See 2956 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2957 // details. 2958 ForceSendFields []string `json:"-"` 2959 // NullFields is a list of field names (e.g. "FileCount") to include in API 2960 // requests with the JSON null value. By default, fields with empty values are 2961 // omitted from API requests. See 2962 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2963 NullFields []string `json:"-"` 2964 } 2965 2966 func (s *ExportDataStatistics) MarshalJSON() ([]byte, error) { 2967 type NoMethod ExportDataStatistics 2968 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2969 } 2970 2971 // Expr: Represents a textual expression in the Common Expression Language 2972 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics 2973 // of CEL are documented at https://github.com/google/cel-spec. Example 2974 // (Comparison): title: "Summary size limit" description: "Determines if a 2975 // summary is less than 100 chars" expression: "document.summary.size() < 100" 2976 // Example (Equality): title: "Requestor is owner" description: "Determines if 2977 // requestor is the document owner" expression: "document.owner == 2978 // request.auth.claims.email" Example (Logic): title: "Public documents" 2979 // description: "Determine whether the document should be publicly visible" 2980 // expression: "document.type != 'private' && document.type != 'internal'" 2981 // Example (Data Manipulation): title: "Notification string" description: 2982 // "Create a notification string with a timestamp." expression: "'New message 2983 // received at ' + string(document.create_time)" The exact variables and 2984 // functions that may be referenced within an expression are determined by the 2985 // service that evaluates it. See the service documentation for additional 2986 // information. 2987 type Expr struct { 2988 // Description: Optional. Description of the expression. This is a longer text 2989 // which describes the expression, e.g. when hovered over it in a UI. 2990 Description string `json:"description,omitempty"` 2991 // Expression: Textual representation of an expression in Common Expression 2992 // Language syntax. 2993 Expression string `json:"expression,omitempty"` 2994 // Location: Optional. String indicating the location of the expression for 2995 // error reporting, e.g. a file name and a position in the file. 2996 Location string `json:"location,omitempty"` 2997 // Title: Optional. Title for the expression, i.e. a short string describing 2998 // its purpose. This can be used e.g. in UIs which allow to enter the 2999 // expression. 3000 Title string `json:"title,omitempty"` 3001 // ForceSendFields is a list of field names (e.g. "Description") to 3002 // unconditionally include in API requests. By default, fields with empty or 3003 // default values are omitted from API requests. See 3004 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3005 // details. 3006 ForceSendFields []string `json:"-"` 3007 // NullFields is a list of field names (e.g. "Description") to include in API 3008 // requests with the JSON null value. By default, fields with empty values are 3009 // omitted from API requests. See 3010 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3011 NullFields []string `json:"-"` 3012 } 3013 3014 func (s *Expr) MarshalJSON() ([]byte, error) { 3015 type NoMethod Expr 3016 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3017 } 3018 3019 // ExternalCatalogDatasetOptions: Options defining open source compatible 3020 // datasets living in the BigQuery catalog. Contains metadata of open source 3021 // database, schema or namespace represented by the current dataset. 3022 type ExternalCatalogDatasetOptions struct { 3023 // DefaultStorageLocationUri: Optional. The storage location URI for all tables 3024 // in the dataset. Equivalent to hive metastore's database locationUri. Maximum 3025 // length of 1024 characters. 3026 DefaultStorageLocationUri string `json:"defaultStorageLocationUri,omitempty"` 3027 // Parameters: Optional. A map of key value pairs defining the parameters and 3028 // properties of the open source schema. Maximum size of 2Mib. 3029 Parameters map[string]string `json:"parameters,omitempty"` 3030 // ForceSendFields is a list of field names (e.g. "DefaultStorageLocationUri") 3031 // to unconditionally include in API requests. By default, fields with empty or 3032 // default values are omitted from API requests. See 3033 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3034 // details. 3035 ForceSendFields []string `json:"-"` 3036 // NullFields is a list of field names (e.g. "DefaultStorageLocationUri") to 3037 // include in API requests with the JSON null value. By default, fields with 3038 // empty values are omitted from API requests. See 3039 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3040 NullFields []string `json:"-"` 3041 } 3042 3043 func (s *ExternalCatalogDatasetOptions) MarshalJSON() ([]byte, error) { 3044 type NoMethod ExternalCatalogDatasetOptions 3045 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3046 } 3047 3048 // ExternalCatalogTableOptions: Metadata about open source compatible table. 3049 // The fields contained in these options correspond to hive metastore's table 3050 // level properties. 3051 type ExternalCatalogTableOptions struct { 3052 // ConnectionId: Optional. The connection specifying the credentials to be used 3053 // to read external storage, such as Azure Blob, Cloud Storage, or S3. The 3054 // connection is needed to read the open source table from BigQuery Engine. The 3055 // connection_id can have the form `..` or `projects//locations//connections/`. 3056 ConnectionId string `json:"connectionId,omitempty"` 3057 // Parameters: Optional. A map of key value pairs defining the parameters and 3058 // properties of the open source table. Corresponds with hive meta store table 3059 // parameters. Maximum size of 4Mib. 3060 Parameters map[string]string `json:"parameters,omitempty"` 3061 // StorageDescriptor: Optional. A storage descriptor containing information 3062 // about the physical storage of this table. 3063 StorageDescriptor *StorageDescriptor `json:"storageDescriptor,omitempty"` 3064 // ForceSendFields is a list of field names (e.g. "ConnectionId") to 3065 // unconditionally include in API requests. By default, fields with empty or 3066 // default values are omitted from API requests. See 3067 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3068 // details. 3069 ForceSendFields []string `json:"-"` 3070 // NullFields is a list of field names (e.g. "ConnectionId") to include in API 3071 // requests with the JSON null value. By default, fields with empty values are 3072 // omitted from API requests. See 3073 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3074 NullFields []string `json:"-"` 3075 } 3076 3077 func (s *ExternalCatalogTableOptions) MarshalJSON() ([]byte, error) { 3078 type NoMethod ExternalCatalogTableOptions 3079 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3080 } 3081 3082 type ExternalDataConfiguration struct { 3083 // Autodetect: Try to detect schema and format options automatically. Any 3084 // option specified explicitly will be honored. 3085 Autodetect bool `json:"autodetect,omitempty"` 3086 // AvroOptions: Optional. Additional properties to set if sourceFormat is set 3087 // to AVRO. 3088 AvroOptions *AvroOptions `json:"avroOptions,omitempty"` 3089 // BigtableOptions: Optional. Additional options if sourceFormat is set to 3090 // BIGTABLE. 3091 BigtableOptions *BigtableOptions `json:"bigtableOptions,omitempty"` 3092 // Compression: Optional. The compression type of the data source. Possible 3093 // values include GZIP and NONE. The default value is NONE. This setting is 3094 // ignored for Google Cloud Bigtable, Google Cloud Datastore backups, Avro, ORC 3095 // and Parquet formats. An empty string is an invalid value. 3096 Compression string `json:"compression,omitempty"` 3097 // ConnectionId: Optional. The connection specifying the credentials to be used 3098 // to read external storage, such as Azure Blob, Cloud Storage, or S3. The 3099 // connection_id can have the form 3100 // "<project\_id>.<location\_id>.<connection\_id>" or 3101 // "projects/<project\_id>/locations/<location\_id>/connections/<connection\_id> 3102 // ". 3103 ConnectionId string `json:"connectionId,omitempty"` 3104 // CsvOptions: Optional. Additional properties to set if sourceFormat is set to 3105 // CSV. 3106 CsvOptions *CsvOptions `json:"csvOptions,omitempty"` 3107 // DecimalTargetTypes: Defines the list of possible SQL data types to which the 3108 // source decimal values are converted. This list and the precision and the 3109 // scale parameters of the decimal field determine the target type. In the 3110 // order of NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in the 3111 // specified list and if it supports the precision and the scale. STRING 3112 // supports all precision and scale values. If none of the listed types 3113 // supports the precision and the scale, the type supporting the widest range 3114 // in the specified list is picked, and if a value exceeds the supported range 3115 // when reading the data, an error will be thrown. Example: Suppose the value 3116 // of this field is ["NUMERIC", "BIGNUMERIC"]. If (precision,scale) is: * 3117 // (38,9) -> NUMERIC; * (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer 3118 // digits); * (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); 3119 // * (76,38) -> BIGNUMERIC; * (77,38) -> BIGNUMERIC (error if value exeeds 3120 // supported range). This field cannot contain duplicate types. The order of 3121 // the types in this field is ignored. For example, ["BIGNUMERIC", "NUMERIC"] 3122 // is the same as ["NUMERIC", "BIGNUMERIC"] and NUMERIC always takes precedence 3123 // over BIGNUMERIC. Defaults to ["NUMERIC", "STRING"] for ORC and ["NUMERIC"] 3124 // for the other file formats. 3125 // 3126 // Possible values: 3127 // "DECIMAL_TARGET_TYPE_UNSPECIFIED" - Invalid type. 3128 // "NUMERIC" - Decimal values could be converted to NUMERIC type. 3129 // "BIGNUMERIC" - Decimal values could be converted to BIGNUMERIC type. 3130 // "STRING" - Decimal values could be converted to STRING type. 3131 DecimalTargetTypes []string `json:"decimalTargetTypes,omitempty"` 3132 // FileSetSpecType: Optional. Specifies how source URIs are interpreted for 3133 // constructing the file set to load. By default source URIs are expanded 3134 // against the underlying storage. Other options include specifying manifest 3135 // files. Only applicable to object storage systems. 3136 // 3137 // Possible values: 3138 // "FILE_SET_SPEC_TYPE_FILE_SYSTEM_MATCH" - This option expands source URIs 3139 // by listing files from the object store. It is the default behavior if 3140 // FileSetSpecType is not set. 3141 // "FILE_SET_SPEC_TYPE_NEW_LINE_DELIMITED_MANIFEST" - This option indicates 3142 // that the provided URIs are newline-delimited manifest files, with one URI 3143 // per line. Wildcard URIs are not supported. 3144 FileSetSpecType string `json:"fileSetSpecType,omitempty"` 3145 // GoogleSheetsOptions: Optional. Additional options if sourceFormat is set to 3146 // GOOGLE_SHEETS. 3147 GoogleSheetsOptions *GoogleSheetsOptions `json:"googleSheetsOptions,omitempty"` 3148 // HivePartitioningOptions: Optional. When set, configures hive partitioning 3149 // support. Not all storage formats support hive partitioning -- requesting 3150 // hive partitioning on an unsupported format will lead to an error, as will 3151 // providing an invalid specification. 3152 HivePartitioningOptions *HivePartitioningOptions `json:"hivePartitioningOptions,omitempty"` 3153 // IgnoreUnknownValues: Optional. Indicates if BigQuery should allow extra 3154 // values that are not represented in the table schema. If true, the extra 3155 // values are ignored. If false, records with extra columns are treated as bad 3156 // records, and if there are too many bad records, an invalid error is returned 3157 // in the job result. The default value is false. The sourceFormat property 3158 // determines what BigQuery treats as an extra value: CSV: Trailing columns 3159 // JSON: Named values that don't match any column names Google Cloud Bigtable: 3160 // This setting is ignored. Google Cloud Datastore backups: This setting is 3161 // ignored. Avro: This setting is ignored. ORC: This setting is ignored. 3162 // Parquet: This setting is ignored. 3163 IgnoreUnknownValues bool `json:"ignoreUnknownValues,omitempty"` 3164 // JsonExtension: Optional. Load option to be used together with source_format 3165 // newline-delimited JSON to indicate that a variant of JSON is being loaded. 3166 // To load newline-delimited GeoJSON, specify GEOJSON (and source_format must 3167 // be set to NEWLINE_DELIMITED_JSON). 3168 // 3169 // Possible values: 3170 // "JSON_EXTENSION_UNSPECIFIED" - The default if provided value is not one 3171 // included in the enum, or the value is not specified. The source formate is 3172 // parsed without any modification. 3173 // "GEOJSON" - Use GeoJSON variant of JSON. See 3174 // https://tools.ietf.org/html/rfc7946. 3175 JsonExtension string `json:"jsonExtension,omitempty"` 3176 // JsonOptions: Optional. Additional properties to set if sourceFormat is set 3177 // to JSON. 3178 JsonOptions *JsonOptions `json:"jsonOptions,omitempty"` 3179 // MaxBadRecords: Optional. The maximum number of bad records that BigQuery can 3180 // ignore when reading data. If the number of bad records exceeds this value, 3181 // an invalid error is returned in the job result. The default value is 0, 3182 // which requires that all records are valid. This setting is ignored for 3183 // Google Cloud Bigtable, Google Cloud Datastore backups, Avro, ORC and Parquet 3184 // formats. 3185 MaxBadRecords int64 `json:"maxBadRecords,omitempty"` 3186 // MetadataCacheMode: Optional. Metadata Cache Mode for the table. Set this to 3187 // enable caching of metadata from external data source. 3188 // 3189 // Possible values: 3190 // "METADATA_CACHE_MODE_UNSPECIFIED" - Unspecified metadata cache mode. 3191 // "AUTOMATIC" - Set this mode to trigger automatic background refresh of 3192 // metadata cache from the external source. Queries will use the latest 3193 // available cache version within the table's maxStaleness interval. 3194 // "MANUAL" - Set this mode to enable triggering manual refresh of the 3195 // metadata cache from external source. Queries will use the latest manually 3196 // triggered cache version within the table's maxStaleness interval. 3197 MetadataCacheMode string `json:"metadataCacheMode,omitempty"` 3198 // ObjectMetadata: Optional. ObjectMetadata is used to create Object Tables. 3199 // Object Tables contain a listing of objects (with their metadata) found at 3200 // the source_uris. If ObjectMetadata is set, source_format should be omitted. 3201 // Currently SIMPLE is the only supported Object Metadata type. 3202 // 3203 // Possible values: 3204 // "OBJECT_METADATA_UNSPECIFIED" - Unspecified by default. 3205 // "DIRECTORY" - A synonym for `SIMPLE`. 3206 // "SIMPLE" - Directory listing of objects. 3207 ObjectMetadata string `json:"objectMetadata,omitempty"` 3208 // ParquetOptions: Optional. Additional properties to set if sourceFormat is 3209 // set to PARQUET. 3210 ParquetOptions *ParquetOptions `json:"parquetOptions,omitempty"` 3211 // ReferenceFileSchemaUri: Optional. When creating an external table, the user 3212 // can provide a reference file with the table schema. This is enabled for the 3213 // following formats: AVRO, PARQUET, ORC. 3214 ReferenceFileSchemaUri string `json:"referenceFileSchemaUri,omitempty"` 3215 // Schema: Optional. The schema for the data. Schema is required for CSV and 3216 // JSON formats if autodetect is not on. Schema is disallowed for Google Cloud 3217 // Bigtable, Cloud Datastore backups, Avro, ORC and Parquet formats. 3218 Schema *TableSchema `json:"schema,omitempty"` 3219 // SourceFormat: [Required] The data format. For CSV files, specify "CSV". For 3220 // Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify 3221 // "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud 3222 // Datastore backups, specify "DATASTORE_BACKUP". For Apache Iceberg tables, 3223 // specify "ICEBERG". For ORC files, specify "ORC". For Parquet files, specify 3224 // "PARQUET". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". 3225 SourceFormat string `json:"sourceFormat,omitempty"` 3226 // SourceUris: [Required] The fully-qualified URIs that point to your data in 3227 // Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' 3228 // wildcard character and it must come after the 'bucket' name. Size limits 3229 // related to load jobs apply to external data sources. For Google Cloud 3230 // Bigtable URIs: Exactly one URI can be specified and it has be a fully 3231 // specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google 3232 // Cloud Datastore backups, exactly one URI can be specified. Also, the '*' 3233 // wildcard character is not allowed. 3234 SourceUris []string `json:"sourceUris,omitempty"` 3235 // ForceSendFields is a list of field names (e.g. "Autodetect") to 3236 // unconditionally include in API requests. By default, fields with empty or 3237 // default values are omitted from API requests. See 3238 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3239 // details. 3240 ForceSendFields []string `json:"-"` 3241 // NullFields is a list of field names (e.g. "Autodetect") to include in API 3242 // requests with the JSON null value. By default, fields with empty values are 3243 // omitted from API requests. See 3244 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3245 NullFields []string `json:"-"` 3246 } 3247 3248 func (s *ExternalDataConfiguration) MarshalJSON() ([]byte, error) { 3249 type NoMethod ExternalDataConfiguration 3250 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3251 } 3252 3253 // ExternalDatasetReference: Configures the access a dataset defined in an 3254 // external metadata storage. 3255 type ExternalDatasetReference struct { 3256 // Connection: Required. The connection id that is used to access the 3257 // external_source. Format: 3258 // projects/{project_id}/locations/{location_id}/connections/{connection_id} 3259 Connection string `json:"connection,omitempty"` 3260 // ExternalSource: Required. External source that backs this dataset. 3261 ExternalSource string `json:"externalSource,omitempty"` 3262 // ForceSendFields is a list of field names (e.g. "Connection") to 3263 // unconditionally include in API requests. By default, fields with empty or 3264 // default values are omitted from API requests. See 3265 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3266 // details. 3267 ForceSendFields []string `json:"-"` 3268 // NullFields is a list of field names (e.g. "Connection") to include in API 3269 // requests with the JSON null value. By default, fields with empty values are 3270 // omitted from API requests. See 3271 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3272 NullFields []string `json:"-"` 3273 } 3274 3275 func (s *ExternalDatasetReference) MarshalJSON() ([]byte, error) { 3276 type NoMethod ExternalDatasetReference 3277 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3278 } 3279 3280 // ExternalServiceCost: The external service cost is a portion of the total 3281 // cost, these costs are not additive with total_bytes_billed. Moreover, this 3282 // field only track external service costs that will show up as BigQuery costs 3283 // (e.g. training BigQuery ML job with google cloud CAIP or Automl Tables 3284 // services), not other costs which may be accrued by running the query (e.g. 3285 // reading from Bigtable or Cloud Storage). The external service costs with 3286 // different billing sku (e.g. CAIP job is charged based on VM usage) are 3287 // converted to BigQuery billed_bytes and slot_ms with equivalent amount of US 3288 // dollars. Services may not directly correlate to these metrics, but these are 3289 // the equivalents for billing purposes. Output only. 3290 type ExternalServiceCost struct { 3291 // BytesBilled: External service cost in terms of bigquery bytes billed. 3292 BytesBilled int64 `json:"bytesBilled,omitempty,string"` 3293 // BytesProcessed: External service cost in terms of bigquery bytes processed. 3294 BytesProcessed int64 `json:"bytesProcessed,omitempty,string"` 3295 // ExternalService: External service name. 3296 ExternalService string `json:"externalService,omitempty"` 3297 // ReservedSlotCount: Non-preemptable reserved slots used for external job. For 3298 // example, reserved slots for Cloua AI Platform job are the VM usages 3299 // converted to BigQuery slot with equivalent mount of price. 3300 ReservedSlotCount int64 `json:"reservedSlotCount,omitempty,string"` 3301 // SlotMs: External service cost in terms of bigquery slot milliseconds. 3302 SlotMs int64 `json:"slotMs,omitempty,string"` 3303 // ForceSendFields is a list of field names (e.g. "BytesBilled") to 3304 // unconditionally include in API requests. By default, fields with empty or 3305 // default values are omitted from API requests. See 3306 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3307 // details. 3308 ForceSendFields []string `json:"-"` 3309 // NullFields is a list of field names (e.g. "BytesBilled") to include in API 3310 // requests with the JSON null value. By default, fields with empty values are 3311 // omitted from API requests. See 3312 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3313 NullFields []string `json:"-"` 3314 } 3315 3316 func (s *ExternalServiceCost) MarshalJSON() ([]byte, error) { 3317 type NoMethod ExternalServiceCost 3318 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3319 } 3320 3321 // FeatureValue: Representative value of a single feature within the cluster. 3322 type FeatureValue struct { 3323 // CategoricalValue: The categorical feature value. 3324 CategoricalValue *CategoricalValue `json:"categoricalValue,omitempty"` 3325 // FeatureColumn: The feature column name. 3326 FeatureColumn string `json:"featureColumn,omitempty"` 3327 // NumericalValue: The numerical feature value. This is the centroid value for 3328 // this feature. 3329 NumericalValue float64 `json:"numericalValue,omitempty"` 3330 // ForceSendFields is a list of field names (e.g. "CategoricalValue") to 3331 // unconditionally include in API requests. By default, fields with empty or 3332 // default values are omitted from API requests. See 3333 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3334 // details. 3335 ForceSendFields []string `json:"-"` 3336 // NullFields is a list of field names (e.g. "CategoricalValue") to include in 3337 // API requests with the JSON null value. By default, fields with empty values 3338 // are omitted from API requests. See 3339 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3340 NullFields []string `json:"-"` 3341 } 3342 3343 func (s *FeatureValue) MarshalJSON() ([]byte, error) { 3344 type NoMethod FeatureValue 3345 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3346 } 3347 3348 func (s *FeatureValue) UnmarshalJSON(data []byte) error { 3349 type NoMethod FeatureValue 3350 var s1 struct { 3351 NumericalValue gensupport.JSONFloat64 `json:"numericalValue"` 3352 *NoMethod 3353 } 3354 s1.NoMethod = (*NoMethod)(s) 3355 if err := json.Unmarshal(data, &s1); err != nil { 3356 return err 3357 } 3358 s.NumericalValue = float64(s1.NumericalValue) 3359 return nil 3360 } 3361 3362 // ForeignTypeInfo: Metadata about the foreign data type definition such as the 3363 // system in which the type is defined. 3364 type ForeignTypeInfo struct { 3365 // TypeSystem: Required. Specifies the system which defines the foreign data 3366 // type. 3367 // 3368 // Possible values: 3369 // "TYPE_SYSTEM_UNSPECIFIED" - TypeSystem not specified. 3370 // "HIVE" - Represents Hive data types. 3371 TypeSystem string `json:"typeSystem,omitempty"` 3372 // ForceSendFields is a list of field names (e.g. "TypeSystem") to 3373 // unconditionally include in API requests. By default, fields with empty or 3374 // default values are omitted from API requests. See 3375 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3376 // details. 3377 ForceSendFields []string `json:"-"` 3378 // NullFields is a list of field names (e.g. "TypeSystem") to include in API 3379 // requests with the JSON null value. By default, fields with empty values are 3380 // omitted from API requests. See 3381 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3382 NullFields []string `json:"-"` 3383 } 3384 3385 func (s *ForeignTypeInfo) MarshalJSON() ([]byte, error) { 3386 type NoMethod ForeignTypeInfo 3387 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3388 } 3389 3390 // GetIamPolicyRequest: Request message for `GetIamPolicy` method. 3391 type GetIamPolicyRequest struct { 3392 // Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to 3393 // `GetIamPolicy`. 3394 Options *GetPolicyOptions `json:"options,omitempty"` 3395 // ForceSendFields is a list of field names (e.g. "Options") to unconditionally 3396 // include in API requests. By default, fields with empty or default values are 3397 // omitted from API requests. See 3398 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3399 // details. 3400 ForceSendFields []string `json:"-"` 3401 // NullFields is a list of field names (e.g. "Options") to include in API 3402 // requests with the JSON null value. By default, fields with empty values are 3403 // omitted from API requests. See 3404 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3405 NullFields []string `json:"-"` 3406 } 3407 3408 func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) { 3409 type NoMethod GetIamPolicyRequest 3410 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3411 } 3412 3413 // GetPolicyOptions: Encapsulates settings provided to GetIamPolicy. 3414 type GetPolicyOptions struct { 3415 // RequestedPolicyVersion: Optional. The maximum policy version that will be 3416 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying 3417 // an invalid value will be rejected. Requests for policies with any 3418 // conditional role bindings must specify version 3. Policies with no 3419 // conditional role bindings may specify any valid value or leave the field 3420 // unset. The policy in the response might use the policy version that you 3421 // specified, or it might use a lower policy version. For example, if you 3422 // specify version 3, but the policy has no conditional role bindings, the 3423 // response uses version 1. To learn which resources support conditions in 3424 // their IAM policies, see the IAM documentation 3425 // (https://cloud.google.com/iam/help/conditions/resource-policies). 3426 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"` 3427 // ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to 3428 // unconditionally include in API requests. By default, fields with empty or 3429 // default values are omitted from API requests. See 3430 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3431 // details. 3432 ForceSendFields []string `json:"-"` 3433 // NullFields is a list of field names (e.g. "RequestedPolicyVersion") to 3434 // include in API requests with the JSON null value. By default, fields with 3435 // empty values are omitted from API requests. See 3436 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3437 NullFields []string `json:"-"` 3438 } 3439 3440 func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { 3441 type NoMethod GetPolicyOptions 3442 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3443 } 3444 3445 // GetQueryResultsResponse: Response object of GetQueryResults. 3446 type GetQueryResultsResponse struct { 3447 // CacheHit: Whether the query result was fetched from the query cache. 3448 CacheHit bool `json:"cacheHit,omitempty"` 3449 // Errors: Output only. The first errors or warnings encountered during the 3450 // running of the job. The final message includes the number of errors that 3451 // caused the process to stop. Errors here do not necessarily mean that the job 3452 // has completed or was unsuccessful. For more information about error 3453 // messages, see Error messages 3454 // (https://cloud.google.com/bigquery/docs/error-messages). 3455 Errors []*ErrorProto `json:"errors,omitempty"` 3456 // Etag: A hash of this response. 3457 Etag string `json:"etag,omitempty"` 3458 // JobComplete: Whether the query has completed or not. If rows or totalRows 3459 // are present, this will always be true. If this is false, totalRows will not 3460 // be available. 3461 JobComplete bool `json:"jobComplete,omitempty"` 3462 // JobReference: Reference to the BigQuery Job that was created to run the 3463 // query. This field will be present even if the original request timed out, in 3464 // which case GetQueryResults can be used to read the results once the query 3465 // has completed. Since this API only returns the first page of results, 3466 // subsequent pages can be fetched via the same mechanism (GetQueryResults). 3467 JobReference *JobReference `json:"jobReference,omitempty"` 3468 // Kind: The resource type of the response. 3469 Kind string `json:"kind,omitempty"` 3470 // NumDmlAffectedRows: Output only. The number of rows affected by a DML 3471 // statement. Present only for DML statements INSERT, UPDATE or DELETE. 3472 NumDmlAffectedRows int64 `json:"numDmlAffectedRows,omitempty,string"` 3473 // PageToken: A token used for paging results. When this token is non-empty, it 3474 // indicates additional results are available. 3475 PageToken string `json:"pageToken,omitempty"` 3476 // Rows: An object with as many results as can be contained within the maximum 3477 // permitted reply size. To get any additional rows, you can call 3478 // GetQueryResults and specify the jobReference returned above. Present only 3479 // when the query completes successfully. The REST-based representation of this 3480 // data leverages a series of JSON f,v objects for indicating fields and 3481 // values. 3482 Rows []*TableRow `json:"rows,omitempty"` 3483 // Schema: The schema of the results. Present only when the query completes 3484 // successfully. 3485 Schema *TableSchema `json:"schema,omitempty"` 3486 // TotalBytesProcessed: The total number of bytes processed for this query. 3487 TotalBytesProcessed int64 `json:"totalBytesProcessed,omitempty,string"` 3488 // TotalRows: The total number of rows in the complete query result set, which 3489 // can be more than the number of rows in this single page of results. Present 3490 // only when the query completes successfully. 3491 TotalRows uint64 `json:"totalRows,omitempty,string"` 3492 3493 // ServerResponse contains the HTTP response code and headers from the server. 3494 googleapi.ServerResponse `json:"-"` 3495 // ForceSendFields is a list of field names (e.g. "CacheHit") to 3496 // unconditionally include in API requests. By default, fields with empty or 3497 // default values are omitted from API requests. See 3498 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3499 // details. 3500 ForceSendFields []string `json:"-"` 3501 // NullFields is a list of field names (e.g. "CacheHit") to include in API 3502 // requests with the JSON null value. By default, fields with empty values are 3503 // omitted from API requests. See 3504 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3505 NullFields []string `json:"-"` 3506 } 3507 3508 func (s *GetQueryResultsResponse) MarshalJSON() ([]byte, error) { 3509 type NoMethod GetQueryResultsResponse 3510 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3511 } 3512 3513 // GetServiceAccountResponse: Response object of GetServiceAccount 3514 type GetServiceAccountResponse struct { 3515 // Email: The service account email address. 3516 Email string `json:"email,omitempty"` 3517 // Kind: The resource type of the response. 3518 Kind string `json:"kind,omitempty"` 3519 3520 // ServerResponse contains the HTTP response code and headers from the server. 3521 googleapi.ServerResponse `json:"-"` 3522 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally 3523 // include in API requests. By default, fields with empty or default values are 3524 // omitted from API requests. See 3525 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3526 // details. 3527 ForceSendFields []string `json:"-"` 3528 // NullFields is a list of field names (e.g. "Email") to include in API 3529 // requests with the JSON null value. By default, fields with empty values are 3530 // omitted from API requests. See 3531 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3532 NullFields []string `json:"-"` 3533 } 3534 3535 func (s *GetServiceAccountResponse) MarshalJSON() ([]byte, error) { 3536 type NoMethod GetServiceAccountResponse 3537 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3538 } 3539 3540 // GlobalExplanation: Global explanations containing the top most important 3541 // features after training. 3542 type GlobalExplanation struct { 3543 // ClassLabel: Class label for this set of global explanations. Will be 3544 // empty/null for binary logistic and linear regression models. Sorted 3545 // alphabetically in descending order. 3546 ClassLabel string `json:"classLabel,omitempty"` 3547 // Explanations: A list of the top global explanations. Sorted by absolute 3548 // value of attribution in descending order. 3549 Explanations []*Explanation `json:"explanations,omitempty"` 3550 // ForceSendFields is a list of field names (e.g. "ClassLabel") to 3551 // unconditionally include in API requests. By default, fields with empty or 3552 // default values are omitted from API requests. See 3553 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3554 // details. 3555 ForceSendFields []string `json:"-"` 3556 // NullFields is a list of field names (e.g. "ClassLabel") to include in API 3557 // requests with the JSON null value. By default, fields with empty values are 3558 // omitted from API requests. See 3559 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3560 NullFields []string `json:"-"` 3561 } 3562 3563 func (s *GlobalExplanation) MarshalJSON() ([]byte, error) { 3564 type NoMethod GlobalExplanation 3565 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3566 } 3567 3568 // GoogleSheetsOptions: Options specific to Google Sheets data sources. 3569 type GoogleSheetsOptions struct { 3570 // Range: Optional. Range of a sheet to query from. Only used when non-empty. 3571 // Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For 3572 // example: sheet1!A1:B20 3573 Range string `json:"range,omitempty"` 3574 // SkipLeadingRows: Optional. The number of rows at the top of a sheet that 3575 // BigQuery will skip when reading the data. The default value is 0. This 3576 // property is useful if you have header rows that should be skipped. When 3577 // autodetect is on, the behavior is the following: * skipLeadingRows 3578 // unspecified - Autodetect tries to detect headers in the first row. If they 3579 // are not detected, the row is read as data. Otherwise data is read starting 3580 // from the second row. * skipLeadingRows is 0 - Instructs autodetect that 3581 // there are no headers and data should be read starting from the first row. * 3582 // skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect 3583 // headers in row N. If headers are not detected, row N is just skipped. 3584 // Otherwise row N is used to extract column names for the detected schema. 3585 SkipLeadingRows int64 `json:"skipLeadingRows,omitempty,string"` 3586 // ForceSendFields is a list of field names (e.g. "Range") 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. "Range") 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 *GoogleSheetsOptions) MarshalJSON() ([]byte, error) { 3600 type NoMethod GoogleSheetsOptions 3601 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3602 } 3603 3604 // HighCardinalityJoin: High cardinality join detailed information. 3605 type HighCardinalityJoin struct { 3606 // LeftRows: Output only. Count of left input rows. 3607 LeftRows int64 `json:"leftRows,omitempty,string"` 3608 // OutputRows: Output only. Count of the output rows. 3609 OutputRows int64 `json:"outputRows,omitempty,string"` 3610 // RightRows: Output only. Count of right input rows. 3611 RightRows int64 `json:"rightRows,omitempty,string"` 3612 // StepIndex: Output only. The index of the join operator in the 3613 // ExplainQueryStep lists. 3614 StepIndex int64 `json:"stepIndex,omitempty"` 3615 // ForceSendFields is a list of field names (e.g. "LeftRows") to 3616 // unconditionally include in API requests. By default, fields with empty or 3617 // default values are omitted from API requests. See 3618 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3619 // details. 3620 ForceSendFields []string `json:"-"` 3621 // NullFields is a list of field names (e.g. "LeftRows") to include in API 3622 // requests with the JSON null value. By default, fields with empty values are 3623 // omitted from API requests. See 3624 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3625 NullFields []string `json:"-"` 3626 } 3627 3628 func (s *HighCardinalityJoin) MarshalJSON() ([]byte, error) { 3629 type NoMethod HighCardinalityJoin 3630 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3631 } 3632 3633 // HivePartitioningOptions: Options for configuring hive partitioning detect. 3634 type HivePartitioningOptions struct { 3635 // Fields: Output only. For permanent external tables, this field is populated 3636 // with the hive partition keys in the order they were inferred. The types of 3637 // the partition keys can be deduced by checking the table schema (which will 3638 // include the partition keys). Not every API will populate this field in the 3639 // output. For example, Tables.Get will populate it, but Tables.List will not 3640 // contain this field. 3641 Fields []string `json:"fields,omitempty"` 3642 // Mode: Optional. When set, what mode of hive partitioning to use when reading 3643 // data. The following modes are supported: * AUTO: automatically infer 3644 // partition key name(s) and type(s). * STRINGS: automatically infer partition 3645 // key name(s). All types are strings. * CUSTOM: partition key schema is 3646 // encoded in the source URI prefix. Not all storage formats support hive 3647 // partitioning. Requesting hive partitioning on an unsupported format will 3648 // lead to an error. Currently supported formats are: JSON, CSV, ORC, Avro and 3649 // Parquet. 3650 Mode string `json:"mode,omitempty"` 3651 // RequirePartitionFilter: Optional. If set to true, queries over this table 3652 // require a partition filter that can be used for partition elimination to be 3653 // specified. Note that this field should only be true when creating a 3654 // permanent external table or querying a temporary external table. 3655 // Hive-partitioned loads with require_partition_filter explicitly set to true 3656 // will fail. 3657 RequirePartitionFilter bool `json:"requirePartitionFilter,omitempty"` 3658 // SourceUriPrefix: Optional. When hive partition detection is requested, a 3659 // common prefix for all source uris must be required. The prefix must end 3660 // immediately before the partition key encoding begins. For example, consider 3661 // files following this data layout: 3662 // gs://bucket/path_to_table/dt=2019-06-01/country=USA/id=7/file.avro 3663 // gs://bucket/path_to_table/dt=2019-05-31/country=CA/id=3/file.avro When hive 3664 // partitioning is requested with either AUTO or STRINGS detection, the common 3665 // prefix can be either of gs://bucket/path_to_table or 3666 // gs://bucket/path_to_table/. CUSTOM detection requires encoding the 3667 // partitioning schema immediately after the common prefix. For CUSTOM, any of 3668 // * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:INTEGER} * 3669 // gs://bucket/path_to_table/{dt:STRING}/{country:STRING}/{id:INTEGER} * 3670 // gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:STRING} would all 3671 // be valid source URI prefixes. 3672 SourceUriPrefix string `json:"sourceUriPrefix,omitempty"` 3673 // ForceSendFields is a list of field names (e.g. "Fields") to unconditionally 3674 // include in API requests. By default, fields with empty or default values are 3675 // 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. "Fields") 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 *HivePartitioningOptions) MarshalJSON() ([]byte, error) { 3687 type NoMethod HivePartitioningOptions 3688 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3689 } 3690 3691 // HparamSearchSpaces: Hyperparameter search spaces. These should be a subset 3692 // of training_options. 3693 type HparamSearchSpaces struct { 3694 // ActivationFn: Activation functions of neural network models. 3695 ActivationFn *StringHparamSearchSpace `json:"activationFn,omitempty"` 3696 // BatchSize: Mini batch sample size. 3697 BatchSize *IntHparamSearchSpace `json:"batchSize,omitempty"` 3698 // BoosterType: Booster type for boosted tree models. 3699 BoosterType *StringHparamSearchSpace `json:"boosterType,omitempty"` 3700 // ColsampleBylevel: Subsample ratio of columns for each level for boosted tree 3701 // models. 3702 ColsampleBylevel *DoubleHparamSearchSpace `json:"colsampleBylevel,omitempty"` 3703 // ColsampleBynode: Subsample ratio of columns for each node(split) for boosted 3704 // tree models. 3705 ColsampleBynode *DoubleHparamSearchSpace `json:"colsampleBynode,omitempty"` 3706 // ColsampleBytree: Subsample ratio of columns when constructing each tree for 3707 // boosted tree models. 3708 ColsampleBytree *DoubleHparamSearchSpace `json:"colsampleBytree,omitempty"` 3709 // DartNormalizeType: Dart normalization type for boosted tree models. 3710 DartNormalizeType *StringHparamSearchSpace `json:"dartNormalizeType,omitempty"` 3711 // Dropout: Dropout probability for dnn model training and boosted tree models 3712 // using dart booster. 3713 Dropout *DoubleHparamSearchSpace `json:"dropout,omitempty"` 3714 // HiddenUnits: Hidden units for neural network models. 3715 HiddenUnits *IntArrayHparamSearchSpace `json:"hiddenUnits,omitempty"` 3716 // L1Reg: L1 regularization coefficient. 3717 L1Reg *DoubleHparamSearchSpace `json:"l1Reg,omitempty"` 3718 // L2Reg: L2 regularization coefficient. 3719 L2Reg *DoubleHparamSearchSpace `json:"l2Reg,omitempty"` 3720 // LearnRate: Learning rate of training jobs. 3721 LearnRate *DoubleHparamSearchSpace `json:"learnRate,omitempty"` 3722 // MaxTreeDepth: Maximum depth of a tree for boosted tree models. 3723 MaxTreeDepth *IntHparamSearchSpace `json:"maxTreeDepth,omitempty"` 3724 // MinSplitLoss: Minimum split loss for boosted tree models. 3725 MinSplitLoss *DoubleHparamSearchSpace `json:"minSplitLoss,omitempty"` 3726 // MinTreeChildWeight: Minimum sum of instance weight needed in a child for 3727 // boosted tree models. 3728 MinTreeChildWeight *IntHparamSearchSpace `json:"minTreeChildWeight,omitempty"` 3729 // NumClusters: Number of clusters for k-means. 3730 NumClusters *IntHparamSearchSpace `json:"numClusters,omitempty"` 3731 // NumFactors: Number of latent factors to train on. 3732 NumFactors *IntHparamSearchSpace `json:"numFactors,omitempty"` 3733 // NumParallelTree: Number of parallel trees for boosted tree models. 3734 NumParallelTree *IntHparamSearchSpace `json:"numParallelTree,omitempty"` 3735 // Optimizer: Optimizer of TF models. 3736 Optimizer *StringHparamSearchSpace `json:"optimizer,omitempty"` 3737 // Subsample: Subsample the training data to grow tree to prevent overfitting 3738 // for boosted tree models. 3739 Subsample *DoubleHparamSearchSpace `json:"subsample,omitempty"` 3740 // TreeMethod: Tree construction algorithm for boosted tree models. 3741 TreeMethod *StringHparamSearchSpace `json:"treeMethod,omitempty"` 3742 // WalsAlpha: Hyperparameter for matrix factoration when implicit feedback type 3743 // is specified. 3744 WalsAlpha *DoubleHparamSearchSpace `json:"walsAlpha,omitempty"` 3745 // ForceSendFields is a list of field names (e.g. "ActivationFn") to 3746 // unconditionally include in API requests. By default, fields with empty or 3747 // default values are omitted from API requests. See 3748 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3749 // details. 3750 ForceSendFields []string `json:"-"` 3751 // NullFields is a list of field names (e.g. "ActivationFn") to include in API 3752 // requests with the JSON null value. By default, fields with empty values are 3753 // omitted from API requests. See 3754 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3755 NullFields []string `json:"-"` 3756 } 3757 3758 func (s *HparamSearchSpaces) MarshalJSON() ([]byte, error) { 3759 type NoMethod HparamSearchSpaces 3760 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3761 } 3762 3763 // HparamTuningTrial: Training info of a trial in hyperparameter tuning 3764 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie 3765 // w) models. 3766 type HparamTuningTrial struct { 3767 // EndTimeMs: Ending time of the trial. 3768 EndTimeMs int64 `json:"endTimeMs,omitempty,string"` 3769 // ErrorMessage: Error message for FAILED and INFEASIBLE trial. 3770 ErrorMessage string `json:"errorMessage,omitempty"` 3771 // EvalLoss: Loss computed on the eval data at the end of trial. 3772 EvalLoss float64 `json:"evalLoss,omitempty"` 3773 // EvaluationMetrics: Evaluation metrics of this trial calculated on the test 3774 // data. Empty in Job API. 3775 EvaluationMetrics *EvaluationMetrics `json:"evaluationMetrics,omitempty"` 3776 // HparamTuningEvaluationMetrics: Hyperparameter tuning evaluation metrics of 3777 // this trial calculated on the eval data. Unlike evaluation_metrics, only the 3778 // fields corresponding to the hparam_tuning_objectives are set. 3779 HparamTuningEvaluationMetrics *EvaluationMetrics `json:"hparamTuningEvaluationMetrics,omitempty"` 3780 // Hparams: The hyperprameters selected for this trial. 3781 Hparams *TrainingOptions `json:"hparams,omitempty"` 3782 // StartTimeMs: Starting time of the trial. 3783 StartTimeMs int64 `json:"startTimeMs,omitempty,string"` 3784 // Status: The status of the trial. 3785 // 3786 // Possible values: 3787 // "TRIAL_STATUS_UNSPECIFIED" - Default value. 3788 // "NOT_STARTED" - Scheduled but not started. 3789 // "RUNNING" - Running state. 3790 // "SUCCEEDED" - The trial succeeded. 3791 // "FAILED" - The trial failed. 3792 // "INFEASIBLE" - The trial is infeasible due to the invalid params. 3793 // "STOPPED_EARLY" - Trial stopped early because it's not promising. 3794 Status string `json:"status,omitempty"` 3795 // TrainingLoss: Loss computed on the training data at the end of trial. 3796 TrainingLoss float64 `json:"trainingLoss,omitempty"` 3797 // TrialId: 1-based index of the trial. 3798 TrialId int64 `json:"trialId,omitempty,string"` 3799 // ForceSendFields is a list of field names (e.g. "EndTimeMs") to 3800 // unconditionally include in API requests. By default, fields with empty or 3801 // default values are omitted from API requests. See 3802 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3803 // details. 3804 ForceSendFields []string `json:"-"` 3805 // NullFields is a list of field names (e.g. "EndTimeMs") to include in API 3806 // requests with the JSON null value. By default, fields with empty values are 3807 // omitted from API requests. See 3808 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3809 NullFields []string `json:"-"` 3810 } 3811 3812 func (s *HparamTuningTrial) MarshalJSON() ([]byte, error) { 3813 type NoMethod HparamTuningTrial 3814 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3815 } 3816 3817 func (s *HparamTuningTrial) UnmarshalJSON(data []byte) error { 3818 type NoMethod HparamTuningTrial 3819 var s1 struct { 3820 EvalLoss gensupport.JSONFloat64 `json:"evalLoss"` 3821 TrainingLoss gensupport.JSONFloat64 `json:"trainingLoss"` 3822 *NoMethod 3823 } 3824 s1.NoMethod = (*NoMethod)(s) 3825 if err := json.Unmarshal(data, &s1); err != nil { 3826 return err 3827 } 3828 s.EvalLoss = float64(s1.EvalLoss) 3829 s.TrainingLoss = float64(s1.TrainingLoss) 3830 return nil 3831 } 3832 3833 // IndexUnusedReason: Reason about why no search index was used in the search 3834 // query (or sub-query). 3835 type IndexUnusedReason struct { 3836 // BaseTable: Specifies the base table involved in the reason that no search 3837 // index was used. 3838 BaseTable *TableReference `json:"baseTable,omitempty"` 3839 // Code: Specifies the high-level reason for the scenario when no search index 3840 // was used. 3841 // 3842 // Possible values: 3843 // "CODE_UNSPECIFIED" - Code not specified. 3844 // "INDEX_CONFIG_NOT_AVAILABLE" - Indicates the search index configuration 3845 // has not been created. 3846 // "PENDING_INDEX_CREATION" - Indicates the search index creation has not 3847 // been completed. 3848 // "BASE_TABLE_TRUNCATED" - Indicates the base table has been truncated (rows 3849 // have been removed from table with TRUNCATE TABLE statement) since the last 3850 // time the search index was refreshed. 3851 // "INDEX_CONFIG_MODIFIED" - Indicates the search index configuration has 3852 // been changed since the last time the search index was refreshed. 3853 // "TIME_TRAVEL_QUERY" - Indicates the search query accesses data at a 3854 // timestamp before the last time the search index was refreshed. 3855 // "NO_PRUNING_POWER" - Indicates the usage of search index will not 3856 // contribute to any pruning improvement for the search function, e.g. when the 3857 // search predicate is in a disjunction with other non-search predicates. 3858 // "UNINDEXED_SEARCH_FIELDS" - Indicates the search index does not cover all 3859 // fields in the search function. 3860 // "UNSUPPORTED_SEARCH_PATTERN" - Indicates the search index does not support 3861 // the given search query pattern. 3862 // "OPTIMIZED_WITH_MATERIALIZED_VIEW" - Indicates the query has been 3863 // optimized by using a materialized view. 3864 // "SECURED_BY_DATA_MASKING" - Indicates the query has been secured by data 3865 // masking, and thus search indexes are not applicable. 3866 // "MISMATCHED_TEXT_ANALYZER" - Indicates that the search index and the 3867 // search function call do not have the same text analyzer. 3868 // "BASE_TABLE_TOO_SMALL" - Indicates the base table is too small (below a 3869 // certain threshold). The index does not provide noticeable search performance 3870 // gains when the base table is too small. 3871 // "BASE_TABLE_TOO_LARGE" - Indicates that the total size of indexed base 3872 // tables in your organization exceeds your region's limit and the index is not 3873 // used in the query. To index larger base tables, you can use your own 3874 // reservation for index-management jobs. 3875 // "ESTIMATED_PERFORMANCE_GAIN_TOO_LOW" - Indicates that the estimated 3876 // performance gain from using the search index is too low for the given search 3877 // query. 3878 // "NOT_SUPPORTED_IN_STANDARD_EDITION" - Indicates that search indexes can 3879 // not be used for search query with STANDARD edition. 3880 // "INDEX_SUPPRESSED_BY_FUNCTION_OPTION" - Indicates that an option in the 3881 // search function that cannot make use of the index has been selected. 3882 // "QUERY_CACHE_HIT" - Indicates that the query was cached, and thus the 3883 // search index was not used. 3884 // "INTERNAL_ERROR" - Indicates an internal error that causes the search 3885 // index to be unused. 3886 // "OTHER_REASON" - Indicates that the reason search indexes cannot be used 3887 // in the query is not covered by any of the other IndexUnusedReason options. 3888 Code string `json:"code,omitempty"` 3889 // IndexName: Specifies the name of the unused search index, if available. 3890 IndexName string `json:"indexName,omitempty"` 3891 // Message: Free form human-readable reason for the scenario when no search 3892 // index was used. 3893 Message string `json:"message,omitempty"` 3894 // ForceSendFields is a list of field names (e.g. "BaseTable") to 3895 // unconditionally include in API requests. By default, fields with empty or 3896 // default values are omitted from API requests. See 3897 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3898 // details. 3899 ForceSendFields []string `json:"-"` 3900 // NullFields is a list of field names (e.g. "BaseTable") to include in API 3901 // requests with the JSON null value. By default, fields with empty values are 3902 // omitted from API requests. See 3903 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3904 NullFields []string `json:"-"` 3905 } 3906 3907 func (s *IndexUnusedReason) MarshalJSON() ([]byte, error) { 3908 type NoMethod IndexUnusedReason 3909 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3910 } 3911 3912 // InputDataChange: Details about the input data change insight. 3913 type InputDataChange struct { 3914 // RecordsReadDiffPercentage: Output only. Records read difference percentage 3915 // compared to a previous run. 3916 RecordsReadDiffPercentage float64 `json:"recordsReadDiffPercentage,omitempty"` 3917 // ForceSendFields is a list of field names (e.g. "RecordsReadDiffPercentage") 3918 // to unconditionally include in API requests. By default, fields with empty or 3919 // default values are omitted from API requests. See 3920 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3921 // details. 3922 ForceSendFields []string `json:"-"` 3923 // NullFields is a list of field names (e.g. "RecordsReadDiffPercentage") to 3924 // include in API requests with the JSON null value. By default, fields with 3925 // empty values are omitted from API requests. See 3926 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3927 NullFields []string `json:"-"` 3928 } 3929 3930 func (s *InputDataChange) MarshalJSON() ([]byte, error) { 3931 type NoMethod InputDataChange 3932 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3933 } 3934 3935 func (s *InputDataChange) UnmarshalJSON(data []byte) error { 3936 type NoMethod InputDataChange 3937 var s1 struct { 3938 RecordsReadDiffPercentage gensupport.JSONFloat64 `json:"recordsReadDiffPercentage"` 3939 *NoMethod 3940 } 3941 s1.NoMethod = (*NoMethod)(s) 3942 if err := json.Unmarshal(data, &s1); err != nil { 3943 return err 3944 } 3945 s.RecordsReadDiffPercentage = float64(s1.RecordsReadDiffPercentage) 3946 return nil 3947 } 3948 3949 // IntArray: An array of int. 3950 type IntArray struct { 3951 // Elements: Elements in the int array. 3952 Elements googleapi.Int64s `json:"elements,omitempty"` 3953 // ForceSendFields is a list of field names (e.g. "Elements") to 3954 // unconditionally include in API requests. By default, fields with empty or 3955 // default values are omitted from API requests. See 3956 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3957 // details. 3958 ForceSendFields []string `json:"-"` 3959 // NullFields is a list of field names (e.g. "Elements") to include in API 3960 // requests with the JSON null value. By default, fields with empty values are 3961 // omitted from API requests. See 3962 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3963 NullFields []string `json:"-"` 3964 } 3965 3966 func (s *IntArray) MarshalJSON() ([]byte, error) { 3967 type NoMethod IntArray 3968 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3969 } 3970 3971 // IntArrayHparamSearchSpace: Search space for int array. 3972 type IntArrayHparamSearchSpace struct { 3973 // Candidates: Candidates for the int array parameter. 3974 Candidates []*IntArray `json:"candidates,omitempty"` 3975 // ForceSendFields is a list of field names (e.g. "Candidates") to 3976 // unconditionally include in API requests. By default, fields with empty or 3977 // default values are omitted from API requests. See 3978 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3979 // details. 3980 ForceSendFields []string `json:"-"` 3981 // NullFields is a list of field names (e.g. "Candidates") to include in API 3982 // requests with the JSON null value. By default, fields with empty values are 3983 // omitted from API requests. See 3984 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3985 NullFields []string `json:"-"` 3986 } 3987 3988 func (s *IntArrayHparamSearchSpace) MarshalJSON() ([]byte, error) { 3989 type NoMethod IntArrayHparamSearchSpace 3990 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3991 } 3992 3993 // IntCandidates: Discrete candidates of an int hyperparameter. 3994 type IntCandidates struct { 3995 // Candidates: Candidates for the int parameter in increasing order. 3996 Candidates googleapi.Int64s `json:"candidates,omitempty"` 3997 // ForceSendFields is a list of field names (e.g. "Candidates") to 3998 // unconditionally include in API requests. By default, fields with empty or 3999 // default values are omitted from API requests. See 4000 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4001 // details. 4002 ForceSendFields []string `json:"-"` 4003 // NullFields is a list of field names (e.g. "Candidates") to include in API 4004 // requests with the JSON null value. By default, fields with empty values are 4005 // omitted from API requests. See 4006 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4007 NullFields []string `json:"-"` 4008 } 4009 4010 func (s *IntCandidates) MarshalJSON() ([]byte, error) { 4011 type NoMethod IntCandidates 4012 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4013 } 4014 4015 // IntHparamSearchSpace: Search space for an int hyperparameter. 4016 type IntHparamSearchSpace struct { 4017 // Candidates: Candidates of the int hyperparameter. 4018 Candidates *IntCandidates `json:"candidates,omitempty"` 4019 // Range: Range of the int hyperparameter. 4020 Range *IntRange `json:"range,omitempty"` 4021 // ForceSendFields is a list of field names (e.g. "Candidates") to 4022 // unconditionally include in API requests. By default, fields with empty or 4023 // default values are omitted from API requests. See 4024 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4025 // details. 4026 ForceSendFields []string `json:"-"` 4027 // NullFields is a list of field names (e.g. "Candidates") to include in API 4028 // requests with the JSON null value. By default, fields with empty values are 4029 // omitted from API requests. See 4030 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4031 NullFields []string `json:"-"` 4032 } 4033 4034 func (s *IntHparamSearchSpace) MarshalJSON() ([]byte, error) { 4035 type NoMethod IntHparamSearchSpace 4036 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4037 } 4038 4039 // IntRange: Range of an int hyperparameter. 4040 type IntRange struct { 4041 // Max: Max value of the int parameter. 4042 Max int64 `json:"max,omitempty,string"` 4043 // Min: Min value of the int parameter. 4044 Min int64 `json:"min,omitempty,string"` 4045 // ForceSendFields is a list of field names (e.g. "Max") to unconditionally 4046 // include in API requests. By default, fields with empty or default values are 4047 // omitted from API requests. See 4048 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4049 // details. 4050 ForceSendFields []string `json:"-"` 4051 // NullFields is a list of field names (e.g. "Max") to include in API requests 4052 // with the JSON null value. By default, fields with empty values are omitted 4053 // from API requests. See 4054 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4055 NullFields []string `json:"-"` 4056 } 4057 4058 func (s *IntRange) MarshalJSON() ([]byte, error) { 4059 type NoMethod IntRange 4060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4061 } 4062 4063 // IterationResult: Information about a single iteration of the training run. 4064 type IterationResult struct { 4065 // ArimaResult: Arima result. 4066 ArimaResult *ArimaResult `json:"arimaResult,omitempty"` 4067 // ClusterInfos: Information about top clusters for clustering models. 4068 ClusterInfos []*ClusterInfo `json:"clusterInfos,omitempty"` 4069 // DurationMs: Time taken to run the iteration in milliseconds. 4070 DurationMs int64 `json:"durationMs,omitempty,string"` 4071 // EvalLoss: Loss computed on the eval data at the end of iteration. 4072 EvalLoss float64 `json:"evalLoss,omitempty"` 4073 // Index: Index of the iteration, 0 based. 4074 Index int64 `json:"index,omitempty"` 4075 // LearnRate: Learn rate used for this iteration. 4076 LearnRate float64 `json:"learnRate,omitempty"` 4077 // PrincipalComponentInfos: The information of the principal components. 4078 PrincipalComponentInfos []*PrincipalComponentInfo `json:"principalComponentInfos,omitempty"` 4079 // TrainingLoss: Loss computed on the training data at the end of iteration. 4080 TrainingLoss float64 `json:"trainingLoss,omitempty"` 4081 // ForceSendFields is a list of field names (e.g. "ArimaResult") to 4082 // unconditionally include in API requests. By default, fields with empty or 4083 // default values are omitted from API requests. See 4084 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4085 // details. 4086 ForceSendFields []string `json:"-"` 4087 // NullFields is a list of field names (e.g. "ArimaResult") to include in API 4088 // requests with the JSON null value. By default, fields with empty values are 4089 // omitted from API requests. See 4090 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4091 NullFields []string `json:"-"` 4092 } 4093 4094 func (s *IterationResult) MarshalJSON() ([]byte, error) { 4095 type NoMethod IterationResult 4096 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4097 } 4098 4099 func (s *IterationResult) UnmarshalJSON(data []byte) error { 4100 type NoMethod IterationResult 4101 var s1 struct { 4102 EvalLoss gensupport.JSONFloat64 `json:"evalLoss"` 4103 LearnRate gensupport.JSONFloat64 `json:"learnRate"` 4104 TrainingLoss gensupport.JSONFloat64 `json:"trainingLoss"` 4105 *NoMethod 4106 } 4107 s1.NoMethod = (*NoMethod)(s) 4108 if err := json.Unmarshal(data, &s1); err != nil { 4109 return err 4110 } 4111 s.EvalLoss = float64(s1.EvalLoss) 4112 s.LearnRate = float64(s1.LearnRate) 4113 s.TrainingLoss = float64(s1.TrainingLoss) 4114 return nil 4115 } 4116 4117 type Job struct { 4118 // Configuration: Required. Describes the job configuration. 4119 Configuration *JobConfiguration `json:"configuration,omitempty"` 4120 // Etag: Output only. A hash of this resource. 4121 Etag string `json:"etag,omitempty"` 4122 // Id: Output only. Opaque ID field of the job. 4123 Id string `json:"id,omitempty"` 4124 // JobCreationReason: Output only. If set, it provides the reason why a Job was 4125 // created. If not set, it should be treated as the default: REQUESTED. This 4126 // feature is not yet available. Jobs will always be created. 4127 JobCreationReason *JobCreationReason `json:"jobCreationReason,omitempty"` 4128 // JobReference: Optional. Reference describing the unique-per-user name of the 4129 // job. 4130 JobReference *JobReference `json:"jobReference,omitempty"` 4131 // Kind: Output only. The type of the resource. 4132 Kind string `json:"kind,omitempty"` 4133 // PrincipalSubject: Output only. [Full-projection-only] String representation 4134 // of identity of requesting party. Populated for both first- and third-party 4135 // identities. Only present for APIs that support third-party identities. 4136 PrincipalSubject string `json:"principal_subject,omitempty"` 4137 // SelfLink: Output only. A URL that can be used to access the resource again. 4138 SelfLink string `json:"selfLink,omitempty"` 4139 // Statistics: Output only. Information about the job, including starting time 4140 // and ending time of the job. 4141 Statistics *JobStatistics `json:"statistics,omitempty"` 4142 // Status: Output only. The status of this job. Examine this value when polling 4143 // an asynchronous job to see if the job is complete. 4144 Status *JobStatus `json:"status,omitempty"` 4145 // UserEmail: Output only. Email address of the user who ran the job. 4146 UserEmail string `json:"user_email,omitempty"` 4147 4148 // ServerResponse contains the HTTP response code and headers from the server. 4149 googleapi.ServerResponse `json:"-"` 4150 // ForceSendFields is a list of field names (e.g. "Configuration") to 4151 // unconditionally include in API requests. By default, fields with empty or 4152 // default values are omitted from API requests. See 4153 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4154 // details. 4155 ForceSendFields []string `json:"-"` 4156 // NullFields is a list of field names (e.g. "Configuration") to include in API 4157 // requests with the JSON null value. By default, fields with empty values are 4158 // omitted from API requests. See 4159 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4160 NullFields []string `json:"-"` 4161 } 4162 4163 func (s *Job) MarshalJSON() ([]byte, error) { 4164 type NoMethod Job 4165 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4166 } 4167 4168 // JobCancelResponse: Describes format of a jobs cancellation response. 4169 type JobCancelResponse struct { 4170 // Job: The final state of the job. 4171 Job *Job `json:"job,omitempty"` 4172 // Kind: The resource type of the response. 4173 Kind string `json:"kind,omitempty"` 4174 4175 // ServerResponse contains the HTTP response code and headers from the server. 4176 googleapi.ServerResponse `json:"-"` 4177 // ForceSendFields is a list of field names (e.g. "Job") to unconditionally 4178 // include in API requests. By default, fields with empty or default values are 4179 // omitted from API requests. See 4180 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4181 // details. 4182 ForceSendFields []string `json:"-"` 4183 // NullFields is a list of field names (e.g. "Job") to include in API requests 4184 // with the JSON null value. By default, fields with empty values are omitted 4185 // from API requests. See 4186 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4187 NullFields []string `json:"-"` 4188 } 4189 4190 func (s *JobCancelResponse) MarshalJSON() ([]byte, error) { 4191 type NoMethod JobCancelResponse 4192 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4193 } 4194 4195 type JobConfiguration struct { 4196 // Copy: [Pick one] Copies a table. 4197 Copy *JobConfigurationTableCopy `json:"copy,omitempty"` 4198 // DryRun: Optional. If set, don't actually run this job. A valid query will 4199 // return a mostly empty response with some processing statistics, while an 4200 // invalid query will return the same error it would if it wasn't a dry run. 4201 // Behavior of non-query jobs is undefined. 4202 DryRun bool `json:"dryRun,omitempty"` 4203 // Extract: [Pick one] Configures an extract job. 4204 Extract *JobConfigurationExtract `json:"extract,omitempty"` 4205 // JobTimeoutMs: Optional. Job timeout in milliseconds. If this time limit is 4206 // exceeded, BigQuery might attempt to stop the job. 4207 JobTimeoutMs int64 `json:"jobTimeoutMs,omitempty,string"` 4208 // JobType: Output only. The type of the job. Can be QUERY, LOAD, EXTRACT, COPY 4209 // or UNKNOWN. 4210 JobType string `json:"jobType,omitempty"` 4211 // Labels: The labels associated with this job. You can use these to organize 4212 // and group your jobs. Label keys and values can be no longer than 63 4213 // characters, can only contain lowercase letters, numeric characters, 4214 // underscores and dashes. International characters are allowed. Label values 4215 // are optional. Label keys must start with a letter and each label in the list 4216 // must have a different key. 4217 Labels map[string]string `json:"labels,omitempty"` 4218 // Load: [Pick one] Configures a load job. 4219 Load *JobConfigurationLoad `json:"load,omitempty"` 4220 // Query: [Pick one] Configures a query job. 4221 Query *JobConfigurationQuery `json:"query,omitempty"` 4222 // ForceSendFields is a list of field names (e.g. "Copy") to unconditionally 4223 // include in API requests. By default, fields with empty or default values are 4224 // omitted from API requests. See 4225 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4226 // details. 4227 ForceSendFields []string `json:"-"` 4228 // NullFields is a list of field names (e.g. "Copy") to include in API requests 4229 // with the JSON null value. By default, fields with empty values are omitted 4230 // from API requests. See 4231 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4232 NullFields []string `json:"-"` 4233 } 4234 4235 func (s *JobConfiguration) MarshalJSON() ([]byte, error) { 4236 type NoMethod JobConfiguration 4237 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4238 } 4239 4240 // JobConfigurationExtract: JobConfigurationExtract configures a job that 4241 // exports data from a BigQuery table into Google Cloud Storage. 4242 type JobConfigurationExtract struct { 4243 // Compression: Optional. The compression type to use for exported files. 4244 // Possible values include DEFLATE, GZIP, NONE, SNAPPY, and ZSTD. The default 4245 // value is NONE. Not all compression formats are support for all file formats. 4246 // DEFLATE is only supported for Avro. ZSTD is only supported for Parquet. Not 4247 // applicable when extracting models. 4248 Compression string `json:"compression,omitempty"` 4249 // DestinationFormat: Optional. The exported file format. Possible values 4250 // include CSV, NEWLINE_DELIMITED_JSON, PARQUET, or AVRO for tables and 4251 // ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default value for 4252 // tables is CSV. Tables with nested or repeated fields cannot be exported as 4253 // CSV. The default value for models is ML_TF_SAVED_MODEL. 4254 DestinationFormat string `json:"destinationFormat,omitempty"` 4255 // DestinationUri: [Pick one] DEPRECATED: Use destinationUris instead, passing 4256 // only one URI as necessary. The fully-qualified Google Cloud Storage URI 4257 // where the extracted table should be written. 4258 DestinationUri string `json:"destinationUri,omitempty"` 4259 // DestinationUris: [Pick one] A list of fully-qualified Google Cloud Storage 4260 // URIs where the extracted table should be written. 4261 DestinationUris []string `json:"destinationUris,omitempty"` 4262 // FieldDelimiter: Optional. When extracting data in CSV format, this defines 4263 // the delimiter to use between fields in the exported data. Default is ','. 4264 // Not applicable when extracting models. 4265 FieldDelimiter string `json:"fieldDelimiter,omitempty"` 4266 // ModelExtractOptions: Optional. Model extract options only applicable when 4267 // extracting models. 4268 ModelExtractOptions *ModelExtractOptions `json:"modelExtractOptions,omitempty"` 4269 // PrintHeader: Optional. Whether to print out a header row in the results. 4270 // Default is true. Not applicable when extracting models. 4271 // 4272 // Default: true 4273 PrintHeader *bool `json:"printHeader,omitempty"` 4274 // SourceModel: A reference to the model being exported. 4275 SourceModel *ModelReference `json:"sourceModel,omitempty"` 4276 // SourceTable: A reference to the table being exported. 4277 SourceTable *TableReference `json:"sourceTable,omitempty"` 4278 // UseAvroLogicalTypes: Whether to use logical types when extracting to AVRO 4279 // format. Not applicable when extracting models. 4280 UseAvroLogicalTypes bool `json:"useAvroLogicalTypes,omitempty"` 4281 // ForceSendFields is a list of field names (e.g. "Compression") to 4282 // unconditionally include in API requests. By default, fields with empty or 4283 // default values are omitted from API requests. See 4284 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4285 // details. 4286 ForceSendFields []string `json:"-"` 4287 // NullFields is a list of field names (e.g. "Compression") to include in API 4288 // requests with the JSON null value. By default, fields with empty values are 4289 // omitted from API requests. See 4290 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4291 NullFields []string `json:"-"` 4292 } 4293 4294 func (s *JobConfigurationExtract) MarshalJSON() ([]byte, error) { 4295 type NoMethod JobConfigurationExtract 4296 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4297 } 4298 4299 // JobConfigurationLoad: JobConfigurationLoad contains the configuration 4300 // properties for loading data into a destination table. 4301 type JobConfigurationLoad struct { 4302 // AllowJaggedRows: Optional. Accept rows that are missing trailing optional 4303 // columns. The missing values are treated as nulls. If false, records with 4304 // missing trailing columns are treated as bad records, and if there are too 4305 // many bad records, an invalid error is returned in the job result. The 4306 // default value is false. Only applicable to CSV, ignored for other formats. 4307 AllowJaggedRows bool `json:"allowJaggedRows,omitempty"` 4308 // AllowQuotedNewlines: Indicates if BigQuery should allow quoted data sections 4309 // that contain newline characters in a CSV file. The default value is false. 4310 AllowQuotedNewlines bool `json:"allowQuotedNewlines,omitempty"` 4311 // Autodetect: Optional. Indicates if we should automatically infer the options 4312 // and schema for CSV and JSON sources. 4313 Autodetect bool `json:"autodetect,omitempty"` 4314 // Clustering: Clustering specification for the destination table. 4315 Clustering *Clustering `json:"clustering,omitempty"` 4316 // ConnectionProperties: Optional. Connection properties which can modify the 4317 // load job behavior. Currently, only the 'session_id' connection property is 4318 // supported, and is used to resolve _SESSION appearing as the dataset id. 4319 ConnectionProperties []*ConnectionProperty `json:"connectionProperties,omitempty"` 4320 // CopyFilesOnly: Optional. [Experimental] Configures the load job to copy 4321 // files directly to the destination BigLake managed table, bypassing file 4322 // content reading and rewriting. Copying files only is supported when all the 4323 // following are true: * `source_uris` are located in the same Cloud Storage 4324 // location as the destination table's `storage_uri` location. * 4325 // `source_format` is `PARQUET`. * `destination_table` is an existing BigLake 4326 // managed table. The table's schema does not have flexible column names. The 4327 // table's columns do not have type parameters other than precision and scale. 4328 // * No options other than the above are specified. 4329 CopyFilesOnly bool `json:"copyFilesOnly,omitempty"` 4330 // CreateDisposition: Optional. Specifies whether the job is allowed to create 4331 // new tables. The following values are supported: * CREATE_IF_NEEDED: If the 4332 // table does not exist, BigQuery creates the table. * CREATE_NEVER: The table 4333 // must already exist. If it does not, a 'notFound' error is returned in the 4334 // job result. The default value is CREATE_IF_NEEDED. Creation, truncation and 4335 // append actions occur as one atomic update upon job completion. 4336 CreateDisposition string `json:"createDisposition,omitempty"` 4337 // CreateSession: Optional. If this property is true, the job creates a new 4338 // session using a randomly generated session_id. To continue using a created 4339 // session with subsequent queries, pass the existing session identifier as a 4340 // `ConnectionProperty` value. The session identifier is returned as part of 4341 // the `SessionInfo` message within the query statistics. The new session's 4342 // location will be set to `Job.JobReference.location` if it is present, 4343 // otherwise it's set to the default location based on existing routing logic. 4344 CreateSession bool `json:"createSession,omitempty"` 4345 // DecimalTargetTypes: Defines the list of possible SQL data types to which the 4346 // source decimal values are converted. This list and the precision and the 4347 // scale parameters of the decimal field determine the target type. In the 4348 // order of NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in the 4349 // specified list and if it supports the precision and the scale. STRING 4350 // supports all precision and scale values. If none of the listed types 4351 // supports the precision and the scale, the type supporting the widest range 4352 // in the specified list is picked, and if a value exceeds the supported range 4353 // when reading the data, an error will be thrown. Example: Suppose the value 4354 // of this field is ["NUMERIC", "BIGNUMERIC"]. If (precision,scale) is: * 4355 // (38,9) -> NUMERIC; * (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer 4356 // digits); * (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); 4357 // * (76,38) -> BIGNUMERIC; * (77,38) -> BIGNUMERIC (error if value exeeds 4358 // supported range). This field cannot contain duplicate types. The order of 4359 // the types in this field is ignored. For example, ["BIGNUMERIC", "NUMERIC"] 4360 // is the same as ["NUMERIC", "BIGNUMERIC"] and NUMERIC always takes precedence 4361 // over BIGNUMERIC. Defaults to ["NUMERIC", "STRING"] for ORC and ["NUMERIC"] 4362 // for the other file formats. 4363 // 4364 // Possible values: 4365 // "DECIMAL_TARGET_TYPE_UNSPECIFIED" - Invalid type. 4366 // "NUMERIC" - Decimal values could be converted to NUMERIC type. 4367 // "BIGNUMERIC" - Decimal values could be converted to BIGNUMERIC type. 4368 // "STRING" - Decimal values could be converted to STRING type. 4369 DecimalTargetTypes []string `json:"decimalTargetTypes,omitempty"` 4370 // DestinationEncryptionConfiguration: Custom encryption configuration (e.g., 4371 // Cloud KMS keys) 4372 DestinationEncryptionConfiguration *EncryptionConfiguration `json:"destinationEncryptionConfiguration,omitempty"` 4373 // DestinationTable: [Required] The destination table to load the data into. 4374 DestinationTable *TableReference `json:"destinationTable,omitempty"` 4375 // DestinationTableProperties: Optional. [Experimental] Properties with which 4376 // to create the destination table if it is new. 4377 DestinationTableProperties *DestinationTableProperties `json:"destinationTableProperties,omitempty"` 4378 // Encoding: Optional. The character encoding of the data. The supported values 4379 // are UTF-8, ISO-8859-1, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. The 4380 // default value is UTF-8. BigQuery decodes the data after the raw, binary data 4381 // has been split using the values of the `quote` and `fieldDelimiter` 4382 // properties. If you don't specify an encoding, or if you specify a UTF-8 4383 // encoding when the CSV file is not UTF-8 encoded, BigQuery attempts to 4384 // convert the data to UTF-8. Generally, your data loads successfully, but it 4385 // may not match byte-for-byte what you expect. To avoid this, specify the 4386 // correct encoding by using the `--encoding` flag. If BigQuery can't convert a 4387 // character other than the ASCII `0` character, BigQuery converts the 4388 // character to the standard Unicode replacement character: �. 4389 Encoding string `json:"encoding,omitempty"` 4390 // FieldDelimiter: Optional. The separator character for fields in a CSV file. 4391 // The separator is interpreted as a single byte. For files encoded in 4392 // ISO-8859-1, any single character can be used as a separator. For files 4393 // encoded in UTF-8, characters represented in decimal range 1-127 4394 // (U+0001-U+007F) can be used without any modification. UTF-8 characters 4395 // encoded with multiple bytes (i.e. U+0080 and above) will have only the first 4396 // byte used for separating fields. The remaining bytes will be treated as a 4397 // part of the field. BigQuery also supports the escape sequence "\t" (U+0009) 4398 // to specify a tab separator. The default value is comma (",", U+002C). 4399 FieldDelimiter string `json:"fieldDelimiter,omitempty"` 4400 // FileSetSpecType: Optional. Specifies how source URIs are interpreted for 4401 // constructing the file set to load. By default, source URIs are expanded 4402 // against the underlying storage. You can also specify manifest files to 4403 // control how the file set is constructed. This option is only applicable to 4404 // object storage systems. 4405 // 4406 // Possible values: 4407 // "FILE_SET_SPEC_TYPE_FILE_SYSTEM_MATCH" - This option expands source URIs 4408 // by listing files from the object store. It is the default behavior if 4409 // FileSetSpecType is not set. 4410 // "FILE_SET_SPEC_TYPE_NEW_LINE_DELIMITED_MANIFEST" - This option indicates 4411 // that the provided URIs are newline-delimited manifest files, with one URI 4412 // per line. Wildcard URIs are not supported. 4413 FileSetSpecType string `json:"fileSetSpecType,omitempty"` 4414 // HivePartitioningOptions: Optional. When set, configures hive partitioning 4415 // support. Not all storage formats support hive partitioning -- requesting 4416 // hive partitioning on an unsupported format will lead to an error, as will 4417 // providing an invalid specification. 4418 HivePartitioningOptions *HivePartitioningOptions `json:"hivePartitioningOptions,omitempty"` 4419 // IgnoreUnknownValues: Optional. Indicates if BigQuery should allow extra 4420 // values that are not represented in the table schema. If true, the extra 4421 // values are ignored. If false, records with extra columns are treated as bad 4422 // records, and if there are too many bad records, an invalid error is returned 4423 // in the job result. The default value is false. The sourceFormat property 4424 // determines what BigQuery treats as an extra value: CSV: Trailing columns 4425 // JSON: Named values that don't match any column names in the table schema 4426 // Avro, Parquet, ORC: Fields in the file schema that don't exist in the table 4427 // schema. 4428 IgnoreUnknownValues bool `json:"ignoreUnknownValues,omitempty"` 4429 // JsonExtension: Optional. Load option to be used together with source_format 4430 // newline-delimited JSON to indicate that a variant of JSON is being loaded. 4431 // To load newline-delimited GeoJSON, specify GEOJSON (and source_format must 4432 // be set to NEWLINE_DELIMITED_JSON). 4433 // 4434 // Possible values: 4435 // "JSON_EXTENSION_UNSPECIFIED" - The default if provided value is not one 4436 // included in the enum, or the value is not specified. The source formate is 4437 // parsed without any modification. 4438 // "GEOJSON" - Use GeoJSON variant of JSON. See 4439 // https://tools.ietf.org/html/rfc7946. 4440 JsonExtension string `json:"jsonExtension,omitempty"` 4441 // MaxBadRecords: Optional. The maximum number of bad records that BigQuery can 4442 // ignore when running the job. If the number of bad records exceeds this 4443 // value, an invalid error is returned in the job result. The default value is 4444 // 0, which requires that all records are valid. This is only supported for CSV 4445 // and NEWLINE_DELIMITED_JSON file formats. 4446 MaxBadRecords int64 `json:"maxBadRecords,omitempty"` 4447 // NullMarker: Optional. Specifies a string that represents a null value in a 4448 // CSV file. For example, if you specify "\N", BigQuery interprets "\N" as a 4449 // null value when loading a CSV file. The default value is the empty string. 4450 // If you set this property to a custom value, BigQuery throws an error if an 4451 // empty string is present for all data types except for STRING and BYTE. For 4452 // STRING and BYTE columns, BigQuery interprets the empty string as an empty 4453 // value. 4454 NullMarker string `json:"nullMarker,omitempty"` 4455 // ParquetOptions: Optional. Additional properties to set if sourceFormat is 4456 // set to PARQUET. 4457 ParquetOptions *ParquetOptions `json:"parquetOptions,omitempty"` 4458 // PreserveAsciiControlCharacters: Optional. When sourceFormat is set to "CSV", 4459 // this indicates whether the embedded ASCII control characters (the first 32 4460 // characters in the ASCII-table, from '\x00' to '\x1F') are preserved. 4461 PreserveAsciiControlCharacters bool `json:"preserveAsciiControlCharacters,omitempty"` 4462 // ProjectionFields: If sourceFormat is set to "DATASTORE_BACKUP", indicates 4463 // which entity properties to load into BigQuery from a Cloud Datastore backup. 4464 // Property names are case sensitive and must be top-level properties. If no 4465 // properties are specified, BigQuery loads all properties. If any named 4466 // property isn't found in the Cloud Datastore backup, an invalid error is 4467 // returned in the job result. 4468 ProjectionFields []string `json:"projectionFields,omitempty"` 4469 // Quote: Optional. The value that is used to quote data sections in a CSV 4470 // file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the 4471 // first byte of the encoded string to split the data in its raw, binary state. 4472 // The default value is a double-quote ('"'). If your data does not contain 4473 // quoted sections, set the property value to an empty string. If your data 4474 // contains quoted newline characters, you must also set the 4475 // allowQuotedNewlines property to true. To include the specific quote 4476 // character within a quoted value, precede it with an additional matching 4477 // quote character. For example, if you want to escape the default character ' 4478 // " ', use ' "" '. @default " 4479 // 4480 // Default: " 4481 Quote *string `json:"quote,omitempty"` 4482 // RangePartitioning: Range partitioning specification for the destination 4483 // table. Only one of timePartitioning and rangePartitioning should be 4484 // specified. 4485 RangePartitioning *RangePartitioning `json:"rangePartitioning,omitempty"` 4486 // ReferenceFileSchemaUri: Optional. The user can provide a reference file with 4487 // the reader schema. This file is only loaded if it is part of source URIs, 4488 // but is not loaded otherwise. It is enabled for the following formats: AVRO, 4489 // PARQUET, ORC. 4490 ReferenceFileSchemaUri string `json:"referenceFileSchemaUri,omitempty"` 4491 // Schema: Optional. The schema for the destination table. The schema can be 4492 // omitted if the destination table already exists, or if you're loading data 4493 // from Google Cloud Datastore. 4494 Schema *TableSchema `json:"schema,omitempty"` 4495 // SchemaInline: [Deprecated] The inline schema. For CSV schemas, specify as 4496 // "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, 4497 // baz:FLOAT". 4498 SchemaInline string `json:"schemaInline,omitempty"` 4499 // SchemaInlineFormat: [Deprecated] The format of the schemaInline property. 4500 SchemaInlineFormat string `json:"schemaInlineFormat,omitempty"` 4501 // SchemaUpdateOptions: Allows the schema of the destination table to be 4502 // updated as a side effect of the load job if a schema is autodetected or 4503 // supplied in the job configuration. Schema update options are supported in 4504 // two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is 4505 // WRITE_TRUNCATE and the destination table is a partition of a table, 4506 // specified by partition decorators. For normal tables, WRITE_TRUNCATE will 4507 // always overwrite the schema. One or more of the following values are 4508 // specified: * ALLOW_FIELD_ADDITION: allow adding a nullable field to the 4509 // schema. * ALLOW_FIELD_RELAXATION: allow relaxing a required field in the 4510 // original schema to nullable. 4511 SchemaUpdateOptions []string `json:"schemaUpdateOptions,omitempty"` 4512 // SkipLeadingRows: Optional. The number of rows at the top of a CSV file that 4513 // BigQuery will skip when loading the data. The default value is 0. This 4514 // property is useful if you have header rows in the file that should be 4515 // skipped. When autodetect is on, the behavior is the following: * 4516 // skipLeadingRows unspecified - Autodetect tries to detect headers in the 4517 // first row. If they are not detected, the row is read as data. Otherwise data 4518 // is read starting from the second row. * skipLeadingRows is 0 - Instructs 4519 // autodetect that there are no headers and data should be read starting from 4520 // the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and 4521 // tries to detect headers in row N. If headers are not detected, row N is just 4522 // skipped. Otherwise row N is used to extract column names for the detected 4523 // schema. 4524 SkipLeadingRows int64 `json:"skipLeadingRows,omitempty"` 4525 // SourceFormat: Optional. The format of the data files. For CSV files, specify 4526 // "CSV". For datastore backups, specify "DATASTORE_BACKUP". For 4527 // newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro, specify 4528 // "AVRO". For parquet, specify "PARQUET". For orc, specify "ORC". The default 4529 // value is CSV. 4530 SourceFormat string `json:"sourceFormat,omitempty"` 4531 // SourceUris: [Required] The fully-qualified URIs that point to your data in 4532 // Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' 4533 // wildcard character and it must come after the 'bucket' name. Size limits 4534 // related to load jobs apply to external data sources. For Google Cloud 4535 // Bigtable URIs: Exactly one URI can be specified and it has be a fully 4536 // specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google 4537 // Cloud Datastore backups: Exactly one URI can be specified. Also, the '*' 4538 // wildcard character is not allowed. 4539 SourceUris []string `json:"sourceUris,omitempty"` 4540 // TimePartitioning: Time-based partitioning specification for the destination 4541 // table. Only one of timePartitioning and rangePartitioning should be 4542 // specified. 4543 TimePartitioning *TimePartitioning `json:"timePartitioning,omitempty"` 4544 // UseAvroLogicalTypes: Optional. If sourceFormat is set to "AVRO", indicates 4545 // whether to interpret logical types as the corresponding BigQuery data type 4546 // (for example, TIMESTAMP), instead of using the raw type (for example, 4547 // INTEGER). 4548 UseAvroLogicalTypes bool `json:"useAvroLogicalTypes,omitempty"` 4549 // WriteDisposition: Optional. Specifies the action that occurs if the 4550 // destination table already exists. The following values are supported: * 4551 // WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the data, 4552 // removes the constraints and uses the schema from the load job. * 4553 // WRITE_APPEND: If the table already exists, BigQuery appends the data to the 4554 // table. * WRITE_EMPTY: If the table already exists and contains data, a 4555 // 'duplicate' error is returned in the job result. The default value is 4556 // WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to 4557 // complete the job successfully. Creation, truncation and append actions occur 4558 // as one atomic update upon job completion. 4559 WriteDisposition string `json:"writeDisposition,omitempty"` 4560 // ForceSendFields is a list of field names (e.g. "AllowJaggedRows") to 4561 // unconditionally include in API requests. By default, fields with empty or 4562 // default values are omitted from API requests. See 4563 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4564 // details. 4565 ForceSendFields []string `json:"-"` 4566 // NullFields is a list of field names (e.g. "AllowJaggedRows") to include in 4567 // API requests with the JSON null value. By default, fields with empty values 4568 // are omitted from API requests. See 4569 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4570 NullFields []string `json:"-"` 4571 } 4572 4573 func (s *JobConfigurationLoad) MarshalJSON() ([]byte, error) { 4574 type NoMethod JobConfigurationLoad 4575 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4576 } 4577 4578 // JobConfigurationQuery: JobConfigurationQuery configures a BigQuery query 4579 // job. 4580 type JobConfigurationQuery struct { 4581 // AllowLargeResults: Optional. If true and query uses legacy SQL dialect, 4582 // allows the query to produce arbitrarily large result tables at a slight cost 4583 // in performance. Requires destinationTable to be set. For GoogleSQL queries, 4584 // this flag is ignored and large results are always allowed. However, you must 4585 // still set destinationTable when result size exceeds the allowed maximum 4586 // response size. 4587 AllowLargeResults bool `json:"allowLargeResults,omitempty"` 4588 // Clustering: Clustering specification for the destination table. 4589 Clustering *Clustering `json:"clustering,omitempty"` 4590 // ConnectionProperties: Connection properties which can modify the query 4591 // behavior. 4592 ConnectionProperties []*ConnectionProperty `json:"connectionProperties,omitempty"` 4593 // Continuous: [Optional] Specifies whether the query should be executed as a 4594 // continuous query. The default value is false. 4595 Continuous bool `json:"continuous,omitempty"` 4596 // CreateDisposition: Optional. Specifies whether the job is allowed to create 4597 // new tables. The following values are supported: * CREATE_IF_NEEDED: If the 4598 // table does not exist, BigQuery creates the table. * CREATE_NEVER: The table 4599 // must already exist. If it does not, a 'notFound' error is returned in the 4600 // job result. The default value is CREATE_IF_NEEDED. Creation, truncation and 4601 // append actions occur as one atomic update upon job completion. 4602 CreateDisposition string `json:"createDisposition,omitempty"` 4603 // CreateSession: If this property is true, the job creates a new session using 4604 // a randomly generated session_id. To continue using a created session with 4605 // subsequent queries, pass the existing session identifier as a 4606 // `ConnectionProperty` value. The session identifier is returned as part of 4607 // the `SessionInfo` message within the query statistics. The new session's 4608 // location will be set to `Job.JobReference.location` if it is present, 4609 // otherwise it's set to the default location based on existing routing logic. 4610 CreateSession bool `json:"createSession,omitempty"` 4611 // DefaultDataset: Optional. Specifies the default dataset to use for 4612 // unqualified table names in the query. This setting does not alter behavior 4613 // of unqualified dataset names. Setting the system variable `@@dataset_id` 4614 // achieves the same behavior. See 4615 // https://cloud.google.com/bigquery/docs/reference/system-variables for more 4616 // information on system variables. 4617 DefaultDataset *DatasetReference `json:"defaultDataset,omitempty"` 4618 // DestinationEncryptionConfiguration: Custom encryption configuration (e.g., 4619 // Cloud KMS keys) 4620 DestinationEncryptionConfiguration *EncryptionConfiguration `json:"destinationEncryptionConfiguration,omitempty"` 4621 // DestinationTable: Optional. Describes the table where the query results 4622 // should be stored. This property must be set for large results that exceed 4623 // the maximum response size. For queries that produce anonymous (cached) 4624 // results, this field will be populated by BigQuery. 4625 DestinationTable *TableReference `json:"destinationTable,omitempty"` 4626 // FlattenResults: Optional. If true and query uses legacy SQL dialect, 4627 // flattens all nested and repeated fields in the query results. 4628 // allowLargeResults must be true if this is set to false. For GoogleSQL 4629 // queries, this flag is ignored and results are never flattened. 4630 // 4631 // Default: true 4632 FlattenResults *bool `json:"flattenResults,omitempty"` 4633 // MaximumBillingTier: Optional. [Deprecated] Maximum billing tier allowed for 4634 // this query. The billing tier controls the amount of compute resources 4635 // allotted to the query, and multiplies the on-demand cost of the query 4636 // accordingly. A query that runs within its allotted resources will succeed 4637 // and indicate its billing tier in statistics.query.billingTier, but if the 4638 // query exceeds its allotted resources, it will fail with 4639 // billingTierLimitExceeded. WARNING: The billed byte amount can be multiplied 4640 // by an amount up to this number! Most users should not need to alter this 4641 // setting, and we recommend that you avoid introducing new uses of it. 4642 // 4643 // Default: 1 4644 MaximumBillingTier *int64 `json:"maximumBillingTier,omitempty"` 4645 // MaximumBytesBilled: Limits the bytes billed for this job. Queries that will 4646 // have bytes billed beyond this limit will fail (without incurring a charge). 4647 // If unspecified, this will be set to your project default. 4648 MaximumBytesBilled int64 `json:"maximumBytesBilled,omitempty,string"` 4649 // ParameterMode: GoogleSQL only. Set to POSITIONAL to use positional (?) query 4650 // parameters or to NAMED to use named (@myparam) query parameters in this 4651 // query. 4652 ParameterMode string `json:"parameterMode,omitempty"` 4653 // PreserveNulls: [Deprecated] This property is deprecated. 4654 PreserveNulls bool `json:"preserveNulls,omitempty"` 4655 // Priority: Optional. Specifies a priority for the query. Possible values 4656 // include INTERACTIVE and BATCH. The default value is INTERACTIVE. 4657 Priority string `json:"priority,omitempty"` 4658 // Query: [Required] SQL query text to execute. The useLegacySql field can be 4659 // used to indicate whether the query uses legacy SQL or GoogleSQL. 4660 Query string `json:"query,omitempty"` 4661 // QueryParameters: Query parameters for GoogleSQL queries. 4662 QueryParameters []*QueryParameter `json:"queryParameters,omitempty"` 4663 // RangePartitioning: Range partitioning specification for the destination 4664 // table. Only one of timePartitioning and rangePartitioning should be 4665 // specified. 4666 RangePartitioning *RangePartitioning `json:"rangePartitioning,omitempty"` 4667 // SchemaUpdateOptions: Allows the schema of the destination table to be 4668 // updated as a side effect of the query job. Schema update options are 4669 // supported in two cases: when writeDisposition is WRITE_APPEND; when 4670 // writeDisposition is WRITE_TRUNCATE and the destination table is a partition 4671 // of a table, specified by partition decorators. For normal tables, 4672 // WRITE_TRUNCATE will always overwrite the schema. One or more of the 4673 // following values are specified: * ALLOW_FIELD_ADDITION: allow adding a 4674 // nullable field to the schema. * ALLOW_FIELD_RELAXATION: allow relaxing a 4675 // required field in the original schema to nullable. 4676 SchemaUpdateOptions []string `json:"schemaUpdateOptions,omitempty"` 4677 // ScriptOptions: Options controlling the execution of scripts. 4678 ScriptOptions *ScriptOptions `json:"scriptOptions,omitempty"` 4679 // SystemVariables: Output only. System variables for GoogleSQL queries. A 4680 // system variable is output if the variable is settable and its value differs 4681 // from the system default. "@@" prefix is not included in the name of the 4682 // System variables. 4683 SystemVariables *SystemVariables `json:"systemVariables,omitempty"` 4684 // TableDefinitions: Optional. You can specify external table definitions, 4685 // which operate as ephemeral tables that can be queried. These definitions are 4686 // configured using a JSON map, where the string key represents the table 4687 // identifier, and the value is the corresponding external data configuration 4688 // object. 4689 TableDefinitions map[string]ExternalDataConfiguration `json:"tableDefinitions,omitempty"` 4690 // TimePartitioning: Time-based partitioning specification for the destination 4691 // table. Only one of timePartitioning and rangePartitioning should be 4692 // specified. 4693 TimePartitioning *TimePartitioning `json:"timePartitioning,omitempty"` 4694 // UseLegacySql: Optional. Specifies whether to use BigQuery's legacy SQL 4695 // dialect for this query. The default value is true. If set to false, the 4696 // query will use BigQuery's GoogleSQL: 4697 // https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is set to 4698 // false, the value of flattenResults is ignored; query will be run as if 4699 // flattenResults is false. 4700 // 4701 // Default: true 4702 UseLegacySql *bool `json:"useLegacySql,omitempty"` 4703 // UseQueryCache: Optional. Whether to look for the result in the query cache. 4704 // The query cache is a best-effort cache that will be flushed whenever tables 4705 // in the query are modified. Moreover, the query cache is only available when 4706 // a query does not have a destination table specified. The default value is 4707 // true. 4708 // 4709 // Default: true 4710 UseQueryCache *bool `json:"useQueryCache,omitempty"` 4711 // UserDefinedFunctionResources: Describes user-defined function resources used 4712 // in the query. 4713 UserDefinedFunctionResources []*UserDefinedFunctionResource `json:"userDefinedFunctionResources,omitempty"` 4714 // WriteDisposition: Optional. Specifies the action that occurs if the 4715 // destination table already exists. The following values are supported: * 4716 // WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the data, 4717 // removes the constraints, and uses the schema from the query result. * 4718 // WRITE_APPEND: If the table already exists, BigQuery appends the data to the 4719 // table. * WRITE_EMPTY: If the table already exists and contains data, a 4720 // 'duplicate' error is returned in the job result. The default value is 4721 // WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to 4722 // complete the job successfully. Creation, truncation and append actions occur 4723 // as one atomic update upon job completion. 4724 WriteDisposition string `json:"writeDisposition,omitempty"` 4725 // ForceSendFields is a list of field names (e.g. "AllowLargeResults") to 4726 // unconditionally include in API requests. By default, fields with empty or 4727 // default values are omitted from API requests. See 4728 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4729 // details. 4730 ForceSendFields []string `json:"-"` 4731 // NullFields is a list of field names (e.g. "AllowLargeResults") to include in 4732 // API requests with the JSON null value. By default, fields with empty values 4733 // are omitted from API requests. See 4734 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4735 NullFields []string `json:"-"` 4736 } 4737 4738 func (s *JobConfigurationQuery) MarshalJSON() ([]byte, error) { 4739 type NoMethod JobConfigurationQuery 4740 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4741 } 4742 4743 // JobConfigurationTableCopy: JobConfigurationTableCopy configures a job that 4744 // copies data from one table to another. For more information on copying 4745 // tables, see Copy a table 4746 // (https://cloud.google.com/bigquery/docs/managing-tables#copy-table). 4747 type JobConfigurationTableCopy struct { 4748 // CreateDisposition: Optional. Specifies whether the job is allowed to create 4749 // new tables. The following values are supported: * CREATE_IF_NEEDED: If the 4750 // table does not exist, BigQuery creates the table. * CREATE_NEVER: The table 4751 // must already exist. If it does not, a 'notFound' error is returned in the 4752 // job result. The default value is CREATE_IF_NEEDED. Creation, truncation and 4753 // append actions occur as one atomic update upon job completion. 4754 CreateDisposition string `json:"createDisposition,omitempty"` 4755 // DestinationEncryptionConfiguration: Custom encryption configuration (e.g., 4756 // Cloud KMS keys). 4757 DestinationEncryptionConfiguration *EncryptionConfiguration `json:"destinationEncryptionConfiguration,omitempty"` 4758 // DestinationExpirationTime: Optional. The time when the destination table 4759 // expires. Expired tables will be deleted and their storage reclaimed. 4760 DestinationExpirationTime string `json:"destinationExpirationTime,omitempty"` 4761 // DestinationTable: [Required] The destination table. 4762 DestinationTable *TableReference `json:"destinationTable,omitempty"` 4763 // OperationType: Optional. Supported operation types in table copy job. 4764 // 4765 // Possible values: 4766 // "OPERATION_TYPE_UNSPECIFIED" - Unspecified operation type. 4767 // "COPY" - The source and destination table have the same table type. 4768 // "SNAPSHOT" - The source table type is TABLE and the destination table type 4769 // is SNAPSHOT. 4770 // "RESTORE" - The source table type is SNAPSHOT and the destination table 4771 // type is TABLE. 4772 // "CLONE" - The source and destination table have the same table type, but 4773 // only bill for unique data. 4774 OperationType string `json:"operationType,omitempty"` 4775 // SourceTable: [Pick one] Source table to copy. 4776 SourceTable *TableReference `json:"sourceTable,omitempty"` 4777 // SourceTables: [Pick one] Source tables to copy. 4778 SourceTables []*TableReference `json:"sourceTables,omitempty"` 4779 // WriteDisposition: Optional. Specifies the action that occurs if the 4780 // destination table already exists. The following values are supported: * 4781 // WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table 4782 // data and uses the schema and table constraints from the source table. * 4783 // WRITE_APPEND: If the table already exists, BigQuery appends the data to the 4784 // table. * WRITE_EMPTY: If the table already exists and contains data, a 4785 // 'duplicate' error is returned in the job result. The default value is 4786 // WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to 4787 // complete the job successfully. Creation, truncation and append actions occur 4788 // as one atomic update upon job completion. 4789 WriteDisposition string `json:"writeDisposition,omitempty"` 4790 // ForceSendFields is a list of field names (e.g. "CreateDisposition") to 4791 // unconditionally include in API requests. By default, fields with empty or 4792 // default values are omitted from API requests. See 4793 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4794 // details. 4795 ForceSendFields []string `json:"-"` 4796 // NullFields is a list of field names (e.g. "CreateDisposition") to include in 4797 // API requests with the JSON null value. By default, fields with empty values 4798 // are omitted from API requests. See 4799 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4800 NullFields []string `json:"-"` 4801 } 4802 4803 func (s *JobConfigurationTableCopy) MarshalJSON() ([]byte, error) { 4804 type NoMethod JobConfigurationTableCopy 4805 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4806 } 4807 4808 // JobCreationReason: Reason about why a Job was created from a `jobs.query` 4809 // (https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query) method 4810 // when used with `JOB_CREATION_OPTIONAL` Job creation mode. For `jobs.insert` 4811 // (https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) 4812 // method calls it will always be `REQUESTED`. This feature is not yet 4813 // available. Jobs will always be created. 4814 type JobCreationReason struct { 4815 // Code: Output only. Specifies the high level reason why a Job was created. 4816 // 4817 // Possible values: 4818 // "CODE_UNSPECIFIED" - Reason is not specified. 4819 // "REQUESTED" - Job creation was requested. 4820 // "LONG_RUNNING" - The query request ran beyond a system defined timeout 4821 // specified by the [timeoutMs field in the 4822 // QueryRequest](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/q 4823 // uery#queryrequest). As a result it was considered a long running operation 4824 // for which a job was created. 4825 // "LARGE_RESULTS" - The results from the query cannot fit in the response. 4826 // "OTHER" - BigQuery has determined that the query needs to be executed as a 4827 // Job. 4828 Code string `json:"code,omitempty"` 4829 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 4830 // include in API requests. By default, fields with empty or default values are 4831 // omitted from API requests. See 4832 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4833 // details. 4834 ForceSendFields []string `json:"-"` 4835 // NullFields is a list of field names (e.g. "Code") to include in API requests 4836 // with the JSON null value. By default, fields with empty values are omitted 4837 // from API requests. See 4838 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4839 NullFields []string `json:"-"` 4840 } 4841 4842 func (s *JobCreationReason) MarshalJSON() ([]byte, error) { 4843 type NoMethod JobCreationReason 4844 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4845 } 4846 4847 // JobList: JobList is the response format for a jobs.list call. 4848 type JobList struct { 4849 // Etag: A hash of this page of results. 4850 Etag string `json:"etag,omitempty"` 4851 // Jobs: List of jobs that were requested. 4852 Jobs []*JobListJobs `json:"jobs,omitempty"` 4853 // Kind: The resource type of the response. 4854 Kind string `json:"kind,omitempty"` 4855 // NextPageToken: A token to request the next page of results. 4856 NextPageToken string `json:"nextPageToken,omitempty"` 4857 // Unreachable: A list of skipped locations that were unreachable. For more 4858 // information about BigQuery locations, see: 4859 // https://cloud.google.com/bigquery/docs/locations. Example: "europe-west5" 4860 Unreachable []string `json:"unreachable,omitempty"` 4861 4862 // ServerResponse contains the HTTP response code and headers from the server. 4863 googleapi.ServerResponse `json:"-"` 4864 // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally 4865 // include in API requests. By default, fields with empty or default values are 4866 // omitted from API requests. See 4867 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4868 // details. 4869 ForceSendFields []string `json:"-"` 4870 // NullFields is a list of field names (e.g. "Etag") to include in API requests 4871 // with the JSON null value. By default, fields with empty values are omitted 4872 // from API requests. See 4873 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4874 NullFields []string `json:"-"` 4875 } 4876 4877 func (s *JobList) MarshalJSON() ([]byte, error) { 4878 type NoMethod JobList 4879 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4880 } 4881 4882 // JobListJobs: ListFormatJob is a partial projection of job information 4883 // returned as part of a jobs.list response. 4884 type JobListJobs struct { 4885 // Configuration: Required. Describes the job configuration. 4886 Configuration *JobConfiguration `json:"configuration,omitempty"` 4887 // ErrorResult: A result object that will be present only if the job has 4888 // failed. 4889 ErrorResult *ErrorProto `json:"errorResult,omitempty"` 4890 // Id: Unique opaque ID of the job. 4891 Id string `json:"id,omitempty"` 4892 // JobReference: Unique opaque ID of the job. 4893 JobReference *JobReference `json:"jobReference,omitempty"` 4894 // Kind: The resource type. 4895 Kind string `json:"kind,omitempty"` 4896 // PrincipalSubject: [Full-projection-only] String representation of identity 4897 // of requesting party. Populated for both first- and third-party identities. 4898 // Only present for APIs that support third-party identities. 4899 PrincipalSubject string `json:"principal_subject,omitempty"` 4900 // State: Running state of the job. When the state is DONE, errorResult can be 4901 // checked to determine whether the job succeeded or failed. 4902 State string `json:"state,omitempty"` 4903 // Statistics: Output only. Information about the job, including starting time 4904 // and ending time of the job. 4905 Statistics *JobStatistics `json:"statistics,omitempty"` 4906 // Status: [Full-projection-only] Describes the status of this job. 4907 Status *JobStatus `json:"status,omitempty"` 4908 // UserEmail: [Full-projection-only] Email address of the user who ran the job. 4909 UserEmail string `json:"user_email,omitempty"` 4910 // ForceSendFields is a list of field names (e.g. "Configuration") to 4911 // unconditionally include in API requests. By default, fields with empty or 4912 // default values are omitted from API requests. See 4913 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4914 // details. 4915 ForceSendFields []string `json:"-"` 4916 // NullFields is a list of field names (e.g. "Configuration") to include in API 4917 // requests with the JSON null value. By default, fields with empty values are 4918 // omitted from API requests. See 4919 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4920 NullFields []string `json:"-"` 4921 } 4922 4923 func (s *JobListJobs) MarshalJSON() ([]byte, error) { 4924 type NoMethod JobListJobs 4925 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4926 } 4927 4928 // JobReference: A job reference is a fully qualified identifier for referring 4929 // to a job. 4930 type JobReference struct { 4931 // JobId: Required. The ID of the job. The ID must contain only letters (a-z, 4932 // A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 4933 // 1,024 characters. 4934 JobId string `json:"jobId,omitempty"` 4935 // Location: Optional. The geographic location of the job. The default value is 4936 // US. For more information about BigQuery locations, see: 4937 // https://cloud.google.com/bigquery/docs/locations 4938 Location string `json:"location,omitempty"` 4939 // ProjectId: Required. The ID of the project containing this job. 4940 ProjectId string `json:"projectId,omitempty"` 4941 // ForceSendFields is a list of field names (e.g. "JobId") to unconditionally 4942 // include in API requests. By default, fields with empty or default values are 4943 // omitted from API requests. See 4944 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4945 // details. 4946 ForceSendFields []string `json:"-"` 4947 // NullFields is a list of field names (e.g. "JobId") to include in API 4948 // requests with the JSON null value. By default, fields with empty values are 4949 // omitted from API requests. See 4950 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4951 NullFields []string `json:"-"` 4952 } 4953 4954 func (s *JobReference) MarshalJSON() ([]byte, error) { 4955 type NoMethod JobReference 4956 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4957 } 4958 4959 // JobStatistics: Statistics for a single job execution. 4960 type JobStatistics struct { 4961 // CompletionRatio: Output only. [TrustedTester] Job progress (0.0 -> 1.0) for 4962 // LOAD and EXTRACT jobs. 4963 CompletionRatio float64 `json:"completionRatio,omitempty"` 4964 // Copy: Output only. Statistics for a copy job. 4965 Copy *JobStatistics5 `json:"copy,omitempty"` 4966 // CreationTime: Output only. Creation time of this job, in milliseconds since 4967 // the epoch. This field will be present on all jobs. 4968 CreationTime int64 `json:"creationTime,omitempty,string"` 4969 // DataMaskingStatistics: Output only. Statistics for data-masking. Present 4970 // only for query and extract jobs. 4971 DataMaskingStatistics *DataMaskingStatistics `json:"dataMaskingStatistics,omitempty"` 4972 // EndTime: Output only. End time of this job, in milliseconds since the epoch. 4973 // This field will be present whenever a job is in the DONE state. 4974 EndTime int64 `json:"endTime,omitempty,string"` 4975 // Extract: Output only. Statistics for an extract job. 4976 Extract *JobStatistics4 `json:"extract,omitempty"` 4977 // FinalExecutionDurationMs: Output only. The duration in milliseconds of the 4978 // execution of the final attempt of this job, as BigQuery may internally 4979 // re-attempt to execute the job. 4980 FinalExecutionDurationMs int64 `json:"finalExecutionDurationMs,omitempty,string"` 4981 // Load: Output only. Statistics for a load job. 4982 Load *JobStatistics3 `json:"load,omitempty"` 4983 // NumChildJobs: Output only. Number of child jobs executed. 4984 NumChildJobs int64 `json:"numChildJobs,omitempty,string"` 4985 // ParentJobId: Output only. If this is a child job, specifies the job ID of 4986 // the parent. 4987 ParentJobId string `json:"parentJobId,omitempty"` 4988 // Query: Output only. Statistics for a query job. 4989 Query *JobStatistics2 `json:"query,omitempty"` 4990 // QuotaDeferments: Output only. Quotas which delayed this job's start time. 4991 QuotaDeferments []string `json:"quotaDeferments,omitempty"` 4992 // ReservationUsage: Output only. Job resource usage breakdown by reservation. 4993 // This field reported misleading information and will no longer be populated. 4994 ReservationUsage []*JobStatisticsReservationUsage `json:"reservationUsage,omitempty"` 4995 // ReservationId: Output only. Name of the primary reservation assigned to this 4996 // job. Note that this could be different than reservations reported in the 4997 // reservation usage field if parent reservations were used to execute this 4998 // job. 4999 ReservationId string `json:"reservation_id,omitempty"` 5000 // RowLevelSecurityStatistics: Output only. Statistics for row-level security. 5001 // Present only for query and extract jobs. 5002 RowLevelSecurityStatistics *RowLevelSecurityStatistics `json:"rowLevelSecurityStatistics,omitempty"` 5003 // ScriptStatistics: Output only. If this a child job of a script, specifies 5004 // information about the context of this job within the script. 5005 ScriptStatistics *ScriptStatistics `json:"scriptStatistics,omitempty"` 5006 // SessionInfo: Output only. Information of the session if this job is part of 5007 // one. 5008 SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` 5009 // StartTime: Output only. Start time of this job, in milliseconds since the 5010 // epoch. This field will be present when the job transitions from the PENDING 5011 // state to either RUNNING or DONE. 5012 StartTime int64 `json:"startTime,omitempty,string"` 5013 // TotalBytesProcessed: Output only. Total bytes processed for the job. 5014 TotalBytesProcessed int64 `json:"totalBytesProcessed,omitempty,string"` 5015 // TotalSlotMs: Output only. Slot-milliseconds for the job. 5016 TotalSlotMs int64 `json:"totalSlotMs,omitempty,string"` 5017 // TransactionInfo: Output only. [Alpha] Information of the multi-statement 5018 // transaction if this job is part of one. This property is only expected on a 5019 // child job or a job that is in a session. A script parent job is not part of 5020 // the transaction started in the script. 5021 TransactionInfo *TransactionInfo `json:"transactionInfo,omitempty"` 5022 // ForceSendFields is a list of field names (e.g. "CompletionRatio") to 5023 // unconditionally include in API requests. By default, fields with empty or 5024 // default values are omitted from API requests. See 5025 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5026 // details. 5027 ForceSendFields []string `json:"-"` 5028 // NullFields is a list of field names (e.g. "CompletionRatio") to include in 5029 // API requests with the JSON null value. By default, fields with empty values 5030 // are omitted from API requests. See 5031 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5032 NullFields []string `json:"-"` 5033 } 5034 5035 func (s *JobStatistics) MarshalJSON() ([]byte, error) { 5036 type NoMethod JobStatistics 5037 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5038 } 5039 5040 func (s *JobStatistics) UnmarshalJSON(data []byte) error { 5041 type NoMethod JobStatistics 5042 var s1 struct { 5043 CompletionRatio gensupport.JSONFloat64 `json:"completionRatio"` 5044 *NoMethod 5045 } 5046 s1.NoMethod = (*NoMethod)(s) 5047 if err := json.Unmarshal(data, &s1); err != nil { 5048 return err 5049 } 5050 s.CompletionRatio = float64(s1.CompletionRatio) 5051 return nil 5052 } 5053 5054 // JobStatisticsReservationUsage: Job resource usage breakdown by reservation. 5055 type JobStatisticsReservationUsage struct { 5056 // Name: Reservation name or "unreserved" for on-demand resource usage and 5057 // multi-statement queries. 5058 Name string `json:"name,omitempty"` 5059 // SlotMs: Total slot milliseconds used by the reservation for a particular 5060 // job. 5061 SlotMs int64 `json:"slotMs,omitempty,string"` 5062 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 5063 // include in API requests. By default, fields with empty or default values are 5064 // omitted from API requests. See 5065 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5066 // details. 5067 ForceSendFields []string `json:"-"` 5068 // NullFields is a list of field names (e.g. "Name") to include in API requests 5069 // with the JSON null value. By default, fields with empty values are omitted 5070 // from API requests. See 5071 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5072 NullFields []string `json:"-"` 5073 } 5074 5075 func (s *JobStatisticsReservationUsage) MarshalJSON() ([]byte, error) { 5076 type NoMethod JobStatisticsReservationUsage 5077 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5078 } 5079 5080 // JobStatistics2: Statistics for a query job. 5081 type JobStatistics2 struct { 5082 // BiEngineStatistics: Output only. BI Engine specific Statistics. 5083 BiEngineStatistics *BiEngineStatistics `json:"biEngineStatistics,omitempty"` 5084 // BillingTier: Output only. Billing tier for the job. This is a 5085 // BigQuery-specific concept which is not related to the Google Cloud notion of 5086 // "free tier". The value here is a measure of the query's resource consumption 5087 // relative to the amount of data scanned. For on-demand queries, the limit is 5088 // 100, and all queries within this limit are billed at the standard on-demand 5089 // rates. On-demand queries that exceed this limit will fail with a 5090 // billingTierLimitExceeded error. 5091 BillingTier int64 `json:"billingTier,omitempty"` 5092 // CacheHit: Output only. Whether the query result was fetched from the query 5093 // cache. 5094 CacheHit bool `json:"cacheHit,omitempty"` 5095 // DclTargetDataset: Output only. Referenced dataset for DCL statement. 5096 DclTargetDataset *DatasetReference `json:"dclTargetDataset,omitempty"` 5097 // DclTargetTable: Output only. Referenced table for DCL statement. 5098 DclTargetTable *TableReference `json:"dclTargetTable,omitempty"` 5099 // DclTargetView: Output only. Referenced view for DCL statement. 5100 DclTargetView *TableReference `json:"dclTargetView,omitempty"` 5101 // DdlAffectedRowAccessPolicyCount: Output only. The number of row access 5102 // policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS 5103 // POLICIES queries. 5104 DdlAffectedRowAccessPolicyCount int64 `json:"ddlAffectedRowAccessPolicyCount,omitempty,string"` 5105 // DdlDestinationTable: Output only. The table after rename. Present only for 5106 // ALTER TABLE RENAME TO query. 5107 DdlDestinationTable *TableReference `json:"ddlDestinationTable,omitempty"` 5108 // DdlOperationPerformed: Output only. The DDL operation performed, possibly 5109 // dependent on the pre-existence of the DDL target. 5110 DdlOperationPerformed string `json:"ddlOperationPerformed,omitempty"` 5111 // DdlTargetDataset: Output only. The DDL target dataset. Present only for 5112 // CREATE/ALTER/DROP SCHEMA(dataset) queries. 5113 DdlTargetDataset *DatasetReference `json:"ddlTargetDataset,omitempty"` 5114 // DdlTargetRoutine: Output only. [Beta] The DDL target routine. Present only 5115 // for CREATE/DROP FUNCTION/PROCEDURE queries. 5116 DdlTargetRoutine *RoutineReference `json:"ddlTargetRoutine,omitempty"` 5117 // DdlTargetRowAccessPolicy: Output only. The DDL target row access policy. 5118 // Present only for CREATE/DROP ROW ACCESS POLICY queries. 5119 DdlTargetRowAccessPolicy *RowAccessPolicyReference `json:"ddlTargetRowAccessPolicy,omitempty"` 5120 // DdlTargetTable: Output only. The DDL target table. Present only for 5121 // CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries. 5122 DdlTargetTable *TableReference `json:"ddlTargetTable,omitempty"` 5123 // DmlStats: Output only. Detailed statistics for DML statements INSERT, 5124 // UPDATE, DELETE, MERGE or TRUNCATE. 5125 DmlStats *DmlStatistics `json:"dmlStats,omitempty"` 5126 // EstimatedBytesProcessed: Output only. The original estimate of bytes 5127 // processed for the job. 5128 EstimatedBytesProcessed int64 `json:"estimatedBytesProcessed,omitempty,string"` 5129 // ExportDataStatistics: Output only. Stats for EXPORT DATA statement. 5130 ExportDataStatistics *ExportDataStatistics `json:"exportDataStatistics,omitempty"` 5131 // ExternalServiceCosts: Output only. Job cost breakdown as bigquery internal 5132 // cost and external service costs. 5133 ExternalServiceCosts []*ExternalServiceCost `json:"externalServiceCosts,omitempty"` 5134 // LoadQueryStatistics: Output only. Statistics for a LOAD query. 5135 LoadQueryStatistics *LoadQueryStatistics `json:"loadQueryStatistics,omitempty"` 5136 // MaterializedViewStatistics: Output only. Statistics of materialized views of 5137 // a query job. 5138 MaterializedViewStatistics *MaterializedViewStatistics `json:"materializedViewStatistics,omitempty"` 5139 // MetadataCacheStatistics: Output only. Statistics of metadata cache usage in 5140 // a query for BigLake tables. 5141 MetadataCacheStatistics *MetadataCacheStatistics `json:"metadataCacheStatistics,omitempty"` 5142 // MlStatistics: Output only. Statistics of a BigQuery ML training job. 5143 MlStatistics *MlStatistics `json:"mlStatistics,omitempty"` 5144 // ModelTraining: Deprecated. 5145 ModelTraining *BigQueryModelTraining `json:"modelTraining,omitempty"` 5146 // ModelTrainingCurrentIteration: Deprecated. 5147 ModelTrainingCurrentIteration int64 `json:"modelTrainingCurrentIteration,omitempty"` 5148 // ModelTrainingExpectedTotalIteration: Deprecated. 5149 ModelTrainingExpectedTotalIteration int64 `json:"modelTrainingExpectedTotalIteration,omitempty,string"` 5150 // NumDmlAffectedRows: Output only. The number of rows affected by a DML 5151 // statement. Present only for DML statements INSERT, UPDATE or DELETE. 5152 NumDmlAffectedRows int64 `json:"numDmlAffectedRows,omitempty,string"` 5153 // PerformanceInsights: Output only. Performance insights. 5154 PerformanceInsights *PerformanceInsights `json:"performanceInsights,omitempty"` 5155 // QueryInfo: Output only. Query optimization information for a QUERY job. 5156 QueryInfo *QueryInfo `json:"queryInfo,omitempty"` 5157 // QueryPlan: Output only. Describes execution plan for the query. 5158 QueryPlan []*ExplainQueryStage `json:"queryPlan,omitempty"` 5159 // ReferencedRoutines: Output only. Referenced routines for the job. 5160 ReferencedRoutines []*RoutineReference `json:"referencedRoutines,omitempty"` 5161 // ReferencedTables: Output only. Referenced tables for the job. Queries that 5162 // reference more than 50 tables will not have a complete list. 5163 ReferencedTables []*TableReference `json:"referencedTables,omitempty"` 5164 // ReservationUsage: Output only. Job resource usage breakdown by reservation. 5165 // This field reported misleading information and will no longer be populated. 5166 ReservationUsage []*JobStatistics2ReservationUsage `json:"reservationUsage,omitempty"` 5167 // Schema: Output only. The schema of the results. Present only for successful 5168 // dry run of non-legacy SQL queries. 5169 Schema *TableSchema `json:"schema,omitempty"` 5170 // SearchStatistics: Output only. Search query specific statistics. 5171 SearchStatistics *SearchStatistics `json:"searchStatistics,omitempty"` 5172 // SparkStatistics: Output only. Statistics of a Spark procedure job. 5173 SparkStatistics *SparkStatistics `json:"sparkStatistics,omitempty"` 5174 // StatementType: Output only. The type of query statement, if valid. Possible 5175 // values: * `SELECT`: `SELECT` 5176 // (/bigquery/docs/reference/standard-sql/query-syntax#select_list) statement. 5177 // * `ASSERT`: `ASSERT` 5178 // (/bigquery/docs/reference/standard-sql/debugging-statements#assert) 5179 // statement. * `INSERT`: `INSERT` 5180 // (/bigquery/docs/reference/standard-sql/dml-syntax#insert_statement) 5181 // statement. * `UPDATE`: `UPDATE` 5182 // (/bigquery/docs/reference/standard-sql/query-syntax#update_statement) 5183 // statement. * `DELETE`: `DELETE` 5184 // (/bigquery/docs/reference/standard-sql/data-manipulation-language) 5185 // statement. * `MERGE`: `MERGE` 5186 // (/bigquery/docs/reference/standard-sql/data-manipulation-language) 5187 // statement. * `CREATE_TABLE`: `CREATE TABLE` 5188 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_table_ 5189 // statement) statement, without `AS SELECT`. * `CREATE_TABLE_AS_SELECT`: 5190 // `CREATE TABLE AS SELECT` 5191 // (/bigquery/docs/reference/standard-sql/data-definition-language#query_stateme 5192 // nt) statement. * `CREATE_VIEW`: `CREATE VIEW` 5193 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_view_s 5194 // tatement) statement. * `CREATE_MODEL`: `CREATE MODEL` 5195 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-create#create_mod 5196 // el_statement) statement. * `CREATE_MATERIALIZED_VIEW`: `CREATE MATERIALIZED 5197 // VIEW` 5198 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_materi 5199 // alized_view_statement) statement. * `CREATE_FUNCTION`: `CREATE FUNCTION` 5200 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_functi 5201 // on_statement) statement. * `CREATE_TABLE_FUNCTION`: `CREATE TABLE FUNCTION` 5202 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_table_ 5203 // function_statement) statement. * `CREATE_PROCEDURE`: `CREATE PROCEDURE` 5204 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_proced 5205 // ure) statement. * `CREATE_ROW_ACCESS_POLICY`: `CREATE ROW ACCESS POLICY` 5206 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_row_ac 5207 // cess_policy_statement) statement. * `CREATE_SCHEMA`: `CREATE SCHEMA` 5208 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_schema 5209 // _statement) statement. * `CREATE_SNAPSHOT_TABLE`: `CREATE SNAPSHOT TABLE` 5210 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_snapsh 5211 // ot_table_statement) statement. * `CREATE_SEARCH_INDEX`: `CREATE SEARCH 5212 // INDEX` 5213 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_search 5214 // _index_statement) statement. * `DROP_TABLE`: `DROP TABLE` 5215 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_st 5216 // atement) statement. * `DROP_EXTERNAL_TABLE`: `DROP EXTERNAL TABLE` 5217 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_external 5218 // _table_statement) statement. * `DROP_VIEW`: `DROP VIEW` 5219 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_view_sta 5220 // tement) statement. * `DROP_MODEL`: `DROP MODEL` 5221 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-drop-model) 5222 // statement. * `DROP_MATERIALIZED_VIEW`: `DROP MATERIALIZED VIEW` 5223 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_material 5224 // ized_view_statement) statement. * `DROP_FUNCTION` : `DROP FUNCTION` 5225 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_function 5226 // _statement) statement. * `DROP_TABLE_FUNCTION` : `DROP TABLE FUNCTION` 5227 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_fu 5228 // nction) statement. * `DROP_PROCEDURE`: `DROP PROCEDURE` 5229 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_procedur 5230 // e_statement) statement. * `DROP_SEARCH_INDEX`: `DROP SEARCH INDEX` 5231 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_search_i 5232 // ndex) statement. * `DROP_SCHEMA`: `DROP SCHEMA` 5233 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_schema_s 5234 // tatement) statement. * `DROP_SNAPSHOT_TABLE`: `DROP SNAPSHOT TABLE` 5235 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_snapshot 5236 // _table_statement) statement. * `DROP_ROW_ACCESS_POLICY`: [`DROP ALL] ROW 5237 // ACCESS POLICY|POLICIES` 5238 // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_row_acce 5239 // ss_policy_statement) statement. * `ALTER_TABLE`: `ALTER TABLE` 5240 // (/bigquery/docs/reference/standard-sql/data-definition-language#alter_table_s 5241 // et_options_statement) statement. * `ALTER_VIEW`: `ALTER VIEW` 5242 // (/bigquery/docs/reference/standard-sql/data-definition-language#alter_view_se 5243 // t_options_statement) statement. * `ALTER_MATERIALIZED_VIEW`: `ALTER 5244 // MATERIALIZED VIEW` 5245 // (/bigquery/docs/reference/standard-sql/data-definition-language#alter_materia 5246 // lized_view_set_options_statement) statement. * `ALTER_SCHEMA`: `ALTER 5247 // SCHEMA` 5248 // (/bigquery/docs/reference/standard-sql/data-definition-language#aalter_schema 5249 // _set_options_statement) statement. * `SCRIPT`: `SCRIPT` 5250 // (/bigquery/docs/reference/standard-sql/procedural-language). * 5251 // `TRUNCATE_TABLE`: `TRUNCATE TABLE` 5252 // (/bigquery/docs/reference/standard-sql/dml-syntax#truncate_table_statement) 5253 // statement. * `CREATE_EXTERNAL_TABLE`: `CREATE EXTERNAL TABLE` 5254 // (/bigquery/docs/reference/standard-sql/data-definition-language#create_extern 5255 // al_table_statement) statement. * `EXPORT_DATA`: `EXPORT DATA` 5256 // (/bigquery/docs/reference/standard-sql/other-statements#export_data_statement 5257 // ) statement. * `EXPORT_MODEL`: `EXPORT MODEL` 5258 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-export-model) 5259 // statement. * `LOAD_DATA`: `LOAD DATA` 5260 // (/bigquery/docs/reference/standard-sql/other-statements#load_data_statement) 5261 // statement. * `CALL`: `CALL` 5262 // (/bigquery/docs/reference/standard-sql/procedural-language#call) statement. 5263 StatementType string `json:"statementType,omitempty"` 5264 // Timeline: Output only. Describes a timeline of job execution. 5265 Timeline []*QueryTimelineSample `json:"timeline,omitempty"` 5266 // TotalBytesBilled: Output only. If the project is configured to use on-demand 5267 // pricing, then this field contains the total bytes billed for the job. If the 5268 // project is configured to use flat-rate pricing, then you are not billed for 5269 // bytes and this field is informational only. 5270 TotalBytesBilled int64 `json:"totalBytesBilled,omitempty,string"` 5271 // TotalBytesProcessed: Output only. Total bytes processed for the job. 5272 TotalBytesProcessed int64 `json:"totalBytesProcessed,omitempty,string"` 5273 // TotalBytesProcessedAccuracy: Output only. For dry-run jobs, 5274 // totalBytesProcessed is an estimate and this field specifies the accuracy of 5275 // the estimate. Possible values can be: UNKNOWN: accuracy of the estimate is 5276 // unknown. PRECISE: estimate is precise. LOWER_BOUND: estimate is lower bound 5277 // of what the query would cost. UPPER_BOUND: estimate is upper bound of what 5278 // the query would cost. 5279 TotalBytesProcessedAccuracy string `json:"totalBytesProcessedAccuracy,omitempty"` 5280 // TotalPartitionsProcessed: Output only. Total number of partitions processed 5281 // from all partitioned tables referenced in the job. 5282 TotalPartitionsProcessed int64 `json:"totalPartitionsProcessed,omitempty,string"` 5283 // TotalSlotMs: Output only. Slot-milliseconds for the job. 5284 TotalSlotMs int64 `json:"totalSlotMs,omitempty,string"` 5285 // TransferredBytes: Output only. Total bytes transferred for cross-cloud 5286 // queries such as Cross Cloud Transfer and CREATE TABLE AS SELECT (CTAS). 5287 TransferredBytes int64 `json:"transferredBytes,omitempty,string"` 5288 // UndeclaredQueryParameters: Output only. GoogleSQL only: list of undeclared 5289 // query parameters detected during a dry run validation. 5290 UndeclaredQueryParameters []*QueryParameter `json:"undeclaredQueryParameters,omitempty"` 5291 // VectorSearchStatistics: Output only. Vector Search query specific 5292 // statistics. 5293 VectorSearchStatistics *VectorSearchStatistics `json:"vectorSearchStatistics,omitempty"` 5294 // ForceSendFields is a list of field names (e.g. "BiEngineStatistics") to 5295 // unconditionally include in API requests. By default, fields with empty or 5296 // default values are omitted from API requests. See 5297 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5298 // details. 5299 ForceSendFields []string `json:"-"` 5300 // NullFields is a list of field names (e.g. "BiEngineStatistics") to include 5301 // in API requests with the JSON null value. By default, fields with empty 5302 // values are omitted from API requests. See 5303 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5304 NullFields []string `json:"-"` 5305 } 5306 5307 func (s *JobStatistics2) MarshalJSON() ([]byte, error) { 5308 type NoMethod JobStatistics2 5309 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5310 } 5311 5312 // JobStatistics2ReservationUsage: Job resource usage breakdown by reservation. 5313 type JobStatistics2ReservationUsage struct { 5314 // Name: Reservation name or "unreserved" for on-demand resource usage and 5315 // multi-statement queries. 5316 Name string `json:"name,omitempty"` 5317 // SlotMs: Total slot milliseconds used by the reservation for a particular 5318 // job. 5319 SlotMs int64 `json:"slotMs,omitempty,string"` 5320 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 5321 // include in API requests. By default, fields with empty or default values are 5322 // omitted from API requests. See 5323 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5324 // details. 5325 ForceSendFields []string `json:"-"` 5326 // NullFields is a list of field names (e.g. "Name") to include in API requests 5327 // with the JSON null value. By default, fields with empty values are omitted 5328 // from API requests. See 5329 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5330 NullFields []string `json:"-"` 5331 } 5332 5333 func (s *JobStatistics2ReservationUsage) MarshalJSON() ([]byte, error) { 5334 type NoMethod JobStatistics2ReservationUsage 5335 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5336 } 5337 5338 // JobStatistics3: Statistics for a load job. 5339 type JobStatistics3 struct { 5340 // BadRecords: Output only. The number of bad records encountered. Note that if 5341 // the job has failed because of more bad records encountered than the maximum 5342 // allowed in the load job configuration, then this number can be less than the 5343 // total number of bad records present in the input data. 5344 BadRecords int64 `json:"badRecords,omitempty,string"` 5345 // InputFileBytes: Output only. Number of bytes of source data in a load job. 5346 InputFileBytes int64 `json:"inputFileBytes,omitempty,string"` 5347 // InputFiles: Output only. Number of source files in a load job. 5348 InputFiles int64 `json:"inputFiles,omitempty,string"` 5349 // OutputBytes: Output only. Size of the loaded data in bytes. Note that while 5350 // a load job is in the running state, this value may change. 5351 OutputBytes int64 `json:"outputBytes,omitempty,string"` 5352 // OutputRows: Output only. Number of rows imported in a load job. Note that 5353 // while an import job is in the running state, this value may change. 5354 OutputRows int64 `json:"outputRows,omitempty,string"` 5355 // Timeline: Output only. Describes a timeline of job execution. 5356 Timeline []*QueryTimelineSample `json:"timeline,omitempty"` 5357 // ForceSendFields is a list of field names (e.g. "BadRecords") to 5358 // unconditionally include in API requests. By default, fields with empty or 5359 // default values are omitted from API requests. See 5360 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5361 // details. 5362 ForceSendFields []string `json:"-"` 5363 // NullFields is a list of field names (e.g. "BadRecords") to include in API 5364 // requests with the JSON null value. By default, fields with empty values are 5365 // omitted from API requests. See 5366 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5367 NullFields []string `json:"-"` 5368 } 5369 5370 func (s *JobStatistics3) MarshalJSON() ([]byte, error) { 5371 type NoMethod JobStatistics3 5372 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5373 } 5374 5375 // JobStatistics4: Statistics for an extract job. 5376 type JobStatistics4 struct { 5377 // DestinationUriFileCounts: Output only. Number of files per destination URI 5378 // or URI pattern specified in the extract configuration. These values will be 5379 // in the same order as the URIs specified in the 'destinationUris' field. 5380 DestinationUriFileCounts googleapi.Int64s `json:"destinationUriFileCounts,omitempty"` 5381 // InputBytes: Output only. Number of user bytes extracted into the result. 5382 // This is the byte count as computed by BigQuery for billing purposes and 5383 // doesn't have any relationship with the number of actual result bytes 5384 // extracted in the desired format. 5385 InputBytes int64 `json:"inputBytes,omitempty,string"` 5386 // Timeline: Output only. Describes a timeline of job execution. 5387 Timeline []*QueryTimelineSample `json:"timeline,omitempty"` 5388 // ForceSendFields is a list of field names (e.g. "DestinationUriFileCounts") 5389 // to unconditionally include in API requests. By default, fields with empty or 5390 // default values are omitted from API requests. See 5391 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5392 // details. 5393 ForceSendFields []string `json:"-"` 5394 // NullFields is a list of field names (e.g. "DestinationUriFileCounts") to 5395 // include in API requests with the JSON null value. By default, fields with 5396 // empty values are omitted from API requests. See 5397 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5398 NullFields []string `json:"-"` 5399 } 5400 5401 func (s *JobStatistics4) MarshalJSON() ([]byte, error) { 5402 type NoMethod JobStatistics4 5403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5404 } 5405 5406 // JobStatistics5: Statistics for a copy job. 5407 type JobStatistics5 struct { 5408 // CopiedLogicalBytes: Output only. Number of logical bytes copied to the 5409 // destination table. 5410 CopiedLogicalBytes int64 `json:"copiedLogicalBytes,omitempty,string"` 5411 // CopiedRows: Output only. Number of rows copied to the destination table. 5412 CopiedRows int64 `json:"copiedRows,omitempty,string"` 5413 // ForceSendFields is a list of field names (e.g. "CopiedLogicalBytes") to 5414 // unconditionally include in API requests. By default, fields with empty or 5415 // default values are omitted from API requests. See 5416 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5417 // details. 5418 ForceSendFields []string `json:"-"` 5419 // NullFields is a list of field names (e.g. "CopiedLogicalBytes") to include 5420 // in API requests with the JSON null value. By default, fields with empty 5421 // values are omitted from API requests. See 5422 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5423 NullFields []string `json:"-"` 5424 } 5425 5426 func (s *JobStatistics5) MarshalJSON() ([]byte, error) { 5427 type NoMethod JobStatistics5 5428 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5429 } 5430 5431 type JobStatus struct { 5432 // ErrorResult: Output only. Final error result of the job. If present, 5433 // indicates that the job has completed and was unsuccessful. 5434 ErrorResult *ErrorProto `json:"errorResult,omitempty"` 5435 // Errors: Output only. The first errors encountered during the running of the 5436 // job. The final message includes the number of errors that caused the process 5437 // to stop. Errors here do not necessarily mean that the job has not completed 5438 // or was unsuccessful. 5439 Errors []*ErrorProto `json:"errors,omitempty"` 5440 // State: Output only. Running state of the job. Valid states include 5441 // 'PENDING', 'RUNNING', and 'DONE'. 5442 State string `json:"state,omitempty"` 5443 // ForceSendFields is a list of field names (e.g. "ErrorResult") to 5444 // unconditionally include in API requests. By default, fields with empty or 5445 // default values are omitted from API requests. See 5446 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5447 // details. 5448 ForceSendFields []string `json:"-"` 5449 // NullFields is a list of field names (e.g. "ErrorResult") to include in API 5450 // requests with the JSON null value. By default, fields with empty values are 5451 // omitted from API requests. See 5452 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5453 NullFields []string `json:"-"` 5454 } 5455 5456 func (s *JobStatus) MarshalJSON() ([]byte, error) { 5457 type NoMethod JobStatus 5458 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5459 } 5460 5461 // JoinRestrictionPolicy: Represents privacy policy associated with "join 5462 // restrictions". Join restriction gives data providers the ability to enforce 5463 // joins on the 'join_allowed_columns' when data is queried from a privacy 5464 // protected view. 5465 type JoinRestrictionPolicy struct { 5466 // JoinAllowedColumns: Optional. The only columns that joins are allowed on. 5467 // This field is must be specified for join_conditions JOIN_ANY and JOIN_ALL 5468 // and it cannot be set for JOIN_BLOCKED. 5469 JoinAllowedColumns []string `json:"joinAllowedColumns,omitempty"` 5470 // JoinCondition: Optional. Specifies if a join is required or not on queries 5471 // for the view. Default is JOIN_CONDITION_UNSPECIFIED. 5472 // 5473 // Possible values: 5474 // "JOIN_CONDITION_UNSPECIFIED" - A join is neither required nor restricted 5475 // on any column. Default value. 5476 // "JOIN_ANY" - A join is required on at least one of the specified columns. 5477 // "JOIN_ALL" - A join is required on all specified columns. 5478 // "JOIN_NOT_REQUIRED" - A join is not required, but if present it is only 5479 // permitted on 'join_allowed_columns' 5480 // "JOIN_BLOCKED" - Joins are blocked for all queries. 5481 JoinCondition string `json:"joinCondition,omitempty"` 5482 // ForceSendFields is a list of field names (e.g. "JoinAllowedColumns") to 5483 // unconditionally include in API requests. By default, fields with empty or 5484 // default values are omitted from API requests. See 5485 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5486 // details. 5487 ForceSendFields []string `json:"-"` 5488 // NullFields is a list of field names (e.g. "JoinAllowedColumns") to include 5489 // in API requests with the JSON null value. By default, fields with empty 5490 // values are omitted from API requests. See 5491 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5492 NullFields []string `json:"-"` 5493 } 5494 5495 func (s *JoinRestrictionPolicy) MarshalJSON() ([]byte, error) { 5496 type NoMethod JoinRestrictionPolicy 5497 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5498 } 5499 5500 // JsonOptions: Json Options for load and make external tables. 5501 type JsonOptions struct { 5502 // Encoding: Optional. The character encoding of the data. The supported values 5503 // are UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. The default value is 5504 // UTF-8. 5505 Encoding string `json:"encoding,omitempty"` 5506 // ForceSendFields is a list of field names (e.g. "Encoding") to 5507 // unconditionally include in API requests. By default, fields with empty or 5508 // default values are omitted from API requests. See 5509 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5510 // details. 5511 ForceSendFields []string `json:"-"` 5512 // NullFields is a list of field names (e.g. "Encoding") to include in API 5513 // requests with the JSON null value. By default, fields with empty values are 5514 // omitted from API requests. See 5515 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5516 NullFields []string `json:"-"` 5517 } 5518 5519 func (s *JsonOptions) MarshalJSON() ([]byte, error) { 5520 type NoMethod JsonOptions 5521 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5522 } 5523 5524 type JsonValue interface{} 5525 5526 // LinkedDatasetMetadata: Metadata about the Linked Dataset. 5527 type LinkedDatasetMetadata struct { 5528 // LinkState: Output only. Specifies whether Linked Dataset is currently in a 5529 // linked state or not. 5530 // 5531 // Possible values: 5532 // "LINK_STATE_UNSPECIFIED" - The default value. Default to the LINKED state. 5533 // "LINKED" - Normal Linked Dataset state. Data is queryable via the Linked 5534 // Dataset. 5535 // "UNLINKED" - Data publisher or owner has unlinked this Linked Dataset. It 5536 // means you can no longer query or see the data in the Linked Dataset. 5537 LinkState string `json:"linkState,omitempty"` 5538 // ForceSendFields is a list of field names (e.g. "LinkState") to 5539 // unconditionally include in API requests. By default, fields with empty or 5540 // default values are omitted from API requests. See 5541 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5542 // details. 5543 ForceSendFields []string `json:"-"` 5544 // NullFields is a list of field names (e.g. "LinkState") to include in API 5545 // requests with the JSON null value. By default, fields with empty values are 5546 // omitted from API requests. See 5547 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5548 NullFields []string `json:"-"` 5549 } 5550 5551 func (s *LinkedDatasetMetadata) MarshalJSON() ([]byte, error) { 5552 type NoMethod LinkedDatasetMetadata 5553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5554 } 5555 5556 // LinkedDatasetSource: A dataset source type which refers to another BigQuery 5557 // dataset. 5558 type LinkedDatasetSource struct { 5559 // SourceDataset: The source dataset reference contains project numbers and not 5560 // project ids. 5561 SourceDataset *DatasetReference `json:"sourceDataset,omitempty"` 5562 // ForceSendFields is a list of field names (e.g. "SourceDataset") to 5563 // unconditionally include in API requests. By default, fields with empty or 5564 // default values are omitted from API requests. See 5565 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5566 // details. 5567 ForceSendFields []string `json:"-"` 5568 // NullFields is a list of field names (e.g. "SourceDataset") to include in API 5569 // requests with the JSON null value. By default, fields with empty values are 5570 // omitted from API requests. See 5571 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5572 NullFields []string `json:"-"` 5573 } 5574 5575 func (s *LinkedDatasetSource) MarshalJSON() ([]byte, error) { 5576 type NoMethod LinkedDatasetSource 5577 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5578 } 5579 5580 // ListModelsResponse: Response format for a single page when listing BigQuery 5581 // ML models. 5582 type ListModelsResponse struct { 5583 // Models: Models in the requested dataset. Only the following fields are 5584 // populated: model_reference, model_type, creation_time, last_modified_time 5585 // and labels. 5586 Models []*Model `json:"models,omitempty"` 5587 // NextPageToken: A token to request the next page of results. 5588 NextPageToken string `json:"nextPageToken,omitempty"` 5589 5590 // ServerResponse contains the HTTP response code and headers from the server. 5591 googleapi.ServerResponse `json:"-"` 5592 // ForceSendFields is a list of field names (e.g. "Models") to unconditionally 5593 // include in API requests. By default, fields with empty or default values are 5594 // omitted from API requests. See 5595 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5596 // details. 5597 ForceSendFields []string `json:"-"` 5598 // NullFields is a list of field names (e.g. "Models") to include in API 5599 // requests with the JSON null value. By default, fields with empty values are 5600 // omitted from API requests. See 5601 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5602 NullFields []string `json:"-"` 5603 } 5604 5605 func (s *ListModelsResponse) MarshalJSON() ([]byte, error) { 5606 type NoMethod ListModelsResponse 5607 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5608 } 5609 5610 // ListRoutinesResponse: Describes the format of a single result page when 5611 // listing routines. 5612 type ListRoutinesResponse struct { 5613 // NextPageToken: A token to request the next page of results. 5614 NextPageToken string `json:"nextPageToken,omitempty"` 5615 // Routines: Routines in the requested dataset. Unless read_mask is set in the 5616 // request, only the following fields are populated: etag, project_id, 5617 // dataset_id, routine_id, routine_type, creation_time, last_modified_time, 5618 // language, and remote_function_options. 5619 Routines []*Routine `json:"routines,omitempty"` 5620 5621 // ServerResponse contains the HTTP response code and headers from the server. 5622 googleapi.ServerResponse `json:"-"` 5623 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 5624 // unconditionally include in API requests. By default, fields with empty or 5625 // default values are omitted from API requests. See 5626 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5627 // details. 5628 ForceSendFields []string `json:"-"` 5629 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 5630 // requests with the JSON null value. By default, fields with empty values are 5631 // omitted from API requests. See 5632 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5633 NullFields []string `json:"-"` 5634 } 5635 5636 func (s *ListRoutinesResponse) MarshalJSON() ([]byte, error) { 5637 type NoMethod ListRoutinesResponse 5638 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5639 } 5640 5641 // ListRowAccessPoliciesResponse: Response message for the 5642 // ListRowAccessPolicies method. 5643 type ListRowAccessPoliciesResponse struct { 5644 // NextPageToken: A token to request the next page of results. 5645 NextPageToken string `json:"nextPageToken,omitempty"` 5646 // RowAccessPolicies: Row access policies on the requested table. 5647 RowAccessPolicies []*RowAccessPolicy `json:"rowAccessPolicies,omitempty"` 5648 5649 // ServerResponse contains the HTTP response code and headers from the server. 5650 googleapi.ServerResponse `json:"-"` 5651 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 5652 // unconditionally include in API requests. By default, fields with empty or 5653 // default values are omitted from API requests. See 5654 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5655 // details. 5656 ForceSendFields []string `json:"-"` 5657 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 5658 // requests with the JSON null value. By default, fields with empty values are 5659 // omitted from API requests. See 5660 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5661 NullFields []string `json:"-"` 5662 } 5663 5664 func (s *ListRowAccessPoliciesResponse) MarshalJSON() ([]byte, error) { 5665 type NoMethod ListRowAccessPoliciesResponse 5666 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5667 } 5668 5669 // LoadQueryStatistics: Statistics for a LOAD query. 5670 type LoadQueryStatistics struct { 5671 // BadRecords: Output only. The number of bad records encountered while 5672 // processing a LOAD query. Note that if the job has failed because of more bad 5673 // records encountered than the maximum allowed in the load job configuration, 5674 // then this number can be less than the total number of bad records present in 5675 // the input data. 5676 BadRecords int64 `json:"badRecords,omitempty,string"` 5677 // BytesTransferred: Output only. This field is deprecated. The number of bytes 5678 // of source data copied over the network for a `LOAD` query. 5679 // `transferred_bytes` has the canonical value for physical transferred bytes, 5680 // which is used for BigQuery Omni billing. 5681 BytesTransferred int64 `json:"bytesTransferred,omitempty,string"` 5682 // InputFileBytes: Output only. Number of bytes of source data in a LOAD query. 5683 InputFileBytes int64 `json:"inputFileBytes,omitempty,string"` 5684 // InputFiles: Output only. Number of source files in a LOAD query. 5685 InputFiles int64 `json:"inputFiles,omitempty,string"` 5686 // OutputBytes: Output only. Size of the loaded data in bytes. Note that while 5687 // a LOAD query is in the running state, this value may change. 5688 OutputBytes int64 `json:"outputBytes,omitempty,string"` 5689 // OutputRows: Output only. Number of rows imported in a LOAD query. Note that 5690 // while a LOAD query is in the running state, this value may change. 5691 OutputRows int64 `json:"outputRows,omitempty,string"` 5692 // ForceSendFields is a list of field names (e.g. "BadRecords") to 5693 // unconditionally include in API requests. By default, fields with empty or 5694 // default values are omitted from API requests. See 5695 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5696 // details. 5697 ForceSendFields []string `json:"-"` 5698 // NullFields is a list of field names (e.g. "BadRecords") to include in API 5699 // requests with the JSON null value. By default, fields with empty values are 5700 // omitted from API requests. See 5701 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5702 NullFields []string `json:"-"` 5703 } 5704 5705 func (s *LoadQueryStatistics) MarshalJSON() ([]byte, error) { 5706 type NoMethod LoadQueryStatistics 5707 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5708 } 5709 5710 // LocationMetadata: BigQuery-specific metadata about a location. This will be 5711 // set on google.cloud.location.Location.metadata in Cloud Location API 5712 // responses. 5713 type LocationMetadata struct { 5714 // LegacyLocationId: The legacy BigQuery location ID, e.g. “EU” for the 5715 // “europe” location. This is for any API consumers that need the legacy 5716 // “US” and “EU” locations. 5717 LegacyLocationId string `json:"legacyLocationId,omitempty"` 5718 // ForceSendFields is a list of field names (e.g. "LegacyLocationId") to 5719 // unconditionally include in API requests. By default, fields with empty or 5720 // default values are omitted from API requests. See 5721 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5722 // details. 5723 ForceSendFields []string `json:"-"` 5724 // NullFields is a list of field names (e.g. "LegacyLocationId") to include in 5725 // API requests with the JSON null value. By default, fields with empty values 5726 // are omitted from API requests. See 5727 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5728 NullFields []string `json:"-"` 5729 } 5730 5731 func (s *LocationMetadata) MarshalJSON() ([]byte, error) { 5732 type NoMethod LocationMetadata 5733 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5734 } 5735 5736 // MaterializedView: A materialized view considered for a query job. 5737 type MaterializedView struct { 5738 // Chosen: Whether the materialized view is chosen for the query. A 5739 // materialized view can be chosen to rewrite multiple parts of the same query. 5740 // If a materialized view is chosen to rewrite any part of the query, then this 5741 // field is true, even if the materialized view was not chosen to rewrite 5742 // others parts. 5743 Chosen bool `json:"chosen,omitempty"` 5744 // EstimatedBytesSaved: If present, specifies a best-effort estimation of the 5745 // bytes saved by using the materialized view rather than its base tables. 5746 EstimatedBytesSaved int64 `json:"estimatedBytesSaved,omitempty,string"` 5747 // RejectedReason: If present, specifies the reason why the materialized view 5748 // was not chosen for the query. 5749 // 5750 // Possible values: 5751 // "REJECTED_REASON_UNSPECIFIED" - Default unspecified value. 5752 // "NO_DATA" - View has no cached data because it has not refreshed yet. 5753 // "COST" - The estimated cost of the view is more expensive than another 5754 // view or the base table. Note: The estimate cost might not match the billed 5755 // cost. 5756 // "BASE_TABLE_TRUNCATED" - View has no cached data because a base table is 5757 // truncated. 5758 // "BASE_TABLE_DATA_CHANGE" - View is invalidated because of a data change in 5759 // one or more base tables. It could be any recent change if the 5760 // [`max_staleness`](https://cloud.google.com/bigquery/docs/materialized-views-c 5761 // reate#max_staleness) option is not set for the view, or otherwise any change 5762 // outside of the staleness window. 5763 // "BASE_TABLE_PARTITION_EXPIRATION_CHANGE" - View is invalidated because a 5764 // base table's partition expiration has changed. 5765 // "BASE_TABLE_EXPIRED_PARTITION" - View is invalidated because a base 5766 // table's partition has expired. 5767 // "BASE_TABLE_INCOMPATIBLE_METADATA_CHANGE" - View is invalidated because a 5768 // base table has an incompatible metadata change. 5769 // "TIME_ZONE" - View is invalidated because it was refreshed with a time 5770 // zone other than that of the current job. 5771 // "OUT_OF_TIME_TRAVEL_WINDOW" - View is outside the time travel window. 5772 // "BASE_TABLE_FINE_GRAINED_SECURITY_POLICY" - View is inaccessible to the 5773 // user because of a fine-grained security policy on one of its base tables. 5774 // "BASE_TABLE_TOO_STALE" - One of the view's base tables is too stale. For 5775 // example, the cached metadata of a BigLake external table needs to be 5776 // updated. 5777 RejectedReason string `json:"rejectedReason,omitempty"` 5778 // TableReference: The candidate materialized view. 5779 TableReference *TableReference `json:"tableReference,omitempty"` 5780 // ForceSendFields is a list of field names (e.g. "Chosen") to unconditionally 5781 // include in API requests. By default, fields with empty or default values are 5782 // omitted from API requests. See 5783 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5784 // details. 5785 ForceSendFields []string `json:"-"` 5786 // NullFields is a list of field names (e.g. "Chosen") to include in API 5787 // requests with the JSON null value. By default, fields with empty values are 5788 // omitted from API requests. See 5789 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5790 NullFields []string `json:"-"` 5791 } 5792 5793 func (s *MaterializedView) MarshalJSON() ([]byte, error) { 5794 type NoMethod MaterializedView 5795 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5796 } 5797 5798 // MaterializedViewDefinition: Definition and configuration of a materialized 5799 // view. 5800 type MaterializedViewDefinition struct { 5801 // AllowNonIncrementalDefinition: Optional. This option declares the intention 5802 // to construct a materialized view that isn't refreshed incrementally. 5803 AllowNonIncrementalDefinition bool `json:"allowNonIncrementalDefinition,omitempty"` 5804 // EnableRefresh: Optional. Enable automatic refresh of the materialized view 5805 // when the base table is updated. The default value is "true". 5806 EnableRefresh bool `json:"enableRefresh,omitempty"` 5807 // LastRefreshTime: Output only. The time when this materialized view was last 5808 // refreshed, in milliseconds since the epoch. 5809 LastRefreshTime int64 `json:"lastRefreshTime,omitempty,string"` 5810 // MaxStaleness: [Optional] Max staleness of data that could be returned when 5811 // materizlized view is queried (formatted as Google SQL Interval type). 5812 MaxStaleness string `json:"maxStaleness,omitempty"` 5813 // Query: Required. A query whose results are persisted. 5814 Query string `json:"query,omitempty"` 5815 // RefreshIntervalMs: Optional. The maximum frequency at which this 5816 // materialized view will be refreshed. The default value is "1800000" (30 5817 // minutes). 5818 RefreshIntervalMs int64 `json:"refreshIntervalMs,omitempty,string"` 5819 // ForceSendFields is a list of field names (e.g. 5820 // "AllowNonIncrementalDefinition") to unconditionally include in API requests. 5821 // By default, fields with empty or default values are omitted from API 5822 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 5823 // for more details. 5824 ForceSendFields []string `json:"-"` 5825 // NullFields is a list of field names (e.g. "AllowNonIncrementalDefinition") 5826 // to include in API requests with the JSON null value. By default, fields with 5827 // empty values are omitted from API requests. See 5828 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5829 NullFields []string `json:"-"` 5830 } 5831 5832 func (s *MaterializedViewDefinition) MarshalJSON() ([]byte, error) { 5833 type NoMethod MaterializedViewDefinition 5834 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5835 } 5836 5837 // MaterializedViewStatistics: Statistics of materialized views considered in a 5838 // query job. 5839 type MaterializedViewStatistics struct { 5840 // MaterializedView: Materialized views considered for the query job. Only 5841 // certain materialized views are used. For a detailed list, see the child 5842 // message. If many materialized views are considered, then the list might be 5843 // incomplete. 5844 MaterializedView []*MaterializedView `json:"materializedView,omitempty"` 5845 // ForceSendFields is a list of field names (e.g. "MaterializedView") to 5846 // unconditionally include in API requests. By default, fields with empty or 5847 // default values are omitted from API requests. See 5848 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5849 // details. 5850 ForceSendFields []string `json:"-"` 5851 // NullFields is a list of field names (e.g. "MaterializedView") to include in 5852 // API requests with the JSON null value. By default, fields with empty values 5853 // are omitted from API requests. See 5854 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5855 NullFields []string `json:"-"` 5856 } 5857 5858 func (s *MaterializedViewStatistics) MarshalJSON() ([]byte, error) { 5859 type NoMethod MaterializedViewStatistics 5860 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5861 } 5862 5863 // MaterializedViewStatus: Status of a materialized view. The last refresh 5864 // timestamp status is omitted here, but is present in the 5865 // MaterializedViewDefinition message. 5866 type MaterializedViewStatus struct { 5867 // LastRefreshStatus: Output only. Error result of the last automatic refresh. 5868 // If present, indicates that the last automatic refresh was unsuccessful. 5869 LastRefreshStatus *ErrorProto `json:"lastRefreshStatus,omitempty"` 5870 // RefreshWatermark: Output only. Refresh watermark of materialized view. The 5871 // base tables' data were collected into the materialized view cache until this 5872 // time. 5873 RefreshWatermark string `json:"refreshWatermark,omitempty"` 5874 // ForceSendFields is a list of field names (e.g. "LastRefreshStatus") to 5875 // unconditionally include in API requests. By default, fields with empty or 5876 // default values are omitted from API requests. See 5877 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5878 // details. 5879 ForceSendFields []string `json:"-"` 5880 // NullFields is a list of field names (e.g. "LastRefreshStatus") to include in 5881 // API requests with the JSON null value. By default, fields with empty values 5882 // are omitted from API requests. See 5883 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5884 NullFields []string `json:"-"` 5885 } 5886 5887 func (s *MaterializedViewStatus) MarshalJSON() ([]byte, error) { 5888 type NoMethod MaterializedViewStatus 5889 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5890 } 5891 5892 // MetadataCacheStatistics: Statistics for metadata caching in BigLake tables. 5893 type MetadataCacheStatistics struct { 5894 // TableMetadataCacheUsage: Set for the Metadata caching eligible tables 5895 // referenced in the query. 5896 TableMetadataCacheUsage []*TableMetadataCacheUsage `json:"tableMetadataCacheUsage,omitempty"` 5897 // ForceSendFields is a list of field names (e.g. "TableMetadataCacheUsage") to 5898 // unconditionally include in API requests. By default, fields with empty or 5899 // default values are omitted from API requests. See 5900 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5901 // details. 5902 ForceSendFields []string `json:"-"` 5903 // NullFields is a list of field names (e.g. "TableMetadataCacheUsage") to 5904 // include in API requests with the JSON null value. By default, fields with 5905 // empty values are omitted from API requests. See 5906 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5907 NullFields []string `json:"-"` 5908 } 5909 5910 func (s *MetadataCacheStatistics) MarshalJSON() ([]byte, error) { 5911 type NoMethod MetadataCacheStatistics 5912 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5913 } 5914 5915 // MlStatistics: Job statistics specific to a BigQuery ML training job. 5916 type MlStatistics struct { 5917 // HparamTrials: Output only. Trials of a hyperparameter tuning job 5918 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie 5919 // w) sorted by trial_id. 5920 HparamTrials []*HparamTuningTrial `json:"hparamTrials,omitempty"` 5921 // IterationResults: Results for all completed iterations. Empty for 5922 // hyperparameter tuning jobs 5923 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie 5924 // w). 5925 IterationResults []*IterationResult `json:"iterationResults,omitempty"` 5926 // MaxIterations: Output only. Maximum number of iterations specified as 5927 // max_iterations in the 'CREATE MODEL' query. The actual number of iterations 5928 // may be less than this number due to early stop. 5929 MaxIterations int64 `json:"maxIterations,omitempty,string"` 5930 // ModelType: Output only. The type of the model that is being trained. 5931 // 5932 // Possible values: 5933 // "MODEL_TYPE_UNSPECIFIED" - Default value. 5934 // "LINEAR_REGRESSION" - Linear regression model. 5935 // "LOGISTIC_REGRESSION" - Logistic regression based classification model. 5936 // "KMEANS" - K-means clustering model. 5937 // "MATRIX_FACTORIZATION" - Matrix factorization model. 5938 // "DNN_CLASSIFIER" - DNN classifier model. 5939 // "TENSORFLOW" - An imported TensorFlow model. 5940 // "DNN_REGRESSOR" - DNN regressor model. 5941 // "XGBOOST" - An imported XGBoost model. 5942 // "BOOSTED_TREE_REGRESSOR" - Boosted tree regressor model. 5943 // "BOOSTED_TREE_CLASSIFIER" - Boosted tree classifier model. 5944 // "ARIMA" - ARIMA model. 5945 // "AUTOML_REGRESSOR" - AutoML Tables regression model. 5946 // "AUTOML_CLASSIFIER" - AutoML Tables classification model. 5947 // "PCA" - Prinpical Component Analysis model. 5948 // "DNN_LINEAR_COMBINED_CLASSIFIER" - Wide-and-deep classifier model. 5949 // "DNN_LINEAR_COMBINED_REGRESSOR" - Wide-and-deep regressor model. 5950 // "AUTOENCODER" - Autoencoder model. 5951 // "ARIMA_PLUS" - New name for the ARIMA model. 5952 // "ARIMA_PLUS_XREG" - ARIMA with external regressors. 5953 // "RANDOM_FOREST_REGRESSOR" - Random forest regressor model. 5954 // "RANDOM_FOREST_CLASSIFIER" - Random forest classifier model. 5955 // "TENSORFLOW_LITE" - An imported TensorFlow Lite model. 5956 // "ONNX" - An imported ONNX model. 5957 // "TRANSFORM_ONLY" - Model to capture the manual preprocessing logic in the 5958 // transform clause. 5959 ModelType string `json:"modelType,omitempty"` 5960 // TrainingType: Output only. Training type of the job. 5961 // 5962 // Possible values: 5963 // "TRAINING_TYPE_UNSPECIFIED" - Unspecified training type. 5964 // "SINGLE_TRAINING" - Single training with fixed parameter space. 5965 // "HPARAM_TUNING" - [Hyperparameter tuning 5966 // training](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tunin 5967 // g-overview). 5968 TrainingType string `json:"trainingType,omitempty"` 5969 // ForceSendFields is a list of field names (e.g. "HparamTrials") to 5970 // unconditionally include in API requests. By default, fields with empty or 5971 // default values are omitted from API requests. See 5972 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5973 // details. 5974 ForceSendFields []string `json:"-"` 5975 // NullFields is a list of field names (e.g. "HparamTrials") to include in API 5976 // requests with the JSON null value. By default, fields with empty values are 5977 // omitted from API requests. See 5978 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5979 NullFields []string `json:"-"` 5980 } 5981 5982 func (s *MlStatistics) MarshalJSON() ([]byte, error) { 5983 type NoMethod MlStatistics 5984 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5985 } 5986 5987 type Model struct { 5988 // BestTrialId: The best trial_id across all training runs. 5989 BestTrialId int64 `json:"bestTrialId,omitempty,string"` 5990 // CreationTime: Output only. The time when this model was created, in 5991 // millisecs since the epoch. 5992 CreationTime int64 `json:"creationTime,omitempty,string"` 5993 // DefaultTrialId: Output only. The default trial_id to use in TVFs when the 5994 // trial_id is not passed in. For single-objective hyperparameter tuning 5995 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie 5996 // w) models, this is the best trial ID. For multi-objective hyperparameter 5997 // tuning 5998 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie 5999 // w) models, this is the smallest trial ID among all Pareto optimal trials. 6000 DefaultTrialId int64 `json:"defaultTrialId,omitempty,string"` 6001 // Description: Optional. A user-friendly description of this model. 6002 Description string `json:"description,omitempty"` 6003 // EncryptionConfiguration: Custom encryption configuration (e.g., Cloud KMS 6004 // keys). This shows the encryption configuration of the model data while 6005 // stored in BigQuery storage. This field can be used with PatchModel to update 6006 // encryption key for an already encrypted model. 6007 EncryptionConfiguration *EncryptionConfiguration `json:"encryptionConfiguration,omitempty"` 6008 // Etag: Output only. A hash of this resource. 6009 Etag string `json:"etag,omitempty"` 6010 // ExpirationTime: Optional. The time when this model expires, in milliseconds 6011 // since the epoch. If not present, the model will persist indefinitely. 6012 // Expired models will be deleted and their storage reclaimed. The 6013 // defaultTableExpirationMs property of the encapsulating dataset can be used 6014 // to set a default expirationTime on newly created models. 6015 ExpirationTime int64 `json:"expirationTime,omitempty,string"` 6016 // FeatureColumns: Output only. Input feature columns for the model inference. 6017 // If the model is trained with TRANSFORM clause, these are the input of the 6018 // TRANSFORM clause. 6019 FeatureColumns []*StandardSqlField `json:"featureColumns,omitempty"` 6020 // FriendlyName: Optional. A descriptive name for this model. 6021 FriendlyName string `json:"friendlyName,omitempty"` 6022 // HparamSearchSpaces: Output only. All hyperparameter search spaces in this 6023 // model. 6024 HparamSearchSpaces *HparamSearchSpaces `json:"hparamSearchSpaces,omitempty"` 6025 // HparamTrials: Output only. Trials of a hyperparameter tuning 6026 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie 6027 // w) model sorted by trial_id. 6028 HparamTrials []*HparamTuningTrial `json:"hparamTrials,omitempty"` 6029 // LabelColumns: Output only. Label columns that were used to train this model. 6030 // The output of the model will have a "predicted_" prefix to these columns. 6031 LabelColumns []*StandardSqlField `json:"labelColumns,omitempty"` 6032 // Labels: The labels associated with this model. You can use these to organize 6033 // and group your models. Label keys and values can be no longer than 63 6034 // characters, can only contain lowercase letters, numeric characters, 6035 // underscores and dashes. International characters are allowed. Label values 6036 // are optional. Label keys must start with a letter and each label in the list 6037 // must have a different key. 6038 Labels map[string]string `json:"labels,omitempty"` 6039 // LastModifiedTime: Output only. The time when this model was last modified, 6040 // in millisecs since the epoch. 6041 LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"` 6042 // Location: Output only. The geographic location where the model resides. This 6043 // value is inherited from the dataset. 6044 Location string `json:"location,omitempty"` 6045 // ModelReference: Required. Unique identifier for this model. 6046 ModelReference *ModelReference `json:"modelReference,omitempty"` 6047 // ModelType: Output only. Type of the model resource. 6048 // 6049 // Possible values: 6050 // "MODEL_TYPE_UNSPECIFIED" - Default value. 6051 // "LINEAR_REGRESSION" - Linear regression model. 6052 // "LOGISTIC_REGRESSION" - Logistic regression based classification model. 6053 // "KMEANS" - K-means clustering model. 6054 // "MATRIX_FACTORIZATION" - Matrix factorization model. 6055 // "DNN_CLASSIFIER" - DNN classifier model. 6056 // "TENSORFLOW" - An imported TensorFlow model. 6057 // "DNN_REGRESSOR" - DNN regressor model. 6058 // "XGBOOST" - An imported XGBoost model. 6059 // "BOOSTED_TREE_REGRESSOR" - Boosted tree regressor model. 6060 // "BOOSTED_TREE_CLASSIFIER" - Boosted tree classifier model. 6061 // "ARIMA" - ARIMA model. 6062 // "AUTOML_REGRESSOR" - AutoML Tables regression model. 6063 // "AUTOML_CLASSIFIER" - AutoML Tables classification model. 6064 // "PCA" - Prinpical Component Analysis model. 6065 // "DNN_LINEAR_COMBINED_CLASSIFIER" - Wide-and-deep classifier model. 6066 // "DNN_LINEAR_COMBINED_REGRESSOR" - Wide-and-deep regressor model. 6067 // "AUTOENCODER" - Autoencoder model. 6068 // "ARIMA_PLUS" - New name for the ARIMA model. 6069 // "ARIMA_PLUS_XREG" - ARIMA with external regressors. 6070 // "RANDOM_FOREST_REGRESSOR" - Random forest regressor model. 6071 // "RANDOM_FOREST_CLASSIFIER" - Random forest classifier model. 6072 // "TENSORFLOW_LITE" - An imported TensorFlow Lite model. 6073 // "ONNX" - An imported ONNX model. 6074 // "TRANSFORM_ONLY" - Model to capture the manual preprocessing logic in the 6075 // transform clause. 6076 ModelType string `json:"modelType,omitempty"` 6077 // OptimalTrialIds: Output only. For single-objective hyperparameter tuning 6078 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie 6079 // w) models, it only contains the best trial. For multi-objective 6080 // hyperparameter tuning 6081 // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie 6082 // w) models, it contains all Pareto optimal trials sorted by trial_id. 6083 OptimalTrialIds googleapi.Int64s `json:"optimalTrialIds,omitempty"` 6084 // RemoteModelInfo: Output only. Remote model info 6085 RemoteModelInfo *RemoteModelInfo `json:"remoteModelInfo,omitempty"` 6086 // TrainingRuns: Information for all training runs in increasing order of 6087 // start_time. 6088 TrainingRuns []*TrainingRun `json:"trainingRuns,omitempty"` 6089 // TransformColumns: Output only. This field will be populated if a TRANSFORM 6090 // clause was used to train a model. TRANSFORM clause (if used) takes 6091 // feature_columns as input and outputs transform_columns. transform_columns 6092 // then are used to train the model. 6093 TransformColumns []*TransformColumn `json:"transformColumns,omitempty"` 6094 6095 // ServerResponse contains the HTTP response code and headers from the server. 6096 googleapi.ServerResponse `json:"-"` 6097 // ForceSendFields is a list of field names (e.g. "BestTrialId") to 6098 // unconditionally include in API requests. By default, fields with empty or 6099 // default values are omitted from API requests. See 6100 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6101 // details. 6102 ForceSendFields []string `json:"-"` 6103 // NullFields is a list of field names (e.g. "BestTrialId") to include in API 6104 // requests with the JSON null value. By default, fields with empty values are 6105 // omitted from API requests. See 6106 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6107 NullFields []string `json:"-"` 6108 } 6109 6110 func (s *Model) MarshalJSON() ([]byte, error) { 6111 type NoMethod Model 6112 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6113 } 6114 6115 type ModelDefinition struct { 6116 // ModelOptions: Deprecated. 6117 ModelOptions *ModelDefinitionModelOptions `json:"modelOptions,omitempty"` 6118 // TrainingRuns: Deprecated. 6119 TrainingRuns []*BqmlTrainingRun `json:"trainingRuns,omitempty"` 6120 // ForceSendFields is a list of field names (e.g. "ModelOptions") to 6121 // unconditionally include in API requests. By default, fields with empty or 6122 // default values are omitted from API requests. See 6123 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6124 // details. 6125 ForceSendFields []string `json:"-"` 6126 // NullFields is a list of field names (e.g. "ModelOptions") to include in API 6127 // requests with the JSON null value. By default, fields with empty values are 6128 // omitted from API requests. See 6129 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6130 NullFields []string `json:"-"` 6131 } 6132 6133 func (s *ModelDefinition) MarshalJSON() ([]byte, error) { 6134 type NoMethod ModelDefinition 6135 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6136 } 6137 6138 // ModelDefinitionModelOptions: Deprecated. 6139 type ModelDefinitionModelOptions struct { 6140 Labels []string `json:"labels,omitempty"` 6141 LossType string `json:"lossType,omitempty"` 6142 ModelType string `json:"modelType,omitempty"` 6143 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally 6144 // include in API requests. By default, fields with empty or default values are 6145 // omitted from API requests. See 6146 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6147 // details. 6148 ForceSendFields []string `json:"-"` 6149 // NullFields is a list of field names (e.g. "Labels") to include in API 6150 // requests with the JSON null value. By default, fields with empty values are 6151 // omitted from API requests. See 6152 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6153 NullFields []string `json:"-"` 6154 } 6155 6156 func (s *ModelDefinitionModelOptions) MarshalJSON() ([]byte, error) { 6157 type NoMethod ModelDefinitionModelOptions 6158 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6159 } 6160 6161 // ModelExtractOptions: Options related to model extraction. 6162 type ModelExtractOptions struct { 6163 // TrialId: The 1-based ID of the trial to be exported from a hyperparameter 6164 // tuning model. If not specified, the trial with id = Model 6165 // (/bigquery/docs/reference/rest/v2/models#resource:-model).defaultTrialId is 6166 // exported. This field is ignored for models not trained with hyperparameter 6167 // tuning. 6168 TrialId int64 `json:"trialId,omitempty,string"` 6169 // ForceSendFields is a list of field names (e.g. "TrialId") to unconditionally 6170 // include in API requests. By default, fields with empty or default values are 6171 // omitted from API requests. See 6172 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6173 // details. 6174 ForceSendFields []string `json:"-"` 6175 // NullFields is a list of field names (e.g. "TrialId") to include in API 6176 // requests with the JSON null value. By default, fields with empty values are 6177 // omitted from API requests. See 6178 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6179 NullFields []string `json:"-"` 6180 } 6181 6182 func (s *ModelExtractOptions) MarshalJSON() ([]byte, error) { 6183 type NoMethod ModelExtractOptions 6184 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6185 } 6186 6187 // ModelReference: Id path of a model. 6188 type ModelReference struct { 6189 // DatasetId: Required. The ID of the dataset containing this model. 6190 DatasetId string `json:"datasetId,omitempty"` 6191 // ModelId: Required. The ID of the model. The ID must contain only letters 6192 // (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 6193 // characters. 6194 ModelId string `json:"modelId,omitempty"` 6195 // ProjectId: Required. The ID of the project containing this model. 6196 ProjectId string `json:"projectId,omitempty"` 6197 // ForceSendFields is a list of field names (e.g. "DatasetId") to 6198 // unconditionally include in API requests. By default, fields with empty or 6199 // default values are omitted from API requests. See 6200 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6201 // details. 6202 ForceSendFields []string `json:"-"` 6203 // NullFields is a list of field names (e.g. "DatasetId") to include in API 6204 // requests with the JSON null value. By default, fields with empty values are 6205 // omitted from API requests. See 6206 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6207 NullFields []string `json:"-"` 6208 } 6209 6210 func (s *ModelReference) MarshalJSON() ([]byte, error) { 6211 type NoMethod ModelReference 6212 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6213 } 6214 6215 // MultiClassClassificationMetrics: Evaluation metrics for multi-class 6216 // classification/classifier models. 6217 type MultiClassClassificationMetrics struct { 6218 // AggregateClassificationMetrics: Aggregate classification metrics. 6219 AggregateClassificationMetrics *AggregateClassificationMetrics `json:"aggregateClassificationMetrics,omitempty"` 6220 // ConfusionMatrixList: Confusion matrix at different thresholds. 6221 ConfusionMatrixList []*ConfusionMatrix `json:"confusionMatrixList,omitempty"` 6222 // ForceSendFields is a list of field names (e.g. 6223 // "AggregateClassificationMetrics") to unconditionally include in API 6224 // requests. By default, fields with empty or default values are omitted from 6225 // API requests. See 6226 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6227 // details. 6228 ForceSendFields []string `json:"-"` 6229 // NullFields is a list of field names (e.g. "AggregateClassificationMetrics") 6230 // to include in API requests with the JSON null value. By default, fields with 6231 // empty values are omitted from API requests. See 6232 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6233 NullFields []string `json:"-"` 6234 } 6235 6236 func (s *MultiClassClassificationMetrics) MarshalJSON() ([]byte, error) { 6237 type NoMethod MultiClassClassificationMetrics 6238 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6239 } 6240 6241 // ParquetOptions: Parquet Options for load and make external tables. 6242 type ParquetOptions struct { 6243 // EnableListInference: Optional. Indicates whether to use schema inference 6244 // specifically for Parquet LIST logical type. 6245 EnableListInference bool `json:"enableListInference,omitempty"` 6246 // EnumAsString: Optional. Indicates whether to infer Parquet ENUM logical type 6247 // as STRING instead of BYTES by default. 6248 EnumAsString bool `json:"enumAsString,omitempty"` 6249 // MapTargetType: Optional. Will indicate how to represent a parquet map if 6250 // present. 6251 // 6252 // Possible values: 6253 // "MAP_TARGET_TYPE_UNSPECIFIED" - In this mode, we fall back to the default. 6254 // Currently (3/24) we represent the map as: struct map_field_name { repeated 6255 // struct key_value { key value } } 6256 // "ARRAY_OF_STRUCT" - In this mode, we omit parquet's key_value struct and 6257 // represent the map as: repeated struct map_field_name { key value } 6258 MapTargetType string `json:"mapTargetType,omitempty"` 6259 // ForceSendFields is a list of field names (e.g. "EnableListInference") to 6260 // unconditionally include in API requests. By default, fields with empty or 6261 // default values are omitted from API requests. See 6262 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6263 // details. 6264 ForceSendFields []string `json:"-"` 6265 // NullFields is a list of field names (e.g. "EnableListInference") to include 6266 // in API requests with the JSON null value. By default, fields with empty 6267 // values are omitted from API requests. See 6268 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6269 NullFields []string `json:"-"` 6270 } 6271 6272 func (s *ParquetOptions) MarshalJSON() ([]byte, error) { 6273 type NoMethod ParquetOptions 6274 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6275 } 6276 6277 // PartitionSkew: Partition skew detailed information. 6278 type PartitionSkew struct { 6279 // SkewSources: Output only. Source stages which produce skewed data. 6280 SkewSources []*SkewSource `json:"skewSources,omitempty"` 6281 // ForceSendFields is a list of field names (e.g. "SkewSources") to 6282 // unconditionally include in API requests. By default, fields with empty or 6283 // default values are omitted from API requests. See 6284 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6285 // details. 6286 ForceSendFields []string `json:"-"` 6287 // NullFields is a list of field names (e.g. "SkewSources") to include in API 6288 // requests with the JSON null value. By default, fields with empty values are 6289 // omitted from API requests. See 6290 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6291 NullFields []string `json:"-"` 6292 } 6293 6294 func (s *PartitionSkew) MarshalJSON() ([]byte, error) { 6295 type NoMethod PartitionSkew 6296 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6297 } 6298 6299 // PartitionedColumn: The partitioning column information. 6300 type PartitionedColumn struct { 6301 // Field: Output only. The name of the partition column. 6302 Field string `json:"field,omitempty"` 6303 // ForceSendFields is a list of field names (e.g. "Field") to unconditionally 6304 // include in API requests. By default, fields with empty or default values are 6305 // omitted from API requests. See 6306 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6307 // details. 6308 ForceSendFields []string `json:"-"` 6309 // NullFields is a list of field names (e.g. "Field") to include in API 6310 // requests with the JSON null value. By default, fields with empty values are 6311 // omitted from API requests. See 6312 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6313 NullFields []string `json:"-"` 6314 } 6315 6316 func (s *PartitionedColumn) MarshalJSON() ([]byte, error) { 6317 type NoMethod PartitionedColumn 6318 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6319 } 6320 6321 // PartitioningDefinition: The partitioning information, which includes managed 6322 // table and external table partition information. 6323 type PartitioningDefinition struct { 6324 // PartitionedColumn: Output only. Details about each partitioning column. 6325 // BigQuery native tables only support 1 partitioning column. Other table types 6326 // may support 0, 1 or more partitioning columns. 6327 PartitionedColumn []*PartitionedColumn `json:"partitionedColumn,omitempty"` 6328 // ForceSendFields is a list of field names (e.g. "PartitionedColumn") to 6329 // unconditionally include in API requests. By default, fields with empty or 6330 // default values are omitted from API requests. See 6331 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6332 // details. 6333 ForceSendFields []string `json:"-"` 6334 // NullFields is a list of field names (e.g. "PartitionedColumn") to include in 6335 // API requests with the JSON null value. By default, fields with empty values 6336 // are omitted from API requests. See 6337 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6338 NullFields []string `json:"-"` 6339 } 6340 6341 func (s *PartitioningDefinition) MarshalJSON() ([]byte, error) { 6342 type NoMethod PartitioningDefinition 6343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6344 } 6345 6346 // PerformanceInsights: Performance insights for the job. 6347 type PerformanceInsights struct { 6348 // AvgPreviousExecutionMs: Output only. Average execution ms of previous runs. 6349 // Indicates the job ran slow compared to previous executions. To find previous 6350 // executions, use INFORMATION_SCHEMA tables and filter jobs with same query 6351 // hash. 6352 AvgPreviousExecutionMs int64 `json:"avgPreviousExecutionMs,omitempty,string"` 6353 // StagePerformanceChangeInsights: Output only. Query stage performance 6354 // insights compared to previous runs, for diagnosing performance regression. 6355 StagePerformanceChangeInsights []*StagePerformanceChangeInsight `json:"stagePerformanceChangeInsights,omitempty"` 6356 // StagePerformanceStandaloneInsights: Output only. Standalone query stage 6357 // performance insights, for exploring potential improvements. 6358 StagePerformanceStandaloneInsights []*StagePerformanceStandaloneInsight `json:"stagePerformanceStandaloneInsights,omitempty"` 6359 // ForceSendFields is a list of field names (e.g. "AvgPreviousExecutionMs") to 6360 // unconditionally include in API requests. By default, fields with empty or 6361 // default values are omitted from API requests. See 6362 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6363 // details. 6364 ForceSendFields []string `json:"-"` 6365 // NullFields is a list of field names (e.g. "AvgPreviousExecutionMs") to 6366 // include in API requests with the JSON null value. By default, fields with 6367 // empty values are omitted from API requests. See 6368 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6369 NullFields []string `json:"-"` 6370 } 6371 6372 func (s *PerformanceInsights) MarshalJSON() ([]byte, error) { 6373 type NoMethod PerformanceInsights 6374 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6375 } 6376 6377 // Policy: An Identity and Access Management (IAM) policy, which specifies 6378 // access controls for Google Cloud resources. A `Policy` is a collection of 6379 // `bindings`. A `binding` binds one or more `members`, or principals, to a 6380 // single `role`. Principals can be user accounts, service accounts, Google 6381 // groups, and domains (such as G Suite). A `role` is a named list of 6382 // permissions; each `role` can be an IAM predefined role or a user-created 6383 // custom role. For some types of Google Cloud resources, a `binding` can also 6384 // specify a `condition`, which is a logical expression that allows access to a 6385 // resource only if the expression evaluates to `true`. A condition can add 6386 // constraints based on attributes of the request, the resource, or both. To 6387 // learn which resources support conditions in their IAM policies, see the IAM 6388 // documentation 6389 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON 6390 // example:** ``` { "bindings": [ { "role": 6391 // "roles/resourcemanager.organizationAdmin", "members": [ 6392 // "user:mike@example.com", "group:admins@example.com", "domain:google.com", 6393 // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": 6394 // "roles/resourcemanager.organizationViewer", "members": [ 6395 // "user:eve@example.com" ], "condition": { "title": "expirable access", 6396 // "description": "Does not grant access after Sep 2020", "expression": 6397 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": 6398 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - 6399 // members: - user:mike@example.com - group:admins@example.com - 6400 // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com 6401 // role: roles/resourcemanager.organizationAdmin - members: - 6402 // user:eve@example.com role: roles/resourcemanager.organizationViewer 6403 // condition: title: expirable access description: Does not grant access after 6404 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') 6405 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, 6406 // see the IAM documentation (https://cloud.google.com/iam/docs/). 6407 type Policy struct { 6408 // AuditConfigs: Specifies cloud audit logging configuration for this policy. 6409 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 6410 // Bindings: Associates a list of `members`, or principals, with a `role`. 6411 // Optionally, may specify a `condition` that determines how and when the 6412 // `bindings` are applied. Each of the `bindings` must contain at least one 6413 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; 6414 // up to 250 of these principals can be Google groups. Each occurrence of a 6415 // principal counts towards these limits. For example, if the `bindings` grant 6416 // 50 different roles to `user:alice@example.com`, and not to any other 6417 // principal, then you can add another 1,450 principals to the `bindings` in 6418 // the `Policy`. 6419 Bindings []*Binding `json:"bindings,omitempty"` 6420 // Etag: `etag` is used for optimistic concurrency control as a way to help 6421 // prevent simultaneous updates of a policy from overwriting each other. It is 6422 // strongly suggested that systems make use of the `etag` in the 6423 // read-modify-write cycle to perform policy updates in order to avoid race 6424 // conditions: An `etag` is returned in the response to `getIamPolicy`, and 6425 // systems are expected to put that etag in the request to `setIamPolicy` to 6426 // ensure that their change will be applied to the same version of the policy. 6427 // **Important:** If you use IAM Conditions, you must include the `etag` field 6428 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 6429 // you to overwrite a version `3` policy with a version `1` policy, and all of 6430 // the conditions in the version `3` policy are lost. 6431 Etag string `json:"etag,omitempty"` 6432 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and 6433 // `3`. Requests that specify an invalid value are rejected. Any operation that 6434 // affects conditional role bindings must specify version `3`. This requirement 6435 // applies to the following operations: * Getting a policy that includes a 6436 // conditional role binding * Adding a conditional role binding to a policy * 6437 // Changing a conditional role binding in a policy * Removing any role binding, 6438 // with or without a condition, from a policy that includes conditions 6439 // **Important:** If you use IAM Conditions, you must include the `etag` field 6440 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 6441 // you to overwrite a version `3` policy with a version `1` policy, and all of 6442 // the conditions in the version `3` policy are lost. If a policy does not 6443 // include any conditions, operations on that policy may specify any valid 6444 // version or leave the field unset. To learn which resources support 6445 // conditions in their IAM policies, see the IAM documentation 6446 // (https://cloud.google.com/iam/help/conditions/resource-policies). 6447 Version int64 `json:"version,omitempty"` 6448 6449 // ServerResponse contains the HTTP response code and headers from the server. 6450 googleapi.ServerResponse `json:"-"` 6451 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 6452 // unconditionally include in API requests. By default, fields with empty or 6453 // default values are omitted from API requests. See 6454 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6455 // details. 6456 ForceSendFields []string `json:"-"` 6457 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API 6458 // requests with the JSON null value. By default, fields with empty values are 6459 // omitted from API requests. See 6460 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6461 NullFields []string `json:"-"` 6462 } 6463 6464 func (s *Policy) MarshalJSON() ([]byte, error) { 6465 type NoMethod Policy 6466 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6467 } 6468 6469 // PrincipalComponentInfo: Principal component infos, used only for eigen 6470 // decomposition based models, e.g., PCA. Ordered by explained_variance in the 6471 // descending order. 6472 type PrincipalComponentInfo struct { 6473 // CumulativeExplainedVarianceRatio: The explained_variance is pre-ordered in 6474 // the descending order to compute the cumulative explained variance ratio. 6475 CumulativeExplainedVarianceRatio float64 `json:"cumulativeExplainedVarianceRatio,omitempty"` 6476 // ExplainedVariance: Explained variance by this principal component, which is 6477 // simply the eigenvalue. 6478 ExplainedVariance float64 `json:"explainedVariance,omitempty"` 6479 // ExplainedVarianceRatio: Explained_variance over the total explained 6480 // variance. 6481 ExplainedVarianceRatio float64 `json:"explainedVarianceRatio,omitempty"` 6482 // PrincipalComponentId: Id of the principal component. 6483 PrincipalComponentId int64 `json:"principalComponentId,omitempty,string"` 6484 // ForceSendFields is a list of field names (e.g. 6485 // "CumulativeExplainedVarianceRatio") to unconditionally include in API 6486 // requests. By default, fields with empty or default values are omitted from 6487 // API requests. See 6488 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6489 // details. 6490 ForceSendFields []string `json:"-"` 6491 // NullFields is a list of field names (e.g. 6492 // "CumulativeExplainedVarianceRatio") to include in API requests with the JSON 6493 // null value. By default, fields with empty values are omitted from API 6494 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for 6495 // more details. 6496 NullFields []string `json:"-"` 6497 } 6498 6499 func (s *PrincipalComponentInfo) MarshalJSON() ([]byte, error) { 6500 type NoMethod PrincipalComponentInfo 6501 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6502 } 6503 6504 func (s *PrincipalComponentInfo) UnmarshalJSON(data []byte) error { 6505 type NoMethod PrincipalComponentInfo 6506 var s1 struct { 6507 CumulativeExplainedVarianceRatio gensupport.JSONFloat64 `json:"cumulativeExplainedVarianceRatio"` 6508 ExplainedVariance gensupport.JSONFloat64 `json:"explainedVariance"` 6509 ExplainedVarianceRatio gensupport.JSONFloat64 `json:"explainedVarianceRatio"` 6510 *NoMethod 6511 } 6512 s1.NoMethod = (*NoMethod)(s) 6513 if err := json.Unmarshal(data, &s1); err != nil { 6514 return err 6515 } 6516 s.CumulativeExplainedVarianceRatio = float64(s1.CumulativeExplainedVarianceRatio) 6517 s.ExplainedVariance = float64(s1.ExplainedVariance) 6518 s.ExplainedVarianceRatio = float64(s1.ExplainedVarianceRatio) 6519 return nil 6520 } 6521 6522 // PrivacyPolicy: Represents privacy policy that contains the privacy 6523 // requirements specified by the data owner. Currently, this is only supported 6524 // on views. 6525 type PrivacyPolicy struct { 6526 // AggregationThresholdPolicy: Optional. Policy used for aggregation 6527 // thresholds. 6528 AggregationThresholdPolicy *AggregationThresholdPolicy `json:"aggregationThresholdPolicy,omitempty"` 6529 // DifferentialPrivacyPolicy: Optional. Policy used for differential privacy. 6530 DifferentialPrivacyPolicy *DifferentialPrivacyPolicy `json:"differentialPrivacyPolicy,omitempty"` 6531 // JoinRestrictionPolicy: Optional. Join restriction policy is outside of the 6532 // one of policies, since this policy can be set along with other policies. 6533 // This policy gives data providers the ability to enforce joins on the 6534 // 'join_allowed_columns' when data is queried from a privacy protected view. 6535 JoinRestrictionPolicy *JoinRestrictionPolicy `json:"joinRestrictionPolicy,omitempty"` 6536 // ForceSendFields is a list of field names (e.g. "AggregationThresholdPolicy") 6537 // to unconditionally include in API requests. By default, fields with empty or 6538 // default values are omitted from API requests. See 6539 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6540 // details. 6541 ForceSendFields []string `json:"-"` 6542 // NullFields is a list of field names (e.g. "AggregationThresholdPolicy") to 6543 // include in API requests with the JSON null value. By default, fields with 6544 // empty values are omitted from API requests. See 6545 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6546 NullFields []string `json:"-"` 6547 } 6548 6549 func (s *PrivacyPolicy) MarshalJSON() ([]byte, error) { 6550 type NoMethod PrivacyPolicy 6551 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6552 } 6553 6554 // ProjectList: Response object of ListProjects 6555 type ProjectList struct { 6556 // Etag: A hash of the page of results. 6557 Etag string `json:"etag,omitempty"` 6558 // Kind: The resource type of the response. 6559 Kind string `json:"kind,omitempty"` 6560 // NextPageToken: Use this token to request the next page of results. 6561 NextPageToken string `json:"nextPageToken,omitempty"` 6562 // Projects: Projects to which the user has at least READ access. 6563 Projects []*ProjectListProjects `json:"projects,omitempty"` 6564 // TotalItems: The total number of projects in the page. A wrapper is used here 6565 // because the field should still be in the response when the value is 0. 6566 TotalItems int64 `json:"totalItems,omitempty"` 6567 6568 // ServerResponse contains the HTTP response code and headers from the server. 6569 googleapi.ServerResponse `json:"-"` 6570 // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally 6571 // include in API requests. By default, fields with empty or default values are 6572 // omitted from API requests. See 6573 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6574 // details. 6575 ForceSendFields []string `json:"-"` 6576 // NullFields is a list of field names (e.g. "Etag") to include in API requests 6577 // with the JSON null value. By default, fields with empty values are omitted 6578 // from API requests. See 6579 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6580 NullFields []string `json:"-"` 6581 } 6582 6583 func (s *ProjectList) MarshalJSON() ([]byte, error) { 6584 type NoMethod ProjectList 6585 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6586 } 6587 6588 // ProjectListProjects: Information about a single project. 6589 type ProjectListProjects struct { 6590 // FriendlyName: A descriptive name for this project. A wrapper is used here 6591 // because friendlyName can be set to the empty string. 6592 FriendlyName string `json:"friendlyName,omitempty"` 6593 // Id: An opaque ID of this project. 6594 Id string `json:"id,omitempty"` 6595 // Kind: The resource type. 6596 Kind string `json:"kind,omitempty"` 6597 // NumericId: The numeric ID of this project. 6598 NumericId uint64 `json:"numericId,omitempty,string"` 6599 // ProjectReference: A unique reference to this project. 6600 ProjectReference *ProjectReference `json:"projectReference,omitempty"` 6601 // ForceSendFields is a list of field names (e.g. "FriendlyName") to 6602 // unconditionally include in API requests. By default, fields with empty or 6603 // default values are omitted from API requests. See 6604 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6605 // details. 6606 ForceSendFields []string `json:"-"` 6607 // NullFields is a list of field names (e.g. "FriendlyName") to include in API 6608 // requests with the JSON null value. By default, fields with empty values are 6609 // omitted from API requests. See 6610 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6611 NullFields []string `json:"-"` 6612 } 6613 6614 func (s *ProjectListProjects) MarshalJSON() ([]byte, error) { 6615 type NoMethod ProjectListProjects 6616 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6617 } 6618 6619 // ProjectReference: A unique reference to a project. 6620 type ProjectReference struct { 6621 // ProjectId: Required. ID of the project. Can be either the numeric ID or the 6622 // assigned ID of the project. 6623 ProjectId string `json:"projectId,omitempty"` 6624 // ForceSendFields is a list of field names (e.g. "ProjectId") to 6625 // unconditionally include in API requests. By default, fields with empty or 6626 // default values are omitted from API requests. See 6627 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6628 // details. 6629 ForceSendFields []string `json:"-"` 6630 // NullFields is a list of field names (e.g. "ProjectId") to include in API 6631 // requests with the JSON null value. By default, fields with empty values are 6632 // omitted from API requests. See 6633 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6634 NullFields []string `json:"-"` 6635 } 6636 6637 func (s *ProjectReference) MarshalJSON() ([]byte, error) { 6638 type NoMethod ProjectReference 6639 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6640 } 6641 6642 // QueryInfo: Query optimization information for a QUERY job. 6643 type QueryInfo struct { 6644 // OptimizationDetails: Output only. Information about query optimizations. 6645 OptimizationDetails googleapi.RawMessage `json:"optimizationDetails,omitempty"` 6646 // ForceSendFields is a list of field names (e.g. "OptimizationDetails") to 6647 // unconditionally include in API requests. By default, fields with empty or 6648 // default values are omitted from API requests. See 6649 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6650 // details. 6651 ForceSendFields []string `json:"-"` 6652 // NullFields is a list of field names (e.g. "OptimizationDetails") to include 6653 // in API requests with the JSON null value. By default, fields with empty 6654 // values are omitted from API requests. See 6655 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6656 NullFields []string `json:"-"` 6657 } 6658 6659 func (s *QueryInfo) MarshalJSON() ([]byte, error) { 6660 type NoMethod QueryInfo 6661 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6662 } 6663 6664 // QueryParameter: A parameter given to a query. 6665 type QueryParameter struct { 6666 // Name: Optional. If unset, this is a positional parameter. Otherwise, should 6667 // be unique within a query. 6668 Name string `json:"name,omitempty"` 6669 // ParameterType: Required. The type of this parameter. 6670 ParameterType *QueryParameterType `json:"parameterType,omitempty"` 6671 // ParameterValue: Required. The value of this parameter. 6672 ParameterValue *QueryParameterValue `json:"parameterValue,omitempty"` 6673 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 6674 // include in API requests. By default, fields with empty or default values are 6675 // omitted from API requests. See 6676 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6677 // details. 6678 ForceSendFields []string `json:"-"` 6679 // NullFields is a list of field names (e.g. "Name") to include in API requests 6680 // with the JSON null value. By default, fields with empty values are omitted 6681 // from API requests. See 6682 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6683 NullFields []string `json:"-"` 6684 } 6685 6686 func (s *QueryParameter) MarshalJSON() ([]byte, error) { 6687 type NoMethod QueryParameter 6688 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6689 } 6690 6691 // QueryParameterType: The type of a query parameter. 6692 type QueryParameterType struct { 6693 // ArrayType: Optional. The type of the array's elements, if this is an array. 6694 ArrayType *QueryParameterType `json:"arrayType,omitempty"` 6695 // RangeElementType: Optional. The element type of the range, if this is a 6696 // range. 6697 RangeElementType *QueryParameterType `json:"rangeElementType,omitempty"` 6698 // StructTypes: Optional. The types of the fields of this struct, in order, if 6699 // this is a struct. 6700 StructTypes []*QueryParameterTypeStructTypes `json:"structTypes,omitempty"` 6701 // Type: Required. The top level type of this field. 6702 Type string `json:"type,omitempty"` 6703 // ForceSendFields is a list of field names (e.g. "ArrayType") to 6704 // unconditionally include in API requests. By default, fields with empty or 6705 // default values are omitted from API requests. See 6706 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6707 // details. 6708 ForceSendFields []string `json:"-"` 6709 // NullFields is a list of field names (e.g. "ArrayType") to include in API 6710 // requests with the JSON null value. By default, fields with empty values are 6711 // omitted from API requests. See 6712 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6713 NullFields []string `json:"-"` 6714 } 6715 6716 func (s *QueryParameterType) MarshalJSON() ([]byte, error) { 6717 type NoMethod QueryParameterType 6718 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6719 } 6720 6721 // QueryParameterTypeStructTypes: The type of a struct parameter. 6722 type QueryParameterTypeStructTypes struct { 6723 // Description: Optional. Human-oriented description of the field. 6724 Description string `json:"description,omitempty"` 6725 // Name: Optional. The name of this field. 6726 Name string `json:"name,omitempty"` 6727 // Type: Required. The type of this field. 6728 Type *QueryParameterType `json:"type,omitempty"` 6729 // ForceSendFields is a list of field names (e.g. "Description") to 6730 // unconditionally include in API requests. By default, fields with empty or 6731 // default values are omitted from API requests. See 6732 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6733 // details. 6734 ForceSendFields []string `json:"-"` 6735 // NullFields is a list of field names (e.g. "Description") to include in API 6736 // requests with the JSON null value. By default, fields with empty values are 6737 // omitted from API requests. See 6738 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6739 NullFields []string `json:"-"` 6740 } 6741 6742 func (s *QueryParameterTypeStructTypes) MarshalJSON() ([]byte, error) { 6743 type NoMethod QueryParameterTypeStructTypes 6744 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6745 } 6746 6747 // QueryParameterValue: The value of a query parameter. 6748 type QueryParameterValue struct { 6749 // ArrayValues: Optional. The array values, if this is an array type. 6750 ArrayValues []*QueryParameterValue `json:"arrayValues,omitempty"` 6751 // RangeValue: Optional. The range value, if this is a range type. 6752 RangeValue *RangeValue `json:"rangeValue,omitempty"` 6753 // StructValues: The struct field values. 6754 StructValues map[string]QueryParameterValue `json:"structValues,omitempty"` 6755 // Value: Optional. The value of this value, if a simple scalar type. 6756 Value string `json:"value,omitempty"` 6757 // ForceSendFields is a list of field names (e.g. "ArrayValues") to 6758 // unconditionally include in API requests. By default, fields with empty or 6759 // default values are omitted from API requests. See 6760 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6761 // details. 6762 ForceSendFields []string `json:"-"` 6763 // NullFields is a list of field names (e.g. "ArrayValues") to include in API 6764 // requests with the JSON null value. By default, fields with empty values are 6765 // omitted from API requests. See 6766 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6767 NullFields []string `json:"-"` 6768 } 6769 6770 func (s *QueryParameterValue) MarshalJSON() ([]byte, error) { 6771 type NoMethod QueryParameterValue 6772 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6773 } 6774 6775 // QueryRequest: Describes the format of the jobs.query request. 6776 type QueryRequest struct { 6777 // ConnectionProperties: Optional. Connection properties which can modify the 6778 // query behavior. 6779 ConnectionProperties []*ConnectionProperty `json:"connectionProperties,omitempty"` 6780 // Continuous: [Optional] Specifies whether the query should be executed as a 6781 // continuous query. The default value is false. 6782 Continuous bool `json:"continuous,omitempty"` 6783 // CreateSession: Optional. If true, creates a new session using a randomly 6784 // generated session_id. If false, runs query with an existing session_id 6785 // passed in ConnectionProperty, otherwise runs query in non-session mode. The 6786 // session location will be set to QueryRequest.location if it is present, 6787 // otherwise it's set to the default location based on existing routing logic. 6788 CreateSession bool `json:"createSession,omitempty"` 6789 // DefaultDataset: Optional. Specifies the default datasetId and projectId to 6790 // assume for any unqualified table names in the query. If not set, all table 6791 // names in the query string must be qualified in the format 6792 // 'datasetId.tableId'. 6793 DefaultDataset *DatasetReference `json:"defaultDataset,omitempty"` 6794 // DryRun: Optional. If set to true, BigQuery doesn't run the job. Instead, if 6795 // the query is valid, BigQuery returns statistics about the job such as how 6796 // many bytes would be processed. If the query is invalid, an error returns. 6797 // The default value is false. 6798 DryRun bool `json:"dryRun,omitempty"` 6799 // FormatOptions: Optional. Output format adjustments. 6800 FormatOptions *DataFormatOptions `json:"formatOptions,omitempty"` 6801 // JobCreationMode: Optional. If not set, jobs are always required. If set, the 6802 // query request will follow the behavior described JobCreationMode. This 6803 // feature is not yet available. Jobs will always be created. 6804 // 6805 // Possible values: 6806 // "JOB_CREATION_MODE_UNSPECIFIED" - If unspecified JOB_CREATION_REQUIRED is 6807 // the default. 6808 // "JOB_CREATION_REQUIRED" - Default. Job creation is always required. 6809 // "JOB_CREATION_OPTIONAL" - Job creation is optional. Returning immediate 6810 // results is prioritized. BigQuery will automatically determine if a Job needs 6811 // to be created. The conditions under which BigQuery can decide to not create 6812 // a Job are subject to change. If Job creation is required, 6813 // JOB_CREATION_REQUIRED mode should be used, which is the default. 6814 JobCreationMode string `json:"jobCreationMode,omitempty"` 6815 // Kind: The resource type of the request. 6816 Kind string `json:"kind,omitempty"` 6817 // Labels: Optional. The labels associated with this query. Labels can be used 6818 // to organize and group query jobs. Label keys and values can be no longer 6819 // than 63 characters, can only contain lowercase letters, numeric characters, 6820 // underscores and dashes. International characters are allowed. Label keys 6821 // must start with a letter and each label in the list must have a different 6822 // key. 6823 Labels map[string]string `json:"labels,omitempty"` 6824 // Location: The geographic location where the job should run. See details at 6825 // https://cloud.google.com/bigquery/docs/locations#specifying_your_location. 6826 Location string `json:"location,omitempty"` 6827 // MaxResults: Optional. The maximum number of rows of data to return per page 6828 // of results. Setting this flag to a small value such as 1000 and then paging 6829 // through results might improve reliability when the query result set is 6830 // large. In addition to this limit, responses are also limited to 10 MB. By 6831 // default, there is no maximum row count, and only the byte limit applies. 6832 MaxResults int64 `json:"maxResults,omitempty"` 6833 // MaximumBytesBilled: Optional. Limits the bytes billed for this query. 6834 // Queries with bytes billed above this limit will fail (without incurring a 6835 // charge). If unspecified, the project default is used. 6836 MaximumBytesBilled int64 `json:"maximumBytesBilled,omitempty,string"` 6837 // ParameterMode: GoogleSQL only. Set to POSITIONAL to use positional (?) query 6838 // parameters or to NAMED to use named (@myparam) query parameters in this 6839 // query. 6840 ParameterMode string `json:"parameterMode,omitempty"` 6841 // PreserveNulls: This property is deprecated. 6842 PreserveNulls bool `json:"preserveNulls,omitempty"` 6843 // Query: Required. A query string to execute, using Google Standard SQL or 6844 // legacy SQL syntax. Example: "SELECT COUNT(f1) FROM 6845 // myProjectId.myDatasetId.myTableId". 6846 Query string `json:"query,omitempty"` 6847 // QueryParameters: Query parameters for GoogleSQL queries. 6848 QueryParameters []*QueryParameter `json:"queryParameters,omitempty"` 6849 // RequestId: Optional. A unique user provided identifier to ensure idempotent 6850 // behavior for queries. Note that this is different from the job_id. It has 6851 // the following properties: 1. It is case-sensitive, limited to up to 36 ASCII 6852 // characters. A UUID is recommended. 2. Read only queries can ignore this 6853 // token since they are nullipotent by definition. 3. For the purposes of 6854 // idempotency ensured by the request_id, a request is considered duplicate of 6855 // another only if they have the same request_id and are actually duplicates. 6856 // When determining whether a request is a duplicate of another request, all 6857 // parameters in the request that may affect the result are considered. For 6858 // example, query, connection_properties, query_parameters, use_legacy_sql are 6859 // parameters that affect the result and are considered when determining 6860 // whether a request is a duplicate, but properties like timeout_ms don't 6861 // affect the result and are thus not considered. Dry run query requests are 6862 // never considered duplicate of another request. 4. When a duplicate mutating 6863 // query request is detected, it returns: a. the results of the mutation if it 6864 // completes successfully within the timeout. b. the running operation if it is 6865 // still in progress at the end of the timeout. 5. Its lifetime is limited to 6866 // 15 minutes. In other words, if two requests are sent with the same 6867 // request_id, but more than 15 minutes apart, idempotency is not guaranteed. 6868 RequestId string `json:"requestId,omitempty"` 6869 // TimeoutMs: Optional. Optional: Specifies the maximum amount of time, in 6870 // milliseconds, that the client is willing to wait for the query to complete. 6871 // By default, this limit is 10 seconds (10,000 milliseconds). If the query is 6872 // complete, the jobComplete field in the response is true. If the query has 6873 // not yet completed, jobComplete is false. You can request a longer timeout 6874 // period in the timeoutMs field. However, the call is not guaranteed to wait 6875 // for the specified timeout; it typically returns after around 200 seconds 6876 // (200,000 milliseconds), even if the query is not complete. If jobComplete is 6877 // false, you can continue to wait for the query to complete by calling the 6878 // getQueryResults method until the jobComplete field in the getQueryResults 6879 // response is true. 6880 TimeoutMs int64 `json:"timeoutMs,omitempty"` 6881 // UseLegacySql: Specifies whether to use BigQuery's legacy SQL dialect for 6882 // this query. The default value is true. If set to false, the query will use 6883 // BigQuery's GoogleSQL: https://cloud.google.com/bigquery/sql-reference/ When 6884 // useLegacySql is set to false, the value of flattenResults is ignored; query 6885 // will be run as if flattenResults is false. 6886 // 6887 // Default: true 6888 UseLegacySql *bool `json:"useLegacySql,omitempty"` 6889 // UseQueryCache: Optional. Whether to look for the result in the query cache. 6890 // The query cache is a best-effort cache that will be flushed whenever tables 6891 // in the query are modified. The default value is true. 6892 // 6893 // Default: true 6894 UseQueryCache *bool `json:"useQueryCache,omitempty"` 6895 // ForceSendFields is a list of field names (e.g. "ConnectionProperties") to 6896 // unconditionally include in API requests. By default, fields with empty or 6897 // default values are omitted from API requests. See 6898 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6899 // details. 6900 ForceSendFields []string `json:"-"` 6901 // NullFields is a list of field names (e.g. "ConnectionProperties") to include 6902 // in API requests with the JSON null value. By default, fields with empty 6903 // values are omitted from API requests. See 6904 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6905 NullFields []string `json:"-"` 6906 } 6907 6908 func (s *QueryRequest) MarshalJSON() ([]byte, error) { 6909 type NoMethod QueryRequest 6910 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6911 } 6912 6913 type QueryResponse struct { 6914 // CacheHit: Whether the query result was fetched from the query cache. 6915 CacheHit bool `json:"cacheHit,omitempty"` 6916 // DmlStats: Output only. Detailed statistics for DML statements INSERT, 6917 // UPDATE, DELETE, MERGE or TRUNCATE. 6918 DmlStats *DmlStatistics `json:"dmlStats,omitempty"` 6919 // Errors: Output only. The first errors or warnings encountered during the 6920 // running of the job. The final message includes the number of errors that 6921 // caused the process to stop. Errors here do not necessarily mean that the job 6922 // has completed or was unsuccessful. For more information about error 6923 // messages, see Error messages 6924 // (https://cloud.google.com/bigquery/docs/error-messages). 6925 Errors []*ErrorProto `json:"errors,omitempty"` 6926 // JobComplete: Whether the query has completed or not. If rows or totalRows 6927 // are present, this will always be true. If this is false, totalRows will not 6928 // be available. 6929 JobComplete bool `json:"jobComplete,omitempty"` 6930 // JobCreationReason: Optional. Only relevant when a job_reference is present 6931 // in the response. If job_reference is not present it will always be unset. 6932 // When job_reference is present, this field should be interpreted as follows: 6933 // If set, it will provide the reason of why a Job was created. If not set, it 6934 // should be treated as the default: REQUESTED. This feature is not yet 6935 // available. Jobs will always be created. 6936 JobCreationReason *JobCreationReason `json:"jobCreationReason,omitempty"` 6937 // JobReference: Reference to the Job that was created to run the query. This 6938 // field will be present even if the original request timed out, in which case 6939 // GetQueryResults can be used to read the results once the query has 6940 // completed. Since this API only returns the first page of results, subsequent 6941 // pages can be fetched via the same mechanism (GetQueryResults). 6942 JobReference *JobReference `json:"jobReference,omitempty"` 6943 // Kind: The resource type. 6944 Kind string `json:"kind,omitempty"` 6945 // NumDmlAffectedRows: Output only. The number of rows affected by a DML 6946 // statement. Present only for DML statements INSERT, UPDATE or DELETE. 6947 NumDmlAffectedRows int64 `json:"numDmlAffectedRows,omitempty,string"` 6948 // PageToken: A token used for paging results. A non-empty token indicates that 6949 // additional results are available. To see additional results, query the 6950 // `jobs.getQueryResults` 6951 // (https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/getQueryResults) 6952 // method. For more information, see Paging through table data 6953 // (https://cloud.google.com/bigquery/docs/paging-results). 6954 PageToken string `json:"pageToken,omitempty"` 6955 // QueryId: Query ID for the completed query. This ID will be auto-generated. 6956 // This field is not yet available and it is currently not guaranteed to be 6957 // populated. 6958 QueryId string `json:"queryId,omitempty"` 6959 // Rows: An object with as many results as can be contained within the maximum 6960 // permitted reply size. To get any additional rows, you can call 6961 // GetQueryResults and specify the jobReference returned above. 6962 Rows []*TableRow `json:"rows,omitempty"` 6963 // Schema: The schema of the results. Present only when the query completes 6964 // successfully. 6965 Schema *TableSchema `json:"schema,omitempty"` 6966 // SessionInfo: Output only. Information of the session if this job is part of 6967 // one. 6968 SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` 6969 // TotalBytesProcessed: The total number of bytes processed for this query. If 6970 // this query was a dry run, this is the number of bytes that would be 6971 // processed if the query were run. 6972 TotalBytesProcessed int64 `json:"totalBytesProcessed,omitempty,string"` 6973 // TotalRows: The total number of rows in the complete query result set, which 6974 // can be more than the number of rows in this single page of results. 6975 TotalRows uint64 `json:"totalRows,omitempty,string"` 6976 6977 // ServerResponse contains the HTTP response code and headers from the server. 6978 googleapi.ServerResponse `json:"-"` 6979 // ForceSendFields is a list of field names (e.g. "CacheHit") to 6980 // unconditionally include in API requests. By default, fields with empty or 6981 // default values are omitted from API requests. See 6982 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6983 // details. 6984 ForceSendFields []string `json:"-"` 6985 // NullFields is a list of field names (e.g. "CacheHit") to include in API 6986 // requests with the JSON null value. By default, fields with empty values are 6987 // omitted from API requests. See 6988 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6989 NullFields []string `json:"-"` 6990 } 6991 6992 func (s *QueryResponse) MarshalJSON() ([]byte, error) { 6993 type NoMethod QueryResponse 6994 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6995 } 6996 6997 // QueryTimelineSample: Summary of the state of query execution at a given 6998 // time. 6999 type QueryTimelineSample struct { 7000 // ActiveUnits: Total number of active workers. This does not correspond 7001 // directly to slot usage. This is the largest value observed since the last 7002 // sample. 7003 ActiveUnits int64 `json:"activeUnits,omitempty,string"` 7004 // CompletedUnits: Total parallel units of work completed by this query. 7005 CompletedUnits int64 `json:"completedUnits,omitempty,string"` 7006 // ElapsedMs: Milliseconds elapsed since the start of query execution. 7007 ElapsedMs int64 `json:"elapsedMs,omitempty,string"` 7008 // EstimatedRunnableUnits: Units of work that can be scheduled immediately. 7009 // Providing additional slots for these units of work will accelerate the 7010 // query, if no other query in the reservation needs additional slots. 7011 EstimatedRunnableUnits int64 `json:"estimatedRunnableUnits,omitempty,string"` 7012 // PendingUnits: Total units of work remaining for the query. This number can 7013 // be revised (increased or decreased) while the query is running. 7014 PendingUnits int64 `json:"pendingUnits,omitempty,string"` 7015 // TotalSlotMs: Cumulative slot-ms consumed by the query. 7016 TotalSlotMs int64 `json:"totalSlotMs,omitempty,string"` 7017 // ForceSendFields is a list of field names (e.g. "ActiveUnits") to 7018 // unconditionally include in API requests. By default, fields with empty or 7019 // default values are omitted from API requests. See 7020 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7021 // details. 7022 ForceSendFields []string `json:"-"` 7023 // NullFields is a list of field names (e.g. "ActiveUnits") to include in API 7024 // requests with the JSON null value. By default, fields with empty values are 7025 // omitted from API requests. See 7026 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7027 NullFields []string `json:"-"` 7028 } 7029 7030 func (s *QueryTimelineSample) MarshalJSON() ([]byte, error) { 7031 type NoMethod QueryTimelineSample 7032 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7033 } 7034 7035 type RangePartitioning struct { 7036 // Field: Required. [Experimental] The table is partitioned by this field. The 7037 // field must be a top-level NULLABLE/REQUIRED field. The only supported type 7038 // is INTEGER/INT64. 7039 Field string `json:"field,omitempty"` 7040 // Range: [Experimental] Defines the ranges for range partitioning. 7041 Range *RangePartitioningRange `json:"range,omitempty"` 7042 // ForceSendFields is a list of field names (e.g. "Field") to unconditionally 7043 // include in API requests. By default, fields with empty or default values are 7044 // omitted from API requests. See 7045 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7046 // details. 7047 ForceSendFields []string `json:"-"` 7048 // NullFields is a list of field names (e.g. "Field") to include in API 7049 // requests with the JSON null value. By default, fields with empty values are 7050 // omitted from API requests. See 7051 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7052 NullFields []string `json:"-"` 7053 } 7054 7055 func (s *RangePartitioning) MarshalJSON() ([]byte, error) { 7056 type NoMethod RangePartitioning 7057 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7058 } 7059 7060 // RangePartitioningRange: [Experimental] Defines the ranges for range 7061 // partitioning. 7062 type RangePartitioningRange struct { 7063 // End: [Experimental] The end of range partitioning, exclusive. 7064 End int64 `json:"end,omitempty,string"` 7065 // Interval: [Experimental] The width of each interval. 7066 Interval int64 `json:"interval,omitempty,string"` 7067 // Start: [Experimental] The start of range partitioning, inclusive. 7068 Start int64 `json:"start,omitempty,string"` 7069 // ForceSendFields is a list of field names (e.g. "End") to unconditionally 7070 // include in API requests. By default, fields with empty or default values are 7071 // omitted from API requests. See 7072 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7073 // details. 7074 ForceSendFields []string `json:"-"` 7075 // NullFields is a list of field names (e.g. "End") to include in API requests 7076 // with the JSON null value. By default, fields with empty values are omitted 7077 // from API requests. See 7078 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7079 NullFields []string `json:"-"` 7080 } 7081 7082 func (s *RangePartitioningRange) MarshalJSON() ([]byte, error) { 7083 type NoMethod RangePartitioningRange 7084 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7085 } 7086 7087 // RangeValue: Represents the value of a range. 7088 type RangeValue struct { 7089 // End: Optional. The end value of the range. A missing value represents an 7090 // unbounded end. 7091 End *QueryParameterValue `json:"end,omitempty"` 7092 // Start: Optional. The start value of the range. A missing value represents an 7093 // unbounded start. 7094 Start *QueryParameterValue `json:"start,omitempty"` 7095 // ForceSendFields is a list of field names (e.g. "End") to unconditionally 7096 // include in API requests. By default, fields with empty or default values are 7097 // omitted from API requests. See 7098 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7099 // details. 7100 ForceSendFields []string `json:"-"` 7101 // NullFields is a list of field names (e.g. "End") to include in API requests 7102 // with the JSON null value. By default, fields with empty values are omitted 7103 // from API requests. See 7104 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7105 NullFields []string `json:"-"` 7106 } 7107 7108 func (s *RangeValue) MarshalJSON() ([]byte, error) { 7109 type NoMethod RangeValue 7110 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7111 } 7112 7113 // RankingMetrics: Evaluation metrics used by weighted-ALS models specified by 7114 // feedback_type=implicit. 7115 type RankingMetrics struct { 7116 // AverageRank: Determines the goodness of a ranking by computing the 7117 // percentile rank from the predicted confidence and dividing it by the 7118 // original rank. 7119 AverageRank float64 `json:"averageRank,omitempty"` 7120 // MeanAveragePrecision: Calculates a precision per user for all the items by 7121 // ranking them and then averages all the precisions across all the users. 7122 MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"` 7123 // MeanSquaredError: Similar to the mean squared error computed in regression 7124 // and explicit recommendation models except instead of computing the rating 7125 // directly, the output from evaluate is computed against a preference which is 7126 // 1 or 0 depending on if the rating exists or not. 7127 MeanSquaredError float64 `json:"meanSquaredError,omitempty"` 7128 // NormalizedDiscountedCumulativeGain: A metric to determine the goodness of a 7129 // ranking calculated from the predicted confidence by comparing it to an ideal 7130 // rank measured by the original ratings. 7131 NormalizedDiscountedCumulativeGain float64 `json:"normalizedDiscountedCumulativeGain,omitempty"` 7132 // ForceSendFields is a list of field names (e.g. "AverageRank") to 7133 // unconditionally include in API requests. By default, fields with empty or 7134 // default values are omitted from API requests. See 7135 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7136 // details. 7137 ForceSendFields []string `json:"-"` 7138 // NullFields is a list of field names (e.g. "AverageRank") to include in API 7139 // requests with the JSON null value. By default, fields with empty values are 7140 // omitted from API requests. See 7141 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7142 NullFields []string `json:"-"` 7143 } 7144 7145 func (s *RankingMetrics) MarshalJSON() ([]byte, error) { 7146 type NoMethod RankingMetrics 7147 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7148 } 7149 7150 func (s *RankingMetrics) UnmarshalJSON(data []byte) error { 7151 type NoMethod RankingMetrics 7152 var s1 struct { 7153 AverageRank gensupport.JSONFloat64 `json:"averageRank"` 7154 MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"` 7155 MeanSquaredError gensupport.JSONFloat64 `json:"meanSquaredError"` 7156 NormalizedDiscountedCumulativeGain gensupport.JSONFloat64 `json:"normalizedDiscountedCumulativeGain"` 7157 *NoMethod 7158 } 7159 s1.NoMethod = (*NoMethod)(s) 7160 if err := json.Unmarshal(data, &s1); err != nil { 7161 return err 7162 } 7163 s.AverageRank = float64(s1.AverageRank) 7164 s.MeanAveragePrecision = float64(s1.MeanAveragePrecision) 7165 s.MeanSquaredError = float64(s1.MeanSquaredError) 7166 s.NormalizedDiscountedCumulativeGain = float64(s1.NormalizedDiscountedCumulativeGain) 7167 return nil 7168 } 7169 7170 // RegressionMetrics: Evaluation metrics for regression and explicit feedback 7171 // type matrix factorization models. 7172 type RegressionMetrics struct { 7173 // MeanAbsoluteError: Mean absolute error. 7174 MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` 7175 // MeanSquaredError: Mean squared error. 7176 MeanSquaredError float64 `json:"meanSquaredError,omitempty"` 7177 // MeanSquaredLogError: Mean squared log error. 7178 MeanSquaredLogError float64 `json:"meanSquaredLogError,omitempty"` 7179 // MedianAbsoluteError: Median absolute error. 7180 MedianAbsoluteError float64 `json:"medianAbsoluteError,omitempty"` 7181 // RSquared: R^2 score. This corresponds to r2_score in ML.EVALUATE. 7182 RSquared float64 `json:"rSquared,omitempty"` 7183 // ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") to 7184 // unconditionally include in API requests. By default, fields with empty or 7185 // default values are omitted from API requests. See 7186 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7187 // details. 7188 ForceSendFields []string `json:"-"` 7189 // NullFields is a list of field names (e.g. "MeanAbsoluteError") to include in 7190 // API requests with the JSON null value. By default, fields with empty values 7191 // are omitted from API requests. See 7192 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7193 NullFields []string `json:"-"` 7194 } 7195 7196 func (s *RegressionMetrics) MarshalJSON() ([]byte, error) { 7197 type NoMethod RegressionMetrics 7198 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7199 } 7200 7201 func (s *RegressionMetrics) UnmarshalJSON(data []byte) error { 7202 type NoMethod RegressionMetrics 7203 var s1 struct { 7204 MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` 7205 MeanSquaredError gensupport.JSONFloat64 `json:"meanSquaredError"` 7206 MeanSquaredLogError gensupport.JSONFloat64 `json:"meanSquaredLogError"` 7207 MedianAbsoluteError gensupport.JSONFloat64 `json:"medianAbsoluteError"` 7208 RSquared gensupport.JSONFloat64 `json:"rSquared"` 7209 *NoMethod 7210 } 7211 s1.NoMethod = (*NoMethod)(s) 7212 if err := json.Unmarshal(data, &s1); err != nil { 7213 return err 7214 } 7215 s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) 7216 s.MeanSquaredError = float64(s1.MeanSquaredError) 7217 s.MeanSquaredLogError = float64(s1.MeanSquaredLogError) 7218 s.MedianAbsoluteError = float64(s1.MedianAbsoluteError) 7219 s.RSquared = float64(s1.RSquared) 7220 return nil 7221 } 7222 7223 // RemoteFunctionOptions: Options for a remote user-defined function. 7224 type RemoteFunctionOptions struct { 7225 // Connection: Fully qualified name of the user-provided connection object 7226 // which holds the authentication information to send requests to the remote 7227 // service. Format: 7228 // ``"projects/{projectId}/locations/{locationId}/connections/{connectionId}"` 7229 // ` 7230 Connection string `json:"connection,omitempty"` 7231 // Endpoint: Endpoint of the user-provided remote service, e.g. 7232 // ```https://us-east1-my_gcf_project.cloudfunctions.net/remote_add``` 7233 Endpoint string `json:"endpoint,omitempty"` 7234 // MaxBatchingRows: Max number of rows in each batch sent to the remote 7235 // service. If absent or if 0, BigQuery dynamically decides the number of rows 7236 // in a batch. 7237 MaxBatchingRows int64 `json:"maxBatchingRows,omitempty,string"` 7238 // UserDefinedContext: User-defined context as a set of key/value pairs, which 7239 // will be sent as function invocation context together with batched arguments 7240 // in the requests to the remote service. The total number of bytes of keys and 7241 // values must be less than 8KB. 7242 UserDefinedContext map[string]string `json:"userDefinedContext,omitempty"` 7243 // ForceSendFields is a list of field names (e.g. "Connection") to 7244 // unconditionally include in API requests. By default, fields with empty or 7245 // default values are omitted from API requests. See 7246 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7247 // details. 7248 ForceSendFields []string `json:"-"` 7249 // NullFields is a list of field names (e.g. "Connection") to include in API 7250 // requests with the JSON null value. By default, fields with empty values are 7251 // omitted from API requests. See 7252 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7253 NullFields []string `json:"-"` 7254 } 7255 7256 func (s *RemoteFunctionOptions) MarshalJSON() ([]byte, error) { 7257 type NoMethod RemoteFunctionOptions 7258 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7259 } 7260 7261 // RemoteModelInfo: Remote Model Info 7262 type RemoteModelInfo struct { 7263 // Connection: Output only. Fully qualified name of the user-provided 7264 // connection object of the remote model. Format: 7265 // ``"projects/{project_id}/locations/{location_id}/connections/{connection_id} 7266 // "`` 7267 Connection string `json:"connection,omitempty"` 7268 // Endpoint: Output only. The endpoint for remote model. 7269 Endpoint string `json:"endpoint,omitempty"` 7270 // MaxBatchingRows: Output only. Max number of rows in each batch sent to the 7271 // remote service. If unset, the number of rows in each batch is set 7272 // dynamically. 7273 MaxBatchingRows int64 `json:"maxBatchingRows,omitempty,string"` 7274 // RemoteModelVersion: Output only. The model version for LLM. 7275 RemoteModelVersion string `json:"remoteModelVersion,omitempty"` 7276 // RemoteServiceType: Output only. The remote service type for remote model. 7277 // 7278 // Possible values: 7279 // "REMOTE_SERVICE_TYPE_UNSPECIFIED" - Unspecified remote service type. 7280 // "CLOUD_AI_TRANSLATE_V3" - V3 Cloud AI Translation API. See more details at 7281 // [Cloud Translation API] 7282 // (https://cloud.google.com/translate/docs/reference/rest). 7283 // "CLOUD_AI_VISION_V1" - V1 Cloud AI Vision API See more details at [Cloud 7284 // Vision API] (https://cloud.google.com/vision/docs/reference/rest). 7285 // "CLOUD_AI_NATURAL_LANGUAGE_V1" - V1 Cloud AI Natural Language API. See 7286 // more details at [REST Resource: 7287 // documents](https://cloud.google.com/natural-language/docs/reference/rest/v1/d 7288 // ocuments). 7289 // "CLOUD_AI_SPEECH_TO_TEXT_V2" - V2 Speech-to-Text API. See more details at 7290 // [Google Cloud Speech-to-Text V2 7291 // API](https://cloud.google.com/speech-to-text/v2/docs) 7292 RemoteServiceType string `json:"remoteServiceType,omitempty"` 7293 // SpeechRecognizer: Output only. The name of the speech recognizer to use for 7294 // speech recognition. The expected format is 7295 // `projects/{project}/locations/{location}/recognizers/{recognizer}`. 7296 // Customers can specify this field at model creation. If not specified, a 7297 // default recognizer `projects/{model project}/locations/global/recognizers/_` 7298 // will be used. See more details at recognizers 7299 // (https://cloud.google.com/speech-to-text/v2/docs/reference/rest/v2/projects.locations.recognizers) 7300 SpeechRecognizer string `json:"speechRecognizer,omitempty"` 7301 // ForceSendFields is a list of field names (e.g. "Connection") to 7302 // unconditionally include in API requests. By default, fields with empty or 7303 // default values are omitted from API requests. See 7304 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7305 // details. 7306 ForceSendFields []string `json:"-"` 7307 // NullFields is a list of field names (e.g. "Connection") to include in API 7308 // requests with the JSON null value. By default, fields with empty values are 7309 // omitted from API requests. See 7310 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7311 NullFields []string `json:"-"` 7312 } 7313 7314 func (s *RemoteModelInfo) MarshalJSON() ([]byte, error) { 7315 type NoMethod RemoteModelInfo 7316 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7317 } 7318 7319 type RestrictionConfig struct { 7320 // Type: Output only. Specifies the type of dataset/table restriction. 7321 // 7322 // Possible values: 7323 // "RESTRICTION_TYPE_UNSPECIFIED" - Should never be used. 7324 // "RESTRICTED_DATA_EGRESS" - Restrict data egress. See [Data 7325 // egress](/bigquery/docs/analytics-hub-introduction#data_egress) for more 7326 // details. 7327 Type string `json:"type,omitempty"` 7328 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 7329 // include in API requests. By default, fields with empty or default values are 7330 // omitted from API requests. See 7331 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7332 // details. 7333 ForceSendFields []string `json:"-"` 7334 // NullFields is a list of field names (e.g. "Type") to include in API requests 7335 // with the JSON null value. By default, fields with empty values are omitted 7336 // from API requests. See 7337 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7338 NullFields []string `json:"-"` 7339 } 7340 7341 func (s *RestrictionConfig) MarshalJSON() ([]byte, error) { 7342 type NoMethod RestrictionConfig 7343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7344 } 7345 7346 // Routine: A user-defined function or a stored procedure. 7347 type Routine struct { 7348 // Arguments: Optional. 7349 Arguments []*Argument `json:"arguments,omitempty"` 7350 // CreationTime: Output only. The time when this routine was created, in 7351 // milliseconds since the epoch. 7352 CreationTime int64 `json:"creationTime,omitempty,string"` 7353 // DataGovernanceType: Optional. If set to `DATA_MASKING`, the function is 7354 // validated and made available as a masking function. For more information, 7355 // see Create custom masking routines 7356 // (https://cloud.google.com/bigquery/docs/user-defined-functions#custom-mask). 7357 // 7358 // Possible values: 7359 // "DATA_GOVERNANCE_TYPE_UNSPECIFIED" - The data governance type is 7360 // unspecified. 7361 // "DATA_MASKING" - The data governance type is data masking. 7362 DataGovernanceType string `json:"dataGovernanceType,omitempty"` 7363 // DefinitionBody: Required. The body of the routine. For functions, this is 7364 // the expression in the AS clause. If language=SQL, it is the substring inside 7365 // (but excluding) the parentheses. For example, for the function created with 7366 // the following statement: `CREATE FUNCTION JoinLines(x string, y string) as 7367 // (concat(x, "\n", y))` The definition_body is `concat(x, "\n", y)` (\n is not 7368 // replaced with linebreak). If language=JAVASCRIPT, it is the evaluated string 7369 // in the AS clause. For example, for the function created with the following 7370 // statement: `CREATE FUNCTION f() RETURNS STRING LANGUAGE js AS 'return 7371 // "\n";\n'` The definition_body is `return "\n";\n` Note that both \n are 7372 // replaced with linebreaks. 7373 DefinitionBody string `json:"definitionBody,omitempty"` 7374 // Description: Optional. The description of the routine, if defined. 7375 Description string `json:"description,omitempty"` 7376 // DeterminismLevel: Optional. The determinism level of the JavaScript UDF, if 7377 // defined. 7378 // 7379 // Possible values: 7380 // "DETERMINISM_LEVEL_UNSPECIFIED" - The determinism of the UDF is 7381 // unspecified. 7382 // "DETERMINISTIC" - The UDF is deterministic, meaning that 2 function calls 7383 // with the same inputs always produce the same result, even across 2 query 7384 // runs. 7385 // "NOT_DETERMINISTIC" - The UDF is not deterministic. 7386 DeterminismLevel string `json:"determinismLevel,omitempty"` 7387 // Etag: Output only. A hash of this resource. 7388 Etag string `json:"etag,omitempty"` 7389 // ImportedLibraries: Optional. If language = "JAVASCRIPT", this field stores 7390 // the path of the imported JAVASCRIPT libraries. 7391 ImportedLibraries []string `json:"importedLibraries,omitempty"` 7392 // Language: Optional. Defaults to "SQL" if remote_function_options field is 7393 // absent, not set otherwise. 7394 // 7395 // Possible values: 7396 // "LANGUAGE_UNSPECIFIED" - Default value. 7397 // "SQL" - SQL language. 7398 // "JAVASCRIPT" - JavaScript language. 7399 // "PYTHON" - Python language. 7400 // "JAVA" - Java language. 7401 // "SCALA" - Scala language. 7402 Language string `json:"language,omitempty"` 7403 // LastModifiedTime: Output only. The time when this routine was last modified, 7404 // in milliseconds since the epoch. 7405 LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"` 7406 // RemoteFunctionOptions: Optional. Remote function specific options. 7407 RemoteFunctionOptions *RemoteFunctionOptions `json:"remoteFunctionOptions,omitempty"` 7408 // ReturnTableType: Optional. Can be set only if routine_type = 7409 // "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from 7410 // definition_body at query time in each query that references this routine. If 7411 // present, then the columns in the evaluated table result will be cast to 7412 // match the column types specified in return table type, at query time. 7413 ReturnTableType *StandardSqlTableType `json:"returnTableType,omitempty"` 7414 // ReturnType: Optional if language = "SQL"; required otherwise. Cannot be set 7415 // if routine_type = "TABLE_VALUED_FUNCTION". If absent, the return type is 7416 // inferred from definition_body at query time in each query that references 7417 // this routine. If present, then the evaluated result will be cast to the 7418 // specified returned type at query time. For example, for the functions 7419 // created with the following statements: * `CREATE FUNCTION Add(x FLOAT64, y 7420 // FLOAT64) RETURNS FLOAT64 AS (x + y);` * `CREATE FUNCTION Increment(x 7421 // FLOAT64) AS (Add(x, 1));` * `CREATE FUNCTION Decrement(x FLOAT64) RETURNS 7422 // FLOAT64 AS (Add(x, -1));` The return_type is `{type_kind: "FLOAT64"}` for 7423 // `Add` and `Decrement`, and is absent for `Increment` (inferred as FLOAT64 at 7424 // query time). Suppose the function `Add` is replaced by `CREATE OR REPLACE 7425 // FUNCTION Add(x INT64, y INT64) AS (x + y);` Then the inferred return type of 7426 // `Increment` is automatically changed to INT64 at query time, while the 7427 // return type of `Decrement` remains FLOAT64. 7428 ReturnType *StandardSqlDataType `json:"returnType,omitempty"` 7429 // RoutineReference: Required. Reference describing the ID of this routine. 7430 RoutineReference *RoutineReference `json:"routineReference,omitempty"` 7431 // RoutineType: Required. The type of routine. 7432 // 7433 // Possible values: 7434 // "ROUTINE_TYPE_UNSPECIFIED" - Default value. 7435 // "SCALAR_FUNCTION" - Non-built-in persistent scalar function. 7436 // "PROCEDURE" - Stored procedure. 7437 // "TABLE_VALUED_FUNCTION" - Non-built-in persistent TVF. 7438 // "AGGREGATE_FUNCTION" - Non-built-in persistent aggregate function. 7439 RoutineType string `json:"routineType,omitempty"` 7440 // SecurityMode: Optional. The security mode of the routine, if defined. If not 7441 // defined, the security mode is automatically determined from the routine's 7442 // configuration. 7443 // 7444 // Possible values: 7445 // "SECURITY_MODE_UNSPECIFIED" - The security mode of the routine is 7446 // unspecified. 7447 // "DEFINER" - The routine is to be executed with the privileges of the user 7448 // who defines it. 7449 // "INVOKER" - The routine is to be executed with the privileges of the user 7450 // who invokes it. 7451 SecurityMode string `json:"securityMode,omitempty"` 7452 // SparkOptions: Optional. Spark specific options. 7453 SparkOptions *SparkOptions `json:"sparkOptions,omitempty"` 7454 // StrictMode: Optional. Use this option to catch many common errors. Error 7455 // checking is not exhaustive, and successfully creating a procedure doesn't 7456 // guarantee that the procedure will successfully execute at runtime. If 7457 // `strictMode` is set to `TRUE`, the procedure body is further checked for 7458 // errors such as non-existent tables or columns. The `CREATE PROCEDURE` 7459 // statement fails if the body fails any of these checks. If `strictMode` is 7460 // set to `FALSE`, the procedure body is checked only for syntax. For 7461 // procedures that invoke themselves recursively, specify `strictMode=FALSE` to 7462 // avoid non-existent procedure errors during validation. Default value is 7463 // `TRUE`. 7464 StrictMode bool `json:"strictMode,omitempty"` 7465 7466 // ServerResponse contains the HTTP response code and headers from the server. 7467 googleapi.ServerResponse `json:"-"` 7468 // ForceSendFields is a list of field names (e.g. "Arguments") to 7469 // unconditionally include in API requests. By default, fields with empty or 7470 // default values are omitted from API requests. See 7471 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7472 // details. 7473 ForceSendFields []string `json:"-"` 7474 // NullFields is a list of field names (e.g. "Arguments") to include in API 7475 // requests with the JSON null value. By default, fields with empty values are 7476 // omitted from API requests. See 7477 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7478 NullFields []string `json:"-"` 7479 } 7480 7481 func (s *Routine) MarshalJSON() ([]byte, error) { 7482 type NoMethod Routine 7483 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7484 } 7485 7486 // RoutineReference: Id path of a routine. 7487 type RoutineReference struct { 7488 // DatasetId: Required. The ID of the dataset containing this routine. 7489 DatasetId string `json:"datasetId,omitempty"` 7490 // ProjectId: Required. The ID of the project containing this routine. 7491 ProjectId string `json:"projectId,omitempty"` 7492 // RoutineId: Required. The ID of the routine. The ID must contain only letters 7493 // (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 7494 // characters. 7495 RoutineId string `json:"routineId,omitempty"` 7496 // ForceSendFields is a list of field names (e.g. "DatasetId") to 7497 // unconditionally include in API requests. By default, fields with empty or 7498 // default values are omitted from API requests. See 7499 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7500 // details. 7501 ForceSendFields []string `json:"-"` 7502 // NullFields is a list of field names (e.g. "DatasetId") to include in API 7503 // requests with the JSON null value. By default, fields with empty values are 7504 // omitted from API requests. See 7505 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7506 NullFields []string `json:"-"` 7507 } 7508 7509 func (s *RoutineReference) MarshalJSON() ([]byte, error) { 7510 type NoMethod RoutineReference 7511 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7512 } 7513 7514 // Row: A single row in the confusion matrix. 7515 type Row struct { 7516 // ActualLabel: The original label of this row. 7517 ActualLabel string `json:"actualLabel,omitempty"` 7518 // Entries: Info describing predicted label distribution. 7519 Entries []*Entry `json:"entries,omitempty"` 7520 // ForceSendFields is a list of field names (e.g. "ActualLabel") to 7521 // unconditionally include in API requests. By default, fields with empty or 7522 // default values are omitted from API requests. See 7523 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7524 // details. 7525 ForceSendFields []string `json:"-"` 7526 // NullFields is a list of field names (e.g. "ActualLabel") to include in API 7527 // requests with the JSON null value. By default, fields with empty values are 7528 // omitted from API requests. See 7529 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7530 NullFields []string `json:"-"` 7531 } 7532 7533 func (s *Row) MarshalJSON() ([]byte, error) { 7534 type NoMethod Row 7535 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7536 } 7537 7538 // RowAccessPolicy: Represents access on a subset of rows on the specified 7539 // table, defined by its filter predicate. Access to the subset of rows is 7540 // controlled by its IAM policy. 7541 type RowAccessPolicy struct { 7542 // CreationTime: Output only. The time when this row access policy was created, 7543 // in milliseconds since the epoch. 7544 CreationTime string `json:"creationTime,omitempty"` 7545 // Etag: Output only. A hash of this resource. 7546 Etag string `json:"etag,omitempty"` 7547 // FilterPredicate: Required. A SQL boolean expression that represents the rows 7548 // defined by this row access policy, similar to the boolean expression in a 7549 // WHERE clause of a SELECT query on a table. References to other tables, 7550 // routines, and temporary functions are not supported. Examples: region="EU" 7551 // date_field = CAST('2019-9-27' as DATE) nullable_field is not NULL 7552 // numeric_field BETWEEN 1.0 AND 5.0 7553 FilterPredicate string `json:"filterPredicate,omitempty"` 7554 // LastModifiedTime: Output only. The time when this row access policy was last 7555 // modified, in milliseconds since the epoch. 7556 LastModifiedTime string `json:"lastModifiedTime,omitempty"` 7557 // RowAccessPolicyReference: Required. Reference describing the ID of this row 7558 // access policy. 7559 RowAccessPolicyReference *RowAccessPolicyReference `json:"rowAccessPolicyReference,omitempty"` 7560 // ForceSendFields is a list of field names (e.g. "CreationTime") to 7561 // unconditionally include in API requests. By default, fields with empty or 7562 // default values are omitted from API requests. See 7563 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7564 // details. 7565 ForceSendFields []string `json:"-"` 7566 // NullFields is a list of field names (e.g. "CreationTime") to include in API 7567 // requests with the JSON null value. By default, fields with empty values are 7568 // omitted from API requests. See 7569 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7570 NullFields []string `json:"-"` 7571 } 7572 7573 func (s *RowAccessPolicy) MarshalJSON() ([]byte, error) { 7574 type NoMethod RowAccessPolicy 7575 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7576 } 7577 7578 // RowAccessPolicyReference: Id path of a row access policy. 7579 type RowAccessPolicyReference struct { 7580 // DatasetId: Required. The ID of the dataset containing this row access 7581 // policy. 7582 DatasetId string `json:"datasetId,omitempty"` 7583 // PolicyId: Required. The ID of the row access policy. The ID must contain 7584 // only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum 7585 // length is 256 characters. 7586 PolicyId string `json:"policyId,omitempty"` 7587 // ProjectId: Required. The ID of the project containing this row access 7588 // policy. 7589 ProjectId string `json:"projectId,omitempty"` 7590 // TableId: Required. The ID of the table containing this row access policy. 7591 TableId string `json:"tableId,omitempty"` 7592 // ForceSendFields is a list of field names (e.g. "DatasetId") to 7593 // unconditionally include in API requests. By default, fields with empty or 7594 // default values are omitted from API requests. See 7595 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7596 // details. 7597 ForceSendFields []string `json:"-"` 7598 // NullFields is a list of field names (e.g. "DatasetId") to include in API 7599 // requests with the JSON null value. By default, fields with empty values are 7600 // omitted from API requests. See 7601 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7602 NullFields []string `json:"-"` 7603 } 7604 7605 func (s *RowAccessPolicyReference) MarshalJSON() ([]byte, error) { 7606 type NoMethod RowAccessPolicyReference 7607 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7608 } 7609 7610 // RowLevelSecurityStatistics: Statistics for row-level security. 7611 type RowLevelSecurityStatistics struct { 7612 // RowLevelSecurityApplied: Whether any accessed data was protected by row 7613 // access policies. 7614 RowLevelSecurityApplied bool `json:"rowLevelSecurityApplied,omitempty"` 7615 // ForceSendFields is a list of field names (e.g. "RowLevelSecurityApplied") to 7616 // unconditionally include in API requests. By default, fields with empty or 7617 // default values are omitted from API requests. See 7618 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7619 // details. 7620 ForceSendFields []string `json:"-"` 7621 // NullFields is a list of field names (e.g. "RowLevelSecurityApplied") to 7622 // include in API requests with the JSON null value. By default, fields with 7623 // empty values are omitted from API requests. See 7624 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7625 NullFields []string `json:"-"` 7626 } 7627 7628 func (s *RowLevelSecurityStatistics) MarshalJSON() ([]byte, error) { 7629 type NoMethod RowLevelSecurityStatistics 7630 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7631 } 7632 7633 // ScriptOptions: Options related to script execution. 7634 type ScriptOptions struct { 7635 // KeyResultStatement: Determines which statement in the script represents the 7636 // "key result", used to populate the schema and query results of the script 7637 // job. Default is LAST. 7638 // 7639 // Possible values: 7640 // "KEY_RESULT_STATEMENT_KIND_UNSPECIFIED" - Default value. 7641 // "LAST" - The last result determines the key result. 7642 // "FIRST_SELECT" - The first SELECT statement determines the key result. 7643 KeyResultStatement string `json:"keyResultStatement,omitempty"` 7644 // StatementByteBudget: Limit on the number of bytes billed per statement. 7645 // Exceeding this budget results in an error. 7646 StatementByteBudget int64 `json:"statementByteBudget,omitempty,string"` 7647 // StatementTimeoutMs: Timeout period for each statement in a script. 7648 StatementTimeoutMs int64 `json:"statementTimeoutMs,omitempty,string"` 7649 // ForceSendFields is a list of field names (e.g. "KeyResultStatement") to 7650 // unconditionally include in API requests. By default, fields with empty or 7651 // default values are omitted from API requests. See 7652 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7653 // details. 7654 ForceSendFields []string `json:"-"` 7655 // NullFields is a list of field names (e.g. "KeyResultStatement") to include 7656 // in API requests with the JSON null value. By default, fields with empty 7657 // values are omitted from API requests. See 7658 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7659 NullFields []string `json:"-"` 7660 } 7661 7662 func (s *ScriptOptions) MarshalJSON() ([]byte, error) { 7663 type NoMethod ScriptOptions 7664 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7665 } 7666 7667 // ScriptStackFrame: Represents the location of the statement/expression being 7668 // evaluated. Line and column numbers are defined as follows: - Line and column 7669 // numbers start with one. That is, line 1 column 1 denotes the start of the 7670 // script. - When inside a stored procedure, all line/column numbers are 7671 // relative to the procedure body, not the script in which the procedure was 7672 // defined. - Start/end positions exclude leading/trailing comments and 7673 // whitespace. The end position always ends with a ";", when present. - 7674 // Multi-byte Unicode characters are treated as just one column. - If the 7675 // original script (or procedure definition) contains TAB characters, a tab 7676 // "snaps" the indentation forward to the nearest multiple of 8 characters, 7677 // plus 1. For example, a TAB on column 1, 2, 3, 4, 5, 6 , or 8 will advance 7678 // the next character to column 9. A TAB on column 9, 10, 11, 12, 13, 14, 15, 7679 // or 16 will advance the next character to column 17. 7680 type ScriptStackFrame struct { 7681 // EndColumn: Output only. One-based end column. 7682 EndColumn int64 `json:"endColumn,omitempty"` 7683 // EndLine: Output only. One-based end line. 7684 EndLine int64 `json:"endLine,omitempty"` 7685 // ProcedureId: Output only. Name of the active procedure, empty if in a 7686 // top-level script. 7687 ProcedureId string `json:"procedureId,omitempty"` 7688 // StartColumn: Output only. One-based start column. 7689 StartColumn int64 `json:"startColumn,omitempty"` 7690 // StartLine: Output only. One-based start line. 7691 StartLine int64 `json:"startLine,omitempty"` 7692 // Text: Output only. Text of the current statement/expression. 7693 Text string `json:"text,omitempty"` 7694 // ForceSendFields is a list of field names (e.g. "EndColumn") to 7695 // unconditionally include in API requests. By default, fields with empty or 7696 // default values are omitted from API requests. See 7697 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7698 // details. 7699 ForceSendFields []string `json:"-"` 7700 // NullFields is a list of field names (e.g. "EndColumn") to include in API 7701 // requests with the JSON null value. By default, fields with empty values are 7702 // omitted from API requests. See 7703 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7704 NullFields []string `json:"-"` 7705 } 7706 7707 func (s *ScriptStackFrame) MarshalJSON() ([]byte, error) { 7708 type NoMethod ScriptStackFrame 7709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7710 } 7711 7712 // ScriptStatistics: Job statistics specific to the child job of a script. 7713 type ScriptStatistics struct { 7714 // EvaluationKind: Whether this child job was a statement or expression. 7715 // 7716 // Possible values: 7717 // "EVALUATION_KIND_UNSPECIFIED" - Default value. 7718 // "STATEMENT" - The statement appears directly in the script. 7719 // "EXPRESSION" - The statement evaluates an expression that appears in the 7720 // script. 7721 EvaluationKind string `json:"evaluationKind,omitempty"` 7722 // StackFrames: Stack trace showing the line/column/procedure name of each 7723 // frame on the stack at the point where the current evaluation happened. The 7724 // leaf frame is first, the primary script is last. Never empty. 7725 StackFrames []*ScriptStackFrame `json:"stackFrames,omitempty"` 7726 // ForceSendFields is a list of field names (e.g. "EvaluationKind") to 7727 // unconditionally include in API requests. By default, fields with empty or 7728 // default values are omitted from API requests. See 7729 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7730 // details. 7731 ForceSendFields []string `json:"-"` 7732 // NullFields is a list of field names (e.g. "EvaluationKind") to include in 7733 // API requests with the JSON null value. By default, fields with empty values 7734 // are omitted from API requests. See 7735 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7736 NullFields []string `json:"-"` 7737 } 7738 7739 func (s *ScriptStatistics) MarshalJSON() ([]byte, error) { 7740 type NoMethod ScriptStatistics 7741 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7742 } 7743 7744 // SearchStatistics: Statistics for a search query. Populated as part of 7745 // JobStatistics2. 7746 type SearchStatistics struct { 7747 // IndexUnusedReasons: When `indexUsageMode` is `UNUSED` or `PARTIALLY_USED`, 7748 // this field explains why indexes were not used in all or part of the search 7749 // query. If `indexUsageMode` is `FULLY_USED`, this field is not populated. 7750 IndexUnusedReasons []*IndexUnusedReason `json:"indexUnusedReasons,omitempty"` 7751 // IndexUsageMode: Specifies the index usage mode for the query. 7752 // 7753 // Possible values: 7754 // "INDEX_USAGE_MODE_UNSPECIFIED" - Index usage mode not specified. 7755 // "UNUSED" - No search indexes were used in the search query. See 7756 // [`indexUnusedReasons`] 7757 // (/bigquery/docs/reference/rest/v2/Job#IndexUnusedReason) for detailed 7758 // reasons. 7759 // "PARTIALLY_USED" - Part of the search query used search indexes. See 7760 // [`indexUnusedReasons`] 7761 // (/bigquery/docs/reference/rest/v2/Job#IndexUnusedReason) for why other parts 7762 // of the query did not use search indexes. 7763 // "FULLY_USED" - The entire search query used search indexes. 7764 IndexUsageMode string `json:"indexUsageMode,omitempty"` 7765 // ForceSendFields is a list of field names (e.g. "IndexUnusedReasons") to 7766 // unconditionally include in API requests. By default, fields with empty or 7767 // default values are omitted from API requests. See 7768 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7769 // details. 7770 ForceSendFields []string `json:"-"` 7771 // NullFields is a list of field names (e.g. "IndexUnusedReasons") to include 7772 // in API requests with the JSON null value. By default, fields with empty 7773 // values are omitted from API requests. See 7774 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7775 NullFields []string `json:"-"` 7776 } 7777 7778 func (s *SearchStatistics) MarshalJSON() ([]byte, error) { 7779 type NoMethod SearchStatistics 7780 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7781 } 7782 7783 // SerDeInfo: Serializer and deserializer information. 7784 type SerDeInfo struct { 7785 // Name: Optional. Name of the SerDe. The maximum length is 256 characters. 7786 Name string `json:"name,omitempty"` 7787 // Parameters: Optional. Key-value pairs that define the initialization 7788 // parameters for the serialization library. Maximum size 10 Kib. 7789 Parameters map[string]string `json:"parameters,omitempty"` 7790 // SerializationLibrary: Required. Specifies a fully-qualified class name of 7791 // the serialization library that is responsible for the translation of data 7792 // between table representation and the underlying low-level input and output 7793 // format structures. The maximum length is 256 characters. 7794 SerializationLibrary string `json:"serializationLibrary,omitempty"` 7795 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 7796 // include in API requests. By default, fields with empty or default values are 7797 // omitted from API requests. See 7798 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7799 // details. 7800 ForceSendFields []string `json:"-"` 7801 // NullFields is a list of field names (e.g. "Name") to include in API requests 7802 // with the JSON null value. By default, fields with empty values are omitted 7803 // from API requests. See 7804 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7805 NullFields []string `json:"-"` 7806 } 7807 7808 func (s *SerDeInfo) MarshalJSON() ([]byte, error) { 7809 type NoMethod SerDeInfo 7810 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7811 } 7812 7813 // SessionInfo: [Preview] Information related to sessions. 7814 type SessionInfo struct { 7815 // SessionId: Output only. The id of the session. 7816 SessionId string `json:"sessionId,omitempty"` 7817 // ForceSendFields is a list of field names (e.g. "SessionId") to 7818 // unconditionally include in API requests. By default, fields with empty or 7819 // default values are omitted from API requests. See 7820 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7821 // details. 7822 ForceSendFields []string `json:"-"` 7823 // NullFields is a list of field names (e.g. "SessionId") to include in API 7824 // requests with the JSON null value. By default, fields with empty values are 7825 // omitted from API requests. See 7826 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7827 NullFields []string `json:"-"` 7828 } 7829 7830 func (s *SessionInfo) MarshalJSON() ([]byte, error) { 7831 type NoMethod SessionInfo 7832 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7833 } 7834 7835 // SetIamPolicyRequest: Request message for `SetIamPolicy` method. 7836 type SetIamPolicyRequest struct { 7837 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The 7838 // size of the policy is limited to a few 10s of KB. An empty policy is a valid 7839 // policy but certain Google Cloud services (such as Projects) might reject 7840 // them. 7841 Policy *Policy `json:"policy,omitempty"` 7842 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to 7843 // modify. Only the fields in the mask will be modified. If no mask is 7844 // provided, the following default mask is used: `paths: "bindings, etag" 7845 UpdateMask string `json:"updateMask,omitempty"` 7846 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally 7847 // include in API requests. By default, fields with empty or default values are 7848 // omitted from API requests. See 7849 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7850 // details. 7851 ForceSendFields []string `json:"-"` 7852 // NullFields is a list of field names (e.g. "Policy") to include in API 7853 // requests with the JSON null value. By default, fields with empty values are 7854 // omitted from API requests. See 7855 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7856 NullFields []string `json:"-"` 7857 } 7858 7859 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 7860 type NoMethod SetIamPolicyRequest 7861 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7862 } 7863 7864 // SkewSource: Details about source stages which produce skewed data. 7865 type SkewSource struct { 7866 // StageId: Output only. Stage id of the skew source stage. 7867 StageId int64 `json:"stageId,omitempty,string"` 7868 // ForceSendFields is a list of field names (e.g. "StageId") to unconditionally 7869 // include in API requests. By default, fields with empty or default values are 7870 // omitted from API requests. See 7871 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7872 // details. 7873 ForceSendFields []string `json:"-"` 7874 // NullFields is a list of field names (e.g. "StageId") to include in API 7875 // requests with the JSON null value. By default, fields with empty values are 7876 // omitted from API requests. See 7877 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7878 NullFields []string `json:"-"` 7879 } 7880 7881 func (s *SkewSource) MarshalJSON() ([]byte, error) { 7882 type NoMethod SkewSource 7883 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7884 } 7885 7886 // SnapshotDefinition: Information about base table and snapshot time of the 7887 // snapshot. 7888 type SnapshotDefinition struct { 7889 // BaseTableReference: Required. Reference describing the ID of the table that 7890 // was snapshot. 7891 BaseTableReference *TableReference `json:"baseTableReference,omitempty"` 7892 // SnapshotTime: Required. The time at which the base table was snapshot. This 7893 // value is reported in the JSON response using RFC3339 format. 7894 SnapshotTime string `json:"snapshotTime,omitempty"` 7895 // ForceSendFields is a list of field names (e.g. "BaseTableReference") to 7896 // unconditionally include in API requests. By default, fields with empty or 7897 // default values are omitted from API requests. See 7898 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7899 // details. 7900 ForceSendFields []string `json:"-"` 7901 // NullFields is a list of field names (e.g. "BaseTableReference") to include 7902 // in API requests with the JSON null value. By default, fields with empty 7903 // values are omitted from API requests. See 7904 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7905 NullFields []string `json:"-"` 7906 } 7907 7908 func (s *SnapshotDefinition) MarshalJSON() ([]byte, error) { 7909 type NoMethod SnapshotDefinition 7910 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7911 } 7912 7913 // SparkLoggingInfo: Spark job logs can be filtered by these fields in Cloud 7914 // Logging. 7915 type SparkLoggingInfo struct { 7916 // ProjectId: Output only. Project ID where the Spark logs were written. 7917 ProjectId string `json:"projectId,omitempty"` 7918 // ResourceType: Output only. Resource type used for logging. 7919 ResourceType string `json:"resourceType,omitempty"` 7920 // ForceSendFields is a list of field names (e.g. "ProjectId") to 7921 // unconditionally include in API requests. By default, fields with empty or 7922 // default values are omitted from API requests. See 7923 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7924 // details. 7925 ForceSendFields []string `json:"-"` 7926 // NullFields is a list of field names (e.g. "ProjectId") to include in API 7927 // requests with the JSON null value. By default, fields with empty values are 7928 // omitted from API requests. See 7929 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7930 NullFields []string `json:"-"` 7931 } 7932 7933 func (s *SparkLoggingInfo) MarshalJSON() ([]byte, error) { 7934 type NoMethod SparkLoggingInfo 7935 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7936 } 7937 7938 // SparkOptions: Options for a user-defined Spark routine. 7939 type SparkOptions struct { 7940 // ArchiveUris: Archive files to be extracted into the working directory of 7941 // each executor. For more information about Apache Spark, see Apache Spark 7942 // (https://spark.apache.org/docs/latest/index.html). 7943 ArchiveUris []string `json:"archiveUris,omitempty"` 7944 // Connection: Fully qualified name of the user-provided Spark connection 7945 // object. Format: 7946 // ``"projects/{project_id}/locations/{location_id}/connections/{connection_id} 7947 // "`` 7948 Connection string `json:"connection,omitempty"` 7949 // ContainerImage: Custom container image for the runtime environment. 7950 ContainerImage string `json:"containerImage,omitempty"` 7951 // FileUris: Files to be placed in the working directory of each executor. For 7952 // more information about Apache Spark, see Apache Spark 7953 // (https://spark.apache.org/docs/latest/index.html). 7954 FileUris []string `json:"fileUris,omitempty"` 7955 // JarUris: JARs to include on the driver and executor CLASSPATH. For more 7956 // information about Apache Spark, see Apache Spark 7957 // (https://spark.apache.org/docs/latest/index.html). 7958 JarUris []string `json:"jarUris,omitempty"` 7959 // MainClass: The fully qualified name of a class in jar_uris, for example, 7960 // com.example.wordcount. Exactly one of main_class and main_jar_uri field 7961 // should be set for Java/Scala language type. 7962 MainClass string `json:"mainClass,omitempty"` 7963 // MainFileUri: The main file/jar URI of the Spark application. Exactly one of 7964 // the definition_body field and the main_file_uri field must be set for 7965 // Python. Exactly one of main_class and main_file_uri field should be set for 7966 // Java/Scala language type. 7967 MainFileUri string `json:"mainFileUri,omitempty"` 7968 // Properties: Configuration properties as a set of key/value pairs, which will 7969 // be passed on to the Spark application. For more information, see Apache 7970 // Spark (https://spark.apache.org/docs/latest/index.html) and the procedure 7971 // option list 7972 // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#procedure_option_list). 7973 Properties map[string]string `json:"properties,omitempty"` 7974 // PyFileUris: Python files to be placed on the PYTHONPATH for PySpark 7975 // application. Supported file types: `.py`, `.egg`, and `.zip`. For more 7976 // information about Apache Spark, see Apache Spark 7977 // (https://spark.apache.org/docs/latest/index.html). 7978 PyFileUris []string `json:"pyFileUris,omitempty"` 7979 // RuntimeVersion: Runtime version. If not specified, the default runtime 7980 // version is used. 7981 RuntimeVersion string `json:"runtimeVersion,omitempty"` 7982 // ForceSendFields is a list of field names (e.g. "ArchiveUris") to 7983 // unconditionally include in API requests. By default, fields with empty or 7984 // default values are omitted from API requests. See 7985 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7986 // details. 7987 ForceSendFields []string `json:"-"` 7988 // NullFields is a list of field names (e.g. "ArchiveUris") to include in API 7989 // requests with the JSON null value. By default, fields with empty values are 7990 // omitted from API requests. See 7991 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7992 NullFields []string `json:"-"` 7993 } 7994 7995 func (s *SparkOptions) MarshalJSON() ([]byte, error) { 7996 type NoMethod SparkOptions 7997 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7998 } 7999 8000 // SparkStatistics: Statistics for a BigSpark query. Populated as part of 8001 // JobStatistics2 8002 type SparkStatistics struct { 8003 // Endpoints: Output only. Endpoints returned from Dataproc. Key list: - 8004 // history_server_endpoint: A link to Spark job UI. 8005 Endpoints map[string]string `json:"endpoints,omitempty"` 8006 // GcsStagingBucket: Output only. The Google Cloud Storage bucket that is used 8007 // as the default file system by the Spark application. This field is only 8008 // filled when the Spark procedure uses the invoker security mode. The 8009 // `gcsStagingBucket` bucket is inferred from the 8010 // `@@spark_proc_properties.staging_bucket` system variable (if it is 8011 // provided). Otherwise, BigQuery creates a default staging bucket for the job 8012 // and returns the bucket name in this field. Example: * `gs://[bucket_name]` 8013 GcsStagingBucket string `json:"gcsStagingBucket,omitempty"` 8014 // KmsKeyName: Output only. The Cloud KMS encryption key that is used to 8015 // protect the resources created by the Spark job. If the Spark procedure uses 8016 // the invoker security mode, the Cloud KMS encryption key is either inferred 8017 // from the provided system variable, `@@spark_proc_properties.kms_key_name`, 8018 // or the default key of the BigQuery job's project (if the CMEK organization 8019 // policy is enforced). Otherwise, the Cloud KMS key is either inferred from 8020 // the Spark connection associated with the procedure (if it is provided), or 8021 // from the default key of the Spark connection's project if the CMEK 8022 // organization policy is enforced. Example: * 8023 // `projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKey 8024 // s/[key]` 8025 KmsKeyName string `json:"kmsKeyName,omitempty"` 8026 // LoggingInfo: Output only. Logging info is used to generate a link to Cloud 8027 // Logging. 8028 LoggingInfo *SparkLoggingInfo `json:"loggingInfo,omitempty"` 8029 // SparkJobId: Output only. Spark job ID if a Spark job is created 8030 // successfully. 8031 SparkJobId string `json:"sparkJobId,omitempty"` 8032 // SparkJobLocation: Output only. Location where the Spark job is executed. A 8033 // location is selected by BigQueury for jobs configured to run in a 8034 // multi-region. 8035 SparkJobLocation string `json:"sparkJobLocation,omitempty"` 8036 // ForceSendFields is a list of field names (e.g. "Endpoints") to 8037 // unconditionally include in API requests. By default, fields with empty or 8038 // default values are omitted from API requests. See 8039 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8040 // details. 8041 ForceSendFields []string `json:"-"` 8042 // NullFields is a list of field names (e.g. "Endpoints") to include in API 8043 // requests with the JSON null value. By default, fields with empty values are 8044 // omitted from API requests. See 8045 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8046 NullFields []string `json:"-"` 8047 } 8048 8049 func (s *SparkStatistics) MarshalJSON() ([]byte, error) { 8050 type NoMethod SparkStatistics 8051 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8052 } 8053 8054 // StagePerformanceChangeInsight: Performance insights compared to the previous 8055 // executions for a specific stage. 8056 type StagePerformanceChangeInsight struct { 8057 // InputDataChange: Output only. Input data change insight of the query stage. 8058 InputDataChange *InputDataChange `json:"inputDataChange,omitempty"` 8059 // StageId: Output only. The stage id that the insight mapped to. 8060 StageId int64 `json:"stageId,omitempty,string"` 8061 // ForceSendFields is a list of field names (e.g. "InputDataChange") to 8062 // unconditionally include in API requests. By default, fields with empty or 8063 // default values are omitted from API requests. See 8064 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8065 // details. 8066 ForceSendFields []string `json:"-"` 8067 // NullFields is a list of field names (e.g. "InputDataChange") to include in 8068 // API requests with the JSON null value. By default, fields with empty values 8069 // are omitted from API requests. See 8070 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8071 NullFields []string `json:"-"` 8072 } 8073 8074 func (s *StagePerformanceChangeInsight) MarshalJSON() ([]byte, error) { 8075 type NoMethod StagePerformanceChangeInsight 8076 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8077 } 8078 8079 // StagePerformanceStandaloneInsight: Standalone performance insights for a 8080 // specific stage. 8081 type StagePerformanceStandaloneInsight struct { 8082 // BiEngineReasons: Output only. If present, the stage had the following 8083 // reasons for being disqualified from BI Engine execution. 8084 BiEngineReasons []*BiEngineReason `json:"biEngineReasons,omitempty"` 8085 // HighCardinalityJoins: Output only. High cardinality joins in the stage. 8086 HighCardinalityJoins []*HighCardinalityJoin `json:"highCardinalityJoins,omitempty"` 8087 // InsufficientShuffleQuota: Output only. True if the stage has insufficient 8088 // shuffle quota. 8089 InsufficientShuffleQuota bool `json:"insufficientShuffleQuota,omitempty"` 8090 // PartitionSkew: Output only. Partition skew in the stage. 8091 PartitionSkew *PartitionSkew `json:"partitionSkew,omitempty"` 8092 // SlotContention: Output only. True if the stage has a slot contention issue. 8093 SlotContention bool `json:"slotContention,omitempty"` 8094 // StageId: Output only. The stage id that the insight mapped to. 8095 StageId int64 `json:"stageId,omitempty,string"` 8096 // ForceSendFields is a list of field names (e.g. "BiEngineReasons") to 8097 // unconditionally include in API requests. By default, fields with empty or 8098 // default values are omitted from API requests. See 8099 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8100 // details. 8101 ForceSendFields []string `json:"-"` 8102 // NullFields is a list of field names (e.g. "BiEngineReasons") to include in 8103 // API requests with the JSON null value. By default, fields with empty values 8104 // are omitted from API requests. See 8105 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8106 NullFields []string `json:"-"` 8107 } 8108 8109 func (s *StagePerformanceStandaloneInsight) MarshalJSON() ([]byte, error) { 8110 type NoMethod StagePerformanceStandaloneInsight 8111 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8112 } 8113 8114 // StandardSqlDataType: The data type of a variable such as a function 8115 // argument. Examples include: * INT64: `{"typeKind": "INT64"}` * ARRAY: { 8116 // "typeKind": "ARRAY", "arrayElementType": {"typeKind": "STRING"} } * STRUCT>: 8117 // { "typeKind": "STRUCT", "structType": { "fields": [ { "name": "x", "type": 8118 // {"typeKind": "STRING"} }, { "name": "y", "type": { "typeKind": "ARRAY", 8119 // "arrayElementType": {"typeKind": "DATE"} } } ] } } 8120 type StandardSqlDataType struct { 8121 // ArrayElementType: The type of the array's elements, if type_kind = "ARRAY". 8122 ArrayElementType *StandardSqlDataType `json:"arrayElementType,omitempty"` 8123 // RangeElementType: The type of the range's elements, if type_kind = "RANGE". 8124 RangeElementType *StandardSqlDataType `json:"rangeElementType,omitempty"` 8125 // StructType: The fields of this struct, in order, if type_kind = "STRUCT". 8126 StructType *StandardSqlStructType `json:"structType,omitempty"` 8127 // TypeKind: Required. The top level type of this field. Can be any GoogleSQL 8128 // data type (e.g., "INT64", "DATE", "ARRAY"). 8129 // 8130 // Possible values: 8131 // "TYPE_KIND_UNSPECIFIED" - Invalid type. 8132 // "INT64" - Encoded as a string in decimal format. 8133 // "BOOL" - Encoded as a boolean "false" or "true". 8134 // "FLOAT64" - Encoded as a number, or string "NaN", "Infinity" or 8135 // "-Infinity". 8136 // "STRING" - Encoded as a string value. 8137 // "BYTES" - Encoded as a base64 string per RFC 4648, section 4. 8138 // "TIMESTAMP" - Encoded as an RFC 3339 timestamp with mandatory "Z" time 8139 // zone string: 1985-04-12T23:20:50.52Z 8140 // "DATE" - Encoded as RFC 3339 full-date format string: 1985-04-12 8141 // "TIME" - Encoded as RFC 3339 partial-time format string: 23:20:50.52 8142 // "DATETIME" - Encoded as RFC 3339 full-date "T" partial-time: 8143 // 1985-04-12T23:20:50.52 8144 // "INTERVAL" - Encoded as fully qualified 3 part: 0-5 15 2:30:45.6 8145 // "GEOGRAPHY" - Encoded as WKT 8146 // "NUMERIC" - Encoded as a decimal string. 8147 // "BIGNUMERIC" - Encoded as a decimal string. 8148 // "JSON" - Encoded as a string. 8149 // "ARRAY" - Encoded as a list with types matching Type.array_type. 8150 // "STRUCT" - Encoded as a list with fields of type Type.struct_type[i]. List 8151 // is used because a JSON object cannot have duplicate field names. 8152 // "RANGE" - Encoded as a pair with types matching range_element_type. Pairs 8153 // must begin with "[", end with ")", and be separated by ", ". 8154 TypeKind string `json:"typeKind,omitempty"` 8155 // ForceSendFields is a list of field names (e.g. "ArrayElementType") to 8156 // unconditionally include in API requests. By default, fields with empty or 8157 // default values are omitted from API requests. See 8158 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8159 // details. 8160 ForceSendFields []string `json:"-"` 8161 // NullFields is a list of field names (e.g. "ArrayElementType") to include in 8162 // API requests with the JSON null value. By default, fields with empty values 8163 // are omitted from API requests. See 8164 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8165 NullFields []string `json:"-"` 8166 } 8167 8168 func (s *StandardSqlDataType) MarshalJSON() ([]byte, error) { 8169 type NoMethod StandardSqlDataType 8170 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8171 } 8172 8173 // StandardSqlField: A field or a column. 8174 type StandardSqlField struct { 8175 // Name: Optional. The name of this field. Can be absent for struct fields. 8176 Name string `json:"name,omitempty"` 8177 // Type: Optional. The type of this parameter. Absent if not explicitly 8178 // specified (e.g., CREATE FUNCTION statement can omit the return type; in this 8179 // case the output parameter does not have this "type" field). 8180 Type *StandardSqlDataType `json:"type,omitempty"` 8181 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 8182 // include in API requests. By default, fields with empty or default values are 8183 // omitted from API requests. See 8184 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8185 // details. 8186 ForceSendFields []string `json:"-"` 8187 // NullFields is a list of field names (e.g. "Name") to include in API requests 8188 // with the JSON null value. By default, fields with empty values are omitted 8189 // from API requests. See 8190 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8191 NullFields []string `json:"-"` 8192 } 8193 8194 func (s *StandardSqlField) MarshalJSON() ([]byte, error) { 8195 type NoMethod StandardSqlField 8196 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8197 } 8198 8199 // StandardSqlStructType: The representation of a SQL STRUCT type. 8200 type StandardSqlStructType struct { 8201 // Fields: Fields within the struct. 8202 Fields []*StandardSqlField `json:"fields,omitempty"` 8203 // ForceSendFields is a list of field names (e.g. "Fields") to unconditionally 8204 // include in API requests. By default, fields with empty or default values are 8205 // omitted from API requests. See 8206 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8207 // details. 8208 ForceSendFields []string `json:"-"` 8209 // NullFields is a list of field names (e.g. "Fields") to include in API 8210 // requests with the JSON null value. By default, fields with empty values are 8211 // omitted from API requests. See 8212 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8213 NullFields []string `json:"-"` 8214 } 8215 8216 func (s *StandardSqlStructType) MarshalJSON() ([]byte, error) { 8217 type NoMethod StandardSqlStructType 8218 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8219 } 8220 8221 // StandardSqlTableType: A table type 8222 type StandardSqlTableType struct { 8223 // Columns: The columns in this table type 8224 Columns []*StandardSqlField `json:"columns,omitempty"` 8225 // ForceSendFields is a list of field names (e.g. "Columns") to unconditionally 8226 // include in API requests. By default, fields with empty or default values are 8227 // omitted from API requests. See 8228 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8229 // details. 8230 ForceSendFields []string `json:"-"` 8231 // NullFields is a list of field names (e.g. "Columns") to include in API 8232 // requests with the JSON null value. By default, fields with empty values are 8233 // omitted from API requests. See 8234 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8235 NullFields []string `json:"-"` 8236 } 8237 8238 func (s *StandardSqlTableType) MarshalJSON() ([]byte, error) { 8239 type NoMethod StandardSqlTableType 8240 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8241 } 8242 8243 // StorageDescriptor: Contains information about how a table's data is stored 8244 // and accessed by open source query engines. 8245 type StorageDescriptor struct { 8246 // InputFormat: Optional. Specifies the fully qualified class name of the 8247 // InputFormat (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"). The 8248 // maximum length is 128 characters. 8249 InputFormat string `json:"inputFormat,omitempty"` 8250 // LocationUri: Optional. The physical location of the table (e.g. 8251 // 'gs://spark-dataproc-data/pangea-data/case_sensitive/' or 8252 // 'gs://spark-dataproc-data/pangea-data/*'). The maximum length is 2056 bytes. 8253 LocationUri string `json:"locationUri,omitempty"` 8254 // OutputFormat: Optional. Specifies the fully qualified class name of the 8255 // OutputFormat (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat"). The 8256 // maximum length is 128 characters. 8257 OutputFormat string `json:"outputFormat,omitempty"` 8258 // SerdeInfo: Optional. Serializer and deserializer information. 8259 SerdeInfo *SerDeInfo `json:"serdeInfo,omitempty"` 8260 // ForceSendFields is a list of field names (e.g. "InputFormat") to 8261 // unconditionally include in API requests. By default, fields with empty or 8262 // default values are omitted from API requests. See 8263 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8264 // details. 8265 ForceSendFields []string `json:"-"` 8266 // NullFields is a list of field names (e.g. "InputFormat") to include in API 8267 // requests with the JSON null value. By default, fields with empty values are 8268 // omitted from API requests. See 8269 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8270 NullFields []string `json:"-"` 8271 } 8272 8273 func (s *StorageDescriptor) MarshalJSON() ([]byte, error) { 8274 type NoMethod StorageDescriptor 8275 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8276 } 8277 8278 type Streamingbuffer struct { 8279 // EstimatedBytes: Output only. A lower-bound estimate of the number of bytes 8280 // currently in the streaming buffer. 8281 EstimatedBytes uint64 `json:"estimatedBytes,omitempty,string"` 8282 // EstimatedRows: Output only. A lower-bound estimate of the number of rows 8283 // currently in the streaming buffer. 8284 EstimatedRows uint64 `json:"estimatedRows,omitempty,string"` 8285 // OldestEntryTime: Output only. Contains the timestamp of the oldest entry in 8286 // the streaming buffer, in milliseconds since the epoch, if the streaming 8287 // buffer is available. 8288 OldestEntryTime uint64 `json:"oldestEntryTime,omitempty,string"` 8289 // ForceSendFields is a list of field names (e.g. "EstimatedBytes") to 8290 // unconditionally include in API requests. By default, fields with empty or 8291 // default values are omitted from API requests. See 8292 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8293 // details. 8294 ForceSendFields []string `json:"-"` 8295 // NullFields is a list of field names (e.g. "EstimatedBytes") to include in 8296 // API requests with the JSON null value. By default, fields with empty values 8297 // are omitted from API requests. See 8298 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8299 NullFields []string `json:"-"` 8300 } 8301 8302 func (s *Streamingbuffer) MarshalJSON() ([]byte, error) { 8303 type NoMethod Streamingbuffer 8304 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8305 } 8306 8307 // StringHparamSearchSpace: Search space for string and enum. 8308 type StringHparamSearchSpace struct { 8309 // Candidates: Canididates for the string or enum parameter in lower case. 8310 Candidates []string `json:"candidates,omitempty"` 8311 // ForceSendFields is a list of field names (e.g. "Candidates") to 8312 // unconditionally include in API requests. By default, fields with empty or 8313 // default values are omitted from API requests. See 8314 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8315 // details. 8316 ForceSendFields []string `json:"-"` 8317 // NullFields is a list of field names (e.g. "Candidates") to include in API 8318 // requests with the JSON null value. By default, fields with empty values are 8319 // omitted from API requests. See 8320 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8321 NullFields []string `json:"-"` 8322 } 8323 8324 func (s *StringHparamSearchSpace) MarshalJSON() ([]byte, error) { 8325 type NoMethod StringHparamSearchSpace 8326 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8327 } 8328 8329 // SystemVariables: System variables given to a query. 8330 type SystemVariables struct { 8331 // Types: Output only. Data type for each system variable. 8332 Types map[string]StandardSqlDataType `json:"types,omitempty"` 8333 // Values: Output only. Value for each system variable. 8334 Values googleapi.RawMessage `json:"values,omitempty"` 8335 // ForceSendFields is a list of field names (e.g. "Types") to unconditionally 8336 // include in API requests. By default, fields with empty or default values are 8337 // omitted from API requests. See 8338 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8339 // details. 8340 ForceSendFields []string `json:"-"` 8341 // NullFields is a list of field names (e.g. "Types") to include in API 8342 // requests with the JSON null value. By default, fields with empty values are 8343 // omitted from API requests. See 8344 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8345 NullFields []string `json:"-"` 8346 } 8347 8348 func (s *SystemVariables) MarshalJSON() ([]byte, error) { 8349 type NoMethod SystemVariables 8350 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8351 } 8352 8353 type Table struct { 8354 // BiglakeConfiguration: Optional. Specifies the configuration of a BigLake 8355 // managed table. 8356 BiglakeConfiguration *BigLakeConfiguration `json:"biglakeConfiguration,omitempty"` 8357 // CloneDefinition: Output only. Contains information about the clone. This 8358 // value is set via the clone operation. 8359 CloneDefinition *CloneDefinition `json:"cloneDefinition,omitempty"` 8360 // Clustering: Clustering specification for the table. Must be specified with 8361 // time-based partitioning, data in the table will be first partitioned and 8362 // subsequently clustered. 8363 Clustering *Clustering `json:"clustering,omitempty"` 8364 // CreationTime: Output only. The time when this table was created, in 8365 // milliseconds since the epoch. 8366 CreationTime int64 `json:"creationTime,omitempty,string"` 8367 // DefaultCollation: Optional. Defines the default collation specification of 8368 // new STRING fields in the table. During table creation or update, if a STRING 8369 // field is added to this table without explicit collation specified, then the 8370 // table inherits the table default collation. A change to this field affects 8371 // only fields added afterwards, and does not alter the existing fields. The 8372 // following values are supported: * 'und:ci': undetermined locale, case 8373 // insensitive. * '': empty string. Default to case-sensitive behavior. 8374 DefaultCollation string `json:"defaultCollation,omitempty"` 8375 // DefaultRoundingMode: Optional. Defines the default rounding mode 8376 // specification of new decimal fields (NUMERIC OR BIGNUMERIC) in the table. 8377 // During table creation or update, if a decimal field is added to this table 8378 // without an explicit rounding mode specified, then the field inherits the 8379 // table default rounding mode. Changing this field doesn't affect existing 8380 // fields. 8381 // 8382 // Possible values: 8383 // "ROUNDING_MODE_UNSPECIFIED" - Unspecified will default to using 8384 // ROUND_HALF_AWAY_FROM_ZERO. 8385 // "ROUND_HALF_AWAY_FROM_ZERO" - ROUND_HALF_AWAY_FROM_ZERO rounds half values 8386 // away from zero when applying precision and scale upon writing of NUMERIC and 8387 // BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 8388 // 1.9 => 2 8389 // "ROUND_HALF_EVEN" - ROUND_HALF_EVEN rounds half values to the nearest even 8390 // value when applying precision and scale upon writing of NUMERIC and 8391 // BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 8392 // 1.8, 1.9 => 2 2.5 => 2 8393 DefaultRoundingMode string `json:"defaultRoundingMode,omitempty"` 8394 // Description: Optional. A user-friendly description of this table. 8395 Description string `json:"description,omitempty"` 8396 // EncryptionConfiguration: Custom encryption configuration (e.g., Cloud KMS 8397 // keys). 8398 EncryptionConfiguration *EncryptionConfiguration `json:"encryptionConfiguration,omitempty"` 8399 // Etag: Output only. A hash of this resource. 8400 Etag string `json:"etag,omitempty"` 8401 // ExpirationTime: Optional. The time when this table expires, in milliseconds 8402 // since the epoch. If not present, the table will persist indefinitely. 8403 // Expired tables will be deleted and their storage reclaimed. The 8404 // defaultTableExpirationMs property of the encapsulating dataset can be used 8405 // to set a default expirationTime on newly created tables. 8406 ExpirationTime int64 `json:"expirationTime,omitempty,string"` 8407 // ExternalCatalogTableOptions: Optional. Options defining open source 8408 // compatible table. 8409 ExternalCatalogTableOptions *ExternalCatalogTableOptions `json:"externalCatalogTableOptions,omitempty"` 8410 // ExternalDataConfiguration: Optional. Describes the data format, location, 8411 // and other properties of a table stored outside of BigQuery. By defining 8412 // these properties, the data source can then be queried as if it were a 8413 // standard BigQuery table. 8414 ExternalDataConfiguration *ExternalDataConfiguration `json:"externalDataConfiguration,omitempty"` 8415 // FriendlyName: Optional. A descriptive name for this table. 8416 FriendlyName string `json:"friendlyName,omitempty"` 8417 // Id: Output only. An opaque ID uniquely identifying the table. 8418 Id string `json:"id,omitempty"` 8419 // Kind: The type of resource ID. 8420 Kind string `json:"kind,omitempty"` 8421 // Labels: The labels associated with this table. You can use these to organize 8422 // and group your tables. Label keys and values can be no longer than 63 8423 // characters, can only contain lowercase letters, numeric characters, 8424 // underscores and dashes. International characters are allowed. Label values 8425 // are optional. Label keys must start with a letter and each label in the list 8426 // must have a different key. 8427 Labels map[string]string `json:"labels,omitempty"` 8428 // LastModifiedTime: Output only. The time when this table was last modified, 8429 // in milliseconds since the epoch. 8430 LastModifiedTime uint64 `json:"lastModifiedTime,omitempty,string"` 8431 // Location: Output only. The geographic location where the table resides. This 8432 // value is inherited from the dataset. 8433 Location string `json:"location,omitempty"` 8434 // MaterializedView: Optional. The materialized view definition. 8435 MaterializedView *MaterializedViewDefinition `json:"materializedView,omitempty"` 8436 // MaterializedViewStatus: Output only. The materialized view status. 8437 MaterializedViewStatus *MaterializedViewStatus `json:"materializedViewStatus,omitempty"` 8438 // MaxStaleness: Optional. The maximum staleness of data that could be returned 8439 // when the table (or stale MV) is queried. Staleness encoded as a string 8440 // encoding of sql IntervalValue type. 8441 MaxStaleness string `json:"maxStaleness,omitempty"` 8442 // Model: Deprecated. 8443 Model *ModelDefinition `json:"model,omitempty"` 8444 // NumActiveLogicalBytes: Output only. Number of logical bytes that are less 8445 // than 90 days old. 8446 NumActiveLogicalBytes int64 `json:"numActiveLogicalBytes,omitempty,string"` 8447 // NumActivePhysicalBytes: Output only. Number of physical bytes less than 90 8448 // days old. This data is not kept in real time, and might be delayed by a few 8449 // seconds to a few minutes. 8450 NumActivePhysicalBytes int64 `json:"numActivePhysicalBytes,omitempty,string"` 8451 // NumBytes: Output only. The size of this table in logical bytes, excluding 8452 // any data in the streaming buffer. 8453 NumBytes int64 `json:"numBytes,omitempty,string"` 8454 // NumLongTermBytes: Output only. The number of logical bytes in the table that 8455 // are considered "long-term storage". 8456 NumLongTermBytes int64 `json:"numLongTermBytes,omitempty,string"` 8457 // NumLongTermLogicalBytes: Output only. Number of logical bytes that are more 8458 // than 90 days old. 8459 NumLongTermLogicalBytes int64 `json:"numLongTermLogicalBytes,omitempty,string"` 8460 // NumLongTermPhysicalBytes: Output only. Number of physical bytes more than 90 8461 // days old. This data is not kept in real time, and might be delayed by a few 8462 // seconds to a few minutes. 8463 NumLongTermPhysicalBytes int64 `json:"numLongTermPhysicalBytes,omitempty,string"` 8464 // NumPartitions: Output only. The number of partitions present in the table or 8465 // materialized view. This data is not kept in real time, and might be delayed 8466 // by a few seconds to a few minutes. 8467 NumPartitions int64 `json:"numPartitions,omitempty,string"` 8468 // NumPhysicalBytes: Output only. The physical size of this table in bytes. 8469 // This includes storage used for time travel. 8470 NumPhysicalBytes int64 `json:"numPhysicalBytes,omitempty,string"` 8471 // NumRows: Output only. The number of rows of data in this table, excluding 8472 // any data in the streaming buffer. 8473 NumRows uint64 `json:"numRows,omitempty,string"` 8474 // NumTimeTravelPhysicalBytes: Output only. Number of physical bytes used by 8475 // time travel storage (deleted or changed data). This data is not kept in real 8476 // time, and might be delayed by a few seconds to a few minutes. 8477 NumTimeTravelPhysicalBytes int64 `json:"numTimeTravelPhysicalBytes,omitempty,string"` 8478 // NumTotalLogicalBytes: Output only. Total number of logical bytes in the 8479 // table or materialized view. 8480 NumTotalLogicalBytes int64 `json:"numTotalLogicalBytes,omitempty,string"` 8481 // NumTotalPhysicalBytes: Output only. The physical size of this table in 8482 // bytes. This also includes storage used for time travel. This data is not 8483 // kept in real time, and might be delayed by a few seconds to a few minutes. 8484 NumTotalPhysicalBytes int64 `json:"numTotalPhysicalBytes,omitempty,string"` 8485 // PartitionDefinition: Output only. The partition information for all table 8486 // formats, including managed partitioned tables, hive partitioned tables, and 8487 // iceberg partitioned tables. 8488 PartitionDefinition *PartitioningDefinition `json:"partitionDefinition,omitempty"` 8489 // RangePartitioning: If specified, configures range partitioning for this 8490 // table. 8491 RangePartitioning *RangePartitioning `json:"rangePartitioning,omitempty"` 8492 // Replicas: Optional. Output only. Table references of all replicas currently 8493 // active on the table. 8494 Replicas []*TableReference `json:"replicas,omitempty"` 8495 // RequirePartitionFilter: Optional. If set to true, queries over this table 8496 // require a partition filter that can be used for partition elimination to be 8497 // specified. 8498 RequirePartitionFilter bool `json:"requirePartitionFilter,omitempty"` 8499 // ResourceTags: [Optional] The tags associated with this table. Tag keys are 8500 // globally unique. See additional information on tags 8501 // (https://cloud.google.com/iam/docs/tags-access-control#definitions). An 8502 // object containing a list of "key": value pairs. The key is the namespaced 8503 // friendly name of the tag key, e.g. "12345/environment" where 12345 is parent 8504 // id. The value is the friendly short name of the tag value, e.g. 8505 // "production". 8506 ResourceTags map[string]string `json:"resourceTags,omitempty"` 8507 // Restrictions: Optional. Output only. Restriction config for table. If set, 8508 // restrict certain accesses on the table based on the config. See Data egress 8509 // (/bigquery/docs/analytics-hub-introduction#data_egress) for more details. 8510 Restrictions *RestrictionConfig `json:"restrictions,omitempty"` 8511 // Schema: Optional. Describes the schema of this table. 8512 Schema *TableSchema `json:"schema,omitempty"` 8513 // SelfLink: Output only. A URL that can be used to access this resource again. 8514 SelfLink string `json:"selfLink,omitempty"` 8515 // SnapshotDefinition: Output only. Contains information about the snapshot. 8516 // This value is set via snapshot creation. 8517 SnapshotDefinition *SnapshotDefinition `json:"snapshotDefinition,omitempty"` 8518 // StreamingBuffer: Output only. Contains information regarding this table's 8519 // streaming buffer, if one is present. This field will be absent if the table 8520 // is not being streamed to or if there is no data in the streaming buffer. 8521 StreamingBuffer *Streamingbuffer `json:"streamingBuffer,omitempty"` 8522 // TableConstraints: Optional. Tables Primary Key and Foreign Key information 8523 TableConstraints *TableConstraints `json:"tableConstraints,omitempty"` 8524 // TableReference: Required. Reference describing the ID of this table. 8525 TableReference *TableReference `json:"tableReference,omitempty"` 8526 // TableReplicationInfo: Optional. Table replication info for table created `AS 8527 // REPLICA` DDL like: `CREATE MATERIALIZED VIEW mv1 AS REPLICA OF src_mv` 8528 TableReplicationInfo *TableReplicationInfo `json:"tableReplicationInfo,omitempty"` 8529 // TimePartitioning: If specified, configures time-based partitioning for this 8530 // table. 8531 TimePartitioning *TimePartitioning `json:"timePartitioning,omitempty"` 8532 // Type: Output only. Describes the table type. The following values are 8533 // supported: * `TABLE`: A normal BigQuery table. * `VIEW`: A virtual table 8534 // defined by a SQL query. * `EXTERNAL`: A table that references data stored in 8535 // an external storage system, such as Google Cloud Storage. * 8536 // `MATERIALIZED_VIEW`: A precomputed view defined by a SQL query. * 8537 // `SNAPSHOT`: An immutable BigQuery table that preserves the contents of a 8538 // base table at a particular time. See additional information on table 8539 // snapshots (/bigquery/docs/table-snapshots-intro). The default value is 8540 // `TABLE`. 8541 Type string `json:"type,omitempty"` 8542 // View: Optional. The view definition. 8543 View *ViewDefinition `json:"view,omitempty"` 8544 8545 // ServerResponse contains the HTTP response code and headers from the server. 8546 googleapi.ServerResponse `json:"-"` 8547 // ForceSendFields is a list of field names (e.g. "BiglakeConfiguration") to 8548 // unconditionally include in API requests. By default, fields with empty or 8549 // default values are omitted from API requests. See 8550 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8551 // details. 8552 ForceSendFields []string `json:"-"` 8553 // NullFields is a list of field names (e.g. "BiglakeConfiguration") to include 8554 // in API requests with the JSON null value. By default, fields with empty 8555 // values are omitted from API requests. See 8556 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8557 NullFields []string `json:"-"` 8558 } 8559 8560 func (s *Table) MarshalJSON() ([]byte, error) { 8561 type NoMethod Table 8562 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8563 } 8564 8565 type TableCell struct { 8566 V interface{} `json:"v,omitempty"` 8567 // ForceSendFields is a list of field names (e.g. "V") to unconditionally 8568 // include in API requests. By default, fields with empty or default values are 8569 // omitted from API requests. See 8570 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8571 // details. 8572 ForceSendFields []string `json:"-"` 8573 // NullFields is a list of field names (e.g. "V") to include in API requests 8574 // with the JSON null value. By default, fields with empty values are omitted 8575 // from API requests. See 8576 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8577 NullFields []string `json:"-"` 8578 } 8579 8580 func (s *TableCell) MarshalJSON() ([]byte, error) { 8581 type NoMethod TableCell 8582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8583 } 8584 8585 // TableConstraints: The TableConstraints defines the primary key and foreign 8586 // key. 8587 type TableConstraints struct { 8588 // ForeignKeys: Optional. Present only if the table has a foreign key. The 8589 // foreign key is not enforced. 8590 ForeignKeys []*TableConstraintsForeignKeys `json:"foreignKeys,omitempty"` 8591 // PrimaryKey: Represents the primary key constraint on a table's columns. 8592 PrimaryKey *TableConstraintsPrimaryKey `json:"primaryKey,omitempty"` 8593 // ForceSendFields is a list of field names (e.g. "ForeignKeys") to 8594 // unconditionally include in API requests. By default, fields with empty or 8595 // default values are omitted from API requests. See 8596 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8597 // details. 8598 ForceSendFields []string `json:"-"` 8599 // NullFields is a list of field names (e.g. "ForeignKeys") to include in API 8600 // requests with the JSON null value. By default, fields with empty values are 8601 // omitted from API requests. See 8602 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8603 NullFields []string `json:"-"` 8604 } 8605 8606 func (s *TableConstraints) MarshalJSON() ([]byte, error) { 8607 type NoMethod TableConstraints 8608 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8609 } 8610 8611 // TableConstraintsForeignKeys: Represents a foreign key constraint on a 8612 // table's columns. 8613 type TableConstraintsForeignKeys struct { 8614 // ColumnReferences: Required. The columns that compose the foreign key. 8615 ColumnReferences []*TableConstraintsForeignKeysColumnReferences `json:"columnReferences,omitempty"` 8616 // Name: Optional. Set only if the foreign key constraint is named. 8617 Name string `json:"name,omitempty"` 8618 ReferencedTable *TableConstraintsForeignKeysReferencedTable `json:"referencedTable,omitempty"` 8619 // ForceSendFields is a list of field names (e.g. "ColumnReferences") to 8620 // unconditionally include in API requests. By default, fields with empty or 8621 // default values are omitted from API requests. See 8622 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8623 // details. 8624 ForceSendFields []string `json:"-"` 8625 // NullFields is a list of field names (e.g. "ColumnReferences") to include in 8626 // API requests with the JSON null value. By default, fields with empty values 8627 // are omitted from API requests. See 8628 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8629 NullFields []string `json:"-"` 8630 } 8631 8632 func (s *TableConstraintsForeignKeys) MarshalJSON() ([]byte, error) { 8633 type NoMethod TableConstraintsForeignKeys 8634 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8635 } 8636 8637 // TableConstraintsForeignKeysColumnReferences: The pair of the foreign key 8638 // column and primary key column. 8639 type TableConstraintsForeignKeysColumnReferences struct { 8640 // ReferencedColumn: Required. The column in the primary key that are 8641 // referenced by the referencing_column. 8642 ReferencedColumn string `json:"referencedColumn,omitempty"` 8643 // ReferencingColumn: Required. The column that composes the foreign key. 8644 ReferencingColumn string `json:"referencingColumn,omitempty"` 8645 // ForceSendFields is a list of field names (e.g. "ReferencedColumn") to 8646 // unconditionally include in API requests. By default, fields with empty or 8647 // default values are omitted from API requests. See 8648 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8649 // details. 8650 ForceSendFields []string `json:"-"` 8651 // NullFields is a list of field names (e.g. "ReferencedColumn") to include in 8652 // API requests with the JSON null value. By default, fields with empty values 8653 // are omitted from API requests. See 8654 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8655 NullFields []string `json:"-"` 8656 } 8657 8658 func (s *TableConstraintsForeignKeysColumnReferences) MarshalJSON() ([]byte, error) { 8659 type NoMethod TableConstraintsForeignKeysColumnReferences 8660 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8661 } 8662 8663 type TableConstraintsForeignKeysReferencedTable struct { 8664 DatasetId string `json:"datasetId,omitempty"` 8665 ProjectId string `json:"projectId,omitempty"` 8666 TableId string `json:"tableId,omitempty"` 8667 // ForceSendFields is a list of field names (e.g. "DatasetId") to 8668 // unconditionally include in API requests. By default, fields with empty or 8669 // default values are omitted from API requests. See 8670 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8671 // details. 8672 ForceSendFields []string `json:"-"` 8673 // NullFields is a list of field names (e.g. "DatasetId") to include in API 8674 // requests with the JSON null value. By default, fields with empty values are 8675 // omitted from API requests. See 8676 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8677 NullFields []string `json:"-"` 8678 } 8679 8680 func (s *TableConstraintsForeignKeysReferencedTable) MarshalJSON() ([]byte, error) { 8681 type NoMethod TableConstraintsForeignKeysReferencedTable 8682 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8683 } 8684 8685 // TableConstraintsPrimaryKey: Represents the primary key constraint on a 8686 // table's columns. 8687 type TableConstraintsPrimaryKey struct { 8688 // Columns: Required. The columns that are composed of the primary key 8689 // constraint. 8690 Columns []string `json:"columns,omitempty"` 8691 // ForceSendFields is a list of field names (e.g. "Columns") to unconditionally 8692 // include in API requests. By default, fields with empty or default values are 8693 // omitted from API requests. See 8694 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8695 // details. 8696 ForceSendFields []string `json:"-"` 8697 // NullFields is a list of field names (e.g. "Columns") to include in API 8698 // requests with the JSON null value. By default, fields with empty values are 8699 // omitted from API requests. See 8700 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8701 NullFields []string `json:"-"` 8702 } 8703 8704 func (s *TableConstraintsPrimaryKey) MarshalJSON() ([]byte, error) { 8705 type NoMethod TableConstraintsPrimaryKey 8706 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8707 } 8708 8709 // TableDataInsertAllRequest: Request for sending a single streaming insert. 8710 type TableDataInsertAllRequest struct { 8711 // IgnoreUnknownValues: Optional. Accept rows that contain values that do not 8712 // match the schema. The unknown values are ignored. Default is false, which 8713 // treats unknown values as errors. 8714 IgnoreUnknownValues bool `json:"ignoreUnknownValues,omitempty"` 8715 // Kind: Optional. The resource type of the response. The value is not checked 8716 // at the backend. Historically, it has been set to 8717 // "bigquery#tableDataInsertAllRequest" but you are not required to set it. 8718 Kind string `json:"kind,omitempty"` 8719 Rows []*TableDataInsertAllRequestRows `json:"rows,omitempty"` 8720 // SkipInvalidRows: Optional. Insert all valid rows of a request, even if 8721 // invalid rows exist. The default value is false, which causes the entire 8722 // request to fail if any invalid rows exist. 8723 SkipInvalidRows bool `json:"skipInvalidRows,omitempty"` 8724 // TemplateSuffix: Optional. If specified, treats the destination table as a 8725 // base template, and inserts the rows into an instance table named 8726 // "{destination}{templateSuffix}". BigQuery will manage creation of the 8727 // instance table, using the schema of the base template table. See 8728 // https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-tables 8729 // for considerations when working with templates tables. 8730 TemplateSuffix string `json:"templateSuffix,omitempty"` 8731 // TraceId: Optional. Unique request trace id. Used for debugging purposes 8732 // only. It is case-sensitive, limited to up to 36 ASCII characters. A UUID is 8733 // recommended. 8734 TraceId string `json:"traceId,omitempty"` 8735 // ForceSendFields is a list of field names (e.g. "IgnoreUnknownValues") to 8736 // unconditionally include in API requests. By default, fields with empty or 8737 // default values are omitted from API requests. See 8738 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8739 // details. 8740 ForceSendFields []string `json:"-"` 8741 // NullFields is a list of field names (e.g. "IgnoreUnknownValues") to include 8742 // in API requests with the JSON null value. By default, fields with empty 8743 // values are omitted from API requests. See 8744 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8745 NullFields []string `json:"-"` 8746 } 8747 8748 func (s *TableDataInsertAllRequest) MarshalJSON() ([]byte, error) { 8749 type NoMethod TableDataInsertAllRequest 8750 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8751 } 8752 8753 // TableDataInsertAllRequestRows: Data for a single insertion row. 8754 type TableDataInsertAllRequestRows struct { 8755 // InsertId: Insertion ID for best-effort deduplication. This feature is not 8756 // recommended, and users seeking stronger insertion semantics are encouraged 8757 // to use other mechanisms such as the BigQuery Write API. 8758 InsertId string `json:"insertId,omitempty"` 8759 // Json: Data for a single row. 8760 Json map[string]JsonValue `json:"json,omitempty"` 8761 // ForceSendFields is a list of field names (e.g. "InsertId") to 8762 // unconditionally include in API requests. By default, fields with empty or 8763 // default values are omitted from API requests. See 8764 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8765 // details. 8766 ForceSendFields []string `json:"-"` 8767 // NullFields is a list of field names (e.g. "InsertId") to include in API 8768 // requests with the JSON null value. By default, fields with empty values are 8769 // omitted from API requests. See 8770 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8771 NullFields []string `json:"-"` 8772 } 8773 8774 func (s *TableDataInsertAllRequestRows) MarshalJSON() ([]byte, error) { 8775 type NoMethod TableDataInsertAllRequestRows 8776 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8777 } 8778 8779 // TableDataInsertAllResponse: Describes the format of a streaming insert 8780 // response. 8781 type TableDataInsertAllResponse struct { 8782 // InsertErrors: Describes specific errors encountered while processing the 8783 // request. 8784 InsertErrors []*TableDataInsertAllResponseInsertErrors `json:"insertErrors,omitempty"` 8785 // Kind: Returns "bigquery#tableDataInsertAllResponse". 8786 Kind string `json:"kind,omitempty"` 8787 8788 // ServerResponse contains the HTTP response code and headers from the server. 8789 googleapi.ServerResponse `json:"-"` 8790 // ForceSendFields is a list of field names (e.g. "InsertErrors") to 8791 // unconditionally include in API requests. By default, fields with empty or 8792 // default values are omitted from API requests. See 8793 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8794 // details. 8795 ForceSendFields []string `json:"-"` 8796 // NullFields is a list of field names (e.g. "InsertErrors") to include in API 8797 // requests with the JSON null value. By default, fields with empty values are 8798 // omitted from API requests. See 8799 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8800 NullFields []string `json:"-"` 8801 } 8802 8803 func (s *TableDataInsertAllResponse) MarshalJSON() ([]byte, error) { 8804 type NoMethod TableDataInsertAllResponse 8805 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8806 } 8807 8808 // TableDataInsertAllResponseInsertErrors: Error details about a single row's 8809 // insertion. 8810 type TableDataInsertAllResponseInsertErrors struct { 8811 // Errors: Error information for the row indicated by the index property. 8812 Errors []*ErrorProto `json:"errors,omitempty"` 8813 // Index: The index of the row that error applies to. 8814 Index int64 `json:"index,omitempty"` 8815 // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally 8816 // include in API requests. By default, fields with empty or default values are 8817 // omitted from API requests. See 8818 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8819 // details. 8820 ForceSendFields []string `json:"-"` 8821 // NullFields is a list of field names (e.g. "Errors") to include in API 8822 // requests with the JSON null value. By default, fields with empty values are 8823 // omitted from API requests. See 8824 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8825 NullFields []string `json:"-"` 8826 } 8827 8828 func (s *TableDataInsertAllResponseInsertErrors) MarshalJSON() ([]byte, error) { 8829 type NoMethod TableDataInsertAllResponseInsertErrors 8830 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8831 } 8832 8833 type TableDataList struct { 8834 // Etag: A hash of this page of results. 8835 Etag string `json:"etag,omitempty"` 8836 // Kind: The resource type of the response. 8837 Kind string `json:"kind,omitempty"` 8838 // PageToken: A token used for paging results. Providing this token instead of 8839 // the startIndex parameter can help you retrieve stable results when an 8840 // underlying table is changing. 8841 PageToken string `json:"pageToken,omitempty"` 8842 // Rows: Rows of results. 8843 Rows []*TableRow `json:"rows,omitempty"` 8844 // TotalRows: Total rows of the entire table. In order to show default value 0 8845 // we have to present it as string. 8846 TotalRows int64 `json:"totalRows,omitempty,string"` 8847 8848 // ServerResponse contains the HTTP response code and headers from the server. 8849 googleapi.ServerResponse `json:"-"` 8850 // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally 8851 // include in API requests. By default, fields with empty or default values are 8852 // omitted from API requests. See 8853 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8854 // details. 8855 ForceSendFields []string `json:"-"` 8856 // NullFields is a list of field names (e.g. "Etag") to include in API requests 8857 // with the JSON null value. By default, fields with empty values are omitted 8858 // from API requests. See 8859 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8860 NullFields []string `json:"-"` 8861 } 8862 8863 func (s *TableDataList) MarshalJSON() ([]byte, error) { 8864 type NoMethod TableDataList 8865 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8866 } 8867 8868 // TableFieldSchema: A field in TableSchema 8869 type TableFieldSchema struct { 8870 // Categories: Deprecated. 8871 Categories *TableFieldSchemaCategories `json:"categories,omitempty"` 8872 // Collation: Optional. Field collation can be set only when the type of field 8873 // is STRING. The following values are supported: * 'und:ci': undetermined 8874 // locale, case insensitive. * '': empty string. Default to case-sensitive 8875 // behavior. 8876 Collation string `json:"collation,omitempty"` 8877 // DefaultValueExpression: Optional. A SQL expression to specify the [default 8878 // value] (https://cloud.google.com/bigquery/docs/default-values) for this 8879 // field. 8880 DefaultValueExpression string `json:"defaultValueExpression,omitempty"` 8881 // Description: Optional. The field description. The maximum length is 1,024 8882 // characters. 8883 Description string `json:"description,omitempty"` 8884 // Fields: Optional. Describes the nested schema fields if the type property is 8885 // set to RECORD. 8886 Fields []*TableFieldSchema `json:"fields,omitempty"` 8887 // ForeignTypeDefinition: Optional. Definition of the foreign data type. Only 8888 // valid for top-level schema fields (not nested fields). If the type is 8889 // FOREIGN, this field is required. 8890 ForeignTypeDefinition string `json:"foreignTypeDefinition,omitempty"` 8891 // MaxLength: Optional. Maximum length of values of this field for STRINGS or 8892 // BYTES. If max_length is not specified, no maximum length constraint is 8893 // imposed on this field. If type = "STRING", then max_length represents the 8894 // maximum UTF-8 length of strings in this field. If type = "BYTES", then 8895 // max_length represents the maximum number of bytes in this field. It is 8896 // invalid to set this field if type ≠ "STRING" and ≠ "BYTES". 8897 MaxLength int64 `json:"maxLength,omitempty,string"` 8898 // Mode: Optional. The field mode. Possible values include NULLABLE, REQUIRED 8899 // and REPEATED. The default value is NULLABLE. 8900 Mode string `json:"mode,omitempty"` 8901 // Name: Required. The field name. The name must contain only letters (a-z, 8902 // A-Z), numbers (0-9), or underscores (_), and must start with a letter or 8903 // underscore. The maximum length is 300 characters. 8904 Name string `json:"name,omitempty"` 8905 // PolicyTags: Optional. The policy tags attached to this field, used for 8906 // field-level access control. If not set, defaults to empty policy_tags. 8907 PolicyTags *TableFieldSchemaPolicyTags `json:"policyTags,omitempty"` 8908 // Precision: Optional. Precision (maximum number of total digits in base 10) 8909 // and scale (maximum number of digits in the fractional part in base 10) 8910 // constraints for values of this field for NUMERIC or BIGNUMERIC. It is 8911 // invalid to set precision or scale if type ≠ "NUMERIC" and ≠ 8912 // "BIGNUMERIC". If precision and scale are not specified, no value range 8913 // constraint is imposed on this field insofar as values are permitted by the 8914 // type. Values of this NUMERIC or BIGNUMERIC field must be in this range when: 8915 // * Precision (P) and scale (S) are specified: [-10P-S + 10-S, 10P-S - 10-S] * 8916 // Precision (P) is specified but not scale (and thus scale is interpreted to 8917 // be equal to zero): [-10P + 1, 10P - 1]. Acceptable values for precision and 8918 // scale if both are specified: * If type = "NUMERIC": 1 ≤ precision - scale 8919 // ≤ 29 and 0 ≤ scale ≤ 9. * If type = "BIGNUMERIC": 1 ≤ precision - 8920 // scale ≤ 38 and 0 ≤ scale ≤ 38. Acceptable values for precision if only 8921 // precision is specified but not scale (and thus scale is interpreted to be 8922 // equal to zero): * If type = "NUMERIC": 1 ≤ precision ≤ 29. * If type = 8923 // "BIGNUMERIC": 1 ≤ precision ≤ 38. If scale is specified but not 8924 // precision, then it is invalid. 8925 Precision int64 `json:"precision,omitempty,string"` 8926 // RangeElementType: Represents the type of a field element. 8927 RangeElementType *TableFieldSchemaRangeElementType `json:"rangeElementType,omitempty"` 8928 // RoundingMode: Optional. Specifies the rounding mode to be used when storing 8929 // values of NUMERIC and BIGNUMERIC type. 8930 // 8931 // Possible values: 8932 // "ROUNDING_MODE_UNSPECIFIED" - Unspecified will default to using 8933 // ROUND_HALF_AWAY_FROM_ZERO. 8934 // "ROUND_HALF_AWAY_FROM_ZERO" - ROUND_HALF_AWAY_FROM_ZERO rounds half values 8935 // away from zero when applying precision and scale upon writing of NUMERIC and 8936 // BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5, 1.6, 1.7, 1.8, 8937 // 1.9 => 2 8938 // "ROUND_HALF_EVEN" - ROUND_HALF_EVEN rounds half values to the nearest even 8939 // value when applying precision and scale upon writing of NUMERIC and 8940 // BIGNUMERIC values. For Scale: 0 1.1, 1.2, 1.3, 1.4 => 1 1.5 => 2 1.6, 1.7, 8941 // 1.8, 1.9 => 2 2.5 => 2 8942 RoundingMode string `json:"roundingMode,omitempty"` 8943 // Scale: Optional. See documentation for precision. 8944 Scale int64 `json:"scale,omitempty,string"` 8945 // Type: Required. The field data type. Possible values include: * STRING * 8946 // BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * 8947 // TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON 8948 // * RECORD (or STRUCT) * RANGE (Preview (/products/#product-launch-stages)) 8949 // Use of RECORD/STRUCT indicates that the field contains a nested schema. 8950 Type string `json:"type,omitempty"` 8951 // ForceSendFields is a list of field names (e.g. "Categories") to 8952 // unconditionally include in API requests. By default, fields with empty or 8953 // default values are omitted from API requests. See 8954 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8955 // details. 8956 ForceSendFields []string `json:"-"` 8957 // NullFields is a list of field names (e.g. "Categories") to include in API 8958 // requests with the JSON null value. By default, fields with empty values are 8959 // omitted from API requests. See 8960 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8961 NullFields []string `json:"-"` 8962 } 8963 8964 func (s *TableFieldSchema) MarshalJSON() ([]byte, error) { 8965 type NoMethod TableFieldSchema 8966 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8967 } 8968 8969 // TableFieldSchemaCategories: Deprecated. 8970 type TableFieldSchemaCategories struct { 8971 // Names: Deprecated. 8972 Names []string `json:"names,omitempty"` 8973 // ForceSendFields is a list of field names (e.g. "Names") to unconditionally 8974 // include in API requests. By default, fields with empty or default values are 8975 // omitted from API requests. See 8976 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8977 // details. 8978 ForceSendFields []string `json:"-"` 8979 // NullFields is a list of field names (e.g. "Names") to include in API 8980 // requests with the JSON null value. By default, fields with empty values are 8981 // omitted from API requests. See 8982 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8983 NullFields []string `json:"-"` 8984 } 8985 8986 func (s *TableFieldSchemaCategories) MarshalJSON() ([]byte, error) { 8987 type NoMethod TableFieldSchemaCategories 8988 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8989 } 8990 8991 // TableFieldSchemaPolicyTags: Optional. The policy tags attached to this 8992 // field, used for field-level access control. If not set, defaults to empty 8993 // policy_tags. 8994 type TableFieldSchemaPolicyTags struct { 8995 // Names: A list of policy tag resource names. For example, 8996 // "projects/1/locations/eu/taxonomies/2/policyTags/3". At most 1 policy tag is 8997 // currently allowed. 8998 Names []string `json:"names,omitempty"` 8999 // ForceSendFields is a list of field names (e.g. "Names") to unconditionally 9000 // include in API requests. By default, fields with empty or default values are 9001 // omitted from API requests. See 9002 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9003 // details. 9004 ForceSendFields []string `json:"-"` 9005 // NullFields is a list of field names (e.g. "Names") to include in API 9006 // requests with the JSON null value. By default, fields with empty values are 9007 // omitted from API requests. See 9008 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9009 NullFields []string `json:"-"` 9010 } 9011 9012 func (s *TableFieldSchemaPolicyTags) MarshalJSON() ([]byte, error) { 9013 type NoMethod TableFieldSchemaPolicyTags 9014 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9015 } 9016 9017 // TableFieldSchemaRangeElementType: Represents the type of a field element. 9018 type TableFieldSchemaRangeElementType struct { 9019 // Type: Required. The type of a field element. For more information, see 9020 // TableFieldSchema.type. 9021 Type string `json:"type,omitempty"` 9022 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 9023 // include in API requests. By default, fields with empty or default values are 9024 // omitted from API requests. See 9025 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9026 // details. 9027 ForceSendFields []string `json:"-"` 9028 // NullFields is a list of field names (e.g. "Type") to include in API requests 9029 // with the JSON null value. By default, fields with empty values are omitted 9030 // from API requests. See 9031 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9032 NullFields []string `json:"-"` 9033 } 9034 9035 func (s *TableFieldSchemaRangeElementType) MarshalJSON() ([]byte, error) { 9036 type NoMethod TableFieldSchemaRangeElementType 9037 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9038 } 9039 9040 // TableList: Partial projection of the metadata for a given table in a list 9041 // response. 9042 type TableList struct { 9043 // Etag: A hash of this page of results. 9044 Etag string `json:"etag,omitempty"` 9045 // Kind: The type of list. 9046 Kind string `json:"kind,omitempty"` 9047 // NextPageToken: A token to request the next page of results. 9048 NextPageToken string `json:"nextPageToken,omitempty"` 9049 // Tables: Tables in the requested dataset. 9050 Tables []*TableListTables `json:"tables,omitempty"` 9051 // TotalItems: The total number of tables in the dataset. 9052 TotalItems int64 `json:"totalItems,omitempty"` 9053 9054 // ServerResponse contains the HTTP response code and headers from the server. 9055 googleapi.ServerResponse `json:"-"` 9056 // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally 9057 // include in API requests. By default, fields with empty or default values are 9058 // omitted from API requests. See 9059 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9060 // details. 9061 ForceSendFields []string `json:"-"` 9062 // NullFields is a list of field names (e.g. "Etag") to include in API requests 9063 // with the JSON null value. By default, fields with empty values are omitted 9064 // from API requests. See 9065 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9066 NullFields []string `json:"-"` 9067 } 9068 9069 func (s *TableList) MarshalJSON() ([]byte, error) { 9070 type NoMethod TableList 9071 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9072 } 9073 9074 type TableListTables struct { 9075 // Clustering: Clustering specification for this table, if configured. 9076 Clustering *Clustering `json:"clustering,omitempty"` 9077 // CreationTime: Output only. The time when this table was created, in 9078 // milliseconds since the epoch. 9079 CreationTime int64 `json:"creationTime,omitempty,string"` 9080 // ExpirationTime: The time when this table expires, in milliseconds since the 9081 // epoch. If not present, the table will persist indefinitely. Expired tables 9082 // will be deleted and their storage reclaimed. 9083 ExpirationTime int64 `json:"expirationTime,omitempty,string"` 9084 // FriendlyName: The user-friendly name for this table. 9085 FriendlyName string `json:"friendlyName,omitempty"` 9086 // Id: An opaque ID of the table. 9087 Id string `json:"id,omitempty"` 9088 // Kind: The resource type. 9089 Kind string `json:"kind,omitempty"` 9090 // Labels: The labels associated with this table. You can use these to organize 9091 // and group your tables. 9092 Labels map[string]string `json:"labels,omitempty"` 9093 // RangePartitioning: The range partitioning for this table. 9094 RangePartitioning *RangePartitioning `json:"rangePartitioning,omitempty"` 9095 // RequirePartitionFilter: Optional. If set to true, queries including this 9096 // table must specify a partition filter. This filter is used for partition 9097 // elimination. 9098 RequirePartitionFilter bool `json:"requirePartitionFilter,omitempty"` 9099 // TableReference: A reference uniquely identifying table. 9100 TableReference *TableReference `json:"tableReference,omitempty"` 9101 // TimePartitioning: The time-based partitioning for this table. 9102 TimePartitioning *TimePartitioning `json:"timePartitioning,omitempty"` 9103 // Type: The type of table. 9104 Type string `json:"type,omitempty"` 9105 // View: Information about a logical view. 9106 View *TableListTablesView `json:"view,omitempty"` 9107 // ForceSendFields is a list of field names (e.g. "Clustering") to 9108 // unconditionally include in API requests. By default, fields with empty or 9109 // default values are omitted from API requests. See 9110 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9111 // details. 9112 ForceSendFields []string `json:"-"` 9113 // NullFields is a list of field names (e.g. "Clustering") to include in API 9114 // requests with the JSON null value. By default, fields with empty values are 9115 // omitted from API requests. See 9116 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9117 NullFields []string `json:"-"` 9118 } 9119 9120 func (s *TableListTables) MarshalJSON() ([]byte, error) { 9121 type NoMethod TableListTables 9122 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9123 } 9124 9125 // TableListTablesView: Information about a logical view. 9126 type TableListTablesView struct { 9127 // PrivacyPolicy: Specifices the privacy policy for the view. 9128 PrivacyPolicy *PrivacyPolicy `json:"privacyPolicy,omitempty"` 9129 // UseLegacySql: True if view is defined in legacy SQL dialect, false if in 9130 // GoogleSQL. 9131 UseLegacySql bool `json:"useLegacySql,omitempty"` 9132 // ForceSendFields is a list of field names (e.g. "PrivacyPolicy") to 9133 // unconditionally include in API requests. By default, fields with empty or 9134 // default values are omitted from API requests. See 9135 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9136 // details. 9137 ForceSendFields []string `json:"-"` 9138 // NullFields is a list of field names (e.g. "PrivacyPolicy") to include in API 9139 // requests with the JSON null value. By default, fields with empty values are 9140 // omitted from API requests. See 9141 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9142 NullFields []string `json:"-"` 9143 } 9144 9145 func (s *TableListTablesView) MarshalJSON() ([]byte, error) { 9146 type NoMethod TableListTablesView 9147 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9148 } 9149 9150 // TableMetadataCacheUsage: Table level detail on the usage of metadata 9151 // caching. Only set for Metadata caching eligible tables referenced in the 9152 // query. 9153 type TableMetadataCacheUsage struct { 9154 // Explanation: Free form human-readable reason metadata caching was unused for 9155 // the job. 9156 Explanation string `json:"explanation,omitempty"` 9157 // TableReference: Metadata caching eligible table referenced in the query. 9158 TableReference *TableReference `json:"tableReference,omitempty"` 9159 // TableType: Table type 9160 // (/bigquery/docs/reference/rest/v2/tables#Table.FIELDS.type). 9161 TableType string `json:"tableType,omitempty"` 9162 // UnusedReason: Reason for not using metadata caching for the table. 9163 // 9164 // Possible values: 9165 // "UNUSED_REASON_UNSPECIFIED" - Unused reasons not specified. 9166 // "EXCEEDED_MAX_STALENESS" - Metadata cache was outside the table's 9167 // maxStaleness. 9168 // "METADATA_CACHING_NOT_ENABLED" - Metadata caching feature is not enabled. 9169 // [Update BigLake tables] 9170 // (/bigquery/docs/create-cloud-storage-table-biglake#update-biglake-tables) to 9171 // enable the metadata caching. 9172 // "OTHER_REASON" - Other unknown reason. 9173 UnusedReason string `json:"unusedReason,omitempty"` 9174 // ForceSendFields is a list of field names (e.g. "Explanation") to 9175 // unconditionally include in API requests. By default, fields with empty or 9176 // default values are omitted from API requests. See 9177 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9178 // details. 9179 ForceSendFields []string `json:"-"` 9180 // NullFields is a list of field names (e.g. "Explanation") to include in API 9181 // requests with the JSON null value. By default, fields with empty values are 9182 // omitted from API requests. See 9183 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9184 NullFields []string `json:"-"` 9185 } 9186 9187 func (s *TableMetadataCacheUsage) MarshalJSON() ([]byte, error) { 9188 type NoMethod TableMetadataCacheUsage 9189 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9190 } 9191 9192 type TableReference struct { 9193 // DatasetId: Required. The ID of the dataset containing this table. 9194 DatasetId string `json:"datasetId,omitempty"` 9195 // ProjectId: Required. The ID of the project containing this table. 9196 ProjectId string `json:"projectId,omitempty"` 9197 // TableId: Required. The ID of the table. The ID can contain Unicode 9198 // characters in category L (letter), M (mark), N (number), Pc (connector, 9199 // including underscore), Pd (dash), and Zs (space). For more information, see 9200 // General Category 9201 // (https://wikipedia.org/wiki/Unicode_character_property#General_Category). 9202 // The maximum length is 1,024 characters. Certain operations allow suffixing 9203 // of the table ID with a partition decorator, such as `sample_table$20190123`. 9204 TableId string `json:"tableId,omitempty"` 9205 // ForceSendFields is a list of field names (e.g. "DatasetId") to 9206 // unconditionally include in API requests. By default, fields with empty or 9207 // default values are omitted from API requests. See 9208 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9209 // details. 9210 ForceSendFields []string `json:"-"` 9211 // NullFields is a list of field names (e.g. "DatasetId") to include in API 9212 // requests with the JSON null value. By default, fields with empty values are 9213 // omitted from API requests. See 9214 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9215 NullFields []string `json:"-"` 9216 } 9217 9218 func (s *TableReference) MarshalJSON() ([]byte, error) { 9219 type NoMethod TableReference 9220 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9221 } 9222 9223 // TableReplicationInfo: Replication info of a table created using `AS REPLICA` 9224 // DDL like: `CREATE MATERIALIZED VIEW mv1 AS REPLICA OF src_mv` 9225 type TableReplicationInfo struct { 9226 // ReplicatedSourceLastRefreshTime: Optional. Output only. If source is a 9227 // materialized view, this field signifies the last refresh time of the source. 9228 ReplicatedSourceLastRefreshTime int64 `json:"replicatedSourceLastRefreshTime,omitempty,string"` 9229 // ReplicationError: Optional. Output only. Replication error that will 9230 // permanently stopped table replication. 9231 ReplicationError *ErrorProto `json:"replicationError,omitempty"` 9232 // ReplicationIntervalMs: Optional. Specifies the interval at which the source 9233 // table is polled for updates. It's Optional. If not specified, default 9234 // replication interval would be applied. 9235 ReplicationIntervalMs int64 `json:"replicationIntervalMs,omitempty,string"` 9236 // ReplicationStatus: Optional. Output only. Replication status of configured 9237 // replication. 9238 // 9239 // Possible values: 9240 // "REPLICATION_STATUS_UNSPECIFIED" - Default value. 9241 // "ACTIVE" - Replication is Active with no errors. 9242 // "SOURCE_DELETED" - Source object is deleted. 9243 // "PERMISSION_DENIED" - Source revoked replication permissions. 9244 // "UNSUPPORTED_CONFIGURATION" - Source configuration doesn’t allow 9245 // replication. 9246 ReplicationStatus string `json:"replicationStatus,omitempty"` 9247 // SourceTable: Required. Source table reference that is replicated. 9248 SourceTable *TableReference `json:"sourceTable,omitempty"` 9249 // ForceSendFields is a list of field names (e.g. 9250 // "ReplicatedSourceLastRefreshTime") to unconditionally include in API 9251 // requests. By default, fields with empty or default values are omitted from 9252 // API requests. See 9253 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9254 // details. 9255 ForceSendFields []string `json:"-"` 9256 // NullFields is a list of field names (e.g. "ReplicatedSourceLastRefreshTime") 9257 // to include in API requests with the JSON null value. By default, fields with 9258 // empty values are omitted from API requests. See 9259 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9260 NullFields []string `json:"-"` 9261 } 9262 9263 func (s *TableReplicationInfo) MarshalJSON() ([]byte, error) { 9264 type NoMethod TableReplicationInfo 9265 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9266 } 9267 9268 type TableRow struct { 9269 // F: Represents a single row in the result set, consisting of one or more 9270 // fields. 9271 F []*TableCell `json:"f,omitempty"` 9272 // ForceSendFields is a list of field names (e.g. "F") to unconditionally 9273 // include in API requests. By default, fields with empty or default values are 9274 // omitted from API requests. See 9275 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9276 // details. 9277 ForceSendFields []string `json:"-"` 9278 // NullFields is a list of field names (e.g. "F") to include in API requests 9279 // with the JSON null value. By default, fields with empty values are omitted 9280 // from API requests. See 9281 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9282 NullFields []string `json:"-"` 9283 } 9284 9285 func (s *TableRow) MarshalJSON() ([]byte, error) { 9286 type NoMethod TableRow 9287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9288 } 9289 9290 // TableSchema: Schema of a table 9291 type TableSchema struct { 9292 // Fields: Describes the fields in a table. 9293 Fields []*TableFieldSchema `json:"fields,omitempty"` 9294 // ForeignTypeInfo: Optional. Specifies metadata of the foreign data type 9295 // definition in field schema (TableFieldSchema.foreign_type_definition). 9296 ForeignTypeInfo *ForeignTypeInfo `json:"foreignTypeInfo,omitempty"` 9297 // ForceSendFields is a list of field names (e.g. "Fields") to unconditionally 9298 // include in API requests. By default, fields with empty or default values are 9299 // omitted from API requests. See 9300 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9301 // details. 9302 ForceSendFields []string `json:"-"` 9303 // NullFields is a list of field names (e.g. "Fields") to include in API 9304 // requests with the JSON null value. By default, fields with empty values are 9305 // omitted from API requests. See 9306 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9307 NullFields []string `json:"-"` 9308 } 9309 9310 func (s *TableSchema) MarshalJSON() ([]byte, error) { 9311 type NoMethod TableSchema 9312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9313 } 9314 9315 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method. 9316 type TestIamPermissionsRequest struct { 9317 // Permissions: The set of permissions to check for the `resource`. Permissions 9318 // with wildcards (such as `*` or `storage.*`) are not allowed. For more 9319 // information see IAM Overview 9320 // (https://cloud.google.com/iam/docs/overview#permissions). 9321 Permissions []string `json:"permissions,omitempty"` 9322 // ForceSendFields is a list of field names (e.g. "Permissions") to 9323 // unconditionally include in API requests. By default, fields with empty or 9324 // default values are omitted from API requests. See 9325 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9326 // details. 9327 ForceSendFields []string `json:"-"` 9328 // NullFields is a list of field names (e.g. "Permissions") to include in API 9329 // requests with the JSON null value. By default, fields with empty values are 9330 // omitted from API requests. See 9331 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9332 NullFields []string `json:"-"` 9333 } 9334 9335 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 9336 type NoMethod TestIamPermissionsRequest 9337 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9338 } 9339 9340 // TestIamPermissionsResponse: Response message for `TestIamPermissions` 9341 // method. 9342 type TestIamPermissionsResponse struct { 9343 // Permissions: A subset of `TestPermissionsRequest.permissions` that the 9344 // caller is allowed. 9345 Permissions []string `json:"permissions,omitempty"` 9346 9347 // ServerResponse contains the HTTP response code and headers from the server. 9348 googleapi.ServerResponse `json:"-"` 9349 // ForceSendFields is a list of field names (e.g. "Permissions") to 9350 // unconditionally include in API requests. By default, fields with empty or 9351 // default values are omitted from API requests. See 9352 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9353 // details. 9354 ForceSendFields []string `json:"-"` 9355 // NullFields is a list of field names (e.g. "Permissions") to include in API 9356 // requests with the JSON null value. By default, fields with empty values are 9357 // omitted from API requests. See 9358 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9359 NullFields []string `json:"-"` 9360 } 9361 9362 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 9363 type NoMethod TestIamPermissionsResponse 9364 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9365 } 9366 9367 type TimePartitioning struct { 9368 // ExpirationMs: Optional. Number of milliseconds for which to keep the storage 9369 // for a partition. A wrapper is used here because 0 is an invalid value. 9370 ExpirationMs int64 `json:"expirationMs,omitempty,string"` 9371 // Field: Optional. If not set, the table is partitioned by pseudo column 9372 // '_PARTITIONTIME'; if set, the table is partitioned by this field. The field 9373 // must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or 9374 // REQUIRED. A wrapper is used here because an empty string is an invalid 9375 // value. 9376 Field string `json:"field,omitempty"` 9377 // RequirePartitionFilter: If set to true, queries over this table require a 9378 // partition filter that can be used for partition elimination to be specified. 9379 // This field is deprecated; please set the field with the same name on the 9380 // table itself instead. This field needs a wrapper because we want to output 9381 // the default value, false, if the user explicitly set it. 9382 RequirePartitionFilter bool `json:"requirePartitionFilter,omitempty"` 9383 // Type: Required. The supported types are DAY, HOUR, MONTH, and YEAR, which 9384 // will generate one partition per day, hour, month, and year, respectively. 9385 Type string `json:"type,omitempty"` 9386 // ForceSendFields is a list of field names (e.g. "ExpirationMs") to 9387 // unconditionally include in API requests. By default, fields with empty or 9388 // default values are omitted from API requests. See 9389 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9390 // details. 9391 ForceSendFields []string `json:"-"` 9392 // NullFields is a list of field names (e.g. "ExpirationMs") to include in API 9393 // requests with the JSON null value. By default, fields with empty values are 9394 // omitted from API requests. See 9395 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9396 NullFields []string `json:"-"` 9397 } 9398 9399 func (s *TimePartitioning) MarshalJSON() ([]byte, error) { 9400 type NoMethod TimePartitioning 9401 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9402 } 9403 9404 // TrainingOptions: Options used in model training. 9405 type TrainingOptions struct { 9406 // ActivationFn: Activation function of the neural nets. 9407 ActivationFn string `json:"activationFn,omitempty"` 9408 // AdjustStepChanges: If true, detect step changes and make data adjustment in 9409 // the input time series. 9410 AdjustStepChanges bool `json:"adjustStepChanges,omitempty"` 9411 // ApproxGlobalFeatureContrib: Whether to use approximate feature contribution 9412 // method in XGBoost model explanation for global explain. 9413 ApproxGlobalFeatureContrib bool `json:"approxGlobalFeatureContrib,omitempty"` 9414 // AutoArima: Whether to enable auto ARIMA or not. 9415 AutoArima bool `json:"autoArima,omitempty"` 9416 // AutoArimaMaxOrder: The max value of the sum of non-seasonal p and q. 9417 AutoArimaMaxOrder int64 `json:"autoArimaMaxOrder,omitempty,string"` 9418 // AutoArimaMinOrder: The min value of the sum of non-seasonal p and q. 9419 AutoArimaMinOrder int64 `json:"autoArimaMinOrder,omitempty,string"` 9420 // AutoClassWeights: Whether to calculate class weights automatically based on 9421 // the popularity of each label. 9422 AutoClassWeights bool `json:"autoClassWeights,omitempty"` 9423 // BatchSize: Batch size for dnn models. 9424 BatchSize int64 `json:"batchSize,omitempty,string"` 9425 // BoosterType: Booster type for boosted tree models. 9426 // 9427 // Possible values: 9428 // "BOOSTER_TYPE_UNSPECIFIED" - Unspecified booster type. 9429 // "GBTREE" - Gbtree booster. 9430 // "DART" - Dart booster. 9431 BoosterType string `json:"boosterType,omitempty"` 9432 // BudgetHours: Budget in hours for AutoML training. 9433 BudgetHours float64 `json:"budgetHours,omitempty"` 9434 // CalculatePValues: Whether or not p-value test should be computed for this 9435 // model. Only available for linear and logistic regression models. 9436 CalculatePValues bool `json:"calculatePValues,omitempty"` 9437 // CategoryEncodingMethod: Categorical feature encoding method. 9438 // 9439 // Possible values: 9440 // "ENCODING_METHOD_UNSPECIFIED" - Unspecified encoding method. 9441 // "ONE_HOT_ENCODING" - Applies one-hot encoding. 9442 // "LABEL_ENCODING" - Applies label encoding. 9443 // "DUMMY_ENCODING" - Applies dummy encoding. 9444 CategoryEncodingMethod string `json:"categoryEncodingMethod,omitempty"` 9445 // CleanSpikesAndDips: If true, clean spikes and dips in the input time series. 9446 CleanSpikesAndDips bool `json:"cleanSpikesAndDips,omitempty"` 9447 // ColorSpace: Enums for color space, used for processing images in Object 9448 // Table. See more details at 9449 // https://www.tensorflow.org/io/tutorials/colorspace. 9450 // 9451 // Possible values: 9452 // "COLOR_SPACE_UNSPECIFIED" - Unspecified color space 9453 // "RGB" - RGB 9454 // "HSV" - HSV 9455 // "YIQ" - YIQ 9456 // "YUV" - YUV 9457 // "GRAYSCALE" - GRAYSCALE 9458 ColorSpace string `json:"colorSpace,omitempty"` 9459 // ColsampleBylevel: Subsample ratio of columns for each level for boosted tree 9460 // models. 9461 ColsampleBylevel float64 `json:"colsampleBylevel,omitempty"` 9462 // ColsampleBynode: Subsample ratio of columns for each node(split) for boosted 9463 // tree models. 9464 ColsampleBynode float64 `json:"colsampleBynode,omitempty"` 9465 // ColsampleBytree: Subsample ratio of columns when constructing each tree for 9466 // boosted tree models. 9467 ColsampleBytree float64 `json:"colsampleBytree,omitempty"` 9468 // DartNormalizeType: Type of normalization algorithm for boosted tree models 9469 // using dart booster. 9470 // 9471 // Possible values: 9472 // "DART_NORMALIZE_TYPE_UNSPECIFIED" - Unspecified dart normalize type. 9473 // "TREE" - New trees have the same weight of each of dropped trees. 9474 // "FOREST" - New trees have the same weight of sum of dropped trees. 9475 DartNormalizeType string `json:"dartNormalizeType,omitempty"` 9476 // DataFrequency: The data frequency of a time series. 9477 // 9478 // Possible values: 9479 // "DATA_FREQUENCY_UNSPECIFIED" - Default value. 9480 // "AUTO_FREQUENCY" - Automatically inferred from timestamps. 9481 // "YEARLY" - Yearly data. 9482 // "QUARTERLY" - Quarterly data. 9483 // "MONTHLY" - Monthly data. 9484 // "WEEKLY" - Weekly data. 9485 // "DAILY" - Daily data. 9486 // "HOURLY" - Hourly data. 9487 // "PER_MINUTE" - Per-minute data. 9488 DataFrequency string `json:"dataFrequency,omitempty"` 9489 // DataSplitColumn: The column to split data with. This column won't be used as 9490 // a feature. 1. When data_split_method is CUSTOM, the corresponding column 9491 // should be boolean. The rows with true value tag are eval data, and the false 9492 // are training data. 2. When data_split_method is SEQ, the first 9493 // DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the 9494 // corresponding column are used as training data, and the rest are eval data. 9495 // It respects the order in Orderable data types: 9496 // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties 9497 DataSplitColumn string `json:"dataSplitColumn,omitempty"` 9498 // DataSplitEvalFraction: The fraction of evaluation data over the whole input 9499 // data. The rest of data will be used as training data. The format should be 9500 // double. Accurate to two decimal places. Default value is 0.2. 9501 DataSplitEvalFraction float64 `json:"dataSplitEvalFraction,omitempty"` 9502 // DataSplitMethod: The data split type for training and evaluation, e.g. 9503 // RANDOM. 9504 // 9505 // Possible values: 9506 // "DATA_SPLIT_METHOD_UNSPECIFIED" - Default value. 9507 // "RANDOM" - Splits data randomly. 9508 // "CUSTOM" - Splits data with the user provided tags. 9509 // "SEQUENTIAL" - Splits data sequentially. 9510 // "NO_SPLIT" - Data split will be skipped. 9511 // "AUTO_SPLIT" - Splits data automatically: Uses NO_SPLIT if the data size 9512 // is small. Otherwise uses RANDOM. 9513 DataSplitMethod string `json:"dataSplitMethod,omitempty"` 9514 // DecomposeTimeSeries: If true, perform decompose time series and save the 9515 // results. 9516 DecomposeTimeSeries bool `json:"decomposeTimeSeries,omitempty"` 9517 // DistanceType: Distance type for clustering models. 9518 // 9519 // Possible values: 9520 // "DISTANCE_TYPE_UNSPECIFIED" - Default value. 9521 // "EUCLIDEAN" - Eculidean distance. 9522 // "COSINE" - Cosine distance. 9523 DistanceType string `json:"distanceType,omitempty"` 9524 // Dropout: Dropout probability for dnn models. 9525 Dropout float64 `json:"dropout,omitempty"` 9526 // EarlyStop: Whether to stop early when the loss doesn't improve significantly 9527 // any more (compared to min_relative_progress). Used only for iterative 9528 // training algorithms. 9529 EarlyStop bool `json:"earlyStop,omitempty"` 9530 // EnableGlobalExplain: If true, enable global explanation during training. 9531 EnableGlobalExplain bool `json:"enableGlobalExplain,omitempty"` 9532 // FeedbackType: Feedback type that specifies which algorithm to run for matrix 9533 // factorization. 9534 // 9535 // Possible values: 9536 // "FEEDBACK_TYPE_UNSPECIFIED" - Default value. 9537 // "IMPLICIT" - Use weighted-als for implicit feedback problems. 9538 // "EXPLICIT" - Use nonweighted-als for explicit feedback problems. 9539 FeedbackType string `json:"feedbackType,omitempty"` 9540 // FitIntercept: Whether the model should include intercept during model 9541 // training. 9542 FitIntercept bool `json:"fitIntercept,omitempty"` 9543 // HiddenUnits: Hidden units for dnn models. 9544 HiddenUnits googleapi.Int64s `json:"hiddenUnits,omitempty"` 9545 // HolidayRegion: The geographical region based on which the holidays are 9546 // considered in time series modeling. If a valid value is specified, then 9547 // holiday effects modeling is enabled. 9548 // 9549 // Possible values: 9550 // "HOLIDAY_REGION_UNSPECIFIED" - Holiday region unspecified. 9551 // "GLOBAL" - Global. 9552 // "NA" - North America. 9553 // "JAPAC" - Japan and Asia Pacific: Korea, Greater China, India, Australia, 9554 // and New Zealand. 9555 // "EMEA" - Europe, the Middle East and Africa. 9556 // "LAC" - Latin America and the Caribbean. 9557 // "AE" - United Arab Emirates 9558 // "AR" - Argentina 9559 // "AT" - Austria 9560 // "AU" - Australia 9561 // "BE" - Belgium 9562 // "BR" - Brazil 9563 // "CA" - Canada 9564 // "CH" - Switzerland 9565 // "CL" - Chile 9566 // "CN" - China 9567 // "CO" - Colombia 9568 // "CS" - Czechoslovakia 9569 // "CZ" - Czech Republic 9570 // "DE" - Germany 9571 // "DK" - Denmark 9572 // "DZ" - Algeria 9573 // "EC" - Ecuador 9574 // "EE" - Estonia 9575 // "EG" - Egypt 9576 // "ES" - Spain 9577 // "FI" - Finland 9578 // "FR" - France 9579 // "GB" - Great Britain (United Kingdom) 9580 // "GR" - Greece 9581 // "HK" - Hong Kong 9582 // "HU" - Hungary 9583 // "ID" - Indonesia 9584 // "IE" - Ireland 9585 // "IL" - Israel 9586 // "IN" - India 9587 // "IR" - Iran 9588 // "IT" - Italy 9589 // "JP" - Japan 9590 // "KR" - Korea (South) 9591 // "LV" - Latvia 9592 // "MA" - Morocco 9593 // "MX" - Mexico 9594 // "MY" - Malaysia 9595 // "NG" - Nigeria 9596 // "NL" - Netherlands 9597 // "NO" - Norway 9598 // "NZ" - New Zealand 9599 // "PE" - Peru 9600 // "PH" - Philippines 9601 // "PK" - Pakistan 9602 // "PL" - Poland 9603 // "PT" - Portugal 9604 // "RO" - Romania 9605 // "RS" - Serbia 9606 // "RU" - Russian Federation 9607 // "SA" - Saudi Arabia 9608 // "SE" - Sweden 9609 // "SG" - Singapore 9610 // "SI" - Slovenia 9611 // "SK" - Slovakia 9612 // "TH" - Thailand 9613 // "TR" - Turkey 9614 // "TW" - Taiwan 9615 // "UA" - Ukraine 9616 // "US" - United States 9617 // "VE" - Venezuela 9618 // "VN" - Viet Nam 9619 // "ZA" - South Africa 9620 HolidayRegion string `json:"holidayRegion,omitempty"` 9621 // HolidayRegions: A list of geographical regions that are used for time series 9622 // modeling. 9623 // 9624 // Possible values: 9625 // "HOLIDAY_REGION_UNSPECIFIED" - Holiday region unspecified. 9626 // "GLOBAL" - Global. 9627 // "NA" - North America. 9628 // "JAPAC" - Japan and Asia Pacific: Korea, Greater China, India, Australia, 9629 // and New Zealand. 9630 // "EMEA" - Europe, the Middle East and Africa. 9631 // "LAC" - Latin America and the Caribbean. 9632 // "AE" - United Arab Emirates 9633 // "AR" - Argentina 9634 // "AT" - Austria 9635 // "AU" - Australia 9636 // "BE" - Belgium 9637 // "BR" - Brazil 9638 // "CA" - Canada 9639 // "CH" - Switzerland 9640 // "CL" - Chile 9641 // "CN" - China 9642 // "CO" - Colombia 9643 // "CS" - Czechoslovakia 9644 // "CZ" - Czech Republic 9645 // "DE" - Germany 9646 // "DK" - Denmark 9647 // "DZ" - Algeria 9648 // "EC" - Ecuador 9649 // "EE" - Estonia 9650 // "EG" - Egypt 9651 // "ES" - Spain 9652 // "FI" - Finland 9653 // "FR" - France 9654 // "GB" - Great Britain (United Kingdom) 9655 // "GR" - Greece 9656 // "HK" - Hong Kong 9657 // "HU" - Hungary 9658 // "ID" - Indonesia 9659 // "IE" - Ireland 9660 // "IL" - Israel 9661 // "IN" - India 9662 // "IR" - Iran 9663 // "IT" - Italy 9664 // "JP" - Japan 9665 // "KR" - Korea (South) 9666 // "LV" - Latvia 9667 // "MA" - Morocco 9668 // "MX" - Mexico 9669 // "MY" - Malaysia 9670 // "NG" - Nigeria 9671 // "NL" - Netherlands 9672 // "NO" - Norway 9673 // "NZ" - New Zealand 9674 // "PE" - Peru 9675 // "PH" - Philippines 9676 // "PK" - Pakistan 9677 // "PL" - Poland 9678 // "PT" - Portugal 9679 // "RO" - Romania 9680 // "RS" - Serbia 9681 // "RU" - Russian Federation 9682 // "SA" - Saudi Arabia 9683 // "SE" - Sweden 9684 // "SG" - Singapore 9685 // "SI" - Slovenia 9686 // "SK" - Slovakia 9687 // "TH" - Thailand 9688 // "TR" - Turkey 9689 // "TW" - Taiwan 9690 // "UA" - Ukraine 9691 // "US" - United States 9692 // "VE" - Venezuela 9693 // "VN" - Viet Nam 9694 // "ZA" - South Africa 9695 HolidayRegions []string `json:"holidayRegions,omitempty"` 9696 // Horizon: The number of periods ahead that need to be forecasted. 9697 Horizon int64 `json:"horizon,omitempty,string"` 9698 // HparamTuningObjectives: The target evaluation metrics to optimize the 9699 // hyperparameters for. 9700 // 9701 // Possible values: 9702 // "HPARAM_TUNING_OBJECTIVE_UNSPECIFIED" - Unspecified evaluation metric. 9703 // "MEAN_ABSOLUTE_ERROR" - Mean absolute error. mean_absolute_error = 9704 // AVG(ABS(label - predicted)) 9705 // "MEAN_SQUARED_ERROR" - Mean squared error. mean_squared_error = 9706 // AVG(POW(label - predicted, 2)) 9707 // "MEAN_SQUARED_LOG_ERROR" - Mean squared log error. mean_squared_log_error 9708 // = AVG(POW(LN(1 + label) - LN(1 + predicted), 2)) 9709 // "MEDIAN_ABSOLUTE_ERROR" - Mean absolute error. median_absolute_error = 9710 // APPROX_QUANTILES(absolute_error, 2)[OFFSET(1)] 9711 // "R_SQUARED" - R^2 score. This corresponds to r2_score in ML.EVALUATE. 9712 // r_squared = 1 - SUM(squared_error)/(COUNT(label)*VAR_POP(label)) 9713 // "EXPLAINED_VARIANCE" - Explained variance. explained_variance = 1 - 9714 // VAR_POP(label_error)/VAR_POP(label) 9715 // "PRECISION" - Precision is the fraction of actual positive predictions 9716 // that had positive actual labels. For multiclass this is a macro-averaged 9717 // metric treating each class as a binary classifier. 9718 // "RECALL" - Recall is the fraction of actual positive labels that were 9719 // given a positive prediction. For multiclass this is a macro-averaged metric. 9720 // "ACCURACY" - Accuracy is the fraction of predictions given the correct 9721 // label. For multiclass this is a globally micro-averaged metric. 9722 // "F1_SCORE" - The F1 score is an average of recall and precision. For 9723 // multiclass this is a macro-averaged metric. 9724 // "LOG_LOSS" - Logorithmic Loss. For multiclass this is a macro-averaged 9725 // metric. 9726 // "ROC_AUC" - Area Under an ROC Curve. For multiclass this is a 9727 // macro-averaged metric. 9728 // "DAVIES_BOULDIN_INDEX" - Davies-Bouldin Index. 9729 // "MEAN_AVERAGE_PRECISION" - Mean Average Precision. 9730 // "NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN" - Normalized Discounted Cumulative 9731 // Gain. 9732 // "AVERAGE_RANK" - Average Rank. 9733 HparamTuningObjectives []string `json:"hparamTuningObjectives,omitempty"` 9734 // IncludeDrift: Include drift when fitting an ARIMA model. 9735 IncludeDrift bool `json:"includeDrift,omitempty"` 9736 // InitialLearnRate: Specifies the initial learning rate for the line search 9737 // learn rate strategy. 9738 InitialLearnRate float64 `json:"initialLearnRate,omitempty"` 9739 // InputLabelColumns: Name of input label columns in training data. 9740 InputLabelColumns []string `json:"inputLabelColumns,omitempty"` 9741 // InstanceWeightColumn: Name of the instance weight column for training data. 9742 // This column isn't be used as a feature. 9743 InstanceWeightColumn string `json:"instanceWeightColumn,omitempty"` 9744 // IntegratedGradientsNumSteps: Number of integral steps for the integrated 9745 // gradients explain method. 9746 IntegratedGradientsNumSteps int64 `json:"integratedGradientsNumSteps,omitempty,string"` 9747 // ItemColumn: Item column specified for matrix factorization models. 9748 ItemColumn string `json:"itemColumn,omitempty"` 9749 // KmeansInitializationColumn: The column used to provide the initial centroids 9750 // for kmeans algorithm when kmeans_initialization_method is CUSTOM. 9751 KmeansInitializationColumn string `json:"kmeansInitializationColumn,omitempty"` 9752 // KmeansInitializationMethod: The method used to initialize the centroids for 9753 // kmeans algorithm. 9754 // 9755 // Possible values: 9756 // "KMEANS_INITIALIZATION_METHOD_UNSPECIFIED" - Unspecified initialization 9757 // method. 9758 // "RANDOM" - Initializes the centroids randomly. 9759 // "CUSTOM" - Initializes the centroids using data specified in 9760 // kmeans_initialization_column. 9761 // "KMEANS_PLUS_PLUS" - Initializes with kmeans++. 9762 KmeansInitializationMethod string `json:"kmeansInitializationMethod,omitempty"` 9763 // L1RegActivation: L1 regularization coefficient to activations. 9764 L1RegActivation float64 `json:"l1RegActivation,omitempty"` 9765 // L1Regularization: L1 regularization coefficient. 9766 L1Regularization float64 `json:"l1Regularization,omitempty"` 9767 // L2Regularization: L2 regularization coefficient. 9768 L2Regularization float64 `json:"l2Regularization,omitempty"` 9769 // LabelClassWeights: Weights associated with each label class, for rebalancing 9770 // the training data. Only applicable for classification models. 9771 LabelClassWeights map[string]float64 `json:"labelClassWeights,omitempty"` 9772 // LearnRate: Learning rate in training. Used only for iterative training 9773 // algorithms. 9774 LearnRate float64 `json:"learnRate,omitempty"` 9775 // LearnRateStrategy: The strategy to determine learn rate for the current 9776 // iteration. 9777 // 9778 // Possible values: 9779 // "LEARN_RATE_STRATEGY_UNSPECIFIED" - Default value. 9780 // "LINE_SEARCH" - Use line search to determine learning rate. 9781 // "CONSTANT" - Use a constant learning rate. 9782 LearnRateStrategy string `json:"learnRateStrategy,omitempty"` 9783 // LossType: Type of loss function used during training run. 9784 // 9785 // Possible values: 9786 // "LOSS_TYPE_UNSPECIFIED" - Default value. 9787 // "MEAN_SQUARED_LOSS" - Mean squared loss, used for linear regression. 9788 // "MEAN_LOG_LOSS" - Mean log loss, used for logistic regression. 9789 LossType string `json:"lossType,omitempty"` 9790 // MaxIterations: The maximum number of iterations in training. Used only for 9791 // iterative training algorithms. 9792 MaxIterations int64 `json:"maxIterations,omitempty,string"` 9793 // MaxParallelTrials: Maximum number of trials to run in parallel. 9794 MaxParallelTrials int64 `json:"maxParallelTrials,omitempty,string"` 9795 // MaxTimeSeriesLength: The maximum number of time points in a time series that 9796 // can be used in modeling the trend component of the time series. Don't use 9797 // this option with the `timeSeriesLengthFraction` or `minTimeSeriesLength` 9798 // options. 9799 MaxTimeSeriesLength int64 `json:"maxTimeSeriesLength,omitempty,string"` 9800 // MaxTreeDepth: Maximum depth of a tree for boosted tree models. 9801 MaxTreeDepth int64 `json:"maxTreeDepth,omitempty,string"` 9802 // MinRelativeProgress: When early_stop is true, stops training when accuracy 9803 // improvement is less than 'min_relative_progress'. Used only for iterative 9804 // training algorithms. 9805 MinRelativeProgress float64 `json:"minRelativeProgress,omitempty"` 9806 // MinSplitLoss: Minimum split loss for boosted tree models. 9807 MinSplitLoss float64 `json:"minSplitLoss,omitempty"` 9808 // MinTimeSeriesLength: The minimum number of time points in a time series that 9809 // are used in modeling the trend component of the time series. If you use this 9810 // option you must also set the `timeSeriesLengthFraction` option. This 9811 // training option ensures that enough time points are available when you use 9812 // `timeSeriesLengthFraction` in trend modeling. This is particularly important 9813 // when forecasting multiple time series in a single query using 9814 // `timeSeriesIdColumn`. If the total number of time points is less than the 9815 // `minTimeSeriesLength` value, then the query uses all available time points. 9816 MinTimeSeriesLength int64 `json:"minTimeSeriesLength,omitempty,string"` 9817 // MinTreeChildWeight: Minimum sum of instance weight needed in a child for 9818 // boosted tree models. 9819 MinTreeChildWeight int64 `json:"minTreeChildWeight,omitempty,string"` 9820 // ModelRegistry: The model registry. 9821 // 9822 // Possible values: 9823 // "MODEL_REGISTRY_UNSPECIFIED" - Default value. 9824 // "VERTEX_AI" - Vertex AI. 9825 ModelRegistry string `json:"modelRegistry,omitempty"` 9826 // ModelUri: Google Cloud Storage URI from which the model was imported. Only 9827 // applicable for imported models. 9828 ModelUri string `json:"modelUri,omitempty"` 9829 // NonSeasonalOrder: A specification of the non-seasonal part of the ARIMA 9830 // model: the three components (p, d, q) are the AR order, the degree of 9831 // differencing, and the MA order. 9832 NonSeasonalOrder *ArimaOrder `json:"nonSeasonalOrder,omitempty"` 9833 // NumClusters: Number of clusters for clustering models. 9834 NumClusters int64 `json:"numClusters,omitempty,string"` 9835 // NumFactors: Num factors specified for matrix factorization models. 9836 NumFactors int64 `json:"numFactors,omitempty,string"` 9837 // NumParallelTree: Number of parallel trees constructed during each iteration 9838 // for boosted tree models. 9839 NumParallelTree int64 `json:"numParallelTree,omitempty,string"` 9840 // NumPrincipalComponents: Number of principal components to keep in the PCA 9841 // model. Must be <= the number of features. 9842 NumPrincipalComponents int64 `json:"numPrincipalComponents,omitempty,string"` 9843 // NumTrials: Number of trials to run this hyperparameter tuning job. 9844 NumTrials int64 `json:"numTrials,omitempty,string"` 9845 // OptimizationStrategy: Optimization strategy for training linear regression 9846 // models. 9847 // 9848 // Possible values: 9849 // "OPTIMIZATION_STRATEGY_UNSPECIFIED" - Default value. 9850 // "BATCH_GRADIENT_DESCENT" - Uses an iterative batch gradient descent 9851 // algorithm. 9852 // "NORMAL_EQUATION" - Uses a normal equation to solve linear regression 9853 // problem. 9854 OptimizationStrategy string `json:"optimizationStrategy,omitempty"` 9855 // Optimizer: Optimizer used for training the neural nets. 9856 Optimizer string `json:"optimizer,omitempty"` 9857 // PcaExplainedVarianceRatio: The minimum ratio of cumulative explained 9858 // variance that needs to be given by the PCA model. 9859 PcaExplainedVarianceRatio float64 `json:"pcaExplainedVarianceRatio,omitempty"` 9860 // PcaSolver: The solver for PCA. 9861 // 9862 // Possible values: 9863 // "UNSPECIFIED" - Default value. 9864 // "FULL" - Full eigen-decoposition. 9865 // "RANDOMIZED" - Randomized SVD. 9866 // "AUTO" - Auto. 9867 PcaSolver string `json:"pcaSolver,omitempty"` 9868 // SampledShapleyNumPaths: Number of paths for the sampled Shapley explain 9869 // method. 9870 SampledShapleyNumPaths int64 `json:"sampledShapleyNumPaths,omitempty,string"` 9871 // ScaleFeatures: If true, scale the feature values by dividing the feature 9872 // standard deviation. Currently only apply to PCA. 9873 ScaleFeatures bool `json:"scaleFeatures,omitempty"` 9874 // StandardizeFeatures: Whether to standardize numerical features. Default to 9875 // true. 9876 StandardizeFeatures bool `json:"standardizeFeatures,omitempty"` 9877 // Subsample: Subsample fraction of the training data to grow tree to prevent 9878 // overfitting for boosted tree models. 9879 Subsample float64 `json:"subsample,omitempty"` 9880 // TfVersion: Based on the selected TF version, the corresponding docker image 9881 // is used to train external models. 9882 TfVersion string `json:"tfVersion,omitempty"` 9883 // TimeSeriesDataColumn: Column to be designated as time series data for ARIMA 9884 // model. 9885 TimeSeriesDataColumn string `json:"timeSeriesDataColumn,omitempty"` 9886 // TimeSeriesIdColumn: The time series id column that was used during ARIMA 9887 // model training. 9888 TimeSeriesIdColumn string `json:"timeSeriesIdColumn,omitempty"` 9889 // TimeSeriesIdColumns: The time series id columns that were used during ARIMA 9890 // model training. 9891 TimeSeriesIdColumns []string `json:"timeSeriesIdColumns,omitempty"` 9892 // TimeSeriesLengthFraction: The fraction of the interpolated length of the 9893 // time series that's used to model the time series trend component. All of the 9894 // time points of the time series are used to model the non-trend component. 9895 // This training option accelerates modeling training without sacrificing much 9896 // forecasting accuracy. You can use this option with `minTimeSeriesLength` but 9897 // not with `maxTimeSeriesLength`. 9898 TimeSeriesLengthFraction float64 `json:"timeSeriesLengthFraction,omitempty"` 9899 // TimeSeriesTimestampColumn: Column to be designated as time series timestamp 9900 // for ARIMA model. 9901 TimeSeriesTimestampColumn string `json:"timeSeriesTimestampColumn,omitempty"` 9902 // TreeMethod: Tree construction algorithm for boosted tree models. 9903 // 9904 // Possible values: 9905 // "TREE_METHOD_UNSPECIFIED" - Unspecified tree method. 9906 // "AUTO" - Use heuristic to choose the fastest method. 9907 // "EXACT" - Exact greedy algorithm. 9908 // "APPROX" - Approximate greedy algorithm using quantile sketch and gradient 9909 // histogram. 9910 // "HIST" - Fast histogram optimized approximate greedy algorithm. 9911 TreeMethod string `json:"treeMethod,omitempty"` 9912 // TrendSmoothingWindowSize: Smoothing window size for the trend component. 9913 // When a positive value is specified, a center moving average smoothing is 9914 // applied on the history trend. When the smoothing window is out of the 9915 // boundary at the beginning or the end of the trend, the first element or the 9916 // last element is padded to fill the smoothing window before the average is 9917 // applied. 9918 TrendSmoothingWindowSize int64 `json:"trendSmoothingWindowSize,omitempty,string"` 9919 // UserColumn: User column specified for matrix factorization models. 9920 UserColumn string `json:"userColumn,omitempty"` 9921 // VertexAiModelVersionAliases: The version aliases to apply in Vertex AI model 9922 // registry. Always overwrite if the version aliases exists in a existing 9923 // model. 9924 VertexAiModelVersionAliases []string `json:"vertexAiModelVersionAliases,omitempty"` 9925 // WalsAlpha: Hyperparameter for matrix factoration when implicit feedback type 9926 // is specified. 9927 WalsAlpha float64 `json:"walsAlpha,omitempty"` 9928 // WarmStart: Whether to train a model from the last checkpoint. 9929 WarmStart bool `json:"warmStart,omitempty"` 9930 // XgboostVersion: User-selected XGBoost versions for training of XGBoost 9931 // models. 9932 XgboostVersion string `json:"xgboostVersion,omitempty"` 9933 // ForceSendFields is a list of field names (e.g. "ActivationFn") to 9934 // unconditionally include in API requests. By default, fields with empty or 9935 // default values are omitted from API requests. See 9936 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9937 // details. 9938 ForceSendFields []string `json:"-"` 9939 // NullFields is a list of field names (e.g. "ActivationFn") to include in API 9940 // requests with the JSON null value. By default, fields with empty values are 9941 // omitted from API requests. See 9942 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9943 NullFields []string `json:"-"` 9944 } 9945 9946 func (s *TrainingOptions) MarshalJSON() ([]byte, error) { 9947 type NoMethod TrainingOptions 9948 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9949 } 9950 9951 func (s *TrainingOptions) UnmarshalJSON(data []byte) error { 9952 type NoMethod TrainingOptions 9953 var s1 struct { 9954 BudgetHours gensupport.JSONFloat64 `json:"budgetHours"` 9955 ColsampleBylevel gensupport.JSONFloat64 `json:"colsampleBylevel"` 9956 ColsampleBynode gensupport.JSONFloat64 `json:"colsampleBynode"` 9957 ColsampleBytree gensupport.JSONFloat64 `json:"colsampleBytree"` 9958 DataSplitEvalFraction gensupport.JSONFloat64 `json:"dataSplitEvalFraction"` 9959 Dropout gensupport.JSONFloat64 `json:"dropout"` 9960 InitialLearnRate gensupport.JSONFloat64 `json:"initialLearnRate"` 9961 L1RegActivation gensupport.JSONFloat64 `json:"l1RegActivation"` 9962 L1Regularization gensupport.JSONFloat64 `json:"l1Regularization"` 9963 L2Regularization gensupport.JSONFloat64 `json:"l2Regularization"` 9964 LearnRate gensupport.JSONFloat64 `json:"learnRate"` 9965 MinRelativeProgress gensupport.JSONFloat64 `json:"minRelativeProgress"` 9966 MinSplitLoss gensupport.JSONFloat64 `json:"minSplitLoss"` 9967 PcaExplainedVarianceRatio gensupport.JSONFloat64 `json:"pcaExplainedVarianceRatio"` 9968 Subsample gensupport.JSONFloat64 `json:"subsample"` 9969 TimeSeriesLengthFraction gensupport.JSONFloat64 `json:"timeSeriesLengthFraction"` 9970 WalsAlpha gensupport.JSONFloat64 `json:"walsAlpha"` 9971 *NoMethod 9972 } 9973 s1.NoMethod = (*NoMethod)(s) 9974 if err := json.Unmarshal(data, &s1); err != nil { 9975 return err 9976 } 9977 s.BudgetHours = float64(s1.BudgetHours) 9978 s.ColsampleBylevel = float64(s1.ColsampleBylevel) 9979 s.ColsampleBynode = float64(s1.ColsampleBynode) 9980 s.ColsampleBytree = float64(s1.ColsampleBytree) 9981 s.DataSplitEvalFraction = float64(s1.DataSplitEvalFraction) 9982 s.Dropout = float64(s1.Dropout) 9983 s.InitialLearnRate = float64(s1.InitialLearnRate) 9984 s.L1RegActivation = float64(s1.L1RegActivation) 9985 s.L1Regularization = float64(s1.L1Regularization) 9986 s.L2Regularization = float64(s1.L2Regularization) 9987 s.LearnRate = float64(s1.LearnRate) 9988 s.MinRelativeProgress = float64(s1.MinRelativeProgress) 9989 s.MinSplitLoss = float64(s1.MinSplitLoss) 9990 s.PcaExplainedVarianceRatio = float64(s1.PcaExplainedVarianceRatio) 9991 s.Subsample = float64(s1.Subsample) 9992 s.TimeSeriesLengthFraction = float64(s1.TimeSeriesLengthFraction) 9993 s.WalsAlpha = float64(s1.WalsAlpha) 9994 return nil 9995 } 9996 9997 // TrainingRun: Information about a single training query run for the model. 9998 type TrainingRun struct { 9999 // ClassLevelGlobalExplanations: Output only. Global explanation contains the 10000 // explanation of top features on the class level. Applies to classification 10001 // models only. 10002 ClassLevelGlobalExplanations []*GlobalExplanation `json:"classLevelGlobalExplanations,omitempty"` 10003 // DataSplitResult: Output only. Data split result of the training run. Only 10004 // set when the input data is actually split. 10005 DataSplitResult *DataSplitResult `json:"dataSplitResult,omitempty"` 10006 // EvaluationMetrics: Output only. The evaluation metrics over training/eval 10007 // data that were computed at the end of training. 10008 EvaluationMetrics *EvaluationMetrics `json:"evaluationMetrics,omitempty"` 10009 // ModelLevelGlobalExplanation: Output only. Global explanation contains the 10010 // explanation of top features on the model level. Applies to both regression 10011 // and classification models. 10012 ModelLevelGlobalExplanation *GlobalExplanation `json:"modelLevelGlobalExplanation,omitempty"` 10013 // Results: Output only. Output of each iteration run, results.size() <= 10014 // max_iterations. 10015 Results []*IterationResult `json:"results,omitempty"` 10016 // StartTime: Output only. The start time of this training run. 10017 StartTime string `json:"startTime,omitempty"` 10018 // TrainingOptions: Output only. Options that were used for this training run, 10019 // includes user specified and default options that were used. 10020 TrainingOptions *TrainingOptions `json:"trainingOptions,omitempty"` 10021 // TrainingStartTime: Output only. The start time of this training run, in 10022 // milliseconds since epoch. 10023 TrainingStartTime int64 `json:"trainingStartTime,omitempty,string"` 10024 // VertexAiModelId: The model id in the Vertex AI Model Registry 10025 // (https://cloud.google.com/vertex-ai/docs/model-registry/introduction) for 10026 // this training run. 10027 VertexAiModelId string `json:"vertexAiModelId,omitempty"` 10028 // VertexAiModelVersion: Output only. The model version in the Vertex AI Model 10029 // Registry 10030 // (https://cloud.google.com/vertex-ai/docs/model-registry/introduction) for 10031 // this training run. 10032 VertexAiModelVersion string `json:"vertexAiModelVersion,omitempty"` 10033 // ForceSendFields is a list of field names (e.g. 10034 // "ClassLevelGlobalExplanations") to unconditionally include in API requests. 10035 // By default, fields with empty or default values are omitted from API 10036 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 10037 // for more details. 10038 ForceSendFields []string `json:"-"` 10039 // NullFields is a list of field names (e.g. "ClassLevelGlobalExplanations") to 10040 // include in API requests with the JSON null value. By default, fields with 10041 // empty values are omitted from API requests. See 10042 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10043 NullFields []string `json:"-"` 10044 } 10045 10046 func (s *TrainingRun) MarshalJSON() ([]byte, error) { 10047 type NoMethod TrainingRun 10048 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10049 } 10050 10051 // TransactionInfo: [Alpha] Information of a multi-statement transaction. 10052 type TransactionInfo struct { 10053 // TransactionId: Output only. [Alpha] Id of the transaction. 10054 TransactionId string `json:"transactionId,omitempty"` 10055 // ForceSendFields is a list of field names (e.g. "TransactionId") to 10056 // unconditionally include in API requests. By default, fields with empty or 10057 // default values are omitted from API requests. See 10058 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10059 // details. 10060 ForceSendFields []string `json:"-"` 10061 // NullFields is a list of field names (e.g. "TransactionId") to include in API 10062 // requests with the JSON null value. By default, fields with empty values are 10063 // omitted from API requests. See 10064 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10065 NullFields []string `json:"-"` 10066 } 10067 10068 func (s *TransactionInfo) MarshalJSON() ([]byte, error) { 10069 type NoMethod TransactionInfo 10070 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10071 } 10072 10073 // TransformColumn: Information about a single transform column. 10074 type TransformColumn struct { 10075 // Name: Output only. Name of the column. 10076 Name string `json:"name,omitempty"` 10077 // TransformSql: Output only. The SQL expression used in the column transform. 10078 TransformSql string `json:"transformSql,omitempty"` 10079 // Type: Output only. Data type of the column after the transform. 10080 Type *StandardSqlDataType `json:"type,omitempty"` 10081 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 10082 // include in API requests. By default, fields with empty or default values are 10083 // omitted from API requests. See 10084 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10085 // details. 10086 ForceSendFields []string `json:"-"` 10087 // NullFields is a list of field names (e.g. "Name") to include in API requests 10088 // with the JSON null value. By default, fields with empty values are omitted 10089 // from API requests. See 10090 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10091 NullFields []string `json:"-"` 10092 } 10093 10094 func (s *TransformColumn) MarshalJSON() ([]byte, error) { 10095 type NoMethod TransformColumn 10096 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10097 } 10098 10099 // UndeleteDatasetRequest: Request format for undeleting a dataset. 10100 type UndeleteDatasetRequest struct { 10101 // DeletionTime: Optional. The exact time when the dataset was deleted. If not 10102 // specified, the most recently deleted version is undeleted. 10103 DeletionTime string `json:"deletionTime,omitempty"` 10104 // ForceSendFields is a list of field names (e.g. "DeletionTime") to 10105 // unconditionally include in API requests. By default, fields with empty or 10106 // default values are omitted from API requests. See 10107 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10108 // details. 10109 ForceSendFields []string `json:"-"` 10110 // NullFields is a list of field names (e.g. "DeletionTime") to include in API 10111 // requests with the JSON null value. By default, fields with empty values are 10112 // omitted from API requests. See 10113 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10114 NullFields []string `json:"-"` 10115 } 10116 10117 func (s *UndeleteDatasetRequest) MarshalJSON() ([]byte, error) { 10118 type NoMethod UndeleteDatasetRequest 10119 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10120 } 10121 10122 // UserDefinedFunctionResource: This is used for defining User Defined 10123 // Function (UDF) resources only when using legacy SQL. Users of GoogleSQL 10124 // should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the 10125 // Routines API to define UDF resources. For additional information on 10126 // migrating, see: 10127 // https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions 10128 type UserDefinedFunctionResource struct { 10129 // InlineCode: [Pick one] An inline resource that contains code for a 10130 // user-defined function (UDF). Providing a inline code resource is equivalent 10131 // to providing a URI for a file containing the same code. 10132 InlineCode string `json:"inlineCode,omitempty"` 10133 // ResourceUri: [Pick one] A code resource to load from a Google Cloud Storage 10134 // URI (gs://bucket/path). 10135 ResourceUri string `json:"resourceUri,omitempty"` 10136 // ForceSendFields is a list of field names (e.g. "InlineCode") to 10137 // unconditionally include in API requests. By default, fields with empty or 10138 // default values are omitted from API requests. See 10139 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10140 // details. 10141 ForceSendFields []string `json:"-"` 10142 // NullFields is a list of field names (e.g. "InlineCode") to include in API 10143 // requests with the JSON null value. By default, fields with empty values are 10144 // omitted from API requests. See 10145 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10146 NullFields []string `json:"-"` 10147 } 10148 10149 func (s *UserDefinedFunctionResource) MarshalJSON() ([]byte, error) { 10150 type NoMethod UserDefinedFunctionResource 10151 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10152 } 10153 10154 // VectorSearchStatistics: Statistics for a vector search query. Populated as 10155 // part of JobStatistics2. 10156 type VectorSearchStatistics struct { 10157 // IndexUnusedReasons: When `indexUsageMode` is `UNUSED` or `PARTIALLY_USED`, 10158 // this field explains why indexes were not used in all or part of the vector 10159 // search query. If `indexUsageMode` is `FULLY_USED`, this field is not 10160 // populated. 10161 IndexUnusedReasons []*IndexUnusedReason `json:"indexUnusedReasons,omitempty"` 10162 // IndexUsageMode: Specifies the index usage mode for the query. 10163 // 10164 // Possible values: 10165 // "INDEX_USAGE_MODE_UNSPECIFIED" - Index usage mode not specified. 10166 // "UNUSED" - No vector indexes were used in the vector search query. See 10167 // [`indexUnusedReasons`] 10168 // (/bigquery/docs/reference/rest/v2/Job#IndexUnusedReason) for detailed 10169 // reasons. 10170 // "PARTIALLY_USED" - Part of the vector search query used vector indexes. 10171 // See [`indexUnusedReasons`] 10172 // (/bigquery/docs/reference/rest/v2/Job#IndexUnusedReason) for why other parts 10173 // of the query did not use vector indexes. 10174 // "FULLY_USED" - The entire vector search query used vector indexes. 10175 IndexUsageMode string `json:"indexUsageMode,omitempty"` 10176 // ForceSendFields is a list of field names (e.g. "IndexUnusedReasons") to 10177 // unconditionally include in API requests. By default, fields with empty or 10178 // default values are omitted from API requests. See 10179 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10180 // details. 10181 ForceSendFields []string `json:"-"` 10182 // NullFields is a list of field names (e.g. "IndexUnusedReasons") to include 10183 // in API requests with the JSON null value. By default, fields with empty 10184 // values are omitted from API requests. See 10185 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10186 NullFields []string `json:"-"` 10187 } 10188 10189 func (s *VectorSearchStatistics) MarshalJSON() ([]byte, error) { 10190 type NoMethod VectorSearchStatistics 10191 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10192 } 10193 10194 // ViewDefinition: Describes the definition of a logical view. 10195 type ViewDefinition struct { 10196 // PrivacyPolicy: Optional. Specifices the privacy policy for the view. 10197 PrivacyPolicy *PrivacyPolicy `json:"privacyPolicy,omitempty"` 10198 // Query: Required. A query that BigQuery executes when the view is referenced. 10199 Query string `json:"query,omitempty"` 10200 // UseExplicitColumnNames: True if the column names are explicitly specified. 10201 // For example by using the 'CREATE VIEW v(c1, c2) AS ...' syntax. Can only be 10202 // set for GoogleSQL views. 10203 UseExplicitColumnNames bool `json:"useExplicitColumnNames,omitempty"` 10204 // UseLegacySql: Specifies whether to use BigQuery's legacy SQL for this view. 10205 // The default value is true. If set to false, the view will use BigQuery's 10206 // GoogleSQL: https://cloud.google.com/bigquery/sql-reference/ Queries and 10207 // views that reference this view must use the same flag value. A wrapper is 10208 // used here because the default value is True. 10209 UseLegacySql bool `json:"useLegacySql,omitempty"` 10210 // UserDefinedFunctionResources: Describes user-defined function resources used 10211 // in the query. 10212 UserDefinedFunctionResources []*UserDefinedFunctionResource `json:"userDefinedFunctionResources,omitempty"` 10213 // ForceSendFields is a list of field names (e.g. "PrivacyPolicy") to 10214 // unconditionally include in API requests. By default, fields with empty or 10215 // default values are omitted from API requests. See 10216 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10217 // details. 10218 ForceSendFields []string `json:"-"` 10219 // NullFields is a list of field names (e.g. "PrivacyPolicy") to include in API 10220 // requests with the JSON null value. By default, fields with empty values are 10221 // omitted from API requests. See 10222 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10223 NullFields []string `json:"-"` 10224 } 10225 10226 func (s *ViewDefinition) MarshalJSON() ([]byte, error) { 10227 type NoMethod ViewDefinition 10228 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10229 } 10230 10231 type DatasetsDeleteCall struct { 10232 s *Service 10233 projectId string 10234 datasetId string 10235 urlParams_ gensupport.URLParams 10236 ctx_ context.Context 10237 header_ http.Header 10238 } 10239 10240 // Delete: Deletes the dataset specified by the datasetId value. Before you can 10241 // delete a dataset, you must delete all its tables, either manually or by 10242 // specifying deleteContents. Immediately after deletion, you can create 10243 // another dataset with the same name. 10244 // 10245 // - datasetId: Dataset ID of dataset being deleted. 10246 // - projectId: Project ID of the dataset being deleted. 10247 func (r *DatasetsService) Delete(projectId string, datasetId string) *DatasetsDeleteCall { 10248 c := &DatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10249 c.projectId = projectId 10250 c.datasetId = datasetId 10251 return c 10252 } 10253 10254 // DeleteContents sets the optional parameter "deleteContents": If True, delete 10255 // all the tables in the dataset. If False and the dataset contains tables, the 10256 // request will fail. Default is False 10257 func (c *DatasetsDeleteCall) DeleteContents(deleteContents bool) *DatasetsDeleteCall { 10258 c.urlParams_.Set("deleteContents", fmt.Sprint(deleteContents)) 10259 return c 10260 } 10261 10262 // Fields allows partial responses to be retrieved. See 10263 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10264 // details. 10265 func (c *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall { 10266 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10267 return c 10268 } 10269 10270 // Context sets the context to be used in this call's Do method. 10271 func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall { 10272 c.ctx_ = ctx 10273 return c 10274 } 10275 10276 // Header returns a http.Header that can be modified by the caller to add 10277 // headers to the request. 10278 func (c *DatasetsDeleteCall) Header() http.Header { 10279 if c.header_ == nil { 10280 c.header_ = make(http.Header) 10281 } 10282 return c.header_ 10283 } 10284 10285 func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { 10286 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10287 var body io.Reader = nil 10288 c.urlParams_.Set("alt", alt) 10289 c.urlParams_.Set("prettyPrint", "false") 10290 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}") 10291 urls += "?" + c.urlParams_.Encode() 10292 req, err := http.NewRequest("DELETE", urls, body) 10293 if err != nil { 10294 return nil, err 10295 } 10296 req.Header = reqHeaders 10297 googleapi.Expand(req.URL, map[string]string{ 10298 "projectId": c.projectId, 10299 "datasetId": c.datasetId, 10300 }) 10301 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10302 } 10303 10304 // Do executes the "bigquery.datasets.delete" call. 10305 func (c *DatasetsDeleteCall) Do(opts ...googleapi.CallOption) error { 10306 gensupport.SetOptions(c.urlParams_, opts...) 10307 res, err := c.doRequest("json") 10308 if err != nil { 10309 return err 10310 } 10311 defer googleapi.CloseBody(res) 10312 if err := googleapi.CheckResponse(res); err != nil { 10313 return gensupport.WrapError(err) 10314 } 10315 return nil 10316 } 10317 10318 type DatasetsGetCall struct { 10319 s *Service 10320 projectId string 10321 datasetId string 10322 urlParams_ gensupport.URLParams 10323 ifNoneMatch_ string 10324 ctx_ context.Context 10325 header_ http.Header 10326 } 10327 10328 // Get: Returns the dataset specified by datasetID. 10329 // 10330 // - datasetId: Dataset ID of the requested dataset. 10331 // - projectId: Project ID of the requested dataset. 10332 func (r *DatasetsService) Get(projectId string, datasetId string) *DatasetsGetCall { 10333 c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10334 c.projectId = projectId 10335 c.datasetId = datasetId 10336 return c 10337 } 10338 10339 // DatasetView sets the optional parameter "datasetView": Specifies the view 10340 // that determines which dataset information is returned. By default, metadata 10341 // and ACL information are returned. 10342 // 10343 // Possible values: 10344 // 10345 // "DATASET_VIEW_UNSPECIFIED" - The default value. Default to the FULL view. 10346 // "METADATA" - Includes metadata information for the dataset, such as 10347 // 10348 // location, etag, lastModifiedTime, etc. 10349 // 10350 // "ACL" - Includes ACL information for the dataset, which defines dataset 10351 // 10352 // access for one or more entities. 10353 // 10354 // "FULL" - Includes both dataset metadata and ACL information. 10355 func (c *DatasetsGetCall) DatasetView(datasetView string) *DatasetsGetCall { 10356 c.urlParams_.Set("datasetView", datasetView) 10357 return c 10358 } 10359 10360 // Fields allows partial responses to be retrieved. See 10361 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10362 // details. 10363 func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { 10364 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10365 return c 10366 } 10367 10368 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10369 // object's ETag matches the given value. This is useful for getting updates 10370 // only after the object has changed since the last request. 10371 func (c *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall { 10372 c.ifNoneMatch_ = entityTag 10373 return c 10374 } 10375 10376 // Context sets the context to be used in this call's Do method. 10377 func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall { 10378 c.ctx_ = ctx 10379 return c 10380 } 10381 10382 // Header returns a http.Header that can be modified by the caller to add 10383 // headers to the request. 10384 func (c *DatasetsGetCall) Header() http.Header { 10385 if c.header_ == nil { 10386 c.header_ = make(http.Header) 10387 } 10388 return c.header_ 10389 } 10390 10391 func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { 10392 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10393 if c.ifNoneMatch_ != "" { 10394 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10395 } 10396 var body io.Reader = nil 10397 c.urlParams_.Set("alt", alt) 10398 c.urlParams_.Set("prettyPrint", "false") 10399 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}") 10400 urls += "?" + c.urlParams_.Encode() 10401 req, err := http.NewRequest("GET", urls, body) 10402 if err != nil { 10403 return nil, err 10404 } 10405 req.Header = reqHeaders 10406 googleapi.Expand(req.URL, map[string]string{ 10407 "projectId": c.projectId, 10408 "datasetId": c.datasetId, 10409 }) 10410 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10411 } 10412 10413 // Do executes the "bigquery.datasets.get" call. 10414 // Any non-2xx status code is an error. Response headers are in either 10415 // *Dataset.ServerResponse.Header or (if a response was returned at all) in 10416 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10417 // whether the returned error was because http.StatusNotModified was returned. 10418 func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) { 10419 gensupport.SetOptions(c.urlParams_, opts...) 10420 res, err := c.doRequest("json") 10421 if res != nil && res.StatusCode == http.StatusNotModified { 10422 if res.Body != nil { 10423 res.Body.Close() 10424 } 10425 return nil, gensupport.WrapError(&googleapi.Error{ 10426 Code: res.StatusCode, 10427 Header: res.Header, 10428 }) 10429 } 10430 if err != nil { 10431 return nil, err 10432 } 10433 defer googleapi.CloseBody(res) 10434 if err := googleapi.CheckResponse(res); err != nil { 10435 return nil, gensupport.WrapError(err) 10436 } 10437 ret := &Dataset{ 10438 ServerResponse: googleapi.ServerResponse{ 10439 Header: res.Header, 10440 HTTPStatusCode: res.StatusCode, 10441 }, 10442 } 10443 target := &ret 10444 if err := gensupport.DecodeResponse(target, res); err != nil { 10445 return nil, err 10446 } 10447 return ret, nil 10448 } 10449 10450 type DatasetsInsertCall struct { 10451 s *Service 10452 projectId string 10453 dataset *Dataset 10454 urlParams_ gensupport.URLParams 10455 ctx_ context.Context 10456 header_ http.Header 10457 } 10458 10459 // Insert: Creates a new empty dataset. 10460 // 10461 // - projectId: Project ID of the new dataset. 10462 func (r *DatasetsService) Insert(projectId string, dataset *Dataset) *DatasetsInsertCall { 10463 c := &DatasetsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10464 c.projectId = projectId 10465 c.dataset = dataset 10466 return c 10467 } 10468 10469 // Fields allows partial responses to be retrieved. See 10470 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10471 // details. 10472 func (c *DatasetsInsertCall) Fields(s ...googleapi.Field) *DatasetsInsertCall { 10473 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10474 return c 10475 } 10476 10477 // Context sets the context to be used in this call's Do method. 10478 func (c *DatasetsInsertCall) Context(ctx context.Context) *DatasetsInsertCall { 10479 c.ctx_ = ctx 10480 return c 10481 } 10482 10483 // Header returns a http.Header that can be modified by the caller to add 10484 // headers to the request. 10485 func (c *DatasetsInsertCall) Header() http.Header { 10486 if c.header_ == nil { 10487 c.header_ = make(http.Header) 10488 } 10489 return c.header_ 10490 } 10491 10492 func (c *DatasetsInsertCall) doRequest(alt string) (*http.Response, error) { 10493 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10494 var body io.Reader = nil 10495 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset) 10496 if err != nil { 10497 return nil, err 10498 } 10499 c.urlParams_.Set("alt", alt) 10500 c.urlParams_.Set("prettyPrint", "false") 10501 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets") 10502 urls += "?" + c.urlParams_.Encode() 10503 req, err := http.NewRequest("POST", urls, body) 10504 if err != nil { 10505 return nil, err 10506 } 10507 req.Header = reqHeaders 10508 googleapi.Expand(req.URL, map[string]string{ 10509 "projectId": c.projectId, 10510 }) 10511 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10512 } 10513 10514 // Do executes the "bigquery.datasets.insert" call. 10515 // Any non-2xx status code is an error. Response headers are in either 10516 // *Dataset.ServerResponse.Header or (if a response was returned at all) in 10517 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10518 // whether the returned error was because http.StatusNotModified was returned. 10519 func (c *DatasetsInsertCall) Do(opts ...googleapi.CallOption) (*Dataset, error) { 10520 gensupport.SetOptions(c.urlParams_, opts...) 10521 res, err := c.doRequest("json") 10522 if res != nil && res.StatusCode == http.StatusNotModified { 10523 if res.Body != nil { 10524 res.Body.Close() 10525 } 10526 return nil, gensupport.WrapError(&googleapi.Error{ 10527 Code: res.StatusCode, 10528 Header: res.Header, 10529 }) 10530 } 10531 if err != nil { 10532 return nil, err 10533 } 10534 defer googleapi.CloseBody(res) 10535 if err := googleapi.CheckResponse(res); err != nil { 10536 return nil, gensupport.WrapError(err) 10537 } 10538 ret := &Dataset{ 10539 ServerResponse: googleapi.ServerResponse{ 10540 Header: res.Header, 10541 HTTPStatusCode: res.StatusCode, 10542 }, 10543 } 10544 target := &ret 10545 if err := gensupport.DecodeResponse(target, res); err != nil { 10546 return nil, err 10547 } 10548 return ret, nil 10549 } 10550 10551 type DatasetsListCall struct { 10552 s *Service 10553 projectId string 10554 urlParams_ gensupport.URLParams 10555 ifNoneMatch_ string 10556 ctx_ context.Context 10557 header_ http.Header 10558 } 10559 10560 // List: Lists all datasets in the specified project to which the user has been 10561 // granted the READER dataset role. 10562 // 10563 // - projectId: Project ID of the datasets to be listed. 10564 func (r *DatasetsService) List(projectId string) *DatasetsListCall { 10565 c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10566 c.projectId = projectId 10567 return c 10568 } 10569 10570 // All sets the optional parameter "all": Whether to list all datasets, 10571 // including hidden ones 10572 func (c *DatasetsListCall) All(all bool) *DatasetsListCall { 10573 c.urlParams_.Set("all", fmt.Sprint(all)) 10574 return c 10575 } 10576 10577 // Filter sets the optional parameter "filter": An expression for filtering the 10578 // results of the request by label. The syntax is \"labels.<name>[:<value>]\". 10579 // Multiple filters can be ANDed together by connecting with a space. Example: 10580 // \"labels.department:receiving labels.active\". See Filtering datasets using 10581 // labels (/bigquery/docs/filtering-labels#filtering_datasets_using_labels) for 10582 // details. 10583 func (c *DatasetsListCall) Filter(filter string) *DatasetsListCall { 10584 c.urlParams_.Set("filter", filter) 10585 return c 10586 } 10587 10588 // MaxResults sets the optional parameter "maxResults": The maximum number of 10589 // results to return in a single response page. Leverage the page tokens to 10590 // iterate through the entire collection. 10591 func (c *DatasetsListCall) MaxResults(maxResults int64) *DatasetsListCall { 10592 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 10593 return c 10594 } 10595 10596 // PageToken sets the optional parameter "pageToken": Page token, returned by a 10597 // previous call, to request the next page of results 10598 func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall { 10599 c.urlParams_.Set("pageToken", pageToken) 10600 return c 10601 } 10602 10603 // Fields allows partial responses to be retrieved. See 10604 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10605 // details. 10606 func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { 10607 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10608 return c 10609 } 10610 10611 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10612 // object's ETag matches the given value. This is useful for getting updates 10613 // only after the object has changed since the last request. 10614 func (c *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall { 10615 c.ifNoneMatch_ = entityTag 10616 return c 10617 } 10618 10619 // Context sets the context to be used in this call's Do method. 10620 func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall { 10621 c.ctx_ = ctx 10622 return c 10623 } 10624 10625 // Header returns a http.Header that can be modified by the caller to add 10626 // headers to the request. 10627 func (c *DatasetsListCall) Header() http.Header { 10628 if c.header_ == nil { 10629 c.header_ = make(http.Header) 10630 } 10631 return c.header_ 10632 } 10633 10634 func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { 10635 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10636 if c.ifNoneMatch_ != "" { 10637 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10638 } 10639 var body io.Reader = nil 10640 c.urlParams_.Set("alt", alt) 10641 c.urlParams_.Set("prettyPrint", "false") 10642 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets") 10643 urls += "?" + c.urlParams_.Encode() 10644 req, err := http.NewRequest("GET", urls, body) 10645 if err != nil { 10646 return nil, err 10647 } 10648 req.Header = reqHeaders 10649 googleapi.Expand(req.URL, map[string]string{ 10650 "projectId": c.projectId, 10651 }) 10652 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10653 } 10654 10655 // Do executes the "bigquery.datasets.list" call. 10656 // Any non-2xx status code is an error. Response headers are in either 10657 // *DatasetList.ServerResponse.Header or (if a response was returned at all) in 10658 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10659 // whether the returned error was because http.StatusNotModified was returned. 10660 func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*DatasetList, error) { 10661 gensupport.SetOptions(c.urlParams_, opts...) 10662 res, err := c.doRequest("json") 10663 if res != nil && res.StatusCode == http.StatusNotModified { 10664 if res.Body != nil { 10665 res.Body.Close() 10666 } 10667 return nil, gensupport.WrapError(&googleapi.Error{ 10668 Code: res.StatusCode, 10669 Header: res.Header, 10670 }) 10671 } 10672 if err != nil { 10673 return nil, err 10674 } 10675 defer googleapi.CloseBody(res) 10676 if err := googleapi.CheckResponse(res); err != nil { 10677 return nil, gensupport.WrapError(err) 10678 } 10679 ret := &DatasetList{ 10680 ServerResponse: googleapi.ServerResponse{ 10681 Header: res.Header, 10682 HTTPStatusCode: res.StatusCode, 10683 }, 10684 } 10685 target := &ret 10686 if err := gensupport.DecodeResponse(target, res); err != nil { 10687 return nil, err 10688 } 10689 return ret, nil 10690 } 10691 10692 // Pages invokes f for each page of results. 10693 // A non-nil error returned from f will halt the iteration. 10694 // The provided context supersedes any context provided to the Context method. 10695 func (c *DatasetsListCall) Pages(ctx context.Context, f func(*DatasetList) error) error { 10696 c.ctx_ = ctx 10697 defer c.PageToken(c.urlParams_.Get("pageToken")) 10698 for { 10699 x, err := c.Do() 10700 if err != nil { 10701 return err 10702 } 10703 if err := f(x); err != nil { 10704 return err 10705 } 10706 if x.NextPageToken == "" { 10707 return nil 10708 } 10709 c.PageToken(x.NextPageToken) 10710 } 10711 } 10712 10713 type DatasetsPatchCall struct { 10714 s *Service 10715 projectId string 10716 datasetId string 10717 dataset *Dataset 10718 urlParams_ gensupport.URLParams 10719 ctx_ context.Context 10720 header_ http.Header 10721 } 10722 10723 // Patch: Updates information in an existing dataset. The update method 10724 // replaces the entire dataset resource, whereas the patch method only replaces 10725 // fields that are provided in the submitted dataset resource. This method 10726 // supports RFC5789 patch semantics. 10727 // 10728 // - datasetId: Dataset ID of the dataset being updated. 10729 // - projectId: Project ID of the dataset being updated. 10730 func (r *DatasetsService) Patch(projectId string, datasetId string, dataset *Dataset) *DatasetsPatchCall { 10731 c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10732 c.projectId = projectId 10733 c.datasetId = datasetId 10734 c.dataset = dataset 10735 return c 10736 } 10737 10738 // Fields allows partial responses to be retrieved. See 10739 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10740 // details. 10741 func (c *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall { 10742 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10743 return c 10744 } 10745 10746 // Context sets the context to be used in this call's Do method. 10747 func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall { 10748 c.ctx_ = ctx 10749 return c 10750 } 10751 10752 // Header returns a http.Header that can be modified by the caller to add 10753 // headers to the request. 10754 func (c *DatasetsPatchCall) Header() http.Header { 10755 if c.header_ == nil { 10756 c.header_ = make(http.Header) 10757 } 10758 return c.header_ 10759 } 10760 10761 func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) { 10762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10763 var body io.Reader = nil 10764 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset) 10765 if err != nil { 10766 return nil, err 10767 } 10768 c.urlParams_.Set("alt", alt) 10769 c.urlParams_.Set("prettyPrint", "false") 10770 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}") 10771 urls += "?" + c.urlParams_.Encode() 10772 req, err := http.NewRequest("PATCH", urls, body) 10773 if err != nil { 10774 return nil, err 10775 } 10776 req.Header = reqHeaders 10777 googleapi.Expand(req.URL, map[string]string{ 10778 "projectId": c.projectId, 10779 "datasetId": c.datasetId, 10780 }) 10781 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10782 } 10783 10784 // Do executes the "bigquery.datasets.patch" call. 10785 // Any non-2xx status code is an error. Response headers are in either 10786 // *Dataset.ServerResponse.Header or (if a response was returned at all) in 10787 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10788 // whether the returned error was because http.StatusNotModified was returned. 10789 func (c *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*Dataset, error) { 10790 gensupport.SetOptions(c.urlParams_, opts...) 10791 res, err := c.doRequest("json") 10792 if res != nil && res.StatusCode == http.StatusNotModified { 10793 if res.Body != nil { 10794 res.Body.Close() 10795 } 10796 return nil, gensupport.WrapError(&googleapi.Error{ 10797 Code: res.StatusCode, 10798 Header: res.Header, 10799 }) 10800 } 10801 if err != nil { 10802 return nil, err 10803 } 10804 defer googleapi.CloseBody(res) 10805 if err := googleapi.CheckResponse(res); err != nil { 10806 return nil, gensupport.WrapError(err) 10807 } 10808 ret := &Dataset{ 10809 ServerResponse: googleapi.ServerResponse{ 10810 Header: res.Header, 10811 HTTPStatusCode: res.StatusCode, 10812 }, 10813 } 10814 target := &ret 10815 if err := gensupport.DecodeResponse(target, res); err != nil { 10816 return nil, err 10817 } 10818 return ret, nil 10819 } 10820 10821 type DatasetsUndeleteCall struct { 10822 s *Service 10823 projectId string 10824 datasetId string 10825 undeletedatasetrequest *UndeleteDatasetRequest 10826 urlParams_ gensupport.URLParams 10827 ctx_ context.Context 10828 header_ http.Header 10829 } 10830 10831 // Undelete: Undeletes a dataset which is within time travel window based on 10832 // datasetId. If a time is specified, the dataset version deleted at that time 10833 // is undeleted, else the last live version is undeleted. 10834 // 10835 // - datasetId: Dataset ID of dataset being deleted. 10836 // - projectId: Project ID of the dataset to be undeleted. 10837 func (r *DatasetsService) Undelete(projectId string, datasetId string, undeletedatasetrequest *UndeleteDatasetRequest) *DatasetsUndeleteCall { 10838 c := &DatasetsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10839 c.projectId = projectId 10840 c.datasetId = datasetId 10841 c.undeletedatasetrequest = undeletedatasetrequest 10842 return c 10843 } 10844 10845 // Fields allows partial responses to be retrieved. See 10846 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10847 // details. 10848 func (c *DatasetsUndeleteCall) Fields(s ...googleapi.Field) *DatasetsUndeleteCall { 10849 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10850 return c 10851 } 10852 10853 // Context sets the context to be used in this call's Do method. 10854 func (c *DatasetsUndeleteCall) Context(ctx context.Context) *DatasetsUndeleteCall { 10855 c.ctx_ = ctx 10856 return c 10857 } 10858 10859 // Header returns a http.Header that can be modified by the caller to add 10860 // headers to the request. 10861 func (c *DatasetsUndeleteCall) Header() http.Header { 10862 if c.header_ == nil { 10863 c.header_ = make(http.Header) 10864 } 10865 return c.header_ 10866 } 10867 10868 func (c *DatasetsUndeleteCall) doRequest(alt string) (*http.Response, error) { 10869 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10870 var body io.Reader = nil 10871 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletedatasetrequest) 10872 if err != nil { 10873 return nil, err 10874 } 10875 c.urlParams_.Set("alt", alt) 10876 c.urlParams_.Set("prettyPrint", "false") 10877 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}:undelete") 10878 urls += "?" + c.urlParams_.Encode() 10879 req, err := http.NewRequest("POST", urls, body) 10880 if err != nil { 10881 return nil, err 10882 } 10883 req.Header = reqHeaders 10884 googleapi.Expand(req.URL, map[string]string{ 10885 "projectId": c.projectId, 10886 "datasetId": c.datasetId, 10887 }) 10888 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10889 } 10890 10891 // Do executes the "bigquery.datasets.undelete" call. 10892 // Any non-2xx status code is an error. Response headers are in either 10893 // *Dataset.ServerResponse.Header or (if a response was returned at all) in 10894 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10895 // whether the returned error was because http.StatusNotModified was returned. 10896 func (c *DatasetsUndeleteCall) Do(opts ...googleapi.CallOption) (*Dataset, error) { 10897 gensupport.SetOptions(c.urlParams_, opts...) 10898 res, err := c.doRequest("json") 10899 if res != nil && res.StatusCode == http.StatusNotModified { 10900 if res.Body != nil { 10901 res.Body.Close() 10902 } 10903 return nil, gensupport.WrapError(&googleapi.Error{ 10904 Code: res.StatusCode, 10905 Header: res.Header, 10906 }) 10907 } 10908 if err != nil { 10909 return nil, err 10910 } 10911 defer googleapi.CloseBody(res) 10912 if err := googleapi.CheckResponse(res); err != nil { 10913 return nil, gensupport.WrapError(err) 10914 } 10915 ret := &Dataset{ 10916 ServerResponse: googleapi.ServerResponse{ 10917 Header: res.Header, 10918 HTTPStatusCode: res.StatusCode, 10919 }, 10920 } 10921 target := &ret 10922 if err := gensupport.DecodeResponse(target, res); err != nil { 10923 return nil, err 10924 } 10925 return ret, nil 10926 } 10927 10928 type DatasetsUpdateCall struct { 10929 s *Service 10930 projectId string 10931 datasetId string 10932 dataset *Dataset 10933 urlParams_ gensupport.URLParams 10934 ctx_ context.Context 10935 header_ http.Header 10936 } 10937 10938 // Update: Updates information in an existing dataset. The update method 10939 // replaces the entire dataset resource, whereas the patch method only replaces 10940 // fields that are provided in the submitted dataset resource. 10941 // 10942 // - datasetId: Dataset ID of the dataset being updated. 10943 // - projectId: Project ID of the dataset being updated. 10944 func (r *DatasetsService) Update(projectId string, datasetId string, dataset *Dataset) *DatasetsUpdateCall { 10945 c := &DatasetsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10946 c.projectId = projectId 10947 c.datasetId = datasetId 10948 c.dataset = dataset 10949 return c 10950 } 10951 10952 // Fields allows partial responses to be retrieved. See 10953 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10954 // details. 10955 func (c *DatasetsUpdateCall) Fields(s ...googleapi.Field) *DatasetsUpdateCall { 10956 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10957 return c 10958 } 10959 10960 // Context sets the context to be used in this call's Do method. 10961 func (c *DatasetsUpdateCall) Context(ctx context.Context) *DatasetsUpdateCall { 10962 c.ctx_ = ctx 10963 return c 10964 } 10965 10966 // Header returns a http.Header that can be modified by the caller to add 10967 // headers to the request. 10968 func (c *DatasetsUpdateCall) Header() http.Header { 10969 if c.header_ == nil { 10970 c.header_ = make(http.Header) 10971 } 10972 return c.header_ 10973 } 10974 10975 func (c *DatasetsUpdateCall) doRequest(alt string) (*http.Response, error) { 10976 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10977 var body io.Reader = nil 10978 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset) 10979 if err != nil { 10980 return nil, err 10981 } 10982 c.urlParams_.Set("alt", alt) 10983 c.urlParams_.Set("prettyPrint", "false") 10984 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}") 10985 urls += "?" + c.urlParams_.Encode() 10986 req, err := http.NewRequest("PUT", urls, body) 10987 if err != nil { 10988 return nil, err 10989 } 10990 req.Header = reqHeaders 10991 googleapi.Expand(req.URL, map[string]string{ 10992 "projectId": c.projectId, 10993 "datasetId": c.datasetId, 10994 }) 10995 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10996 } 10997 10998 // Do executes the "bigquery.datasets.update" call. 10999 // Any non-2xx status code is an error. Response headers are in either 11000 // *Dataset.ServerResponse.Header or (if a response was returned at all) in 11001 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11002 // whether the returned error was because http.StatusNotModified was returned. 11003 func (c *DatasetsUpdateCall) Do(opts ...googleapi.CallOption) (*Dataset, error) { 11004 gensupport.SetOptions(c.urlParams_, opts...) 11005 res, err := c.doRequest("json") 11006 if res != nil && res.StatusCode == http.StatusNotModified { 11007 if res.Body != nil { 11008 res.Body.Close() 11009 } 11010 return nil, gensupport.WrapError(&googleapi.Error{ 11011 Code: res.StatusCode, 11012 Header: res.Header, 11013 }) 11014 } 11015 if err != nil { 11016 return nil, err 11017 } 11018 defer googleapi.CloseBody(res) 11019 if err := googleapi.CheckResponse(res); err != nil { 11020 return nil, gensupport.WrapError(err) 11021 } 11022 ret := &Dataset{ 11023 ServerResponse: googleapi.ServerResponse{ 11024 Header: res.Header, 11025 HTTPStatusCode: res.StatusCode, 11026 }, 11027 } 11028 target := &ret 11029 if err := gensupport.DecodeResponse(target, res); err != nil { 11030 return nil, err 11031 } 11032 return ret, nil 11033 } 11034 11035 type JobsCancelCall struct { 11036 s *Service 11037 projectId string 11038 jobId string 11039 urlParams_ gensupport.URLParams 11040 ctx_ context.Context 11041 header_ http.Header 11042 } 11043 11044 // Cancel: Requests that a job be cancelled. This call will return immediately, 11045 // and the client will need to poll for the job status to see if the cancel 11046 // completed successfully. Cancelled jobs may still incur costs. 11047 // 11048 // - jobId: Job ID of the job to cancel. 11049 // - projectId: Project ID of the job to cancel. 11050 func (r *JobsService) Cancel(projectId string, jobId string) *JobsCancelCall { 11051 c := &JobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11052 c.projectId = projectId 11053 c.jobId = jobId 11054 return c 11055 } 11056 11057 // Location sets the optional parameter "location": The geographic location of 11058 // the job. You must specify the location to run the job for the following 11059 // scenarios: - If the location to run a job is not in the `us` or the `eu` 11060 // multi-regional location - If the job's location is in a single region (for 11061 // example, `us-central1`) For more information, see 11062 // https://cloud.google.com/bigquery/docs/locations#specifying_your_location. 11063 func (c *JobsCancelCall) Location(location string) *JobsCancelCall { 11064 c.urlParams_.Set("location", location) 11065 return c 11066 } 11067 11068 // Fields allows partial responses to be retrieved. See 11069 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11070 // details. 11071 func (c *JobsCancelCall) Fields(s ...googleapi.Field) *JobsCancelCall { 11072 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11073 return c 11074 } 11075 11076 // Context sets the context to be used in this call's Do method. 11077 func (c *JobsCancelCall) Context(ctx context.Context) *JobsCancelCall { 11078 c.ctx_ = ctx 11079 return c 11080 } 11081 11082 // Header returns a http.Header that can be modified by the caller to add 11083 // headers to the request. 11084 func (c *JobsCancelCall) Header() http.Header { 11085 if c.header_ == nil { 11086 c.header_ = make(http.Header) 11087 } 11088 return c.header_ 11089 } 11090 11091 func (c *JobsCancelCall) doRequest(alt string) (*http.Response, error) { 11092 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11093 var body io.Reader = nil 11094 c.urlParams_.Set("alt", alt) 11095 c.urlParams_.Set("prettyPrint", "false") 11096 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/jobs/{+jobId}/cancel") 11097 urls += "?" + c.urlParams_.Encode() 11098 req, err := http.NewRequest("POST", urls, body) 11099 if err != nil { 11100 return nil, err 11101 } 11102 req.Header = reqHeaders 11103 googleapi.Expand(req.URL, map[string]string{ 11104 "projectId": c.projectId, 11105 "jobId": c.jobId, 11106 }) 11107 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11108 } 11109 11110 // Do executes the "bigquery.jobs.cancel" call. 11111 // Any non-2xx status code is an error. Response headers are in either 11112 // *JobCancelResponse.ServerResponse.Header or (if a response was returned at 11113 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11114 // check whether the returned error was because http.StatusNotModified was 11115 // returned. 11116 func (c *JobsCancelCall) Do(opts ...googleapi.CallOption) (*JobCancelResponse, error) { 11117 gensupport.SetOptions(c.urlParams_, opts...) 11118 res, err := c.doRequest("json") 11119 if res != nil && res.StatusCode == http.StatusNotModified { 11120 if res.Body != nil { 11121 res.Body.Close() 11122 } 11123 return nil, gensupport.WrapError(&googleapi.Error{ 11124 Code: res.StatusCode, 11125 Header: res.Header, 11126 }) 11127 } 11128 if err != nil { 11129 return nil, err 11130 } 11131 defer googleapi.CloseBody(res) 11132 if err := googleapi.CheckResponse(res); err != nil { 11133 return nil, gensupport.WrapError(err) 11134 } 11135 ret := &JobCancelResponse{ 11136 ServerResponse: googleapi.ServerResponse{ 11137 Header: res.Header, 11138 HTTPStatusCode: res.StatusCode, 11139 }, 11140 } 11141 target := &ret 11142 if err := gensupport.DecodeResponse(target, res); err != nil { 11143 return nil, err 11144 } 11145 return ret, nil 11146 } 11147 11148 type JobsDeleteCall struct { 11149 s *Service 11150 projectId string 11151 jobId string 11152 urlParams_ gensupport.URLParams 11153 ctx_ context.Context 11154 header_ http.Header 11155 } 11156 11157 // Delete: Requests the deletion of the metadata of a job. This call returns 11158 // when the job's metadata is deleted. 11159 // 11160 // - jobId: Job ID of the job for which metadata is to be deleted. If this is a 11161 // parent job which has child jobs, the metadata from all child jobs will be 11162 // deleted as well. Direct deletion of the metadata of child jobs is not 11163 // allowed. 11164 // - projectId: Project ID of the job for which metadata is to be deleted. 11165 func (r *JobsService) Delete(projectId string, jobId string) *JobsDeleteCall { 11166 c := &JobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11167 c.projectId = projectId 11168 c.jobId = jobId 11169 return c 11170 } 11171 11172 // Location sets the optional parameter "location": The geographic location of 11173 // the job. Required. See details at: 11174 // https://cloud.google.com/bigquery/docs/locations#specifying_your_location. 11175 func (c *JobsDeleteCall) Location(location string) *JobsDeleteCall { 11176 c.urlParams_.Set("location", location) 11177 return c 11178 } 11179 11180 // Fields allows partial responses to be retrieved. See 11181 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11182 // details. 11183 func (c *JobsDeleteCall) Fields(s ...googleapi.Field) *JobsDeleteCall { 11184 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11185 return c 11186 } 11187 11188 // Context sets the context to be used in this call's Do method. 11189 func (c *JobsDeleteCall) Context(ctx context.Context) *JobsDeleteCall { 11190 c.ctx_ = ctx 11191 return c 11192 } 11193 11194 // Header returns a http.Header that can be modified by the caller to add 11195 // headers to the request. 11196 func (c *JobsDeleteCall) Header() http.Header { 11197 if c.header_ == nil { 11198 c.header_ = make(http.Header) 11199 } 11200 return c.header_ 11201 } 11202 11203 func (c *JobsDeleteCall) doRequest(alt string) (*http.Response, error) { 11204 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11205 var body io.Reader = nil 11206 c.urlParams_.Set("alt", alt) 11207 c.urlParams_.Set("prettyPrint", "false") 11208 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/jobs/{+jobId}/delete") 11209 urls += "?" + c.urlParams_.Encode() 11210 req, err := http.NewRequest("DELETE", urls, body) 11211 if err != nil { 11212 return nil, err 11213 } 11214 req.Header = reqHeaders 11215 googleapi.Expand(req.URL, map[string]string{ 11216 "projectId": c.projectId, 11217 "jobId": c.jobId, 11218 }) 11219 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11220 } 11221 11222 // Do executes the "bigquery.jobs.delete" call. 11223 func (c *JobsDeleteCall) Do(opts ...googleapi.CallOption) error { 11224 gensupport.SetOptions(c.urlParams_, opts...) 11225 res, err := c.doRequest("json") 11226 if err != nil { 11227 return err 11228 } 11229 defer googleapi.CloseBody(res) 11230 if err := googleapi.CheckResponse(res); err != nil { 11231 return gensupport.WrapError(err) 11232 } 11233 return nil 11234 } 11235 11236 type JobsGetCall struct { 11237 s *Service 11238 projectId string 11239 jobId string 11240 urlParams_ gensupport.URLParams 11241 ifNoneMatch_ string 11242 ctx_ context.Context 11243 header_ http.Header 11244 } 11245 11246 // Get: Returns information about a specific job. Job information is available 11247 // for a six month period after creation. Requires that you're the person who 11248 // ran the job, or have the Is Owner project role. 11249 // 11250 // - jobId: Job ID of the requested job. 11251 // - projectId: Project ID of the requested job. 11252 func (r *JobsService) Get(projectId string, jobId string) *JobsGetCall { 11253 c := &JobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11254 c.projectId = projectId 11255 c.jobId = jobId 11256 return c 11257 } 11258 11259 // Location sets the optional parameter "location": The geographic location of 11260 // the job. You must specify the location to run the job for the following 11261 // scenarios: - If the location to run a job is not in the `us` or the `eu` 11262 // multi-regional location - If the job's location is in a single region (for 11263 // example, `us-central1`) For more information, see 11264 // https://cloud.google.com/bigquery/docs/locations#specifying_your_location. 11265 func (c *JobsGetCall) Location(location string) *JobsGetCall { 11266 c.urlParams_.Set("location", location) 11267 return c 11268 } 11269 11270 // Fields allows partial responses to be retrieved. See 11271 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11272 // details. 11273 func (c *JobsGetCall) Fields(s ...googleapi.Field) *JobsGetCall { 11274 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11275 return c 11276 } 11277 11278 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11279 // object's ETag matches the given value. This is useful for getting updates 11280 // only after the object has changed since the last request. 11281 func (c *JobsGetCall) IfNoneMatch(entityTag string) *JobsGetCall { 11282 c.ifNoneMatch_ = entityTag 11283 return c 11284 } 11285 11286 // Context sets the context to be used in this call's Do method. 11287 func (c *JobsGetCall) Context(ctx context.Context) *JobsGetCall { 11288 c.ctx_ = ctx 11289 return c 11290 } 11291 11292 // Header returns a http.Header that can be modified by the caller to add 11293 // headers to the request. 11294 func (c *JobsGetCall) Header() http.Header { 11295 if c.header_ == nil { 11296 c.header_ = make(http.Header) 11297 } 11298 return c.header_ 11299 } 11300 11301 func (c *JobsGetCall) doRequest(alt string) (*http.Response, error) { 11302 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11303 if c.ifNoneMatch_ != "" { 11304 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11305 } 11306 var body io.Reader = nil 11307 c.urlParams_.Set("alt", alt) 11308 c.urlParams_.Set("prettyPrint", "false") 11309 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/jobs/{+jobId}") 11310 urls += "?" + c.urlParams_.Encode() 11311 req, err := http.NewRequest("GET", urls, body) 11312 if err != nil { 11313 return nil, err 11314 } 11315 req.Header = reqHeaders 11316 googleapi.Expand(req.URL, map[string]string{ 11317 "projectId": c.projectId, 11318 "jobId": c.jobId, 11319 }) 11320 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11321 } 11322 11323 // Do executes the "bigquery.jobs.get" call. 11324 // Any non-2xx status code is an error. Response headers are in either 11325 // *Job.ServerResponse.Header or (if a response was returned at all) in 11326 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11327 // whether the returned error was because http.StatusNotModified was returned. 11328 func (c *JobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { 11329 gensupport.SetOptions(c.urlParams_, opts...) 11330 res, err := c.doRequest("json") 11331 if res != nil && res.StatusCode == http.StatusNotModified { 11332 if res.Body != nil { 11333 res.Body.Close() 11334 } 11335 return nil, gensupport.WrapError(&googleapi.Error{ 11336 Code: res.StatusCode, 11337 Header: res.Header, 11338 }) 11339 } 11340 if err != nil { 11341 return nil, err 11342 } 11343 defer googleapi.CloseBody(res) 11344 if err := googleapi.CheckResponse(res); err != nil { 11345 return nil, gensupport.WrapError(err) 11346 } 11347 ret := &Job{ 11348 ServerResponse: googleapi.ServerResponse{ 11349 Header: res.Header, 11350 HTTPStatusCode: res.StatusCode, 11351 }, 11352 } 11353 target := &ret 11354 if err := gensupport.DecodeResponse(target, res); err != nil { 11355 return nil, err 11356 } 11357 return ret, nil 11358 } 11359 11360 type JobsGetQueryResultsCall struct { 11361 s *Service 11362 projectId string 11363 jobId string 11364 urlParams_ gensupport.URLParams 11365 ifNoneMatch_ string 11366 ctx_ context.Context 11367 header_ http.Header 11368 } 11369 11370 // GetQueryResults: RPC to get the results of a query job. 11371 // 11372 // - jobId: Job ID of the query job. 11373 // - projectId: Project ID of the query job. 11374 func (r *JobsService) GetQueryResults(projectId string, jobId string) *JobsGetQueryResultsCall { 11375 c := &JobsGetQueryResultsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11376 c.projectId = projectId 11377 c.jobId = jobId 11378 return c 11379 } 11380 11381 // FormatOptionsUseInt64Timestamp sets the optional parameter 11382 // "formatOptions.useInt64Timestamp": Output timestamp as usec int64. Default 11383 // is false. 11384 func (c *JobsGetQueryResultsCall) FormatOptionsUseInt64Timestamp(formatOptionsUseInt64Timestamp bool) *JobsGetQueryResultsCall { 11385 c.urlParams_.Set("formatOptions.useInt64Timestamp", fmt.Sprint(formatOptionsUseInt64Timestamp)) 11386 return c 11387 } 11388 11389 // Location sets the optional parameter "location": The geographic location of 11390 // the job. You must specify the location to run the job for the following 11391 // scenarios: - If the location to run a job is not in the `us` or the `eu` 11392 // multi-regional location - If the job's location is in a single region (for 11393 // example, `us-central1`) For more information, see 11394 // https://cloud.google.com/bigquery/docs/locations#specifying_your_location. 11395 func (c *JobsGetQueryResultsCall) Location(location string) *JobsGetQueryResultsCall { 11396 c.urlParams_.Set("location", location) 11397 return c 11398 } 11399 11400 // MaxResults sets the optional parameter "maxResults": Maximum number of 11401 // results to read. 11402 func (c *JobsGetQueryResultsCall) MaxResults(maxResults int64) *JobsGetQueryResultsCall { 11403 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 11404 return c 11405 } 11406 11407 // PageToken sets the optional parameter "pageToken": Page token, returned by a 11408 // previous call, to request the next page of results. 11409 func (c *JobsGetQueryResultsCall) PageToken(pageToken string) *JobsGetQueryResultsCall { 11410 c.urlParams_.Set("pageToken", pageToken) 11411 return c 11412 } 11413 11414 // StartIndex sets the optional parameter "startIndex": Zero-based index of the 11415 // starting row. 11416 func (c *JobsGetQueryResultsCall) StartIndex(startIndex uint64) *JobsGetQueryResultsCall { 11417 c.urlParams_.Set("startIndex", fmt.Sprint(startIndex)) 11418 return c 11419 } 11420 11421 // TimeoutMs sets the optional parameter "timeoutMs": Optional: Specifies the 11422 // maximum amount of time, in milliseconds, that the client is willing to wait 11423 // for the query to complete. By default, this limit is 10 seconds (10,000 11424 // milliseconds). If the query is complete, the jobComplete field in the 11425 // response is true. If the query has not yet completed, jobComplete is false. 11426 // You can request a longer timeout period in the timeoutMs field. However, the 11427 // call is not guaranteed to wait for the specified timeout; it typically 11428 // returns after around 200 seconds (200,000 milliseconds), even if the query 11429 // is not complete. If jobComplete is false, you can continue to wait for the 11430 // query to complete by calling the getQueryResults method until the 11431 // jobComplete field in the getQueryResults response is true. 11432 func (c *JobsGetQueryResultsCall) TimeoutMs(timeoutMs int64) *JobsGetQueryResultsCall { 11433 c.urlParams_.Set("timeoutMs", fmt.Sprint(timeoutMs)) 11434 return c 11435 } 11436 11437 // Fields allows partial responses to be retrieved. See 11438 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11439 // details. 11440 func (c *JobsGetQueryResultsCall) Fields(s ...googleapi.Field) *JobsGetQueryResultsCall { 11441 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11442 return c 11443 } 11444 11445 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11446 // object's ETag matches the given value. This is useful for getting updates 11447 // only after the object has changed since the last request. 11448 func (c *JobsGetQueryResultsCall) IfNoneMatch(entityTag string) *JobsGetQueryResultsCall { 11449 c.ifNoneMatch_ = entityTag 11450 return c 11451 } 11452 11453 // Context sets the context to be used in this call's Do method. 11454 func (c *JobsGetQueryResultsCall) Context(ctx context.Context) *JobsGetQueryResultsCall { 11455 c.ctx_ = ctx 11456 return c 11457 } 11458 11459 // Header returns a http.Header that can be modified by the caller to add 11460 // headers to the request. 11461 func (c *JobsGetQueryResultsCall) Header() http.Header { 11462 if c.header_ == nil { 11463 c.header_ = make(http.Header) 11464 } 11465 return c.header_ 11466 } 11467 11468 func (c *JobsGetQueryResultsCall) doRequest(alt string) (*http.Response, error) { 11469 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11470 if c.ifNoneMatch_ != "" { 11471 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11472 } 11473 var body io.Reader = nil 11474 c.urlParams_.Set("alt", alt) 11475 c.urlParams_.Set("prettyPrint", "false") 11476 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/queries/{+jobId}") 11477 urls += "?" + c.urlParams_.Encode() 11478 req, err := http.NewRequest("GET", urls, body) 11479 if err != nil { 11480 return nil, err 11481 } 11482 req.Header = reqHeaders 11483 googleapi.Expand(req.URL, map[string]string{ 11484 "projectId": c.projectId, 11485 "jobId": c.jobId, 11486 }) 11487 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11488 } 11489 11490 // Do executes the "bigquery.jobs.getQueryResults" call. 11491 // Any non-2xx status code is an error. Response headers are in either 11492 // *GetQueryResultsResponse.ServerResponse.Header or (if a response was 11493 // returned at all) in error.(*googleapi.Error).Header. Use 11494 // googleapi.IsNotModified to check whether the returned error was because 11495 // http.StatusNotModified was returned. 11496 func (c *JobsGetQueryResultsCall) Do(opts ...googleapi.CallOption) (*GetQueryResultsResponse, error) { 11497 gensupport.SetOptions(c.urlParams_, opts...) 11498 res, err := c.doRequest("json") 11499 if res != nil && res.StatusCode == http.StatusNotModified { 11500 if res.Body != nil { 11501 res.Body.Close() 11502 } 11503 return nil, gensupport.WrapError(&googleapi.Error{ 11504 Code: res.StatusCode, 11505 Header: res.Header, 11506 }) 11507 } 11508 if err != nil { 11509 return nil, err 11510 } 11511 defer googleapi.CloseBody(res) 11512 if err := googleapi.CheckResponse(res); err != nil { 11513 return nil, gensupport.WrapError(err) 11514 } 11515 ret := &GetQueryResultsResponse{ 11516 ServerResponse: googleapi.ServerResponse{ 11517 Header: res.Header, 11518 HTTPStatusCode: res.StatusCode, 11519 }, 11520 } 11521 target := &ret 11522 if err := gensupport.DecodeResponse(target, res); err != nil { 11523 return nil, err 11524 } 11525 return ret, nil 11526 } 11527 11528 // Pages invokes f for each page of results. 11529 // A non-nil error returned from f will halt the iteration. 11530 // The provided context supersedes any context provided to the Context method. 11531 func (c *JobsGetQueryResultsCall) Pages(ctx context.Context, f func(*GetQueryResultsResponse) error) error { 11532 c.ctx_ = ctx 11533 defer c.PageToken(c.urlParams_.Get("pageToken")) 11534 for { 11535 x, err := c.Do() 11536 if err != nil { 11537 return err 11538 } 11539 if err := f(x); err != nil { 11540 return err 11541 } 11542 if x.PageToken == "" { 11543 return nil 11544 } 11545 c.PageToken(x.PageToken) 11546 } 11547 } 11548 11549 type JobsInsertCall struct { 11550 s *Service 11551 projectId string 11552 job *Job 11553 urlParams_ gensupport.URLParams 11554 mediaInfo_ *gensupport.MediaInfo 11555 ctx_ context.Context 11556 header_ http.Header 11557 } 11558 11559 // Insert: Starts a new asynchronous job. This API has two different kinds of 11560 // endpoint URIs, as this method supports a variety of use cases. * The 11561 // *Metadata* URI is used for most interactions, as it accepts the job 11562 // configuration directly. * The *Upload* URI is ONLY for the case when you're 11563 // sending both a load job configuration and a data stream together. In this 11564 // case, the Upload URI accepts the job configuration and the data as two 11565 // distinct multipart MIME parts. 11566 // 11567 // - projectId: Project ID of project that will be billed for the job. 11568 func (r *JobsService) Insert(projectId string, job *Job) *JobsInsertCall { 11569 c := &JobsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11570 c.projectId = projectId 11571 c.job = job 11572 return c 11573 } 11574 11575 // Media specifies the media to upload in one or more chunks. The chunk size 11576 // may be controlled by supplying a MediaOption generated by 11577 // googleapi.ChunkSize. The chunk size defaults to 11578 // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload 11579 // request will be determined by sniffing the contents of r, unless a 11580 // MediaOption generated by googleapi.ContentType is supplied. 11581 // At most one of Media and ResumableMedia may be set. 11582 func (c *JobsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *JobsInsertCall { 11583 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) 11584 return c 11585 } 11586 11587 // ResumableMedia specifies the media to upload in chunks and can be canceled 11588 // with ctx. 11589 // 11590 // Deprecated: use Media instead. 11591 // 11592 // At most one of Media and ResumableMedia may be set. mediaType identifies the 11593 // MIME media type of the upload, such as "image/png". If mediaType is "", it 11594 // will be auto-detected. The provided ctx will supersede any context 11595 // previously provided to the Context method. 11596 func (c *JobsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *JobsInsertCall { 11597 c.ctx_ = ctx 11598 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) 11599 return c 11600 } 11601 11602 // ProgressUpdater provides a callback function that will be called after every 11603 // chunk. It should be a low-latency function in order to not slow down the 11604 // upload operation. This should only be called when using ResumableMedia (as 11605 // opposed to Media). 11606 func (c *JobsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *JobsInsertCall { 11607 c.mediaInfo_.SetProgressUpdater(pu) 11608 return c 11609 } 11610 11611 // Fields allows partial responses to be retrieved. See 11612 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11613 // details. 11614 func (c *JobsInsertCall) Fields(s ...googleapi.Field) *JobsInsertCall { 11615 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11616 return c 11617 } 11618 11619 // Context sets the context to be used in this call's Do method. 11620 // This context will supersede any context previously provided to the 11621 // ResumableMedia method. 11622 func (c *JobsInsertCall) Context(ctx context.Context) *JobsInsertCall { 11623 c.ctx_ = ctx 11624 return c 11625 } 11626 11627 // Header returns a http.Header that can be modified by the caller to add 11628 // headers to the request. 11629 func (c *JobsInsertCall) Header() http.Header { 11630 if c.header_ == nil { 11631 c.header_ = make(http.Header) 11632 } 11633 return c.header_ 11634 } 11635 11636 func (c *JobsInsertCall) doRequest(alt string) (*http.Response, error) { 11637 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11638 var body io.Reader = nil 11639 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 11640 if err != nil { 11641 return nil, err 11642 } 11643 c.urlParams_.Set("alt", alt) 11644 c.urlParams_.Set("prettyPrint", "false") 11645 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/jobs") 11646 if c.mediaInfo_ != nil { 11647 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/bigquery/v2/projects/{+projectId}/jobs") 11648 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) 11649 } 11650 if body == nil { 11651 body = new(bytes.Buffer) 11652 reqHeaders.Set("Content-Type", "application/json") 11653 } 11654 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) 11655 defer cleanup() 11656 urls += "?" + c.urlParams_.Encode() 11657 req, err := http.NewRequest("POST", urls, body) 11658 if err != nil { 11659 return nil, err 11660 } 11661 req.Header = reqHeaders 11662 req.GetBody = getBody 11663 googleapi.Expand(req.URL, map[string]string{ 11664 "projectId": c.projectId, 11665 }) 11666 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11667 } 11668 11669 // Do executes the "bigquery.jobs.insert" call. 11670 // Any non-2xx status code is an error. Response headers are in either 11671 // *Job.ServerResponse.Header or (if a response was returned at all) in 11672 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11673 // whether the returned error was because http.StatusNotModified was returned. 11674 func (c *JobsInsertCall) Do(opts ...googleapi.CallOption) (*Job, error) { 11675 gensupport.SetOptions(c.urlParams_, opts...) 11676 res, err := c.doRequest("json") 11677 if res != nil && res.StatusCode == http.StatusNotModified { 11678 if res.Body != nil { 11679 res.Body.Close() 11680 } 11681 return nil, gensupport.WrapError(&googleapi.Error{ 11682 Code: res.StatusCode, 11683 Header: res.Header, 11684 }) 11685 } 11686 if err != nil { 11687 return nil, err 11688 } 11689 defer googleapi.CloseBody(res) 11690 if err := googleapi.CheckResponse(res); err != nil { 11691 return nil, gensupport.WrapError(err) 11692 } 11693 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) 11694 if rx != nil { 11695 rx.Client = c.s.client 11696 rx.UserAgent = c.s.userAgent() 11697 ctx := c.ctx_ 11698 if ctx == nil { 11699 ctx = context.TODO() 11700 } 11701 res, err = rx.Upload(ctx) 11702 if err != nil { 11703 return nil, err 11704 } 11705 defer res.Body.Close() 11706 if err := googleapi.CheckResponse(res); err != nil { 11707 return nil, gensupport.WrapError(err) 11708 } 11709 } 11710 ret := &Job{ 11711 ServerResponse: googleapi.ServerResponse{ 11712 Header: res.Header, 11713 HTTPStatusCode: res.StatusCode, 11714 }, 11715 } 11716 target := &ret 11717 if err := gensupport.DecodeResponse(target, res); err != nil { 11718 return nil, err 11719 } 11720 return ret, nil 11721 } 11722 11723 type JobsListCall struct { 11724 s *Service 11725 projectId string 11726 urlParams_ gensupport.URLParams 11727 ifNoneMatch_ string 11728 ctx_ context.Context 11729 header_ http.Header 11730 } 11731 11732 // List: Lists all jobs that you started in the specified project. Job 11733 // information is available for a six month period after creation. The job list 11734 // is sorted in reverse chronological order, by job creation time. Requires the 11735 // Can View project role, or the Is Owner project role if you set the allUsers 11736 // property. 11737 // 11738 // - projectId: Project ID of the jobs to list. 11739 func (r *JobsService) List(projectId string) *JobsListCall { 11740 c := &JobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11741 c.projectId = projectId 11742 return c 11743 } 11744 11745 // AllUsers sets the optional parameter "allUsers": Whether to display jobs 11746 // owned by all users in the project. Default False. 11747 func (c *JobsListCall) AllUsers(allUsers bool) *JobsListCall { 11748 c.urlParams_.Set("allUsers", fmt.Sprint(allUsers)) 11749 return c 11750 } 11751 11752 // MaxCreationTime sets the optional parameter "maxCreationTime": Max value for 11753 // job creation time, in milliseconds since the POSIX epoch. If set, only jobs 11754 // created before or at this timestamp are returned. 11755 func (c *JobsListCall) MaxCreationTime(maxCreationTime uint64) *JobsListCall { 11756 c.urlParams_.Set("maxCreationTime", fmt.Sprint(maxCreationTime)) 11757 return c 11758 } 11759 11760 // MaxResults sets the optional parameter "maxResults": The maximum number of 11761 // results to return in a single response page. Leverage the page tokens to 11762 // iterate through the entire collection. 11763 func (c *JobsListCall) MaxResults(maxResults int64) *JobsListCall { 11764 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 11765 return c 11766 } 11767 11768 // MinCreationTime sets the optional parameter "minCreationTime": Min value for 11769 // job creation time, in milliseconds since the POSIX epoch. If set, only jobs 11770 // created after or at this timestamp are returned. 11771 func (c *JobsListCall) MinCreationTime(minCreationTime uint64) *JobsListCall { 11772 c.urlParams_.Set("minCreationTime", fmt.Sprint(minCreationTime)) 11773 return c 11774 } 11775 11776 // PageToken sets the optional parameter "pageToken": Page token, returned by a 11777 // previous call, to request the next page of results. 11778 func (c *JobsListCall) PageToken(pageToken string) *JobsListCall { 11779 c.urlParams_.Set("pageToken", pageToken) 11780 return c 11781 } 11782 11783 // ParentJobId sets the optional parameter "parentJobId": If set, show only 11784 // child jobs of the specified parent. Otherwise, show all top-level jobs. 11785 func (c *JobsListCall) ParentJobId(parentJobId string) *JobsListCall { 11786 c.urlParams_.Set("parentJobId", parentJobId) 11787 return c 11788 } 11789 11790 // Projection sets the optional parameter "projection": Restrict information 11791 // returned to a set of selected fields 11792 // 11793 // Possible values: 11794 // 11795 // "full" - Includes all job data 11796 // "minimal" - Does not include the job configuration 11797 func (c *JobsListCall) Projection(projection string) *JobsListCall { 11798 c.urlParams_.Set("projection", projection) 11799 return c 11800 } 11801 11802 // StateFilter sets the optional parameter "stateFilter": Filter for job state 11803 // 11804 // Possible values: 11805 // 11806 // "done" - Finished jobs 11807 // "pending" - Pending jobs 11808 // "running" - Running jobs 11809 func (c *JobsListCall) StateFilter(stateFilter ...string) *JobsListCall { 11810 c.urlParams_.SetMulti("stateFilter", append([]string{}, stateFilter...)) 11811 return c 11812 } 11813 11814 // Fields allows partial responses to be retrieved. See 11815 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11816 // details. 11817 func (c *JobsListCall) Fields(s ...googleapi.Field) *JobsListCall { 11818 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11819 return c 11820 } 11821 11822 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11823 // object's ETag matches the given value. This is useful for getting updates 11824 // only after the object has changed since the last request. 11825 func (c *JobsListCall) IfNoneMatch(entityTag string) *JobsListCall { 11826 c.ifNoneMatch_ = entityTag 11827 return c 11828 } 11829 11830 // Context sets the context to be used in this call's Do method. 11831 func (c *JobsListCall) Context(ctx context.Context) *JobsListCall { 11832 c.ctx_ = ctx 11833 return c 11834 } 11835 11836 // Header returns a http.Header that can be modified by the caller to add 11837 // headers to the request. 11838 func (c *JobsListCall) Header() http.Header { 11839 if c.header_ == nil { 11840 c.header_ = make(http.Header) 11841 } 11842 return c.header_ 11843 } 11844 11845 func (c *JobsListCall) doRequest(alt string) (*http.Response, error) { 11846 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11847 if c.ifNoneMatch_ != "" { 11848 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11849 } 11850 var body io.Reader = nil 11851 c.urlParams_.Set("alt", alt) 11852 c.urlParams_.Set("prettyPrint", "false") 11853 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/jobs") 11854 urls += "?" + c.urlParams_.Encode() 11855 req, err := http.NewRequest("GET", urls, body) 11856 if err != nil { 11857 return nil, err 11858 } 11859 req.Header = reqHeaders 11860 googleapi.Expand(req.URL, map[string]string{ 11861 "projectId": c.projectId, 11862 }) 11863 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11864 } 11865 11866 // Do executes the "bigquery.jobs.list" call. 11867 // Any non-2xx status code is an error. Response headers are in either 11868 // *JobList.ServerResponse.Header or (if a response was returned at all) in 11869 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11870 // whether the returned error was because http.StatusNotModified was returned. 11871 func (c *JobsListCall) Do(opts ...googleapi.CallOption) (*JobList, error) { 11872 gensupport.SetOptions(c.urlParams_, opts...) 11873 res, err := c.doRequest("json") 11874 if res != nil && res.StatusCode == http.StatusNotModified { 11875 if res.Body != nil { 11876 res.Body.Close() 11877 } 11878 return nil, gensupport.WrapError(&googleapi.Error{ 11879 Code: res.StatusCode, 11880 Header: res.Header, 11881 }) 11882 } 11883 if err != nil { 11884 return nil, err 11885 } 11886 defer googleapi.CloseBody(res) 11887 if err := googleapi.CheckResponse(res); err != nil { 11888 return nil, gensupport.WrapError(err) 11889 } 11890 ret := &JobList{ 11891 ServerResponse: googleapi.ServerResponse{ 11892 Header: res.Header, 11893 HTTPStatusCode: res.StatusCode, 11894 }, 11895 } 11896 target := &ret 11897 if err := gensupport.DecodeResponse(target, res); err != nil { 11898 return nil, err 11899 } 11900 return ret, nil 11901 } 11902 11903 // Pages invokes f for each page of results. 11904 // A non-nil error returned from f will halt the iteration. 11905 // The provided context supersedes any context provided to the Context method. 11906 func (c *JobsListCall) Pages(ctx context.Context, f func(*JobList) error) error { 11907 c.ctx_ = ctx 11908 defer c.PageToken(c.urlParams_.Get("pageToken")) 11909 for { 11910 x, err := c.Do() 11911 if err != nil { 11912 return err 11913 } 11914 if err := f(x); err != nil { 11915 return err 11916 } 11917 if x.NextPageToken == "" { 11918 return nil 11919 } 11920 c.PageToken(x.NextPageToken) 11921 } 11922 } 11923 11924 type JobsQueryCall struct { 11925 s *Service 11926 projectId string 11927 queryrequest *QueryRequest 11928 urlParams_ gensupport.URLParams 11929 ctx_ context.Context 11930 header_ http.Header 11931 } 11932 11933 // Query: Runs a BigQuery SQL query synchronously and returns query results if 11934 // the query completes within a specified timeout. 11935 // 11936 // - projectId: Project ID of the query request. 11937 func (r *JobsService) Query(projectId string, queryrequest *QueryRequest) *JobsQueryCall { 11938 c := &JobsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11939 c.projectId = projectId 11940 c.queryrequest = queryrequest 11941 return c 11942 } 11943 11944 // Fields allows partial responses to be retrieved. See 11945 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11946 // details. 11947 func (c *JobsQueryCall) Fields(s ...googleapi.Field) *JobsQueryCall { 11948 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11949 return c 11950 } 11951 11952 // Context sets the context to be used in this call's Do method. 11953 func (c *JobsQueryCall) Context(ctx context.Context) *JobsQueryCall { 11954 c.ctx_ = ctx 11955 return c 11956 } 11957 11958 // Header returns a http.Header that can be modified by the caller to add 11959 // headers to the request. 11960 func (c *JobsQueryCall) Header() http.Header { 11961 if c.header_ == nil { 11962 c.header_ = make(http.Header) 11963 } 11964 return c.header_ 11965 } 11966 11967 func (c *JobsQueryCall) doRequest(alt string) (*http.Response, error) { 11968 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11969 var body io.Reader = nil 11970 body, err := googleapi.WithoutDataWrapper.JSONReader(c.queryrequest) 11971 if err != nil { 11972 return nil, err 11973 } 11974 c.urlParams_.Set("alt", alt) 11975 c.urlParams_.Set("prettyPrint", "false") 11976 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/queries") 11977 urls += "?" + c.urlParams_.Encode() 11978 req, err := http.NewRequest("POST", urls, body) 11979 if err != nil { 11980 return nil, err 11981 } 11982 req.Header = reqHeaders 11983 googleapi.Expand(req.URL, map[string]string{ 11984 "projectId": c.projectId, 11985 }) 11986 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11987 } 11988 11989 // Do executes the "bigquery.jobs.query" call. 11990 // Any non-2xx status code is an error. Response headers are in either 11991 // *QueryResponse.ServerResponse.Header or (if a response was returned at all) 11992 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11993 // whether the returned error was because http.StatusNotModified was returned. 11994 func (c *JobsQueryCall) Do(opts ...googleapi.CallOption) (*QueryResponse, error) { 11995 gensupport.SetOptions(c.urlParams_, opts...) 11996 res, err := c.doRequest("json") 11997 if res != nil && res.StatusCode == http.StatusNotModified { 11998 if res.Body != nil { 11999 res.Body.Close() 12000 } 12001 return nil, gensupport.WrapError(&googleapi.Error{ 12002 Code: res.StatusCode, 12003 Header: res.Header, 12004 }) 12005 } 12006 if err != nil { 12007 return nil, err 12008 } 12009 defer googleapi.CloseBody(res) 12010 if err := googleapi.CheckResponse(res); err != nil { 12011 return nil, gensupport.WrapError(err) 12012 } 12013 ret := &QueryResponse{ 12014 ServerResponse: googleapi.ServerResponse{ 12015 Header: res.Header, 12016 HTTPStatusCode: res.StatusCode, 12017 }, 12018 } 12019 target := &ret 12020 if err := gensupport.DecodeResponse(target, res); err != nil { 12021 return nil, err 12022 } 12023 return ret, nil 12024 } 12025 12026 type ModelsDeleteCall struct { 12027 s *Service 12028 projectId string 12029 datasetId string 12030 modelId string 12031 urlParams_ gensupport.URLParams 12032 ctx_ context.Context 12033 header_ http.Header 12034 } 12035 12036 // Delete: Deletes the model specified by modelId from the dataset. 12037 // 12038 // - datasetId: Dataset ID of the model to delete. 12039 // - modelId: Model ID of the model to delete. 12040 // - projectId: Project ID of the model to delete. 12041 func (r *ModelsService) Delete(projectId string, datasetId string, modelId string) *ModelsDeleteCall { 12042 c := &ModelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12043 c.projectId = projectId 12044 c.datasetId = datasetId 12045 c.modelId = modelId 12046 return c 12047 } 12048 12049 // Fields allows partial responses to be retrieved. See 12050 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12051 // details. 12052 func (c *ModelsDeleteCall) Fields(s ...googleapi.Field) *ModelsDeleteCall { 12053 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12054 return c 12055 } 12056 12057 // Context sets the context to be used in this call's Do method. 12058 func (c *ModelsDeleteCall) Context(ctx context.Context) *ModelsDeleteCall { 12059 c.ctx_ = ctx 12060 return c 12061 } 12062 12063 // Header returns a http.Header that can be modified by the caller to add 12064 // headers to the request. 12065 func (c *ModelsDeleteCall) Header() http.Header { 12066 if c.header_ == nil { 12067 c.header_ = make(http.Header) 12068 } 12069 return c.header_ 12070 } 12071 12072 func (c *ModelsDeleteCall) doRequest(alt string) (*http.Response, error) { 12073 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12074 var body io.Reader = nil 12075 c.urlParams_.Set("alt", alt) 12076 c.urlParams_.Set("prettyPrint", "false") 12077 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}") 12078 urls += "?" + c.urlParams_.Encode() 12079 req, err := http.NewRequest("DELETE", urls, body) 12080 if err != nil { 12081 return nil, err 12082 } 12083 req.Header = reqHeaders 12084 googleapi.Expand(req.URL, map[string]string{ 12085 "projectId": c.projectId, 12086 "datasetId": c.datasetId, 12087 "modelId": c.modelId, 12088 }) 12089 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12090 } 12091 12092 // Do executes the "bigquery.models.delete" call. 12093 func (c *ModelsDeleteCall) Do(opts ...googleapi.CallOption) error { 12094 gensupport.SetOptions(c.urlParams_, opts...) 12095 res, err := c.doRequest("json") 12096 if err != nil { 12097 return err 12098 } 12099 defer googleapi.CloseBody(res) 12100 if err := googleapi.CheckResponse(res); err != nil { 12101 return gensupport.WrapError(err) 12102 } 12103 return nil 12104 } 12105 12106 type ModelsGetCall struct { 12107 s *Service 12108 projectId string 12109 datasetId string 12110 modelId string 12111 urlParams_ gensupport.URLParams 12112 ifNoneMatch_ string 12113 ctx_ context.Context 12114 header_ http.Header 12115 } 12116 12117 // Get: Gets the specified model resource by model ID. 12118 // 12119 // - datasetId: Dataset ID of the requested model. 12120 // - modelId: Model ID of the requested model. 12121 // - projectId: Project ID of the requested model. 12122 func (r *ModelsService) Get(projectId string, datasetId string, modelId string) *ModelsGetCall { 12123 c := &ModelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12124 c.projectId = projectId 12125 c.datasetId = datasetId 12126 c.modelId = modelId 12127 return c 12128 } 12129 12130 // Fields allows partial responses to be retrieved. See 12131 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12132 // details. 12133 func (c *ModelsGetCall) Fields(s ...googleapi.Field) *ModelsGetCall { 12134 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12135 return c 12136 } 12137 12138 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12139 // object's ETag matches the given value. This is useful for getting updates 12140 // only after the object has changed since the last request. 12141 func (c *ModelsGetCall) IfNoneMatch(entityTag string) *ModelsGetCall { 12142 c.ifNoneMatch_ = entityTag 12143 return c 12144 } 12145 12146 // Context sets the context to be used in this call's Do method. 12147 func (c *ModelsGetCall) Context(ctx context.Context) *ModelsGetCall { 12148 c.ctx_ = ctx 12149 return c 12150 } 12151 12152 // Header returns a http.Header that can be modified by the caller to add 12153 // headers to the request. 12154 func (c *ModelsGetCall) Header() http.Header { 12155 if c.header_ == nil { 12156 c.header_ = make(http.Header) 12157 } 12158 return c.header_ 12159 } 12160 12161 func (c *ModelsGetCall) doRequest(alt string) (*http.Response, error) { 12162 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12163 if c.ifNoneMatch_ != "" { 12164 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12165 } 12166 var body io.Reader = nil 12167 c.urlParams_.Set("alt", alt) 12168 c.urlParams_.Set("prettyPrint", "false") 12169 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}") 12170 urls += "?" + c.urlParams_.Encode() 12171 req, err := http.NewRequest("GET", urls, body) 12172 if err != nil { 12173 return nil, err 12174 } 12175 req.Header = reqHeaders 12176 googleapi.Expand(req.URL, map[string]string{ 12177 "projectId": c.projectId, 12178 "datasetId": c.datasetId, 12179 "modelId": c.modelId, 12180 }) 12181 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12182 } 12183 12184 // Do executes the "bigquery.models.get" call. 12185 // Any non-2xx status code is an error. Response headers are in either 12186 // *Model.ServerResponse.Header or (if a response was returned at all) in 12187 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12188 // whether the returned error was because http.StatusNotModified was returned. 12189 func (c *ModelsGetCall) Do(opts ...googleapi.CallOption) (*Model, error) { 12190 gensupport.SetOptions(c.urlParams_, opts...) 12191 res, err := c.doRequest("json") 12192 if res != nil && res.StatusCode == http.StatusNotModified { 12193 if res.Body != nil { 12194 res.Body.Close() 12195 } 12196 return nil, gensupport.WrapError(&googleapi.Error{ 12197 Code: res.StatusCode, 12198 Header: res.Header, 12199 }) 12200 } 12201 if err != nil { 12202 return nil, err 12203 } 12204 defer googleapi.CloseBody(res) 12205 if err := googleapi.CheckResponse(res); err != nil { 12206 return nil, gensupport.WrapError(err) 12207 } 12208 ret := &Model{ 12209 ServerResponse: googleapi.ServerResponse{ 12210 Header: res.Header, 12211 HTTPStatusCode: res.StatusCode, 12212 }, 12213 } 12214 target := &ret 12215 if err := gensupport.DecodeResponse(target, res); err != nil { 12216 return nil, err 12217 } 12218 return ret, nil 12219 } 12220 12221 type ModelsListCall struct { 12222 s *Service 12223 projectId string 12224 datasetId string 12225 urlParams_ gensupport.URLParams 12226 ifNoneMatch_ string 12227 ctx_ context.Context 12228 header_ http.Header 12229 } 12230 12231 // List: Lists all models in the specified dataset. Requires the READER dataset 12232 // role. After retrieving the list of models, you can get information about a 12233 // particular model by calling the models.get method. 12234 // 12235 // - datasetId: Dataset ID of the models to list. 12236 // - projectId: Project ID of the models to list. 12237 func (r *ModelsService) List(projectId string, datasetId string) *ModelsListCall { 12238 c := &ModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12239 c.projectId = projectId 12240 c.datasetId = datasetId 12241 return c 12242 } 12243 12244 // MaxResults sets the optional parameter "maxResults": The maximum number of 12245 // results to return in a single response page. Leverage the page tokens to 12246 // iterate through the entire collection. 12247 func (c *ModelsListCall) MaxResults(maxResults int64) *ModelsListCall { 12248 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 12249 return c 12250 } 12251 12252 // PageToken sets the optional parameter "pageToken": Page token, returned by a 12253 // previous call to request the next page of results 12254 func (c *ModelsListCall) PageToken(pageToken string) *ModelsListCall { 12255 c.urlParams_.Set("pageToken", pageToken) 12256 return c 12257 } 12258 12259 // Fields allows partial responses to be retrieved. See 12260 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12261 // details. 12262 func (c *ModelsListCall) Fields(s ...googleapi.Field) *ModelsListCall { 12263 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12264 return c 12265 } 12266 12267 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12268 // object's ETag matches the given value. This is useful for getting updates 12269 // only after the object has changed since the last request. 12270 func (c *ModelsListCall) IfNoneMatch(entityTag string) *ModelsListCall { 12271 c.ifNoneMatch_ = entityTag 12272 return c 12273 } 12274 12275 // Context sets the context to be used in this call's Do method. 12276 func (c *ModelsListCall) Context(ctx context.Context) *ModelsListCall { 12277 c.ctx_ = ctx 12278 return c 12279 } 12280 12281 // Header returns a http.Header that can be modified by the caller to add 12282 // headers to the request. 12283 func (c *ModelsListCall) Header() http.Header { 12284 if c.header_ == nil { 12285 c.header_ = make(http.Header) 12286 } 12287 return c.header_ 12288 } 12289 12290 func (c *ModelsListCall) doRequest(alt string) (*http.Response, error) { 12291 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12292 if c.ifNoneMatch_ != "" { 12293 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12294 } 12295 var body io.Reader = nil 12296 c.urlParams_.Set("alt", alt) 12297 c.urlParams_.Set("prettyPrint", "false") 12298 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/models") 12299 urls += "?" + c.urlParams_.Encode() 12300 req, err := http.NewRequest("GET", urls, body) 12301 if err != nil { 12302 return nil, err 12303 } 12304 req.Header = reqHeaders 12305 googleapi.Expand(req.URL, map[string]string{ 12306 "projectId": c.projectId, 12307 "datasetId": c.datasetId, 12308 }) 12309 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12310 } 12311 12312 // Do executes the "bigquery.models.list" call. 12313 // Any non-2xx status code is an error. Response headers are in either 12314 // *ListModelsResponse.ServerResponse.Header or (if a response was returned at 12315 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12316 // check whether the returned error was because http.StatusNotModified was 12317 // returned. 12318 func (c *ModelsListCall) Do(opts ...googleapi.CallOption) (*ListModelsResponse, error) { 12319 gensupport.SetOptions(c.urlParams_, opts...) 12320 res, err := c.doRequest("json") 12321 if res != nil && res.StatusCode == http.StatusNotModified { 12322 if res.Body != nil { 12323 res.Body.Close() 12324 } 12325 return nil, gensupport.WrapError(&googleapi.Error{ 12326 Code: res.StatusCode, 12327 Header: res.Header, 12328 }) 12329 } 12330 if err != nil { 12331 return nil, err 12332 } 12333 defer googleapi.CloseBody(res) 12334 if err := googleapi.CheckResponse(res); err != nil { 12335 return nil, gensupport.WrapError(err) 12336 } 12337 ret := &ListModelsResponse{ 12338 ServerResponse: googleapi.ServerResponse{ 12339 Header: res.Header, 12340 HTTPStatusCode: res.StatusCode, 12341 }, 12342 } 12343 target := &ret 12344 if err := gensupport.DecodeResponse(target, res); err != nil { 12345 return nil, err 12346 } 12347 return ret, nil 12348 } 12349 12350 // Pages invokes f for each page of results. 12351 // A non-nil error returned from f will halt the iteration. 12352 // The provided context supersedes any context provided to the Context method. 12353 func (c *ModelsListCall) Pages(ctx context.Context, f func(*ListModelsResponse) error) error { 12354 c.ctx_ = ctx 12355 defer c.PageToken(c.urlParams_.Get("pageToken")) 12356 for { 12357 x, err := c.Do() 12358 if err != nil { 12359 return err 12360 } 12361 if err := f(x); err != nil { 12362 return err 12363 } 12364 if x.NextPageToken == "" { 12365 return nil 12366 } 12367 c.PageToken(x.NextPageToken) 12368 } 12369 } 12370 12371 type ModelsPatchCall struct { 12372 s *Service 12373 projectId string 12374 datasetId string 12375 modelId string 12376 model *Model 12377 urlParams_ gensupport.URLParams 12378 ctx_ context.Context 12379 header_ http.Header 12380 } 12381 12382 // Patch: Patch specific fields in the specified model. 12383 // 12384 // - datasetId: Dataset ID of the model to patch. 12385 // - modelId: Model ID of the model to patch. 12386 // - projectId: Project ID of the model to patch. 12387 func (r *ModelsService) Patch(projectId string, datasetId string, modelId string, model *Model) *ModelsPatchCall { 12388 c := &ModelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12389 c.projectId = projectId 12390 c.datasetId = datasetId 12391 c.modelId = modelId 12392 c.model = model 12393 return c 12394 } 12395 12396 // Fields allows partial responses to be retrieved. See 12397 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12398 // details. 12399 func (c *ModelsPatchCall) Fields(s ...googleapi.Field) *ModelsPatchCall { 12400 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12401 return c 12402 } 12403 12404 // Context sets the context to be used in this call's Do method. 12405 func (c *ModelsPatchCall) Context(ctx context.Context) *ModelsPatchCall { 12406 c.ctx_ = ctx 12407 return c 12408 } 12409 12410 // Header returns a http.Header that can be modified by the caller to add 12411 // headers to the request. 12412 func (c *ModelsPatchCall) Header() http.Header { 12413 if c.header_ == nil { 12414 c.header_ = make(http.Header) 12415 } 12416 return c.header_ 12417 } 12418 12419 func (c *ModelsPatchCall) doRequest(alt string) (*http.Response, error) { 12420 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12421 var body io.Reader = nil 12422 body, err := googleapi.WithoutDataWrapper.JSONReader(c.model) 12423 if err != nil { 12424 return nil, err 12425 } 12426 c.urlParams_.Set("alt", alt) 12427 c.urlParams_.Set("prettyPrint", "false") 12428 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}") 12429 urls += "?" + c.urlParams_.Encode() 12430 req, err := http.NewRequest("PATCH", urls, body) 12431 if err != nil { 12432 return nil, err 12433 } 12434 req.Header = reqHeaders 12435 googleapi.Expand(req.URL, map[string]string{ 12436 "projectId": c.projectId, 12437 "datasetId": c.datasetId, 12438 "modelId": c.modelId, 12439 }) 12440 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12441 } 12442 12443 // Do executes the "bigquery.models.patch" call. 12444 // Any non-2xx status code is an error. Response headers are in either 12445 // *Model.ServerResponse.Header or (if a response was returned at all) in 12446 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12447 // whether the returned error was because http.StatusNotModified was returned. 12448 func (c *ModelsPatchCall) Do(opts ...googleapi.CallOption) (*Model, error) { 12449 gensupport.SetOptions(c.urlParams_, opts...) 12450 res, err := c.doRequest("json") 12451 if res != nil && res.StatusCode == http.StatusNotModified { 12452 if res.Body != nil { 12453 res.Body.Close() 12454 } 12455 return nil, gensupport.WrapError(&googleapi.Error{ 12456 Code: res.StatusCode, 12457 Header: res.Header, 12458 }) 12459 } 12460 if err != nil { 12461 return nil, err 12462 } 12463 defer googleapi.CloseBody(res) 12464 if err := googleapi.CheckResponse(res); err != nil { 12465 return nil, gensupport.WrapError(err) 12466 } 12467 ret := &Model{ 12468 ServerResponse: googleapi.ServerResponse{ 12469 Header: res.Header, 12470 HTTPStatusCode: res.StatusCode, 12471 }, 12472 } 12473 target := &ret 12474 if err := gensupport.DecodeResponse(target, res); err != nil { 12475 return nil, err 12476 } 12477 return ret, nil 12478 } 12479 12480 type ProjectsGetServiceAccountCall struct { 12481 s *Service 12482 projectId string 12483 urlParams_ gensupport.URLParams 12484 ifNoneMatch_ string 12485 ctx_ context.Context 12486 header_ http.Header 12487 } 12488 12489 // GetServiceAccount: RPC to get the service account for a project used for 12490 // interactions with Google Cloud KMS 12491 // 12492 // - projectId: ID of the project. 12493 func (r *ProjectsService) GetServiceAccount(projectId string) *ProjectsGetServiceAccountCall { 12494 c := &ProjectsGetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12495 c.projectId = projectId 12496 return c 12497 } 12498 12499 // Fields allows partial responses to be retrieved. See 12500 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12501 // details. 12502 func (c *ProjectsGetServiceAccountCall) Fields(s ...googleapi.Field) *ProjectsGetServiceAccountCall { 12503 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12504 return c 12505 } 12506 12507 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12508 // object's ETag matches the given value. This is useful for getting updates 12509 // only after the object has changed since the last request. 12510 func (c *ProjectsGetServiceAccountCall) IfNoneMatch(entityTag string) *ProjectsGetServiceAccountCall { 12511 c.ifNoneMatch_ = entityTag 12512 return c 12513 } 12514 12515 // Context sets the context to be used in this call's Do method. 12516 func (c *ProjectsGetServiceAccountCall) Context(ctx context.Context) *ProjectsGetServiceAccountCall { 12517 c.ctx_ = ctx 12518 return c 12519 } 12520 12521 // Header returns a http.Header that can be modified by the caller to add 12522 // headers to the request. 12523 func (c *ProjectsGetServiceAccountCall) Header() http.Header { 12524 if c.header_ == nil { 12525 c.header_ = make(http.Header) 12526 } 12527 return c.header_ 12528 } 12529 12530 func (c *ProjectsGetServiceAccountCall) doRequest(alt string) (*http.Response, error) { 12531 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12532 if c.ifNoneMatch_ != "" { 12533 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12534 } 12535 var body io.Reader = nil 12536 c.urlParams_.Set("alt", alt) 12537 c.urlParams_.Set("prettyPrint", "false") 12538 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/serviceAccount") 12539 urls += "?" + c.urlParams_.Encode() 12540 req, err := http.NewRequest("GET", urls, body) 12541 if err != nil { 12542 return nil, err 12543 } 12544 req.Header = reqHeaders 12545 googleapi.Expand(req.URL, map[string]string{ 12546 "projectId": c.projectId, 12547 }) 12548 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12549 } 12550 12551 // Do executes the "bigquery.projects.getServiceAccount" call. 12552 // Any non-2xx status code is an error. Response headers are in either 12553 // *GetServiceAccountResponse.ServerResponse.Header or (if a response was 12554 // returned at all) in error.(*googleapi.Error).Header. Use 12555 // googleapi.IsNotModified to check whether the returned error was because 12556 // http.StatusNotModified was returned. 12557 func (c *ProjectsGetServiceAccountCall) Do(opts ...googleapi.CallOption) (*GetServiceAccountResponse, error) { 12558 gensupport.SetOptions(c.urlParams_, opts...) 12559 res, err := c.doRequest("json") 12560 if res != nil && res.StatusCode == http.StatusNotModified { 12561 if res.Body != nil { 12562 res.Body.Close() 12563 } 12564 return nil, gensupport.WrapError(&googleapi.Error{ 12565 Code: res.StatusCode, 12566 Header: res.Header, 12567 }) 12568 } 12569 if err != nil { 12570 return nil, err 12571 } 12572 defer googleapi.CloseBody(res) 12573 if err := googleapi.CheckResponse(res); err != nil { 12574 return nil, gensupport.WrapError(err) 12575 } 12576 ret := &GetServiceAccountResponse{ 12577 ServerResponse: googleapi.ServerResponse{ 12578 Header: res.Header, 12579 HTTPStatusCode: res.StatusCode, 12580 }, 12581 } 12582 target := &ret 12583 if err := gensupport.DecodeResponse(target, res); err != nil { 12584 return nil, err 12585 } 12586 return ret, nil 12587 } 12588 12589 type ProjectsListCall struct { 12590 s *Service 12591 urlParams_ gensupport.URLParams 12592 ifNoneMatch_ string 12593 ctx_ context.Context 12594 header_ http.Header 12595 } 12596 12597 // List: RPC to list projects to which the user has been granted any project 12598 // role. Users of this method are encouraged to consider the Resource Manager 12599 // (https://cloud.google.com/resource-manager/docs/) API, which provides the 12600 // underlying data for this method and has more capabilities. 12601 func (r *ProjectsService) List() *ProjectsListCall { 12602 c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12603 return c 12604 } 12605 12606 // MaxResults sets the optional parameter "maxResults": `maxResults` unset 12607 // returns all results, up to 50 per page. Additionally, the number of projects 12608 // in a page may be fewer than `maxResults` because projects are retrieved and 12609 // then filtered to only projects with the BigQuery API enabled. 12610 func (c *ProjectsListCall) MaxResults(maxResults int64) *ProjectsListCall { 12611 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 12612 return c 12613 } 12614 12615 // PageToken sets the optional parameter "pageToken": Page token, returned by a 12616 // previous call, to request the next page of results. If not present, no 12617 // further pages are present. 12618 func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall { 12619 c.urlParams_.Set("pageToken", pageToken) 12620 return c 12621 } 12622 12623 // Fields allows partial responses to be retrieved. See 12624 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12625 // details. 12626 func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall { 12627 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12628 return c 12629 } 12630 12631 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12632 // object's ETag matches the given value. This is useful for getting updates 12633 // only after the object has changed since the last request. 12634 func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall { 12635 c.ifNoneMatch_ = entityTag 12636 return c 12637 } 12638 12639 // Context sets the context to be used in this call's Do method. 12640 func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall { 12641 c.ctx_ = ctx 12642 return c 12643 } 12644 12645 // Header returns a http.Header that can be modified by the caller to add 12646 // headers to the request. 12647 func (c *ProjectsListCall) Header() http.Header { 12648 if c.header_ == nil { 12649 c.header_ = make(http.Header) 12650 } 12651 return c.header_ 12652 } 12653 12654 func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) { 12655 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12656 if c.ifNoneMatch_ != "" { 12657 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12658 } 12659 var body io.Reader = nil 12660 c.urlParams_.Set("alt", alt) 12661 c.urlParams_.Set("prettyPrint", "false") 12662 urls := googleapi.ResolveRelative(c.s.BasePath, "projects") 12663 urls += "?" + c.urlParams_.Encode() 12664 req, err := http.NewRequest("GET", urls, body) 12665 if err != nil { 12666 return nil, err 12667 } 12668 req.Header = reqHeaders 12669 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12670 } 12671 12672 // Do executes the "bigquery.projects.list" call. 12673 // Any non-2xx status code is an error. Response headers are in either 12674 // *ProjectList.ServerResponse.Header or (if a response was returned at all) in 12675 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12676 // whether the returned error was because http.StatusNotModified was returned. 12677 func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ProjectList, error) { 12678 gensupport.SetOptions(c.urlParams_, opts...) 12679 res, err := c.doRequest("json") 12680 if res != nil && res.StatusCode == http.StatusNotModified { 12681 if res.Body != nil { 12682 res.Body.Close() 12683 } 12684 return nil, gensupport.WrapError(&googleapi.Error{ 12685 Code: res.StatusCode, 12686 Header: res.Header, 12687 }) 12688 } 12689 if err != nil { 12690 return nil, err 12691 } 12692 defer googleapi.CloseBody(res) 12693 if err := googleapi.CheckResponse(res); err != nil { 12694 return nil, gensupport.WrapError(err) 12695 } 12696 ret := &ProjectList{ 12697 ServerResponse: googleapi.ServerResponse{ 12698 Header: res.Header, 12699 HTTPStatusCode: res.StatusCode, 12700 }, 12701 } 12702 target := &ret 12703 if err := gensupport.DecodeResponse(target, res); err != nil { 12704 return nil, err 12705 } 12706 return ret, nil 12707 } 12708 12709 // Pages invokes f for each page of results. 12710 // A non-nil error returned from f will halt the iteration. 12711 // The provided context supersedes any context provided to the Context method. 12712 func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ProjectList) error) error { 12713 c.ctx_ = ctx 12714 defer c.PageToken(c.urlParams_.Get("pageToken")) 12715 for { 12716 x, err := c.Do() 12717 if err != nil { 12718 return err 12719 } 12720 if err := f(x); err != nil { 12721 return err 12722 } 12723 if x.NextPageToken == "" { 12724 return nil 12725 } 12726 c.PageToken(x.NextPageToken) 12727 } 12728 } 12729 12730 type RoutinesDeleteCall struct { 12731 s *Service 12732 projectId string 12733 datasetId string 12734 routineId string 12735 urlParams_ gensupport.URLParams 12736 ctx_ context.Context 12737 header_ http.Header 12738 } 12739 12740 // Delete: Deletes the routine specified by routineId from the dataset. 12741 // 12742 // - datasetId: Dataset ID of the routine to delete. 12743 // - projectId: Project ID of the routine to delete. 12744 // - routineId: Routine ID of the routine to delete. 12745 func (r *RoutinesService) Delete(projectId string, datasetId string, routineId string) *RoutinesDeleteCall { 12746 c := &RoutinesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12747 c.projectId = projectId 12748 c.datasetId = datasetId 12749 c.routineId = routineId 12750 return c 12751 } 12752 12753 // Fields allows partial responses to be retrieved. See 12754 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12755 // details. 12756 func (c *RoutinesDeleteCall) Fields(s ...googleapi.Field) *RoutinesDeleteCall { 12757 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12758 return c 12759 } 12760 12761 // Context sets the context to be used in this call's Do method. 12762 func (c *RoutinesDeleteCall) Context(ctx context.Context) *RoutinesDeleteCall { 12763 c.ctx_ = ctx 12764 return c 12765 } 12766 12767 // Header returns a http.Header that can be modified by the caller to add 12768 // headers to the request. 12769 func (c *RoutinesDeleteCall) Header() http.Header { 12770 if c.header_ == nil { 12771 c.header_ = make(http.Header) 12772 } 12773 return c.header_ 12774 } 12775 12776 func (c *RoutinesDeleteCall) doRequest(alt string) (*http.Response, error) { 12777 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12778 var body io.Reader = nil 12779 c.urlParams_.Set("alt", alt) 12780 c.urlParams_.Set("prettyPrint", "false") 12781 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/routines/{+routineId}") 12782 urls += "?" + c.urlParams_.Encode() 12783 req, err := http.NewRequest("DELETE", urls, body) 12784 if err != nil { 12785 return nil, err 12786 } 12787 req.Header = reqHeaders 12788 googleapi.Expand(req.URL, map[string]string{ 12789 "projectId": c.projectId, 12790 "datasetId": c.datasetId, 12791 "routineId": c.routineId, 12792 }) 12793 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12794 } 12795 12796 // Do executes the "bigquery.routines.delete" call. 12797 func (c *RoutinesDeleteCall) Do(opts ...googleapi.CallOption) error { 12798 gensupport.SetOptions(c.urlParams_, opts...) 12799 res, err := c.doRequest("json") 12800 if err != nil { 12801 return err 12802 } 12803 defer googleapi.CloseBody(res) 12804 if err := googleapi.CheckResponse(res); err != nil { 12805 return gensupport.WrapError(err) 12806 } 12807 return nil 12808 } 12809 12810 type RoutinesGetCall struct { 12811 s *Service 12812 projectId string 12813 datasetId string 12814 routineId string 12815 urlParams_ gensupport.URLParams 12816 ifNoneMatch_ string 12817 ctx_ context.Context 12818 header_ http.Header 12819 } 12820 12821 // Get: Gets the specified routine resource by routine ID. 12822 // 12823 // - datasetId: Dataset ID of the requested routine. 12824 // - projectId: Project ID of the requested routine. 12825 // - routineId: Routine ID of the requested routine. 12826 func (r *RoutinesService) Get(projectId string, datasetId string, routineId string) *RoutinesGetCall { 12827 c := &RoutinesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12828 c.projectId = projectId 12829 c.datasetId = datasetId 12830 c.routineId = routineId 12831 return c 12832 } 12833 12834 // ReadMask sets the optional parameter "readMask": If set, only the Routine 12835 // fields in the field mask are returned in the response. If unset, all Routine 12836 // fields are returned. 12837 func (c *RoutinesGetCall) ReadMask(readMask string) *RoutinesGetCall { 12838 c.urlParams_.Set("readMask", readMask) 12839 return c 12840 } 12841 12842 // Fields allows partial responses to be retrieved. See 12843 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12844 // details. 12845 func (c *RoutinesGetCall) Fields(s ...googleapi.Field) *RoutinesGetCall { 12846 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12847 return c 12848 } 12849 12850 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12851 // object's ETag matches the given value. This is useful for getting updates 12852 // only after the object has changed since the last request. 12853 func (c *RoutinesGetCall) IfNoneMatch(entityTag string) *RoutinesGetCall { 12854 c.ifNoneMatch_ = entityTag 12855 return c 12856 } 12857 12858 // Context sets the context to be used in this call's Do method. 12859 func (c *RoutinesGetCall) Context(ctx context.Context) *RoutinesGetCall { 12860 c.ctx_ = ctx 12861 return c 12862 } 12863 12864 // Header returns a http.Header that can be modified by the caller to add 12865 // headers to the request. 12866 func (c *RoutinesGetCall) Header() http.Header { 12867 if c.header_ == nil { 12868 c.header_ = make(http.Header) 12869 } 12870 return c.header_ 12871 } 12872 12873 func (c *RoutinesGetCall) doRequest(alt string) (*http.Response, error) { 12874 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12875 if c.ifNoneMatch_ != "" { 12876 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12877 } 12878 var body io.Reader = nil 12879 c.urlParams_.Set("alt", alt) 12880 c.urlParams_.Set("prettyPrint", "false") 12881 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/routines/{+routineId}") 12882 urls += "?" + c.urlParams_.Encode() 12883 req, err := http.NewRequest("GET", urls, body) 12884 if err != nil { 12885 return nil, err 12886 } 12887 req.Header = reqHeaders 12888 googleapi.Expand(req.URL, map[string]string{ 12889 "projectId": c.projectId, 12890 "datasetId": c.datasetId, 12891 "routineId": c.routineId, 12892 }) 12893 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12894 } 12895 12896 // Do executes the "bigquery.routines.get" call. 12897 // Any non-2xx status code is an error. Response headers are in either 12898 // *Routine.ServerResponse.Header or (if a response was returned at all) in 12899 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12900 // whether the returned error was because http.StatusNotModified was returned. 12901 func (c *RoutinesGetCall) Do(opts ...googleapi.CallOption) (*Routine, error) { 12902 gensupport.SetOptions(c.urlParams_, opts...) 12903 res, err := c.doRequest("json") 12904 if res != nil && res.StatusCode == http.StatusNotModified { 12905 if res.Body != nil { 12906 res.Body.Close() 12907 } 12908 return nil, gensupport.WrapError(&googleapi.Error{ 12909 Code: res.StatusCode, 12910 Header: res.Header, 12911 }) 12912 } 12913 if err != nil { 12914 return nil, err 12915 } 12916 defer googleapi.CloseBody(res) 12917 if err := googleapi.CheckResponse(res); err != nil { 12918 return nil, gensupport.WrapError(err) 12919 } 12920 ret := &Routine{ 12921 ServerResponse: googleapi.ServerResponse{ 12922 Header: res.Header, 12923 HTTPStatusCode: res.StatusCode, 12924 }, 12925 } 12926 target := &ret 12927 if err := gensupport.DecodeResponse(target, res); err != nil { 12928 return nil, err 12929 } 12930 return ret, nil 12931 } 12932 12933 type RoutinesGetIamPolicyCall struct { 12934 s *Service 12935 resource string 12936 getiampolicyrequest *GetIamPolicyRequest 12937 urlParams_ gensupport.URLParams 12938 ctx_ context.Context 12939 header_ http.Header 12940 } 12941 12942 // GetIamPolicy: Gets the access control policy for a resource. Returns an 12943 // empty policy if the resource exists and does not have a policy set. 12944 // 12945 // - resource: REQUIRED: The resource for which the policy is being requested. 12946 // See Resource names (https://cloud.google.com/apis/design/resource_names) 12947 // for the appropriate value for this field. 12948 func (r *RoutinesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *RoutinesGetIamPolicyCall { 12949 c := &RoutinesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12950 c.resource = resource 12951 c.getiampolicyrequest = getiampolicyrequest 12952 return c 12953 } 12954 12955 // Fields allows partial responses to be retrieved. See 12956 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12957 // details. 12958 func (c *RoutinesGetIamPolicyCall) Fields(s ...googleapi.Field) *RoutinesGetIamPolicyCall { 12959 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12960 return c 12961 } 12962 12963 // Context sets the context to be used in this call's Do method. 12964 func (c *RoutinesGetIamPolicyCall) Context(ctx context.Context) *RoutinesGetIamPolicyCall { 12965 c.ctx_ = ctx 12966 return c 12967 } 12968 12969 // Header returns a http.Header that can be modified by the caller to add 12970 // headers to the request. 12971 func (c *RoutinesGetIamPolicyCall) Header() http.Header { 12972 if c.header_ == nil { 12973 c.header_ = make(http.Header) 12974 } 12975 return c.header_ 12976 } 12977 12978 func (c *RoutinesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 12979 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12980 var body io.Reader = nil 12981 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 12982 if err != nil { 12983 return nil, err 12984 } 12985 c.urlParams_.Set("alt", alt) 12986 c.urlParams_.Set("prettyPrint", "false") 12987 urls := googleapi.ResolveRelative(c.s.BasePath, "{+resource}:getIamPolicy") 12988 urls += "?" + c.urlParams_.Encode() 12989 req, err := http.NewRequest("POST", urls, body) 12990 if err != nil { 12991 return nil, err 12992 } 12993 req.Header = reqHeaders 12994 googleapi.Expand(req.URL, map[string]string{ 12995 "resource": c.resource, 12996 }) 12997 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12998 } 12999 13000 // Do executes the "bigquery.routines.getIamPolicy" call. 13001 // Any non-2xx status code is an error. Response headers are in either 13002 // *Policy.ServerResponse.Header or (if a response was returned at all) in 13003 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13004 // whether the returned error was because http.StatusNotModified was returned. 13005 func (c *RoutinesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 13006 gensupport.SetOptions(c.urlParams_, opts...) 13007 res, err := c.doRequest("json") 13008 if res != nil && res.StatusCode == http.StatusNotModified { 13009 if res.Body != nil { 13010 res.Body.Close() 13011 } 13012 return nil, gensupport.WrapError(&googleapi.Error{ 13013 Code: res.StatusCode, 13014 Header: res.Header, 13015 }) 13016 } 13017 if err != nil { 13018 return nil, err 13019 } 13020 defer googleapi.CloseBody(res) 13021 if err := googleapi.CheckResponse(res); err != nil { 13022 return nil, gensupport.WrapError(err) 13023 } 13024 ret := &Policy{ 13025 ServerResponse: googleapi.ServerResponse{ 13026 Header: res.Header, 13027 HTTPStatusCode: res.StatusCode, 13028 }, 13029 } 13030 target := &ret 13031 if err := gensupport.DecodeResponse(target, res); err != nil { 13032 return nil, err 13033 } 13034 return ret, nil 13035 } 13036 13037 type RoutinesInsertCall struct { 13038 s *Service 13039 projectId string 13040 datasetId string 13041 routine *Routine 13042 urlParams_ gensupport.URLParams 13043 ctx_ context.Context 13044 header_ http.Header 13045 } 13046 13047 // Insert: Creates a new routine in the dataset. 13048 // 13049 // - datasetId: Dataset ID of the new routine. 13050 // - projectId: Project ID of the new routine. 13051 func (r *RoutinesService) Insert(projectId string, datasetId string, routine *Routine) *RoutinesInsertCall { 13052 c := &RoutinesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13053 c.projectId = projectId 13054 c.datasetId = datasetId 13055 c.routine = routine 13056 return c 13057 } 13058 13059 // Fields allows partial responses to be retrieved. See 13060 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13061 // details. 13062 func (c *RoutinesInsertCall) Fields(s ...googleapi.Field) *RoutinesInsertCall { 13063 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13064 return c 13065 } 13066 13067 // Context sets the context to be used in this call's Do method. 13068 func (c *RoutinesInsertCall) Context(ctx context.Context) *RoutinesInsertCall { 13069 c.ctx_ = ctx 13070 return c 13071 } 13072 13073 // Header returns a http.Header that can be modified by the caller to add 13074 // headers to the request. 13075 func (c *RoutinesInsertCall) Header() http.Header { 13076 if c.header_ == nil { 13077 c.header_ = make(http.Header) 13078 } 13079 return c.header_ 13080 } 13081 13082 func (c *RoutinesInsertCall) doRequest(alt string) (*http.Response, error) { 13083 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13084 var body io.Reader = nil 13085 body, err := googleapi.WithoutDataWrapper.JSONReader(c.routine) 13086 if err != nil { 13087 return nil, err 13088 } 13089 c.urlParams_.Set("alt", alt) 13090 c.urlParams_.Set("prettyPrint", "false") 13091 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/routines") 13092 urls += "?" + c.urlParams_.Encode() 13093 req, err := http.NewRequest("POST", urls, body) 13094 if err != nil { 13095 return nil, err 13096 } 13097 req.Header = reqHeaders 13098 googleapi.Expand(req.URL, map[string]string{ 13099 "projectId": c.projectId, 13100 "datasetId": c.datasetId, 13101 }) 13102 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13103 } 13104 13105 // Do executes the "bigquery.routines.insert" call. 13106 // Any non-2xx status code is an error. Response headers are in either 13107 // *Routine.ServerResponse.Header or (if a response was returned at all) in 13108 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13109 // whether the returned error was because http.StatusNotModified was returned. 13110 func (c *RoutinesInsertCall) Do(opts ...googleapi.CallOption) (*Routine, error) { 13111 gensupport.SetOptions(c.urlParams_, opts...) 13112 res, err := c.doRequest("json") 13113 if res != nil && res.StatusCode == http.StatusNotModified { 13114 if res.Body != nil { 13115 res.Body.Close() 13116 } 13117 return nil, gensupport.WrapError(&googleapi.Error{ 13118 Code: res.StatusCode, 13119 Header: res.Header, 13120 }) 13121 } 13122 if err != nil { 13123 return nil, err 13124 } 13125 defer googleapi.CloseBody(res) 13126 if err := googleapi.CheckResponse(res); err != nil { 13127 return nil, gensupport.WrapError(err) 13128 } 13129 ret := &Routine{ 13130 ServerResponse: googleapi.ServerResponse{ 13131 Header: res.Header, 13132 HTTPStatusCode: res.StatusCode, 13133 }, 13134 } 13135 target := &ret 13136 if err := gensupport.DecodeResponse(target, res); err != nil { 13137 return nil, err 13138 } 13139 return ret, nil 13140 } 13141 13142 type RoutinesListCall struct { 13143 s *Service 13144 projectId string 13145 datasetId string 13146 urlParams_ gensupport.URLParams 13147 ifNoneMatch_ string 13148 ctx_ context.Context 13149 header_ http.Header 13150 } 13151 13152 // List: Lists all routines in the specified dataset. Requires the READER 13153 // dataset role. 13154 // 13155 // - datasetId: Dataset ID of the routines to list. 13156 // - projectId: Project ID of the routines to list. 13157 func (r *RoutinesService) List(projectId string, datasetId string) *RoutinesListCall { 13158 c := &RoutinesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13159 c.projectId = projectId 13160 c.datasetId = datasetId 13161 return c 13162 } 13163 13164 // Filter sets the optional parameter "filter": If set, then only the Routines 13165 // matching this filter are returned. The supported format is 13166 // `routineType:{RoutineType}`, where `{RoutineType}` is a RoutineType enum. 13167 // For example: `routineType:SCALAR_FUNCTION`. 13168 func (c *RoutinesListCall) Filter(filter string) *RoutinesListCall { 13169 c.urlParams_.Set("filter", filter) 13170 return c 13171 } 13172 13173 // MaxResults sets the optional parameter "maxResults": The maximum number of 13174 // results to return in a single response page. Leverage the page tokens to 13175 // iterate through the entire collection. 13176 func (c *RoutinesListCall) MaxResults(maxResults int64) *RoutinesListCall { 13177 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 13178 return c 13179 } 13180 13181 // PageToken sets the optional parameter "pageToken": Page token, returned by a 13182 // previous call, to request the next page of results 13183 func (c *RoutinesListCall) PageToken(pageToken string) *RoutinesListCall { 13184 c.urlParams_.Set("pageToken", pageToken) 13185 return c 13186 } 13187 13188 // ReadMask sets the optional parameter "readMask": If set, then only the 13189 // Routine fields in the field mask, as well as project_id, dataset_id and 13190 // routine_id, are returned in the response. If unset, then the following 13191 // Routine fields are returned: etag, project_id, dataset_id, routine_id, 13192 // routine_type, creation_time, last_modified_time, and language. 13193 func (c *RoutinesListCall) ReadMask(readMask string) *RoutinesListCall { 13194 c.urlParams_.Set("readMask", readMask) 13195 return c 13196 } 13197 13198 // Fields allows partial responses to be retrieved. See 13199 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13200 // details. 13201 func (c *RoutinesListCall) Fields(s ...googleapi.Field) *RoutinesListCall { 13202 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13203 return c 13204 } 13205 13206 // IfNoneMatch sets an optional parameter which makes the operation fail if the 13207 // object's ETag matches the given value. This is useful for getting updates 13208 // only after the object has changed since the last request. 13209 func (c *RoutinesListCall) IfNoneMatch(entityTag string) *RoutinesListCall { 13210 c.ifNoneMatch_ = entityTag 13211 return c 13212 } 13213 13214 // Context sets the context to be used in this call's Do method. 13215 func (c *RoutinesListCall) Context(ctx context.Context) *RoutinesListCall { 13216 c.ctx_ = ctx 13217 return c 13218 } 13219 13220 // Header returns a http.Header that can be modified by the caller to add 13221 // headers to the request. 13222 func (c *RoutinesListCall) Header() http.Header { 13223 if c.header_ == nil { 13224 c.header_ = make(http.Header) 13225 } 13226 return c.header_ 13227 } 13228 13229 func (c *RoutinesListCall) doRequest(alt string) (*http.Response, error) { 13230 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 13231 if c.ifNoneMatch_ != "" { 13232 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13233 } 13234 var body io.Reader = nil 13235 c.urlParams_.Set("alt", alt) 13236 c.urlParams_.Set("prettyPrint", "false") 13237 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/routines") 13238 urls += "?" + c.urlParams_.Encode() 13239 req, err := http.NewRequest("GET", urls, body) 13240 if err != nil { 13241 return nil, err 13242 } 13243 req.Header = reqHeaders 13244 googleapi.Expand(req.URL, map[string]string{ 13245 "projectId": c.projectId, 13246 "datasetId": c.datasetId, 13247 }) 13248 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13249 } 13250 13251 // Do executes the "bigquery.routines.list" call. 13252 // Any non-2xx status code is an error. Response headers are in either 13253 // *ListRoutinesResponse.ServerResponse.Header or (if a response was returned 13254 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13255 // check whether the returned error was because http.StatusNotModified was 13256 // returned. 13257 func (c *RoutinesListCall) Do(opts ...googleapi.CallOption) (*ListRoutinesResponse, error) { 13258 gensupport.SetOptions(c.urlParams_, opts...) 13259 res, err := c.doRequest("json") 13260 if res != nil && res.StatusCode == http.StatusNotModified { 13261 if res.Body != nil { 13262 res.Body.Close() 13263 } 13264 return nil, gensupport.WrapError(&googleapi.Error{ 13265 Code: res.StatusCode, 13266 Header: res.Header, 13267 }) 13268 } 13269 if err != nil { 13270 return nil, err 13271 } 13272 defer googleapi.CloseBody(res) 13273 if err := googleapi.CheckResponse(res); err != nil { 13274 return nil, gensupport.WrapError(err) 13275 } 13276 ret := &ListRoutinesResponse{ 13277 ServerResponse: googleapi.ServerResponse{ 13278 Header: res.Header, 13279 HTTPStatusCode: res.StatusCode, 13280 }, 13281 } 13282 target := &ret 13283 if err := gensupport.DecodeResponse(target, res); err != nil { 13284 return nil, err 13285 } 13286 return ret, nil 13287 } 13288 13289 // Pages invokes f for each page of results. 13290 // A non-nil error returned from f will halt the iteration. 13291 // The provided context supersedes any context provided to the Context method. 13292 func (c *RoutinesListCall) Pages(ctx context.Context, f func(*ListRoutinesResponse) error) error { 13293 c.ctx_ = ctx 13294 defer c.PageToken(c.urlParams_.Get("pageToken")) 13295 for { 13296 x, err := c.Do() 13297 if err != nil { 13298 return err 13299 } 13300 if err := f(x); err != nil { 13301 return err 13302 } 13303 if x.NextPageToken == "" { 13304 return nil 13305 } 13306 c.PageToken(x.NextPageToken) 13307 } 13308 } 13309 13310 type RoutinesSetIamPolicyCall struct { 13311 s *Service 13312 resource string 13313 setiampolicyrequest *SetIamPolicyRequest 13314 urlParams_ gensupport.URLParams 13315 ctx_ context.Context 13316 header_ http.Header 13317 } 13318 13319 // SetIamPolicy: Sets the access control policy on the specified resource. 13320 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, 13321 // and `PERMISSION_DENIED` errors. 13322 // 13323 // - resource: REQUIRED: The resource for which the policy is being specified. 13324 // See Resource names (https://cloud.google.com/apis/design/resource_names) 13325 // for the appropriate value for this field. 13326 func (r *RoutinesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *RoutinesSetIamPolicyCall { 13327 c := &RoutinesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13328 c.resource = resource 13329 c.setiampolicyrequest = setiampolicyrequest 13330 return c 13331 } 13332 13333 // Fields allows partial responses to be retrieved. See 13334 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13335 // details. 13336 func (c *RoutinesSetIamPolicyCall) Fields(s ...googleapi.Field) *RoutinesSetIamPolicyCall { 13337 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13338 return c 13339 } 13340 13341 // Context sets the context to be used in this call's Do method. 13342 func (c *RoutinesSetIamPolicyCall) Context(ctx context.Context) *RoutinesSetIamPolicyCall { 13343 c.ctx_ = ctx 13344 return c 13345 } 13346 13347 // Header returns a http.Header that can be modified by the caller to add 13348 // headers to the request. 13349 func (c *RoutinesSetIamPolicyCall) Header() http.Header { 13350 if c.header_ == nil { 13351 c.header_ = make(http.Header) 13352 } 13353 return c.header_ 13354 } 13355 13356 func (c *RoutinesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 13357 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13358 var body io.Reader = nil 13359 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 13360 if err != nil { 13361 return nil, err 13362 } 13363 c.urlParams_.Set("alt", alt) 13364 c.urlParams_.Set("prettyPrint", "false") 13365 urls := googleapi.ResolveRelative(c.s.BasePath, "{+resource}:setIamPolicy") 13366 urls += "?" + c.urlParams_.Encode() 13367 req, err := http.NewRequest("POST", urls, body) 13368 if err != nil { 13369 return nil, err 13370 } 13371 req.Header = reqHeaders 13372 googleapi.Expand(req.URL, map[string]string{ 13373 "resource": c.resource, 13374 }) 13375 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13376 } 13377 13378 // Do executes the "bigquery.routines.setIamPolicy" call. 13379 // Any non-2xx status code is an error. Response headers are in either 13380 // *Policy.ServerResponse.Header or (if a response was returned at all) in 13381 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13382 // whether the returned error was because http.StatusNotModified was returned. 13383 func (c *RoutinesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 13384 gensupport.SetOptions(c.urlParams_, opts...) 13385 res, err := c.doRequest("json") 13386 if res != nil && res.StatusCode == http.StatusNotModified { 13387 if res.Body != nil { 13388 res.Body.Close() 13389 } 13390 return nil, gensupport.WrapError(&googleapi.Error{ 13391 Code: res.StatusCode, 13392 Header: res.Header, 13393 }) 13394 } 13395 if err != nil { 13396 return nil, err 13397 } 13398 defer googleapi.CloseBody(res) 13399 if err := googleapi.CheckResponse(res); err != nil { 13400 return nil, gensupport.WrapError(err) 13401 } 13402 ret := &Policy{ 13403 ServerResponse: googleapi.ServerResponse{ 13404 Header: res.Header, 13405 HTTPStatusCode: res.StatusCode, 13406 }, 13407 } 13408 target := &ret 13409 if err := gensupport.DecodeResponse(target, res); err != nil { 13410 return nil, err 13411 } 13412 return ret, nil 13413 } 13414 13415 type RoutinesUpdateCall struct { 13416 s *Service 13417 projectId string 13418 datasetId string 13419 routineId string 13420 routine *Routine 13421 urlParams_ gensupport.URLParams 13422 ctx_ context.Context 13423 header_ http.Header 13424 } 13425 13426 // Update: Updates information in an existing routine. The update method 13427 // replaces the entire Routine resource. 13428 // 13429 // - datasetId: Dataset ID of the routine to update. 13430 // - projectId: Project ID of the routine to update. 13431 // - routineId: Routine ID of the routine to update. 13432 func (r *RoutinesService) Update(projectId string, datasetId string, routineId string, routine *Routine) *RoutinesUpdateCall { 13433 c := &RoutinesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13434 c.projectId = projectId 13435 c.datasetId = datasetId 13436 c.routineId = routineId 13437 c.routine = routine 13438 return c 13439 } 13440 13441 // Fields allows partial responses to be retrieved. See 13442 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13443 // details. 13444 func (c *RoutinesUpdateCall) Fields(s ...googleapi.Field) *RoutinesUpdateCall { 13445 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13446 return c 13447 } 13448 13449 // Context sets the context to be used in this call's Do method. 13450 func (c *RoutinesUpdateCall) Context(ctx context.Context) *RoutinesUpdateCall { 13451 c.ctx_ = ctx 13452 return c 13453 } 13454 13455 // Header returns a http.Header that can be modified by the caller to add 13456 // headers to the request. 13457 func (c *RoutinesUpdateCall) Header() http.Header { 13458 if c.header_ == nil { 13459 c.header_ = make(http.Header) 13460 } 13461 return c.header_ 13462 } 13463 13464 func (c *RoutinesUpdateCall) doRequest(alt string) (*http.Response, error) { 13465 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13466 var body io.Reader = nil 13467 body, err := googleapi.WithoutDataWrapper.JSONReader(c.routine) 13468 if err != nil { 13469 return nil, err 13470 } 13471 c.urlParams_.Set("alt", alt) 13472 c.urlParams_.Set("prettyPrint", "false") 13473 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/routines/{+routineId}") 13474 urls += "?" + c.urlParams_.Encode() 13475 req, err := http.NewRequest("PUT", urls, body) 13476 if err != nil { 13477 return nil, err 13478 } 13479 req.Header = reqHeaders 13480 googleapi.Expand(req.URL, map[string]string{ 13481 "projectId": c.projectId, 13482 "datasetId": c.datasetId, 13483 "routineId": c.routineId, 13484 }) 13485 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13486 } 13487 13488 // Do executes the "bigquery.routines.update" call. 13489 // Any non-2xx status code is an error. Response headers are in either 13490 // *Routine.ServerResponse.Header or (if a response was returned at all) in 13491 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13492 // whether the returned error was because http.StatusNotModified was returned. 13493 func (c *RoutinesUpdateCall) Do(opts ...googleapi.CallOption) (*Routine, error) { 13494 gensupport.SetOptions(c.urlParams_, opts...) 13495 res, err := c.doRequest("json") 13496 if res != nil && res.StatusCode == http.StatusNotModified { 13497 if res.Body != nil { 13498 res.Body.Close() 13499 } 13500 return nil, gensupport.WrapError(&googleapi.Error{ 13501 Code: res.StatusCode, 13502 Header: res.Header, 13503 }) 13504 } 13505 if err != nil { 13506 return nil, err 13507 } 13508 defer googleapi.CloseBody(res) 13509 if err := googleapi.CheckResponse(res); err != nil { 13510 return nil, gensupport.WrapError(err) 13511 } 13512 ret := &Routine{ 13513 ServerResponse: googleapi.ServerResponse{ 13514 Header: res.Header, 13515 HTTPStatusCode: res.StatusCode, 13516 }, 13517 } 13518 target := &ret 13519 if err := gensupport.DecodeResponse(target, res); err != nil { 13520 return nil, err 13521 } 13522 return ret, nil 13523 } 13524 13525 type RowAccessPoliciesGetIamPolicyCall struct { 13526 s *Service 13527 resource string 13528 getiampolicyrequest *GetIamPolicyRequest 13529 urlParams_ gensupport.URLParams 13530 ctx_ context.Context 13531 header_ http.Header 13532 } 13533 13534 // GetIamPolicy: Gets the access control policy for a resource. Returns an 13535 // empty policy if the resource exists and does not have a policy set. 13536 // 13537 // - resource: REQUIRED: The resource for which the policy is being requested. 13538 // See Resource names (https://cloud.google.com/apis/design/resource_names) 13539 // for the appropriate value for this field. 13540 func (r *RowAccessPoliciesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *RowAccessPoliciesGetIamPolicyCall { 13541 c := &RowAccessPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13542 c.resource = resource 13543 c.getiampolicyrequest = getiampolicyrequest 13544 return c 13545 } 13546 13547 // Fields allows partial responses to be retrieved. See 13548 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13549 // details. 13550 func (c *RowAccessPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *RowAccessPoliciesGetIamPolicyCall { 13551 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13552 return c 13553 } 13554 13555 // Context sets the context to be used in this call's Do method. 13556 func (c *RowAccessPoliciesGetIamPolicyCall) Context(ctx context.Context) *RowAccessPoliciesGetIamPolicyCall { 13557 c.ctx_ = ctx 13558 return c 13559 } 13560 13561 // Header returns a http.Header that can be modified by the caller to add 13562 // headers to the request. 13563 func (c *RowAccessPoliciesGetIamPolicyCall) Header() http.Header { 13564 if c.header_ == nil { 13565 c.header_ = make(http.Header) 13566 } 13567 return c.header_ 13568 } 13569 13570 func (c *RowAccessPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 13571 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13572 var body io.Reader = nil 13573 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 13574 if err != nil { 13575 return nil, err 13576 } 13577 c.urlParams_.Set("alt", alt) 13578 c.urlParams_.Set("prettyPrint", "false") 13579 urls := googleapi.ResolveRelative(c.s.BasePath, "{+resource}:getIamPolicy") 13580 urls += "?" + c.urlParams_.Encode() 13581 req, err := http.NewRequest("POST", urls, body) 13582 if err != nil { 13583 return nil, err 13584 } 13585 req.Header = reqHeaders 13586 googleapi.Expand(req.URL, map[string]string{ 13587 "resource": c.resource, 13588 }) 13589 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13590 } 13591 13592 // Do executes the "bigquery.rowAccessPolicies.getIamPolicy" call. 13593 // Any non-2xx status code is an error. Response headers are in either 13594 // *Policy.ServerResponse.Header or (if a response was returned at all) in 13595 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13596 // whether the returned error was because http.StatusNotModified was returned. 13597 func (c *RowAccessPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 13598 gensupport.SetOptions(c.urlParams_, opts...) 13599 res, err := c.doRequest("json") 13600 if res != nil && res.StatusCode == http.StatusNotModified { 13601 if res.Body != nil { 13602 res.Body.Close() 13603 } 13604 return nil, gensupport.WrapError(&googleapi.Error{ 13605 Code: res.StatusCode, 13606 Header: res.Header, 13607 }) 13608 } 13609 if err != nil { 13610 return nil, err 13611 } 13612 defer googleapi.CloseBody(res) 13613 if err := googleapi.CheckResponse(res); err != nil { 13614 return nil, gensupport.WrapError(err) 13615 } 13616 ret := &Policy{ 13617 ServerResponse: googleapi.ServerResponse{ 13618 Header: res.Header, 13619 HTTPStatusCode: res.StatusCode, 13620 }, 13621 } 13622 target := &ret 13623 if err := gensupport.DecodeResponse(target, res); err != nil { 13624 return nil, err 13625 } 13626 return ret, nil 13627 } 13628 13629 type RowAccessPoliciesListCall struct { 13630 s *Service 13631 projectId string 13632 datasetId string 13633 tableId string 13634 urlParams_ gensupport.URLParams 13635 ifNoneMatch_ string 13636 ctx_ context.Context 13637 header_ http.Header 13638 } 13639 13640 // List: Lists all row access policies on the specified table. 13641 // 13642 // - datasetId: Dataset ID of row access policies to list. 13643 // - projectId: Project ID of the row access policies to list. 13644 // - tableId: Table ID of the table to list row access policies. 13645 func (r *RowAccessPoliciesService) List(projectId string, datasetId string, tableId string) *RowAccessPoliciesListCall { 13646 c := &RowAccessPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13647 c.projectId = projectId 13648 c.datasetId = datasetId 13649 c.tableId = tableId 13650 return c 13651 } 13652 13653 // PageSize sets the optional parameter "pageSize": The maximum number of 13654 // results to return in a single response page. Leverage the page tokens to 13655 // iterate through the entire collection. 13656 func (c *RowAccessPoliciesListCall) PageSize(pageSize int64) *RowAccessPoliciesListCall { 13657 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13658 return c 13659 } 13660 13661 // PageToken sets the optional parameter "pageToken": Page token, returned by a 13662 // previous call, to request the next page of results. 13663 func (c *RowAccessPoliciesListCall) PageToken(pageToken string) *RowAccessPoliciesListCall { 13664 c.urlParams_.Set("pageToken", pageToken) 13665 return c 13666 } 13667 13668 // Fields allows partial responses to be retrieved. See 13669 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13670 // details. 13671 func (c *RowAccessPoliciesListCall) Fields(s ...googleapi.Field) *RowAccessPoliciesListCall { 13672 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13673 return c 13674 } 13675 13676 // IfNoneMatch sets an optional parameter which makes the operation fail if the 13677 // object's ETag matches the given value. This is useful for getting updates 13678 // only after the object has changed since the last request. 13679 func (c *RowAccessPoliciesListCall) IfNoneMatch(entityTag string) *RowAccessPoliciesListCall { 13680 c.ifNoneMatch_ = entityTag 13681 return c 13682 } 13683 13684 // Context sets the context to be used in this call's Do method. 13685 func (c *RowAccessPoliciesListCall) Context(ctx context.Context) *RowAccessPoliciesListCall { 13686 c.ctx_ = ctx 13687 return c 13688 } 13689 13690 // Header returns a http.Header that can be modified by the caller to add 13691 // headers to the request. 13692 func (c *RowAccessPoliciesListCall) Header() http.Header { 13693 if c.header_ == nil { 13694 c.header_ = make(http.Header) 13695 } 13696 return c.header_ 13697 } 13698 13699 func (c *RowAccessPoliciesListCall) doRequest(alt string) (*http.Response, error) { 13700 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 13701 if c.ifNoneMatch_ != "" { 13702 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13703 } 13704 var body io.Reader = nil 13705 c.urlParams_.Set("alt", alt) 13706 c.urlParams_.Set("prettyPrint", "false") 13707 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}/rowAccessPolicies") 13708 urls += "?" + c.urlParams_.Encode() 13709 req, err := http.NewRequest("GET", urls, body) 13710 if err != nil { 13711 return nil, err 13712 } 13713 req.Header = reqHeaders 13714 googleapi.Expand(req.URL, map[string]string{ 13715 "projectId": c.projectId, 13716 "datasetId": c.datasetId, 13717 "tableId": c.tableId, 13718 }) 13719 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13720 } 13721 13722 // Do executes the "bigquery.rowAccessPolicies.list" call. 13723 // Any non-2xx status code is an error. Response headers are in either 13724 // *ListRowAccessPoliciesResponse.ServerResponse.Header or (if a response was 13725 // returned at all) in error.(*googleapi.Error).Header. Use 13726 // googleapi.IsNotModified to check whether the returned error was because 13727 // http.StatusNotModified was returned. 13728 func (c *RowAccessPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListRowAccessPoliciesResponse, error) { 13729 gensupport.SetOptions(c.urlParams_, opts...) 13730 res, err := c.doRequest("json") 13731 if res != nil && res.StatusCode == http.StatusNotModified { 13732 if res.Body != nil { 13733 res.Body.Close() 13734 } 13735 return nil, gensupport.WrapError(&googleapi.Error{ 13736 Code: res.StatusCode, 13737 Header: res.Header, 13738 }) 13739 } 13740 if err != nil { 13741 return nil, err 13742 } 13743 defer googleapi.CloseBody(res) 13744 if err := googleapi.CheckResponse(res); err != nil { 13745 return nil, gensupport.WrapError(err) 13746 } 13747 ret := &ListRowAccessPoliciesResponse{ 13748 ServerResponse: googleapi.ServerResponse{ 13749 Header: res.Header, 13750 HTTPStatusCode: res.StatusCode, 13751 }, 13752 } 13753 target := &ret 13754 if err := gensupport.DecodeResponse(target, res); err != nil { 13755 return nil, err 13756 } 13757 return ret, nil 13758 } 13759 13760 // Pages invokes f for each page of results. 13761 // A non-nil error returned from f will halt the iteration. 13762 // The provided context supersedes any context provided to the Context method. 13763 func (c *RowAccessPoliciesListCall) Pages(ctx context.Context, f func(*ListRowAccessPoliciesResponse) error) error { 13764 c.ctx_ = ctx 13765 defer c.PageToken(c.urlParams_.Get("pageToken")) 13766 for { 13767 x, err := c.Do() 13768 if err != nil { 13769 return err 13770 } 13771 if err := f(x); err != nil { 13772 return err 13773 } 13774 if x.NextPageToken == "" { 13775 return nil 13776 } 13777 c.PageToken(x.NextPageToken) 13778 } 13779 } 13780 13781 type RowAccessPoliciesTestIamPermissionsCall struct { 13782 s *Service 13783 resource string 13784 testiampermissionsrequest *TestIamPermissionsRequest 13785 urlParams_ gensupport.URLParams 13786 ctx_ context.Context 13787 header_ http.Header 13788 } 13789 13790 // TestIamPermissions: Returns permissions that a caller has on the specified 13791 // resource. If the resource does not exist, this will return an empty set of 13792 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be 13793 // used for building permission-aware UIs and command-line tools, not for 13794 // authorization checking. This operation may "fail open" without warning. 13795 // 13796 // - resource: REQUIRED: The resource for which the policy detail is being 13797 // requested. See Resource names 13798 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 13799 // value for this field. 13800 func (r *RowAccessPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *RowAccessPoliciesTestIamPermissionsCall { 13801 c := &RowAccessPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13802 c.resource = resource 13803 c.testiampermissionsrequest = testiampermissionsrequest 13804 return c 13805 } 13806 13807 // Fields allows partial responses to be retrieved. See 13808 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13809 // details. 13810 func (c *RowAccessPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RowAccessPoliciesTestIamPermissionsCall { 13811 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13812 return c 13813 } 13814 13815 // Context sets the context to be used in this call's Do method. 13816 func (c *RowAccessPoliciesTestIamPermissionsCall) Context(ctx context.Context) *RowAccessPoliciesTestIamPermissionsCall { 13817 c.ctx_ = ctx 13818 return c 13819 } 13820 13821 // Header returns a http.Header that can be modified by the caller to add 13822 // headers to the request. 13823 func (c *RowAccessPoliciesTestIamPermissionsCall) Header() http.Header { 13824 if c.header_ == nil { 13825 c.header_ = make(http.Header) 13826 } 13827 return c.header_ 13828 } 13829 13830 func (c *RowAccessPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 13831 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13832 var body io.Reader = nil 13833 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 13834 if err != nil { 13835 return nil, err 13836 } 13837 c.urlParams_.Set("alt", alt) 13838 c.urlParams_.Set("prettyPrint", "false") 13839 urls := googleapi.ResolveRelative(c.s.BasePath, "{+resource}:testIamPermissions") 13840 urls += "?" + c.urlParams_.Encode() 13841 req, err := http.NewRequest("POST", urls, body) 13842 if err != nil { 13843 return nil, err 13844 } 13845 req.Header = reqHeaders 13846 googleapi.Expand(req.URL, map[string]string{ 13847 "resource": c.resource, 13848 }) 13849 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13850 } 13851 13852 // Do executes the "bigquery.rowAccessPolicies.testIamPermissions" call. 13853 // Any non-2xx status code is an error. Response headers are in either 13854 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 13855 // returned at all) in error.(*googleapi.Error).Header. Use 13856 // googleapi.IsNotModified to check whether the returned error was because 13857 // http.StatusNotModified was returned. 13858 func (c *RowAccessPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 13859 gensupport.SetOptions(c.urlParams_, opts...) 13860 res, err := c.doRequest("json") 13861 if res != nil && res.StatusCode == http.StatusNotModified { 13862 if res.Body != nil { 13863 res.Body.Close() 13864 } 13865 return nil, gensupport.WrapError(&googleapi.Error{ 13866 Code: res.StatusCode, 13867 Header: res.Header, 13868 }) 13869 } 13870 if err != nil { 13871 return nil, err 13872 } 13873 defer googleapi.CloseBody(res) 13874 if err := googleapi.CheckResponse(res); err != nil { 13875 return nil, gensupport.WrapError(err) 13876 } 13877 ret := &TestIamPermissionsResponse{ 13878 ServerResponse: googleapi.ServerResponse{ 13879 Header: res.Header, 13880 HTTPStatusCode: res.StatusCode, 13881 }, 13882 } 13883 target := &ret 13884 if err := gensupport.DecodeResponse(target, res); err != nil { 13885 return nil, err 13886 } 13887 return ret, nil 13888 } 13889 13890 type TabledataInsertAllCall struct { 13891 s *Service 13892 projectId string 13893 datasetId string 13894 tableId string 13895 tabledatainsertallrequest *TableDataInsertAllRequest 13896 urlParams_ gensupport.URLParams 13897 ctx_ context.Context 13898 header_ http.Header 13899 } 13900 13901 // InsertAll: Streams data into BigQuery one record at a time without needing 13902 // to run a load job. 13903 // 13904 // - datasetId: Dataset ID of the destination. 13905 // - projectId: Project ID of the destination. 13906 // - tableId: Table ID of the destination. 13907 func (r *TabledataService) InsertAll(projectId string, datasetId string, tableId string, tabledatainsertallrequest *TableDataInsertAllRequest) *TabledataInsertAllCall { 13908 c := &TabledataInsertAllCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13909 c.projectId = projectId 13910 c.datasetId = datasetId 13911 c.tableId = tableId 13912 c.tabledatainsertallrequest = tabledatainsertallrequest 13913 return c 13914 } 13915 13916 // Fields allows partial responses to be retrieved. See 13917 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13918 // details. 13919 func (c *TabledataInsertAllCall) Fields(s ...googleapi.Field) *TabledataInsertAllCall { 13920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13921 return c 13922 } 13923 13924 // Context sets the context to be used in this call's Do method. 13925 func (c *TabledataInsertAllCall) Context(ctx context.Context) *TabledataInsertAllCall { 13926 c.ctx_ = ctx 13927 return c 13928 } 13929 13930 // Header returns a http.Header that can be modified by the caller to add 13931 // headers to the request. 13932 func (c *TabledataInsertAllCall) Header() http.Header { 13933 if c.header_ == nil { 13934 c.header_ = make(http.Header) 13935 } 13936 return c.header_ 13937 } 13938 13939 func (c *TabledataInsertAllCall) doRequest(alt string) (*http.Response, error) { 13940 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13941 var body io.Reader = nil 13942 body, err := googleapi.WithoutDataWrapper.JSONReader(c.tabledatainsertallrequest) 13943 if err != nil { 13944 return nil, err 13945 } 13946 c.urlParams_.Set("alt", alt) 13947 c.urlParams_.Set("prettyPrint", "false") 13948 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}/insertAll") 13949 urls += "?" + c.urlParams_.Encode() 13950 req, err := http.NewRequest("POST", urls, body) 13951 if err != nil { 13952 return nil, err 13953 } 13954 req.Header = reqHeaders 13955 googleapi.Expand(req.URL, map[string]string{ 13956 "projectId": c.projectId, 13957 "datasetId": c.datasetId, 13958 "tableId": c.tableId, 13959 }) 13960 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13961 } 13962 13963 // Do executes the "bigquery.tabledata.insertAll" call. 13964 // Any non-2xx status code is an error. Response headers are in either 13965 // *TableDataInsertAllResponse.ServerResponse.Header or (if a response was 13966 // returned at all) in error.(*googleapi.Error).Header. Use 13967 // googleapi.IsNotModified to check whether the returned error was because 13968 // http.StatusNotModified was returned. 13969 func (c *TabledataInsertAllCall) Do(opts ...googleapi.CallOption) (*TableDataInsertAllResponse, error) { 13970 gensupport.SetOptions(c.urlParams_, opts...) 13971 res, err := c.doRequest("json") 13972 if res != nil && res.StatusCode == http.StatusNotModified { 13973 if res.Body != nil { 13974 res.Body.Close() 13975 } 13976 return nil, gensupport.WrapError(&googleapi.Error{ 13977 Code: res.StatusCode, 13978 Header: res.Header, 13979 }) 13980 } 13981 if err != nil { 13982 return nil, err 13983 } 13984 defer googleapi.CloseBody(res) 13985 if err := googleapi.CheckResponse(res); err != nil { 13986 return nil, gensupport.WrapError(err) 13987 } 13988 ret := &TableDataInsertAllResponse{ 13989 ServerResponse: googleapi.ServerResponse{ 13990 Header: res.Header, 13991 HTTPStatusCode: res.StatusCode, 13992 }, 13993 } 13994 target := &ret 13995 if err := gensupport.DecodeResponse(target, res); err != nil { 13996 return nil, err 13997 } 13998 return ret, nil 13999 } 14000 14001 type TabledataListCall struct { 14002 s *Service 14003 projectId string 14004 datasetId string 14005 tableId string 14006 urlParams_ gensupport.URLParams 14007 ifNoneMatch_ string 14008 ctx_ context.Context 14009 header_ http.Header 14010 } 14011 14012 // List: List the content of a table in rows. 14013 // 14014 // - datasetId: Dataset id of the table to list. 14015 // - projectId: Project id of the table to list. 14016 // - tableId: Table id of the table to list. 14017 func (r *TabledataService) List(projectId string, datasetId string, tableId string) *TabledataListCall { 14018 c := &TabledataListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14019 c.projectId = projectId 14020 c.datasetId = datasetId 14021 c.tableId = tableId 14022 return c 14023 } 14024 14025 // FormatOptionsUseInt64Timestamp sets the optional parameter 14026 // "formatOptions.useInt64Timestamp": Output timestamp as usec int64. Default 14027 // is false. 14028 func (c *TabledataListCall) FormatOptionsUseInt64Timestamp(formatOptionsUseInt64Timestamp bool) *TabledataListCall { 14029 c.urlParams_.Set("formatOptions.useInt64Timestamp", fmt.Sprint(formatOptionsUseInt64Timestamp)) 14030 return c 14031 } 14032 14033 // MaxResults sets the optional parameter "maxResults": Row limit of the table. 14034 func (c *TabledataListCall) MaxResults(maxResults int64) *TabledataListCall { 14035 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 14036 return c 14037 } 14038 14039 // PageToken sets the optional parameter "pageToken": To retrieve the next page 14040 // of table data, set this field to the string provided in the pageToken field 14041 // of the response body from your previous call to tabledata.list. 14042 func (c *TabledataListCall) PageToken(pageToken string) *TabledataListCall { 14043 c.urlParams_.Set("pageToken", pageToken) 14044 return c 14045 } 14046 14047 // SelectedFields sets the optional parameter "selectedFields": Subset of 14048 // fields to return, supports select into sub fields. Example: selected_fields 14049 // = "a,e.d.f"; 14050 func (c *TabledataListCall) SelectedFields(selectedFields string) *TabledataListCall { 14051 c.urlParams_.Set("selectedFields", selectedFields) 14052 return c 14053 } 14054 14055 // StartIndex sets the optional parameter "startIndex": Start row index of the 14056 // table. 14057 func (c *TabledataListCall) StartIndex(startIndex uint64) *TabledataListCall { 14058 c.urlParams_.Set("startIndex", fmt.Sprint(startIndex)) 14059 return c 14060 } 14061 14062 // Fields allows partial responses to be retrieved. See 14063 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14064 // details. 14065 func (c *TabledataListCall) Fields(s ...googleapi.Field) *TabledataListCall { 14066 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14067 return c 14068 } 14069 14070 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14071 // object's ETag matches the given value. This is useful for getting updates 14072 // only after the object has changed since the last request. 14073 func (c *TabledataListCall) IfNoneMatch(entityTag string) *TabledataListCall { 14074 c.ifNoneMatch_ = entityTag 14075 return c 14076 } 14077 14078 // Context sets the context to be used in this call's Do method. 14079 func (c *TabledataListCall) Context(ctx context.Context) *TabledataListCall { 14080 c.ctx_ = ctx 14081 return c 14082 } 14083 14084 // Header returns a http.Header that can be modified by the caller to add 14085 // headers to the request. 14086 func (c *TabledataListCall) Header() http.Header { 14087 if c.header_ == nil { 14088 c.header_ = make(http.Header) 14089 } 14090 return c.header_ 14091 } 14092 14093 func (c *TabledataListCall) doRequest(alt string) (*http.Response, error) { 14094 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14095 if c.ifNoneMatch_ != "" { 14096 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14097 } 14098 var body io.Reader = nil 14099 c.urlParams_.Set("alt", alt) 14100 c.urlParams_.Set("prettyPrint", "false") 14101 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}/data") 14102 urls += "?" + c.urlParams_.Encode() 14103 req, err := http.NewRequest("GET", urls, body) 14104 if err != nil { 14105 return nil, err 14106 } 14107 req.Header = reqHeaders 14108 googleapi.Expand(req.URL, map[string]string{ 14109 "projectId": c.projectId, 14110 "datasetId": c.datasetId, 14111 "tableId": c.tableId, 14112 }) 14113 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14114 } 14115 14116 // Do executes the "bigquery.tabledata.list" call. 14117 // Any non-2xx status code is an error. Response headers are in either 14118 // *TableDataList.ServerResponse.Header or (if a response was returned at all) 14119 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14120 // whether the returned error was because http.StatusNotModified was returned. 14121 func (c *TabledataListCall) Do(opts ...googleapi.CallOption) (*TableDataList, error) { 14122 gensupport.SetOptions(c.urlParams_, opts...) 14123 res, err := c.doRequest("json") 14124 if res != nil && res.StatusCode == http.StatusNotModified { 14125 if res.Body != nil { 14126 res.Body.Close() 14127 } 14128 return nil, gensupport.WrapError(&googleapi.Error{ 14129 Code: res.StatusCode, 14130 Header: res.Header, 14131 }) 14132 } 14133 if err != nil { 14134 return nil, err 14135 } 14136 defer googleapi.CloseBody(res) 14137 if err := googleapi.CheckResponse(res); err != nil { 14138 return nil, gensupport.WrapError(err) 14139 } 14140 ret := &TableDataList{ 14141 ServerResponse: googleapi.ServerResponse{ 14142 Header: res.Header, 14143 HTTPStatusCode: res.StatusCode, 14144 }, 14145 } 14146 target := &ret 14147 if err := gensupport.DecodeResponse(target, res); err != nil { 14148 return nil, err 14149 } 14150 return ret, nil 14151 } 14152 14153 // Pages invokes f for each page of results. 14154 // A non-nil error returned from f will halt the iteration. 14155 // The provided context supersedes any context provided to the Context method. 14156 func (c *TabledataListCall) Pages(ctx context.Context, f func(*TableDataList) error) error { 14157 c.ctx_ = ctx 14158 defer c.PageToken(c.urlParams_.Get("pageToken")) 14159 for { 14160 x, err := c.Do() 14161 if err != nil { 14162 return err 14163 } 14164 if err := f(x); err != nil { 14165 return err 14166 } 14167 if x.PageToken == "" { 14168 return nil 14169 } 14170 c.PageToken(x.PageToken) 14171 } 14172 } 14173 14174 type TablesDeleteCall struct { 14175 s *Service 14176 projectId string 14177 datasetId string 14178 tableId string 14179 urlParams_ gensupport.URLParams 14180 ctx_ context.Context 14181 header_ http.Header 14182 } 14183 14184 // Delete: Deletes the table specified by tableId from the dataset. If the 14185 // table contains data, all the data will be deleted. 14186 // 14187 // - datasetId: Dataset ID of the table to delete. 14188 // - projectId: Project ID of the table to delete. 14189 // - tableId: Table ID of the table to delete. 14190 func (r *TablesService) Delete(projectId string, datasetId string, tableId string) *TablesDeleteCall { 14191 c := &TablesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14192 c.projectId = projectId 14193 c.datasetId = datasetId 14194 c.tableId = tableId 14195 return c 14196 } 14197 14198 // Fields allows partial responses to be retrieved. See 14199 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14200 // details. 14201 func (c *TablesDeleteCall) Fields(s ...googleapi.Field) *TablesDeleteCall { 14202 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14203 return c 14204 } 14205 14206 // Context sets the context to be used in this call's Do method. 14207 func (c *TablesDeleteCall) Context(ctx context.Context) *TablesDeleteCall { 14208 c.ctx_ = ctx 14209 return c 14210 } 14211 14212 // Header returns a http.Header that can be modified by the caller to add 14213 // headers to the request. 14214 func (c *TablesDeleteCall) Header() http.Header { 14215 if c.header_ == nil { 14216 c.header_ = make(http.Header) 14217 } 14218 return c.header_ 14219 } 14220 14221 func (c *TablesDeleteCall) doRequest(alt string) (*http.Response, error) { 14222 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14223 var body io.Reader = nil 14224 c.urlParams_.Set("alt", alt) 14225 c.urlParams_.Set("prettyPrint", "false") 14226 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}") 14227 urls += "?" + c.urlParams_.Encode() 14228 req, err := http.NewRequest("DELETE", urls, body) 14229 if err != nil { 14230 return nil, err 14231 } 14232 req.Header = reqHeaders 14233 googleapi.Expand(req.URL, map[string]string{ 14234 "projectId": c.projectId, 14235 "datasetId": c.datasetId, 14236 "tableId": c.tableId, 14237 }) 14238 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14239 } 14240 14241 // Do executes the "bigquery.tables.delete" call. 14242 func (c *TablesDeleteCall) Do(opts ...googleapi.CallOption) error { 14243 gensupport.SetOptions(c.urlParams_, opts...) 14244 res, err := c.doRequest("json") 14245 if err != nil { 14246 return err 14247 } 14248 defer googleapi.CloseBody(res) 14249 if err := googleapi.CheckResponse(res); err != nil { 14250 return gensupport.WrapError(err) 14251 } 14252 return nil 14253 } 14254 14255 type TablesGetCall struct { 14256 s *Service 14257 projectId string 14258 datasetId string 14259 tableId string 14260 urlParams_ gensupport.URLParams 14261 ifNoneMatch_ string 14262 ctx_ context.Context 14263 header_ http.Header 14264 } 14265 14266 // Get: Gets the specified table resource by table ID. This method does not 14267 // return the data in the table, it only returns the table resource, which 14268 // describes the structure of this table. 14269 // 14270 // - datasetId: Dataset ID of the requested table. 14271 // - projectId: Project ID of the requested table. 14272 // - tableId: Table ID of the requested table. 14273 func (r *TablesService) Get(projectId string, datasetId string, tableId string) *TablesGetCall { 14274 c := &TablesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14275 c.projectId = projectId 14276 c.datasetId = datasetId 14277 c.tableId = tableId 14278 return c 14279 } 14280 14281 // SelectedFields sets the optional parameter "selectedFields": List of table 14282 // schema fields to return (comma-separated). If unspecified, all fields are 14283 // returned. A fieldMask cannot be used here because the fields will 14284 // automatically be converted from camelCase to snake_case and the conversion 14285 // will fail if there are underscores. Since these are fields in BigQuery table 14286 // schemas, underscores are allowed. 14287 func (c *TablesGetCall) SelectedFields(selectedFields string) *TablesGetCall { 14288 c.urlParams_.Set("selectedFields", selectedFields) 14289 return c 14290 } 14291 14292 // View sets the optional parameter "view": Specifies the view that determines 14293 // which table information is returned. By default, basic table information and 14294 // storage statistics (STORAGE_STATS) are returned. 14295 // 14296 // Possible values: 14297 // 14298 // "TABLE_METADATA_VIEW_UNSPECIFIED" - The default value. Default to the 14299 // 14300 // STORAGE_STATS view. 14301 // 14302 // "BASIC" - Includes basic table information including schema and 14303 // 14304 // partitioning specification. This view does not include storage statistics 14305 // such as numRows or numBytes. This view is significantly more efficient and 14306 // should be used to support high query rates. 14307 // 14308 // "STORAGE_STATS" - Includes all information in the BASIC view as well as 14309 // 14310 // storage statistics (numBytes, numLongTermBytes, numRows and 14311 // lastModifiedTime). 14312 // 14313 // "FULL" - Includes all table information, including storage statistics. It 14314 // 14315 // returns same information as STORAGE_STATS view, but may contain additional 14316 // information in the future. 14317 func (c *TablesGetCall) View(view string) *TablesGetCall { 14318 c.urlParams_.Set("view", view) 14319 return c 14320 } 14321 14322 // Fields allows partial responses to be retrieved. See 14323 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14324 // details. 14325 func (c *TablesGetCall) Fields(s ...googleapi.Field) *TablesGetCall { 14326 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14327 return c 14328 } 14329 14330 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14331 // object's ETag matches the given value. This is useful for getting updates 14332 // only after the object has changed since the last request. 14333 func (c *TablesGetCall) IfNoneMatch(entityTag string) *TablesGetCall { 14334 c.ifNoneMatch_ = entityTag 14335 return c 14336 } 14337 14338 // Context sets the context to be used in this call's Do method. 14339 func (c *TablesGetCall) Context(ctx context.Context) *TablesGetCall { 14340 c.ctx_ = ctx 14341 return c 14342 } 14343 14344 // Header returns a http.Header that can be modified by the caller to add 14345 // headers to the request. 14346 func (c *TablesGetCall) Header() http.Header { 14347 if c.header_ == nil { 14348 c.header_ = make(http.Header) 14349 } 14350 return c.header_ 14351 } 14352 14353 func (c *TablesGetCall) doRequest(alt string) (*http.Response, error) { 14354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14355 if c.ifNoneMatch_ != "" { 14356 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14357 } 14358 var body io.Reader = nil 14359 c.urlParams_.Set("alt", alt) 14360 c.urlParams_.Set("prettyPrint", "false") 14361 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}") 14362 urls += "?" + c.urlParams_.Encode() 14363 req, err := http.NewRequest("GET", urls, body) 14364 if err != nil { 14365 return nil, err 14366 } 14367 req.Header = reqHeaders 14368 googleapi.Expand(req.URL, map[string]string{ 14369 "projectId": c.projectId, 14370 "datasetId": c.datasetId, 14371 "tableId": c.tableId, 14372 }) 14373 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14374 } 14375 14376 // Do executes the "bigquery.tables.get" call. 14377 // Any non-2xx status code is an error. Response headers are in either 14378 // *Table.ServerResponse.Header or (if a response was returned at all) in 14379 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14380 // whether the returned error was because http.StatusNotModified was returned. 14381 func (c *TablesGetCall) Do(opts ...googleapi.CallOption) (*Table, error) { 14382 gensupport.SetOptions(c.urlParams_, opts...) 14383 res, err := c.doRequest("json") 14384 if res != nil && res.StatusCode == http.StatusNotModified { 14385 if res.Body != nil { 14386 res.Body.Close() 14387 } 14388 return nil, gensupport.WrapError(&googleapi.Error{ 14389 Code: res.StatusCode, 14390 Header: res.Header, 14391 }) 14392 } 14393 if err != nil { 14394 return nil, err 14395 } 14396 defer googleapi.CloseBody(res) 14397 if err := googleapi.CheckResponse(res); err != nil { 14398 return nil, gensupport.WrapError(err) 14399 } 14400 ret := &Table{ 14401 ServerResponse: googleapi.ServerResponse{ 14402 Header: res.Header, 14403 HTTPStatusCode: res.StatusCode, 14404 }, 14405 } 14406 target := &ret 14407 if err := gensupport.DecodeResponse(target, res); err != nil { 14408 return nil, err 14409 } 14410 return ret, nil 14411 } 14412 14413 type TablesGetIamPolicyCall struct { 14414 s *Service 14415 resource string 14416 getiampolicyrequest *GetIamPolicyRequest 14417 urlParams_ gensupport.URLParams 14418 ctx_ context.Context 14419 header_ http.Header 14420 } 14421 14422 // GetIamPolicy: Gets the access control policy for a resource. Returns an 14423 // empty policy if the resource exists and does not have a policy set. 14424 // 14425 // - resource: REQUIRED: The resource for which the policy is being requested. 14426 // See Resource names (https://cloud.google.com/apis/design/resource_names) 14427 // for the appropriate value for this field. 14428 func (r *TablesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *TablesGetIamPolicyCall { 14429 c := &TablesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14430 c.resource = resource 14431 c.getiampolicyrequest = getiampolicyrequest 14432 return c 14433 } 14434 14435 // Fields allows partial responses to be retrieved. See 14436 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14437 // details. 14438 func (c *TablesGetIamPolicyCall) Fields(s ...googleapi.Field) *TablesGetIamPolicyCall { 14439 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14440 return c 14441 } 14442 14443 // Context sets the context to be used in this call's Do method. 14444 func (c *TablesGetIamPolicyCall) Context(ctx context.Context) *TablesGetIamPolicyCall { 14445 c.ctx_ = ctx 14446 return c 14447 } 14448 14449 // Header returns a http.Header that can be modified by the caller to add 14450 // headers to the request. 14451 func (c *TablesGetIamPolicyCall) Header() http.Header { 14452 if c.header_ == nil { 14453 c.header_ = make(http.Header) 14454 } 14455 return c.header_ 14456 } 14457 14458 func (c *TablesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 14459 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 14460 var body io.Reader = nil 14461 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 14462 if err != nil { 14463 return nil, err 14464 } 14465 c.urlParams_.Set("alt", alt) 14466 c.urlParams_.Set("prettyPrint", "false") 14467 urls := googleapi.ResolveRelative(c.s.BasePath, "{+resource}:getIamPolicy") 14468 urls += "?" + c.urlParams_.Encode() 14469 req, err := http.NewRequest("POST", urls, body) 14470 if err != nil { 14471 return nil, err 14472 } 14473 req.Header = reqHeaders 14474 googleapi.Expand(req.URL, map[string]string{ 14475 "resource": c.resource, 14476 }) 14477 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14478 } 14479 14480 // Do executes the "bigquery.tables.getIamPolicy" call. 14481 // Any non-2xx status code is an error. Response headers are in either 14482 // *Policy.ServerResponse.Header or (if a response was returned at all) in 14483 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14484 // whether the returned error was because http.StatusNotModified was returned. 14485 func (c *TablesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 14486 gensupport.SetOptions(c.urlParams_, opts...) 14487 res, err := c.doRequest("json") 14488 if res != nil && res.StatusCode == http.StatusNotModified { 14489 if res.Body != nil { 14490 res.Body.Close() 14491 } 14492 return nil, gensupport.WrapError(&googleapi.Error{ 14493 Code: res.StatusCode, 14494 Header: res.Header, 14495 }) 14496 } 14497 if err != nil { 14498 return nil, err 14499 } 14500 defer googleapi.CloseBody(res) 14501 if err := googleapi.CheckResponse(res); err != nil { 14502 return nil, gensupport.WrapError(err) 14503 } 14504 ret := &Policy{ 14505 ServerResponse: googleapi.ServerResponse{ 14506 Header: res.Header, 14507 HTTPStatusCode: res.StatusCode, 14508 }, 14509 } 14510 target := &ret 14511 if err := gensupport.DecodeResponse(target, res); err != nil { 14512 return nil, err 14513 } 14514 return ret, nil 14515 } 14516 14517 type TablesInsertCall struct { 14518 s *Service 14519 projectId string 14520 datasetId string 14521 table *Table 14522 urlParams_ gensupport.URLParams 14523 ctx_ context.Context 14524 header_ http.Header 14525 } 14526 14527 // Insert: Creates a new, empty table in the dataset. 14528 // 14529 // - datasetId: Dataset ID of the new table. 14530 // - projectId: Project ID of the new table. 14531 func (r *TablesService) Insert(projectId string, datasetId string, table *Table) *TablesInsertCall { 14532 c := &TablesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14533 c.projectId = projectId 14534 c.datasetId = datasetId 14535 c.table = table 14536 return c 14537 } 14538 14539 // Fields allows partial responses to be retrieved. See 14540 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14541 // details. 14542 func (c *TablesInsertCall) Fields(s ...googleapi.Field) *TablesInsertCall { 14543 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14544 return c 14545 } 14546 14547 // Context sets the context to be used in this call's Do method. 14548 func (c *TablesInsertCall) Context(ctx context.Context) *TablesInsertCall { 14549 c.ctx_ = ctx 14550 return c 14551 } 14552 14553 // Header returns a http.Header that can be modified by the caller to add 14554 // headers to the request. 14555 func (c *TablesInsertCall) Header() http.Header { 14556 if c.header_ == nil { 14557 c.header_ = make(http.Header) 14558 } 14559 return c.header_ 14560 } 14561 14562 func (c *TablesInsertCall) doRequest(alt string) (*http.Response, error) { 14563 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 14564 var body io.Reader = nil 14565 body, err := googleapi.WithoutDataWrapper.JSONReader(c.table) 14566 if err != nil { 14567 return nil, err 14568 } 14569 c.urlParams_.Set("alt", alt) 14570 c.urlParams_.Set("prettyPrint", "false") 14571 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/tables") 14572 urls += "?" + c.urlParams_.Encode() 14573 req, err := http.NewRequest("POST", urls, body) 14574 if err != nil { 14575 return nil, err 14576 } 14577 req.Header = reqHeaders 14578 googleapi.Expand(req.URL, map[string]string{ 14579 "projectId": c.projectId, 14580 "datasetId": c.datasetId, 14581 }) 14582 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14583 } 14584 14585 // Do executes the "bigquery.tables.insert" call. 14586 // Any non-2xx status code is an error. Response headers are in either 14587 // *Table.ServerResponse.Header or (if a response was returned at all) in 14588 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14589 // whether the returned error was because http.StatusNotModified was returned. 14590 func (c *TablesInsertCall) Do(opts ...googleapi.CallOption) (*Table, error) { 14591 gensupport.SetOptions(c.urlParams_, opts...) 14592 res, err := c.doRequest("json") 14593 if res != nil && res.StatusCode == http.StatusNotModified { 14594 if res.Body != nil { 14595 res.Body.Close() 14596 } 14597 return nil, gensupport.WrapError(&googleapi.Error{ 14598 Code: res.StatusCode, 14599 Header: res.Header, 14600 }) 14601 } 14602 if err != nil { 14603 return nil, err 14604 } 14605 defer googleapi.CloseBody(res) 14606 if err := googleapi.CheckResponse(res); err != nil { 14607 return nil, gensupport.WrapError(err) 14608 } 14609 ret := &Table{ 14610 ServerResponse: googleapi.ServerResponse{ 14611 Header: res.Header, 14612 HTTPStatusCode: res.StatusCode, 14613 }, 14614 } 14615 target := &ret 14616 if err := gensupport.DecodeResponse(target, res); err != nil { 14617 return nil, err 14618 } 14619 return ret, nil 14620 } 14621 14622 type TablesListCall struct { 14623 s *Service 14624 projectId string 14625 datasetId string 14626 urlParams_ gensupport.URLParams 14627 ifNoneMatch_ string 14628 ctx_ context.Context 14629 header_ http.Header 14630 } 14631 14632 // List: Lists all tables in the specified dataset. Requires the READER dataset 14633 // role. 14634 // 14635 // - datasetId: Dataset ID of the tables to list. 14636 // - projectId: Project ID of the tables to list. 14637 func (r *TablesService) List(projectId string, datasetId string) *TablesListCall { 14638 c := &TablesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14639 c.projectId = projectId 14640 c.datasetId = datasetId 14641 return c 14642 } 14643 14644 // MaxResults sets the optional parameter "maxResults": The maximum number of 14645 // results to return in a single response page. Leverage the page tokens to 14646 // iterate through the entire collection. 14647 func (c *TablesListCall) MaxResults(maxResults int64) *TablesListCall { 14648 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 14649 return c 14650 } 14651 14652 // PageToken sets the optional parameter "pageToken": Page token, returned by a 14653 // previous call, to request the next page of results 14654 func (c *TablesListCall) PageToken(pageToken string) *TablesListCall { 14655 c.urlParams_.Set("pageToken", pageToken) 14656 return c 14657 } 14658 14659 // Fields allows partial responses to be retrieved. See 14660 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14661 // details. 14662 func (c *TablesListCall) Fields(s ...googleapi.Field) *TablesListCall { 14663 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14664 return c 14665 } 14666 14667 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14668 // object's ETag matches the given value. This is useful for getting updates 14669 // only after the object has changed since the last request. 14670 func (c *TablesListCall) IfNoneMatch(entityTag string) *TablesListCall { 14671 c.ifNoneMatch_ = entityTag 14672 return c 14673 } 14674 14675 // Context sets the context to be used in this call's Do method. 14676 func (c *TablesListCall) Context(ctx context.Context) *TablesListCall { 14677 c.ctx_ = ctx 14678 return c 14679 } 14680 14681 // Header returns a http.Header that can be modified by the caller to add 14682 // headers to the request. 14683 func (c *TablesListCall) Header() http.Header { 14684 if c.header_ == nil { 14685 c.header_ = make(http.Header) 14686 } 14687 return c.header_ 14688 } 14689 14690 func (c *TablesListCall) doRequest(alt string) (*http.Response, error) { 14691 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14692 if c.ifNoneMatch_ != "" { 14693 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14694 } 14695 var body io.Reader = nil 14696 c.urlParams_.Set("alt", alt) 14697 c.urlParams_.Set("prettyPrint", "false") 14698 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/tables") 14699 urls += "?" + c.urlParams_.Encode() 14700 req, err := http.NewRequest("GET", urls, body) 14701 if err != nil { 14702 return nil, err 14703 } 14704 req.Header = reqHeaders 14705 googleapi.Expand(req.URL, map[string]string{ 14706 "projectId": c.projectId, 14707 "datasetId": c.datasetId, 14708 }) 14709 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14710 } 14711 14712 // Do executes the "bigquery.tables.list" call. 14713 // Any non-2xx status code is an error. Response headers are in either 14714 // *TableList.ServerResponse.Header or (if a response was returned at all) in 14715 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14716 // whether the returned error was because http.StatusNotModified was returned. 14717 func (c *TablesListCall) Do(opts ...googleapi.CallOption) (*TableList, error) { 14718 gensupport.SetOptions(c.urlParams_, opts...) 14719 res, err := c.doRequest("json") 14720 if res != nil && res.StatusCode == http.StatusNotModified { 14721 if res.Body != nil { 14722 res.Body.Close() 14723 } 14724 return nil, gensupport.WrapError(&googleapi.Error{ 14725 Code: res.StatusCode, 14726 Header: res.Header, 14727 }) 14728 } 14729 if err != nil { 14730 return nil, err 14731 } 14732 defer googleapi.CloseBody(res) 14733 if err := googleapi.CheckResponse(res); err != nil { 14734 return nil, gensupport.WrapError(err) 14735 } 14736 ret := &TableList{ 14737 ServerResponse: googleapi.ServerResponse{ 14738 Header: res.Header, 14739 HTTPStatusCode: res.StatusCode, 14740 }, 14741 } 14742 target := &ret 14743 if err := gensupport.DecodeResponse(target, res); err != nil { 14744 return nil, err 14745 } 14746 return ret, nil 14747 } 14748 14749 // Pages invokes f for each page of results. 14750 // A non-nil error returned from f will halt the iteration. 14751 // The provided context supersedes any context provided to the Context method. 14752 func (c *TablesListCall) Pages(ctx context.Context, f func(*TableList) error) error { 14753 c.ctx_ = ctx 14754 defer c.PageToken(c.urlParams_.Get("pageToken")) 14755 for { 14756 x, err := c.Do() 14757 if err != nil { 14758 return err 14759 } 14760 if err := f(x); err != nil { 14761 return err 14762 } 14763 if x.NextPageToken == "" { 14764 return nil 14765 } 14766 c.PageToken(x.NextPageToken) 14767 } 14768 } 14769 14770 type TablesPatchCall struct { 14771 s *Service 14772 projectId string 14773 datasetId string 14774 tableId string 14775 table *Table 14776 urlParams_ gensupport.URLParams 14777 ctx_ context.Context 14778 header_ http.Header 14779 } 14780 14781 // Patch: Updates information in an existing table. The update method replaces 14782 // the entire table resource, whereas the patch method only replaces fields 14783 // that are provided in the submitted table resource. This method supports 14784 // RFC5789 patch semantics. 14785 // 14786 // - datasetId: Dataset ID of the table to update. 14787 // - projectId: Project ID of the table to update. 14788 // - tableId: Table ID of the table to update. 14789 func (r *TablesService) Patch(projectId string, datasetId string, tableId string, table *Table) *TablesPatchCall { 14790 c := &TablesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14791 c.projectId = projectId 14792 c.datasetId = datasetId 14793 c.tableId = tableId 14794 c.table = table 14795 return c 14796 } 14797 14798 // AutodetectSchema sets the optional parameter "autodetect_schema": When true 14799 // will autodetect schema, else will keep original schema 14800 func (c *TablesPatchCall) AutodetectSchema(autodetectSchema bool) *TablesPatchCall { 14801 c.urlParams_.Set("autodetect_schema", fmt.Sprint(autodetectSchema)) 14802 return c 14803 } 14804 14805 // Fields allows partial responses to be retrieved. See 14806 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14807 // details. 14808 func (c *TablesPatchCall) Fields(s ...googleapi.Field) *TablesPatchCall { 14809 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14810 return c 14811 } 14812 14813 // Context sets the context to be used in this call's Do method. 14814 func (c *TablesPatchCall) Context(ctx context.Context) *TablesPatchCall { 14815 c.ctx_ = ctx 14816 return c 14817 } 14818 14819 // Header returns a http.Header that can be modified by the caller to add 14820 // headers to the request. 14821 func (c *TablesPatchCall) Header() http.Header { 14822 if c.header_ == nil { 14823 c.header_ = make(http.Header) 14824 } 14825 return c.header_ 14826 } 14827 14828 func (c *TablesPatchCall) doRequest(alt string) (*http.Response, error) { 14829 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 14830 var body io.Reader = nil 14831 body, err := googleapi.WithoutDataWrapper.JSONReader(c.table) 14832 if err != nil { 14833 return nil, err 14834 } 14835 c.urlParams_.Set("alt", alt) 14836 c.urlParams_.Set("prettyPrint", "false") 14837 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}") 14838 urls += "?" + c.urlParams_.Encode() 14839 req, err := http.NewRequest("PATCH", urls, body) 14840 if err != nil { 14841 return nil, err 14842 } 14843 req.Header = reqHeaders 14844 googleapi.Expand(req.URL, map[string]string{ 14845 "projectId": c.projectId, 14846 "datasetId": c.datasetId, 14847 "tableId": c.tableId, 14848 }) 14849 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14850 } 14851 14852 // Do executes the "bigquery.tables.patch" call. 14853 // Any non-2xx status code is an error. Response headers are in either 14854 // *Table.ServerResponse.Header or (if a response was returned at all) in 14855 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14856 // whether the returned error was because http.StatusNotModified was returned. 14857 func (c *TablesPatchCall) Do(opts ...googleapi.CallOption) (*Table, error) { 14858 gensupport.SetOptions(c.urlParams_, opts...) 14859 res, err := c.doRequest("json") 14860 if res != nil && res.StatusCode == http.StatusNotModified { 14861 if res.Body != nil { 14862 res.Body.Close() 14863 } 14864 return nil, gensupport.WrapError(&googleapi.Error{ 14865 Code: res.StatusCode, 14866 Header: res.Header, 14867 }) 14868 } 14869 if err != nil { 14870 return nil, err 14871 } 14872 defer googleapi.CloseBody(res) 14873 if err := googleapi.CheckResponse(res); err != nil { 14874 return nil, gensupport.WrapError(err) 14875 } 14876 ret := &Table{ 14877 ServerResponse: googleapi.ServerResponse{ 14878 Header: res.Header, 14879 HTTPStatusCode: res.StatusCode, 14880 }, 14881 } 14882 target := &ret 14883 if err := gensupport.DecodeResponse(target, res); err != nil { 14884 return nil, err 14885 } 14886 return ret, nil 14887 } 14888 14889 type TablesSetIamPolicyCall struct { 14890 s *Service 14891 resource string 14892 setiampolicyrequest *SetIamPolicyRequest 14893 urlParams_ gensupport.URLParams 14894 ctx_ context.Context 14895 header_ http.Header 14896 } 14897 14898 // SetIamPolicy: Sets the access control policy on the specified resource. 14899 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, 14900 // and `PERMISSION_DENIED` errors. 14901 // 14902 // - resource: REQUIRED: The resource for which the policy is being specified. 14903 // See Resource names (https://cloud.google.com/apis/design/resource_names) 14904 // for the appropriate value for this field. 14905 func (r *TablesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *TablesSetIamPolicyCall { 14906 c := &TablesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14907 c.resource = resource 14908 c.setiampolicyrequest = setiampolicyrequest 14909 return c 14910 } 14911 14912 // Fields allows partial responses to be retrieved. See 14913 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14914 // details. 14915 func (c *TablesSetIamPolicyCall) Fields(s ...googleapi.Field) *TablesSetIamPolicyCall { 14916 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14917 return c 14918 } 14919 14920 // Context sets the context to be used in this call's Do method. 14921 func (c *TablesSetIamPolicyCall) Context(ctx context.Context) *TablesSetIamPolicyCall { 14922 c.ctx_ = ctx 14923 return c 14924 } 14925 14926 // Header returns a http.Header that can be modified by the caller to add 14927 // headers to the request. 14928 func (c *TablesSetIamPolicyCall) Header() http.Header { 14929 if c.header_ == nil { 14930 c.header_ = make(http.Header) 14931 } 14932 return c.header_ 14933 } 14934 14935 func (c *TablesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 14936 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 14937 var body io.Reader = nil 14938 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 14939 if err != nil { 14940 return nil, err 14941 } 14942 c.urlParams_.Set("alt", alt) 14943 c.urlParams_.Set("prettyPrint", "false") 14944 urls := googleapi.ResolveRelative(c.s.BasePath, "{+resource}:setIamPolicy") 14945 urls += "?" + c.urlParams_.Encode() 14946 req, err := http.NewRequest("POST", urls, body) 14947 if err != nil { 14948 return nil, err 14949 } 14950 req.Header = reqHeaders 14951 googleapi.Expand(req.URL, map[string]string{ 14952 "resource": c.resource, 14953 }) 14954 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14955 } 14956 14957 // Do executes the "bigquery.tables.setIamPolicy" call. 14958 // Any non-2xx status code is an error. Response headers are in either 14959 // *Policy.ServerResponse.Header or (if a response was returned at all) in 14960 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14961 // whether the returned error was because http.StatusNotModified was returned. 14962 func (c *TablesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 14963 gensupport.SetOptions(c.urlParams_, opts...) 14964 res, err := c.doRequest("json") 14965 if res != nil && res.StatusCode == http.StatusNotModified { 14966 if res.Body != nil { 14967 res.Body.Close() 14968 } 14969 return nil, gensupport.WrapError(&googleapi.Error{ 14970 Code: res.StatusCode, 14971 Header: res.Header, 14972 }) 14973 } 14974 if err != nil { 14975 return nil, err 14976 } 14977 defer googleapi.CloseBody(res) 14978 if err := googleapi.CheckResponse(res); err != nil { 14979 return nil, gensupport.WrapError(err) 14980 } 14981 ret := &Policy{ 14982 ServerResponse: googleapi.ServerResponse{ 14983 Header: res.Header, 14984 HTTPStatusCode: res.StatusCode, 14985 }, 14986 } 14987 target := &ret 14988 if err := gensupport.DecodeResponse(target, res); err != nil { 14989 return nil, err 14990 } 14991 return ret, nil 14992 } 14993 14994 type TablesTestIamPermissionsCall struct { 14995 s *Service 14996 resource string 14997 testiampermissionsrequest *TestIamPermissionsRequest 14998 urlParams_ gensupport.URLParams 14999 ctx_ context.Context 15000 header_ http.Header 15001 } 15002 15003 // TestIamPermissions: Returns permissions that a caller has on the specified 15004 // resource. If the resource does not exist, this will return an empty set of 15005 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be 15006 // used for building permission-aware UIs and command-line tools, not for 15007 // authorization checking. This operation may "fail open" without warning. 15008 // 15009 // - resource: REQUIRED: The resource for which the policy detail is being 15010 // requested. See Resource names 15011 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 15012 // value for this field. 15013 func (r *TablesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *TablesTestIamPermissionsCall { 15014 c := &TablesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15015 c.resource = resource 15016 c.testiampermissionsrequest = testiampermissionsrequest 15017 return c 15018 } 15019 15020 // Fields allows partial responses to be retrieved. See 15021 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 15022 // details. 15023 func (c *TablesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TablesTestIamPermissionsCall { 15024 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15025 return c 15026 } 15027 15028 // Context sets the context to be used in this call's Do method. 15029 func (c *TablesTestIamPermissionsCall) Context(ctx context.Context) *TablesTestIamPermissionsCall { 15030 c.ctx_ = ctx 15031 return c 15032 } 15033 15034 // Header returns a http.Header that can be modified by the caller to add 15035 // headers to the request. 15036 func (c *TablesTestIamPermissionsCall) Header() http.Header { 15037 if c.header_ == nil { 15038 c.header_ = make(http.Header) 15039 } 15040 return c.header_ 15041 } 15042 15043 func (c *TablesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 15044 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 15045 var body io.Reader = nil 15046 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 15047 if err != nil { 15048 return nil, err 15049 } 15050 c.urlParams_.Set("alt", alt) 15051 c.urlParams_.Set("prettyPrint", "false") 15052 urls := googleapi.ResolveRelative(c.s.BasePath, "{+resource}:testIamPermissions") 15053 urls += "?" + c.urlParams_.Encode() 15054 req, err := http.NewRequest("POST", urls, body) 15055 if err != nil { 15056 return nil, err 15057 } 15058 req.Header = reqHeaders 15059 googleapi.Expand(req.URL, map[string]string{ 15060 "resource": c.resource, 15061 }) 15062 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15063 } 15064 15065 // Do executes the "bigquery.tables.testIamPermissions" call. 15066 // Any non-2xx status code is an error. Response headers are in either 15067 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 15068 // returned at all) in error.(*googleapi.Error).Header. Use 15069 // googleapi.IsNotModified to check whether the returned error was because 15070 // http.StatusNotModified was returned. 15071 func (c *TablesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 15072 gensupport.SetOptions(c.urlParams_, opts...) 15073 res, err := c.doRequest("json") 15074 if res != nil && res.StatusCode == http.StatusNotModified { 15075 if res.Body != nil { 15076 res.Body.Close() 15077 } 15078 return nil, gensupport.WrapError(&googleapi.Error{ 15079 Code: res.StatusCode, 15080 Header: res.Header, 15081 }) 15082 } 15083 if err != nil { 15084 return nil, err 15085 } 15086 defer googleapi.CloseBody(res) 15087 if err := googleapi.CheckResponse(res); err != nil { 15088 return nil, gensupport.WrapError(err) 15089 } 15090 ret := &TestIamPermissionsResponse{ 15091 ServerResponse: googleapi.ServerResponse{ 15092 Header: res.Header, 15093 HTTPStatusCode: res.StatusCode, 15094 }, 15095 } 15096 target := &ret 15097 if err := gensupport.DecodeResponse(target, res); err != nil { 15098 return nil, err 15099 } 15100 return ret, nil 15101 } 15102 15103 type TablesUpdateCall struct { 15104 s *Service 15105 projectId string 15106 datasetId string 15107 tableId string 15108 table *Table 15109 urlParams_ gensupport.URLParams 15110 ctx_ context.Context 15111 header_ http.Header 15112 } 15113 15114 // Update: Updates information in an existing table. The update method replaces 15115 // the entire Table resource, whereas the patch method only replaces fields 15116 // that are provided in the submitted Table resource. 15117 // 15118 // - datasetId: Dataset ID of the table to update. 15119 // - projectId: Project ID of the table to update. 15120 // - tableId: Table ID of the table to update. 15121 func (r *TablesService) Update(projectId string, datasetId string, tableId string, table *Table) *TablesUpdateCall { 15122 c := &TablesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15123 c.projectId = projectId 15124 c.datasetId = datasetId 15125 c.tableId = tableId 15126 c.table = table 15127 return c 15128 } 15129 15130 // AutodetectSchema sets the optional parameter "autodetect_schema": When true 15131 // will autodetect schema, else will keep original schema 15132 func (c *TablesUpdateCall) AutodetectSchema(autodetectSchema bool) *TablesUpdateCall { 15133 c.urlParams_.Set("autodetect_schema", fmt.Sprint(autodetectSchema)) 15134 return c 15135 } 15136 15137 // Fields allows partial responses to be retrieved. See 15138 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 15139 // details. 15140 func (c *TablesUpdateCall) Fields(s ...googleapi.Field) *TablesUpdateCall { 15141 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15142 return c 15143 } 15144 15145 // Context sets the context to be used in this call's Do method. 15146 func (c *TablesUpdateCall) Context(ctx context.Context) *TablesUpdateCall { 15147 c.ctx_ = ctx 15148 return c 15149 } 15150 15151 // Header returns a http.Header that can be modified by the caller to add 15152 // headers to the request. 15153 func (c *TablesUpdateCall) Header() http.Header { 15154 if c.header_ == nil { 15155 c.header_ = make(http.Header) 15156 } 15157 return c.header_ 15158 } 15159 15160 func (c *TablesUpdateCall) doRequest(alt string) (*http.Response, error) { 15161 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 15162 var body io.Reader = nil 15163 body, err := googleapi.WithoutDataWrapper.JSONReader(c.table) 15164 if err != nil { 15165 return nil, err 15166 } 15167 c.urlParams_.Set("alt", alt) 15168 c.urlParams_.Set("prettyPrint", "false") 15169 urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}") 15170 urls += "?" + c.urlParams_.Encode() 15171 req, err := http.NewRequest("PUT", urls, body) 15172 if err != nil { 15173 return nil, err 15174 } 15175 req.Header = reqHeaders 15176 googleapi.Expand(req.URL, map[string]string{ 15177 "projectId": c.projectId, 15178 "datasetId": c.datasetId, 15179 "tableId": c.tableId, 15180 }) 15181 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15182 } 15183 15184 // Do executes the "bigquery.tables.update" call. 15185 // Any non-2xx status code is an error. Response headers are in either 15186 // *Table.ServerResponse.Header or (if a response was returned at all) in 15187 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15188 // whether the returned error was because http.StatusNotModified was returned. 15189 func (c *TablesUpdateCall) Do(opts ...googleapi.CallOption) (*Table, error) { 15190 gensupport.SetOptions(c.urlParams_, opts...) 15191 res, err := c.doRequest("json") 15192 if res != nil && res.StatusCode == http.StatusNotModified { 15193 if res.Body != nil { 15194 res.Body.Close() 15195 } 15196 return nil, gensupport.WrapError(&googleapi.Error{ 15197 Code: res.StatusCode, 15198 Header: res.Header, 15199 }) 15200 } 15201 if err != nil { 15202 return nil, err 15203 } 15204 defer googleapi.CloseBody(res) 15205 if err := googleapi.CheckResponse(res); err != nil { 15206 return nil, gensupport.WrapError(err) 15207 } 15208 ret := &Table{ 15209 ServerResponse: googleapi.ServerResponse{ 15210 Header: res.Header, 15211 HTTPStatusCode: res.StatusCode, 15212 }, 15213 } 15214 target := &ret 15215 if err := gensupport.DecodeResponse(target, res); err != nil { 15216 return nil, err 15217 } 15218 return ret, nil 15219 } 15220