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