...

Source file src/google.golang.org/api/firebasehosting/v1beta1/firebasehosting-gen.go

Documentation: google.golang.org/api/firebasehosting/v1beta1

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package firebasehosting provides access to the Firebase Hosting API.
     8  //
     9  // For product documentation, see: https://firebase.google.com/docs/hosting/
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/firebasehosting/v1beta1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	firebasehostingService, err := firebasehosting.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	firebasehostingService, err := firebasehosting.NewService(ctx, option.WithScopes(firebasehosting.FirebaseReadonlyScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	firebasehostingService, err := firebasehosting.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	firebasehostingService, err := firebasehosting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package firebasehosting // import "google.golang.org/api/firebasehosting/v1beta1"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "firebasehosting:v1beta1"
    95  const apiName = "firebasehosting"
    96  const apiVersion = "v1beta1"
    97  const basePath = "https://firebasehosting.googleapis.com/"
    98  const basePathTemplate = "https://firebasehosting.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://firebasehosting.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// See, edit, configure, and delete your Google Cloud data and see the email
   104  	// address for your Google Account.
   105  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   106  
   107  	// View your data across Google Cloud services and see the email address of
   108  	// your Google Account
   109  	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
   110  
   111  	// View and administer all your Firebase data and settings
   112  	FirebaseScope = "https://www.googleapis.com/auth/firebase"
   113  
   114  	// View all your Firebase data and settings
   115  	FirebaseReadonlyScope = "https://www.googleapis.com/auth/firebase.readonly"
   116  )
   117  
   118  // NewService creates a new Service.
   119  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   120  	scopesOption := internaloption.WithDefaultScopes(
   121  		"https://www.googleapis.com/auth/cloud-platform",
   122  		"https://www.googleapis.com/auth/cloud-platform.read-only",
   123  		"https://www.googleapis.com/auth/firebase",
   124  		"https://www.googleapis.com/auth/firebase.readonly",
   125  	)
   126  	// NOTE: prepend, so we don't override user-specified scopes.
   127  	opts = append([]option.ClientOption{scopesOption}, opts...)
   128  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   129  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   130  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   131  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   132  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   133  	if err != nil {
   134  		return nil, err
   135  	}
   136  	s, err := New(client)
   137  	if err != nil {
   138  		return nil, err
   139  	}
   140  	if endpoint != "" {
   141  		s.BasePath = endpoint
   142  	}
   143  	return s, nil
   144  }
   145  
   146  // New creates a new Service. It uses the provided http.Client for requests.
   147  //
   148  // Deprecated: please use NewService instead.
   149  // To provide a custom HTTP client, use option.WithHTTPClient.
   150  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   151  func New(client *http.Client) (*Service, error) {
   152  	if client == nil {
   153  		return nil, errors.New("client is nil")
   154  	}
   155  	s := &Service{client: client, BasePath: basePath}
   156  	s.Projects = NewProjectsService(s)
   157  	s.Sites = NewSitesService(s)
   158  	return s, nil
   159  }
   160  
   161  type Service struct {
   162  	client    *http.Client
   163  	BasePath  string // API endpoint base URL
   164  	UserAgent string // optional additional User-Agent fragment
   165  
   166  	Projects *ProjectsService
   167  
   168  	Sites *SitesService
   169  }
   170  
   171  func (s *Service) userAgent() string {
   172  	if s.UserAgent == "" {
   173  		return googleapi.UserAgent
   174  	}
   175  	return googleapi.UserAgent + " " + s.UserAgent
   176  }
   177  
   178  func NewProjectsService(s *Service) *ProjectsService {
   179  	rs := &ProjectsService{s: s}
   180  	rs.Operations = NewProjectsOperationsService(s)
   181  	rs.Sites = NewProjectsSitesService(s)
   182  	return rs
   183  }
   184  
   185  type ProjectsService struct {
   186  	s *Service
   187  
   188  	Operations *ProjectsOperationsService
   189  
   190  	Sites *ProjectsSitesService
   191  }
   192  
   193  func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
   194  	rs := &ProjectsOperationsService{s: s}
   195  	return rs
   196  }
   197  
   198  type ProjectsOperationsService struct {
   199  	s *Service
   200  }
   201  
   202  func NewProjectsSitesService(s *Service) *ProjectsSitesService {
   203  	rs := &ProjectsSitesService{s: s}
   204  	rs.Channels = NewProjectsSitesChannelsService(s)
   205  	rs.CustomDomains = NewProjectsSitesCustomDomainsService(s)
   206  	rs.Domains = NewProjectsSitesDomainsService(s)
   207  	rs.Releases = NewProjectsSitesReleasesService(s)
   208  	rs.Versions = NewProjectsSitesVersionsService(s)
   209  	return rs
   210  }
   211  
   212  type ProjectsSitesService struct {
   213  	s *Service
   214  
   215  	Channels *ProjectsSitesChannelsService
   216  
   217  	CustomDomains *ProjectsSitesCustomDomainsService
   218  
   219  	Domains *ProjectsSitesDomainsService
   220  
   221  	Releases *ProjectsSitesReleasesService
   222  
   223  	Versions *ProjectsSitesVersionsService
   224  }
   225  
   226  func NewProjectsSitesChannelsService(s *Service) *ProjectsSitesChannelsService {
   227  	rs := &ProjectsSitesChannelsService{s: s}
   228  	rs.Releases = NewProjectsSitesChannelsReleasesService(s)
   229  	return rs
   230  }
   231  
   232  type ProjectsSitesChannelsService struct {
   233  	s *Service
   234  
   235  	Releases *ProjectsSitesChannelsReleasesService
   236  }
   237  
   238  func NewProjectsSitesChannelsReleasesService(s *Service) *ProjectsSitesChannelsReleasesService {
   239  	rs := &ProjectsSitesChannelsReleasesService{s: s}
   240  	return rs
   241  }
   242  
   243  type ProjectsSitesChannelsReleasesService struct {
   244  	s *Service
   245  }
   246  
   247  func NewProjectsSitesCustomDomainsService(s *Service) *ProjectsSitesCustomDomainsService {
   248  	rs := &ProjectsSitesCustomDomainsService{s: s}
   249  	rs.Operations = NewProjectsSitesCustomDomainsOperationsService(s)
   250  	return rs
   251  }
   252  
   253  type ProjectsSitesCustomDomainsService struct {
   254  	s *Service
   255  
   256  	Operations *ProjectsSitesCustomDomainsOperationsService
   257  }
   258  
   259  func NewProjectsSitesCustomDomainsOperationsService(s *Service) *ProjectsSitesCustomDomainsOperationsService {
   260  	rs := &ProjectsSitesCustomDomainsOperationsService{s: s}
   261  	return rs
   262  }
   263  
   264  type ProjectsSitesCustomDomainsOperationsService struct {
   265  	s *Service
   266  }
   267  
   268  func NewProjectsSitesDomainsService(s *Service) *ProjectsSitesDomainsService {
   269  	rs := &ProjectsSitesDomainsService{s: s}
   270  	return rs
   271  }
   272  
   273  type ProjectsSitesDomainsService struct {
   274  	s *Service
   275  }
   276  
   277  func NewProjectsSitesReleasesService(s *Service) *ProjectsSitesReleasesService {
   278  	rs := &ProjectsSitesReleasesService{s: s}
   279  	return rs
   280  }
   281  
   282  type ProjectsSitesReleasesService struct {
   283  	s *Service
   284  }
   285  
   286  func NewProjectsSitesVersionsService(s *Service) *ProjectsSitesVersionsService {
   287  	rs := &ProjectsSitesVersionsService{s: s}
   288  	rs.Files = NewProjectsSitesVersionsFilesService(s)
   289  	return rs
   290  }
   291  
   292  type ProjectsSitesVersionsService struct {
   293  	s *Service
   294  
   295  	Files *ProjectsSitesVersionsFilesService
   296  }
   297  
   298  func NewProjectsSitesVersionsFilesService(s *Service) *ProjectsSitesVersionsFilesService {
   299  	rs := &ProjectsSitesVersionsFilesService{s: s}
   300  	return rs
   301  }
   302  
   303  type ProjectsSitesVersionsFilesService struct {
   304  	s *Service
   305  }
   306  
   307  func NewSitesService(s *Service) *SitesService {
   308  	rs := &SitesService{s: s}
   309  	rs.Channels = NewSitesChannelsService(s)
   310  	rs.Domains = NewSitesDomainsService(s)
   311  	rs.Releases = NewSitesReleasesService(s)
   312  	rs.Versions = NewSitesVersionsService(s)
   313  	return rs
   314  }
   315  
   316  type SitesService struct {
   317  	s *Service
   318  
   319  	Channels *SitesChannelsService
   320  
   321  	Domains *SitesDomainsService
   322  
   323  	Releases *SitesReleasesService
   324  
   325  	Versions *SitesVersionsService
   326  }
   327  
   328  func NewSitesChannelsService(s *Service) *SitesChannelsService {
   329  	rs := &SitesChannelsService{s: s}
   330  	rs.Releases = NewSitesChannelsReleasesService(s)
   331  	return rs
   332  }
   333  
   334  type SitesChannelsService struct {
   335  	s *Service
   336  
   337  	Releases *SitesChannelsReleasesService
   338  }
   339  
   340  func NewSitesChannelsReleasesService(s *Service) *SitesChannelsReleasesService {
   341  	rs := &SitesChannelsReleasesService{s: s}
   342  	return rs
   343  }
   344  
   345  type SitesChannelsReleasesService struct {
   346  	s *Service
   347  }
   348  
   349  func NewSitesDomainsService(s *Service) *SitesDomainsService {
   350  	rs := &SitesDomainsService{s: s}
   351  	return rs
   352  }
   353  
   354  type SitesDomainsService struct {
   355  	s *Service
   356  }
   357  
   358  func NewSitesReleasesService(s *Service) *SitesReleasesService {
   359  	rs := &SitesReleasesService{s: s}
   360  	return rs
   361  }
   362  
   363  type SitesReleasesService struct {
   364  	s *Service
   365  }
   366  
   367  func NewSitesVersionsService(s *Service) *SitesVersionsService {
   368  	rs := &SitesVersionsService{s: s}
   369  	rs.Files = NewSitesVersionsFilesService(s)
   370  	return rs
   371  }
   372  
   373  type SitesVersionsService struct {
   374  	s *Service
   375  
   376  	Files *SitesVersionsFilesService
   377  }
   378  
   379  func NewSitesVersionsFilesService(s *Service) *SitesVersionsFilesService {
   380  	rs := &SitesVersionsFilesService{s: s}
   381  	return rs
   382  }
   383  
   384  type SitesVersionsFilesService struct {
   385  	s *Service
   386  }
   387  
   388  // ActingUser: Contains metadata about the user who performed an action, such
   389  // as creating a release or finalizing a version.
   390  type ActingUser struct {
   391  	// Email: The email address of the user when the user performed the action.
   392  	Email string `json:"email,omitempty"`
   393  	// ImageUrl: A profile image URL for the user. May not be present if the user
   394  	// has changed their email address or deleted their account.
   395  	ImageUrl string `json:"imageUrl,omitempty"`
   396  	// ForceSendFields is a list of field names (e.g. "Email") to unconditionally
   397  	// include in API requests. By default, fields with empty or default values are
   398  	// omitted from API requests. See
   399  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   400  	// details.
   401  	ForceSendFields []string `json:"-"`
   402  	// NullFields is a list of field names (e.g. "Email") to include in API
   403  	// requests with the JSON null value. By default, fields with empty values are
   404  	// omitted from API requests. See
   405  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   406  	NullFields []string `json:"-"`
   407  }
   408  
   409  func (s *ActingUser) MarshalJSON() ([]byte, error) {
   410  	type NoMethod ActingUser
   411  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   412  }
   413  
   414  // CertDnsChallenge: Represents a DNS certificate challenge.
   415  type CertDnsChallenge struct {
   416  	// DomainName: The domain name upon which the DNS challenge must be satisfied.
   417  	DomainName string `json:"domainName,omitempty"`
   418  	// Token: The value that must be present as a TXT record on the domain name to
   419  	// satisfy the challenge.
   420  	Token string `json:"token,omitempty"`
   421  	// ForceSendFields is a list of field names (e.g. "DomainName") to
   422  	// unconditionally include in API requests. By default, fields with empty or
   423  	// default values are omitted from API requests. See
   424  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   425  	// details.
   426  	ForceSendFields []string `json:"-"`
   427  	// NullFields is a list of field names (e.g. "DomainName") to include in API
   428  	// requests with the JSON null value. By default, fields with empty values are
   429  	// omitted from API requests. See
   430  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   431  	NullFields []string `json:"-"`
   432  }
   433  
   434  func (s *CertDnsChallenge) MarshalJSON() ([]byte, error) {
   435  	type NoMethod CertDnsChallenge
   436  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   437  }
   438  
   439  // CertHttpChallenge: Represents an HTTP certificate challenge.
   440  type CertHttpChallenge struct {
   441  	// Path: The URL path on which to serve the specified token to satisfy the
   442  	// certificate challenge.
   443  	Path string `json:"path,omitempty"`
   444  	// Token: The token to serve at the specified URL path to satisfy the
   445  	// certificate challenge.
   446  	Token string `json:"token,omitempty"`
   447  	// ForceSendFields is a list of field names (e.g. "Path") to unconditionally
   448  	// include in API requests. By default, fields with empty or default values are
   449  	// omitted from API requests. See
   450  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   451  	// details.
   452  	ForceSendFields []string `json:"-"`
   453  	// NullFields is a list of field names (e.g. "Path") to include in API requests
   454  	// with the JSON null value. By default, fields with empty values are omitted
   455  	// from API requests. See
   456  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   457  	NullFields []string `json:"-"`
   458  }
   459  
   460  func (s *CertHttpChallenge) MarshalJSON() ([]byte, error) {
   461  	type NoMethod CertHttpChallenge
   462  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   463  }
   464  
   465  // CertVerification: A set of ACME challenges you can use to allow Hosting to
   466  // create an SSL certificate for your domain name before directing traffic to
   467  // Hosting servers. Use either the DNS or HTTP challenge; it's not necessary to
   468  // provide both.
   469  type CertVerification struct {
   470  	// Dns: Output only. A `TXT` record to add to your DNS records that confirms
   471  	// your intent to let Hosting create an SSL cert for your domain name.
   472  	Dns *DnsUpdates `json:"dns,omitempty"`
   473  	// Http: Output only. A file to add to your existing, non-Hosting hosting
   474  	// service that confirms your intent to let Hosting create an SSL cert for your
   475  	// domain name.
   476  	Http *HttpUpdate `json:"http,omitempty"`
   477  	// ForceSendFields is a list of field names (e.g. "Dns") to unconditionally
   478  	// include in API requests. By default, fields with empty or default values are
   479  	// omitted from API requests. See
   480  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   481  	// details.
   482  	ForceSendFields []string `json:"-"`
   483  	// NullFields is a list of field names (e.g. "Dns") to include in API requests
   484  	// with the JSON null value. By default, fields with empty values are omitted
   485  	// from API requests. See
   486  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   487  	NullFields []string `json:"-"`
   488  }
   489  
   490  func (s *CertVerification) MarshalJSON() ([]byte, error) {
   491  	type NoMethod CertVerification
   492  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   493  }
   494  
   495  // Certificate: An SSL certificate used to provide end-to-end encryption for
   496  // requests against your domain name. A `Certificate` can be an actual SSL
   497  // certificate or, for newly-created custom domains, Hosting's intent to create
   498  // one.
   499  type Certificate struct {
   500  	// CreateTime: Output only. The certificate's creation time. For `TEMPORARY`
   501  	// certs this is the time Hosting first generated challenges for your domain
   502  	// name. For all other cert types, it's the time the actual cert was created.
   503  	CreateTime string `json:"createTime,omitempty"`
   504  	// ExpireTime: Output only. The certificate's expiration time. After this time,
   505  	// the cert can no longer be used to provide secure communication between
   506  	// Hosting and your site's visitors.
   507  	ExpireTime string `json:"expireTime,omitempty"`
   508  	// Issues: Output only. A set of errors Hosting encountered when attempting to
   509  	// create a cert for your domain name. Resolve these issues to ensure Hosting
   510  	// is able to provide secure communication with your site's visitors.
   511  	Issues []*Status `json:"issues,omitempty"`
   512  	// State: Output only. The state of the certificate. Only the `CERT_ACTIVE` and
   513  	// `CERT_EXPIRING_SOON` states provide SSL coverage for a domain name. If the
   514  	// state is `PROPAGATING` and Hosting had an active cert for the domain name
   515  	// before, that formerly-active cert provides SSL coverage for the domain name
   516  	// until the current cert propagates.
   517  	//
   518  	// Possible values:
   519  	//   "CERT_STATE_UNSPECIFIED" - The certificate's state is unspecified. The
   520  	// message is invalid if this is unspecified.
   521  	//   "CERT_PREPARING" - The initial state of every certificate, represents
   522  	// Hosting's intent to create a certificate, before requests to a Certificate
   523  	// Authority are made.
   524  	//   "CERT_VALIDATING" - Hosting is validating whether a domain name's DNS
   525  	// records are in a state that allow certificate creation on its behalf.
   526  	//   "CERT_PROPAGATING" - The certificate was recently created, and needs time
   527  	// to propagate in Hosting's CDN.
   528  	//   "CERT_ACTIVE" - The certificate is active, providing secure connections
   529  	// for the domain names it represents.
   530  	//   "CERT_EXPIRING_SOON" - The certificate is expiring, all domain names on it
   531  	// will be given new certificates.
   532  	//   "CERT_EXPIRED" - The certificate has expired. Hosting can no longer serve
   533  	// secure content on your domain name.
   534  	State string `json:"state,omitempty"`
   535  	// Type: Output only. The certificate's type.
   536  	//
   537  	// Possible values:
   538  	//   "TYPE_UNSPECIFIED" - The certificate's type is unspecified. The message is
   539  	// invalid if this is unspecified.
   540  	//   "TEMPORARY" - A short-lived certificate type that covers a domain name
   541  	// temporarily, while Hosting creates a more permanent certificate.
   542  	//   "GROUPED" - The standard certificate for Spark plan custom domains.
   543  	//   "PROJECT_GROUPED" - Blaze plan only. A certificate that covers from 1 to
   544  	// 100 domain names with custom domains on the same Firebase project.
   545  	//   "DEDICATED" - Blaze plan only. A certificate that covers a single domain
   546  	// name.
   547  	Type string `json:"type,omitempty"`
   548  	// Verification: Output only. A set of ACME challenges you can add to your DNS
   549  	// records or existing, non-Hosting hosting provider to allow Hosting to create
   550  	// an SSL certificate for your domain name before you point traffic toward
   551  	// hosting. You can use thse challenges as part of a zero downtime transition
   552  	// from your old provider to Hosting.
   553  	Verification *CertVerification `json:"verification,omitempty"`
   554  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   555  	// unconditionally include in API requests. By default, fields with empty or
   556  	// default values are omitted from API requests. See
   557  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   558  	// details.
   559  	ForceSendFields []string `json:"-"`
   560  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   561  	// requests with the JSON null value. By default, fields with empty values are
   562  	// omitted from API requests. See
   563  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   564  	NullFields []string `json:"-"`
   565  }
   566  
   567  func (s *Certificate) MarshalJSON() ([]byte, error) {
   568  	type NoMethod Certificate
   569  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   570  }
   571  
   572  // Channel: A `Channel` represents a stream of releases for a site. All sites
   573  // have a default `live` channel that serves content to the Firebase-provided
   574  // subdomains and any connected custom domains.
   575  type Channel struct {
   576  	// CreateTime: Output only. The time at which the channel was created.
   577  	CreateTime string `json:"createTime,omitempty"`
   578  	// ExpireTime: The time at which the channel will be automatically deleted. If
   579  	// null, the channel will not be automatically deleted. This field is present
   580  	// in the output whether it's set directly or via the `ttl` field.
   581  	ExpireTime string `json:"expireTime,omitempty"`
   582  	// Labels: Text labels used for extra metadata and/or filtering.
   583  	Labels map[string]string `json:"labels,omitempty"`
   584  	// Name: The fully-qualified resource name for the channel, in the format:
   585  	// sites/ SITE_ID/channels/CHANNEL_ID
   586  	Name string `json:"name,omitempty"`
   587  	// Release: Output only. The current release for the channel, if any.
   588  	Release *Release `json:"release,omitempty"`
   589  	// RetainedReleaseCount: The number of previous releases to retain on the
   590  	// channel for rollback or other purposes. Must be a number between 1-100.
   591  	// Defaults to 10 for new channels.
   592  	RetainedReleaseCount int64 `json:"retainedReleaseCount,omitempty"`
   593  	// Ttl: Input only. A time-to-live for this channel. Sets `expire_time` to the
   594  	// provided duration past the time of the request.
   595  	Ttl string `json:"ttl,omitempty"`
   596  	// UpdateTime: Output only. The time at which the channel was last updated.
   597  	UpdateTime string `json:"updateTime,omitempty"`
   598  	// Url: Output only. The URL at which the content of this channel's current
   599  	// release can be viewed. This URL is a Firebase-provided subdomain of
   600  	// `web.app`. The content of this channel's current release can also be viewed
   601  	// at the Firebase-provided subdomain of `firebaseapp.com`. If this channel is
   602  	// the `live` channel for the Hosting site, then the content of this channel's
   603  	// current release can also be viewed at any connected custom domains.
   604  	Url string `json:"url,omitempty"`
   605  
   606  	// ServerResponse contains the HTTP response code and headers from the server.
   607  	googleapi.ServerResponse `json:"-"`
   608  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   609  	// unconditionally include in API requests. By default, fields with empty or
   610  	// default values are omitted from API requests. See
   611  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   612  	// details.
   613  	ForceSendFields []string `json:"-"`
   614  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   615  	// requests with the JSON null value. By default, fields with empty values are
   616  	// omitted from API requests. See
   617  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   618  	NullFields []string `json:"-"`
   619  }
   620  
   621  func (s *Channel) MarshalJSON() ([]byte, error) {
   622  	type NoMethod Channel
   623  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   624  }
   625  
   626  type CloneVersionRequest struct {
   627  	// Exclude: If provided, only paths that do not match any of the RegEx values
   628  	// in this list will be included in the new version.
   629  	Exclude *PathFilter `json:"exclude,omitempty"`
   630  	// Finalize: If true, the call to `CloneVersion` immediately finalizes the
   631  	// version after cloning is complete. If false, the cloned version will have a
   632  	// status of `CREATED`. Use `UpdateVersion` (patch) to set the status of the
   633  	// version to `FINALIZED`.
   634  	Finalize bool `json:"finalize,omitempty"`
   635  	// Include: If provided, only paths that match one or more RegEx values in this
   636  	// list will be included in the new version.
   637  	Include *PathFilter `json:"include,omitempty"`
   638  	// SourceVersion: Required. The unique identifier for the version to be cloned,
   639  	// in the format: sites/SITE_ID/versions/VERSION_ID
   640  	SourceVersion string `json:"sourceVersion,omitempty"`
   641  	// ForceSendFields is a list of field names (e.g. "Exclude") to unconditionally
   642  	// include in API requests. By default, fields with empty or default values are
   643  	// omitted from API requests. See
   644  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   645  	// details.
   646  	ForceSendFields []string `json:"-"`
   647  	// NullFields is a list of field names (e.g. "Exclude") to include in API
   648  	// requests with the JSON null value. By default, fields with empty values are
   649  	// omitted from API requests. See
   650  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   651  	NullFields []string `json:"-"`
   652  }
   653  
   654  func (s *CloneVersionRequest) MarshalJSON() ([]byte, error) {
   655  	type NoMethod CloneVersionRequest
   656  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   657  }
   658  
   659  // CloudRunRewrite: A configured rewrite that directs requests to a Cloud Run
   660  // service. If the Cloud Run service does not exist when setting or updating
   661  // your Firebase Hosting configuration, then the request fails. Any errors from
   662  // the Cloud Run service are passed to the end user (for example, if you delete
   663  // a service, any requests directed to that service receive a `404` error).
   664  type CloudRunRewrite struct {
   665  	// Region: Optional. User-provided region where the Cloud Run service is
   666  	// hosted. Defaults to `us-central1` if not supplied.
   667  	Region string `json:"region,omitempty"`
   668  	// ServiceId: Required. User-defined ID of the Cloud Run service.
   669  	ServiceId string `json:"serviceId,omitempty"`
   670  	// Tag: Optional. User-provided TrafficConfig tag to send traffic to. When
   671  	// omitted, traffic is sent to the service-wide URI
   672  	Tag string `json:"tag,omitempty"`
   673  	// ForceSendFields is a list of field names (e.g. "Region") to unconditionally
   674  	// include in API requests. By default, fields with empty or default values are
   675  	// omitted from API requests. See
   676  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   677  	// details.
   678  	ForceSendFields []string `json:"-"`
   679  	// NullFields is a list of field names (e.g. "Region") to include in API
   680  	// requests with the JSON null value. By default, fields with empty values are
   681  	// omitted from API requests. See
   682  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   683  	NullFields []string `json:"-"`
   684  }
   685  
   686  func (s *CloudRunRewrite) MarshalJSON() ([]byte, error) {
   687  	type NoMethod CloudRunRewrite
   688  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   689  }
   690  
   691  // CustomDomain: A `CustomDomain` is an entity that links a domain name to a
   692  // Firebase Hosting site. Add a `CustomDomain` to your site to allow Hosting to
   693  // serve the site's content in response to requests against your domain name.
   694  type CustomDomain struct {
   695  	// Annotations: Annotations you can add to leave both human- and
   696  	// machine-readable metadata about your `CustomDomain`.
   697  	Annotations map[string]string `json:"annotations,omitempty"`
   698  	// Cert: Output only. The SSL certificate Hosting has for this custom domain's
   699  	// domain name. For new custom domains, this often represents Hosting's intent
   700  	// to create a certificate, rather than an actual cert. Check the `state` field
   701  	// for more.
   702  	Cert *Certificate `json:"cert,omitempty"`
   703  	// CertPreference: A field that lets you specify which SSL certificate type
   704  	// Hosting creates for your domain name. Spark plan custom domains only have
   705  	// access to the `GROUPED` cert type, while Blaze plan domains can select any
   706  	// option.
   707  	//
   708  	// Possible values:
   709  	//   "TYPE_UNSPECIFIED" - The certificate's type is unspecified. The message is
   710  	// invalid if this is unspecified.
   711  	//   "TEMPORARY" - A short-lived certificate type that covers a domain name
   712  	// temporarily, while Hosting creates a more permanent certificate.
   713  	//   "GROUPED" - The standard certificate for Spark plan custom domains.
   714  	//   "PROJECT_GROUPED" - Blaze plan only. A certificate that covers from 1 to
   715  	// 100 domain names with custom domains on the same Firebase project.
   716  	//   "DEDICATED" - Blaze plan only. A certificate that covers a single domain
   717  	// name.
   718  	CertPreference string `json:"certPreference,omitempty"`
   719  	// CreateTime: Output only. The custom domain's create time.
   720  	CreateTime string `json:"createTime,omitempty"`
   721  	// DeleteTime: Output only. The time the `CustomDomain` was deleted; null for
   722  	// custom domains that haven't been deleted. Deleted custom domains persist for
   723  	// approximately 30 days, after which time Hosting removes them completely. To
   724  	// restore a deleted custom domain, make an `UndeleteCustomDomain` request.
   725  	DeleteTime string `json:"deleteTime,omitempty"`
   726  	// Etag: Output only. A string that represents the current state of the
   727  	// `CustomDomain` and allows you to confirm its initial state in requests that
   728  	// would modify it. Use the tag to ensure consistency when making
   729  	// `UpdateCustomDomain`, `DeleteCustomDomain`, and `UndeleteCustomDomain`
   730  	// requests.
   731  	Etag string `json:"etag,omitempty"`
   732  	// ExpireTime: Output only. The minimum time before a soft-deleted
   733  	// `CustomDomain` is completely removed from Hosting; null for custom domains
   734  	// that haven't been deleted.
   735  	ExpireTime string `json:"expireTime,omitempty"`
   736  	// HostState: Output only. The `HostState` of the domain name this
   737  	// `CustomDomain` refers to.
   738  	//
   739  	// Possible values:
   740  	//   "HOST_STATE_UNSPECIFIED" - Your custom domain's host state is unspecified.
   741  	// The message is invalid if this is unspecified.
   742  	//   "HOST_UNHOSTED" - Your custom domain's domain name isn't associated with
   743  	// any IP addresses.
   744  	//   "HOST_UNREACHABLE" - Your custom domain's domain name can't be reached.
   745  	// Hosting services' DNS queries to find your domain name's IP addresses
   746  	// resulted in errors. See your `CustomDomain` object's `issues` field for more
   747  	// details.
   748  	//   "HOST_MISMATCH" - Your custom domain's domain name has IP addresses that
   749  	// don't ultimately resolve to Hosting.
   750  	//   "HOST_CONFLICT" - Your custom domain's domain name has IP addresses that
   751  	// resolve to both Hosting and other services. To ensure consistent results,
   752  	// remove `A` and `AAAA` records related to non-Hosting services.
   753  	//   "HOST_ACTIVE" - All requests against your custom domain's domain name are
   754  	// served by Hosting. If the custom domain's `OwnershipState` is also `ACTIVE`,
   755  	// Hosting serves your Hosting site's content on the domain name.
   756  	HostState string `json:"hostState,omitempty"`
   757  	// Issues: Output only. A set of errors Hosting systems encountered when trying
   758  	// to establish Hosting's ability to serve secure content for your domain name.
   759  	// Resolve these issues to ensure your `CustomDomain` behaves properly.
   760  	Issues []*Status `json:"issues,omitempty"`
   761  	// Labels: Labels used for extra metadata and/or filtering.
   762  	Labels map[string]string `json:"labels,omitempty"`
   763  	// Name: Output only. The fully-qualified name of the `CustomDomain`.
   764  	Name string `json:"name,omitempty"`
   765  	// OwnershipState: Output only. The `OwnershipState` of the domain name this
   766  	// `CustomDomain` refers to.
   767  	//
   768  	// Possible values:
   769  	//   "OWNERSHIP_STATE_UNSPECIFIED" - Your custom domain's ownership state is
   770  	// unspecified. This should never happen.
   771  	//   "OWNERSHIP_MISSING" - Your custom domain's domain name has no
   772  	// Hosting-related ownership records; no Firebase project has permission to act
   773  	// on the domain name's behalf.
   774  	//   "OWNERSHIP_UNREACHABLE" - Your custom domain's domain name can't be
   775  	// reached. Hosting services' DNS queries to find your domain name's ownership
   776  	// records resulted in errors. See your `CustomDomain` object's `issues` field
   777  	// for more details.
   778  	//   "OWNERSHIP_MISMATCH" - Your custom domain's domain name is owned by
   779  	// another Firebase project. Remove the conflicting `TXT` records and replace
   780  	// them with project-specific records for your current Firebase project.
   781  	//   "OWNERSHIP_CONFLICT" - Your custom domain's domain name has conflicting
   782  	// `TXT` records that indicate ownership by both your current Firebase project
   783  	// and another project. Remove the other project's ownership records to grant
   784  	// the current project ownership.
   785  	//   "OWNERSHIP_PENDING" - Your custom domain's DNS records are configured
   786  	// correctly. Hosting will transfer ownership of your domain to this
   787  	// `CustomDomain` within 24 hours.
   788  	//   "OWNERSHIP_ACTIVE" - Your custom domain's domain name has `TXT` records
   789  	// that grant its project permission to act on its behalf.
   790  	OwnershipState string `json:"ownershipState,omitempty"`
   791  	// Reconciling: Output only. A field that, if true, indicates that Hosting's
   792  	// systems are attmepting to make the custom domain's state match your
   793  	// preferred state. This is most frequently `true` when initially provisioning
   794  	// a `CustomDomain` after a `CreateCustomDomain` request or when creating a new
   795  	// SSL certificate to match an updated `cert_preference` after an
   796  	// `UpdateCustomDomain` request.
   797  	Reconciling bool `json:"reconciling,omitempty"`
   798  	// RedirectTarget: A domain name that this `CustomDomain` should direct traffic
   799  	// towards. If specified, Hosting will respond to requests against this custom
   800  	// domain with an HTTP 301 code, and route traffic to the specified
   801  	// `redirect_target` instead.
   802  	RedirectTarget string `json:"redirectTarget,omitempty"`
   803  	// RequiredDnsUpdates: Output only. A set of updates you should make to the
   804  	// domain name's DNS records to let Hosting serve secure content on its behalf.
   805  	RequiredDnsUpdates *DnsUpdates `json:"requiredDnsUpdates,omitempty"`
   806  	// UpdateTime: Output only. The last time the `CustomDomain` was updated.
   807  	UpdateTime string `json:"updateTime,omitempty"`
   808  
   809  	// ServerResponse contains the HTTP response code and headers from the server.
   810  	googleapi.ServerResponse `json:"-"`
   811  	// ForceSendFields is a list of field names (e.g. "Annotations") to
   812  	// unconditionally include in API requests. By default, fields with empty or
   813  	// default values are omitted from API requests. See
   814  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   815  	// details.
   816  	ForceSendFields []string `json:"-"`
   817  	// NullFields is a list of field names (e.g. "Annotations") to include in API
   818  	// requests with the JSON null value. By default, fields with empty values are
   819  	// omitted from API requests. See
   820  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   821  	NullFields []string `json:"-"`
   822  }
   823  
   824  func (s *CustomDomain) MarshalJSON() ([]byte, error) {
   825  	type NoMethod CustomDomain
   826  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   827  }
   828  
   829  // CustomDomainMetadata: Metadata associated with a`CustomDomain` operation.
   830  type CustomDomainMetadata struct {
   831  	// CertState: The `CertState` of the domain name's SSL certificate.
   832  	//
   833  	// Possible values:
   834  	//   "CERT_STATE_UNSPECIFIED" - The certificate's state is unspecified. The
   835  	// message is invalid if this is unspecified.
   836  	//   "CERT_PREPARING" - The initial state of every certificate, represents
   837  	// Hosting's intent to create a certificate, before requests to a Certificate
   838  	// Authority are made.
   839  	//   "CERT_VALIDATING" - Hosting is validating whether a domain name's DNS
   840  	// records are in a state that allow certificate creation on its behalf.
   841  	//   "CERT_PROPAGATING" - The certificate was recently created, and needs time
   842  	// to propagate in Hosting's CDN.
   843  	//   "CERT_ACTIVE" - The certificate is active, providing secure connections
   844  	// for the domain names it represents.
   845  	//   "CERT_EXPIRING_SOON" - The certificate is expiring, all domain names on it
   846  	// will be given new certificates.
   847  	//   "CERT_EXPIRED" - The certificate has expired. Hosting can no longer serve
   848  	// secure content on your domain name.
   849  	CertState string `json:"certState,omitempty"`
   850  	// HostState: The `HostState` of the domain name this `CustomDomain` refers to.
   851  	//
   852  	// Possible values:
   853  	//   "HOST_STATE_UNSPECIFIED" - Your custom domain's host state is unspecified.
   854  	// The message is invalid if this is unspecified.
   855  	//   "HOST_UNHOSTED" - Your custom domain's domain name isn't associated with
   856  	// any IP addresses.
   857  	//   "HOST_UNREACHABLE" - Your custom domain's domain name can't be reached.
   858  	// Hosting services' DNS queries to find your domain name's IP addresses
   859  	// resulted in errors. See your `CustomDomain` object's `issues` field for more
   860  	// details.
   861  	//   "HOST_MISMATCH" - Your custom domain's domain name has IP addresses that
   862  	// don't ultimately resolve to Hosting.
   863  	//   "HOST_CONFLICT" - Your custom domain's domain name has IP addresses that
   864  	// resolve to both Hosting and other services. To ensure consistent results,
   865  	// remove `A` and `AAAA` records related to non-Hosting services.
   866  	//   "HOST_ACTIVE" - All requests against your custom domain's domain name are
   867  	// served by Hosting. If the custom domain's `OwnershipState` is also `ACTIVE`,
   868  	// Hosting serves your Hosting site's content on the domain name.
   869  	HostState string `json:"hostState,omitempty"`
   870  	// Issues: A list of issues that are currently preventing Hosting from
   871  	// completing the operation. These are generally DNS-related issues that
   872  	// Hosting encounters when querying a domain name's records or attempting to
   873  	// mint an SSL certificate.
   874  	Issues []*Status `json:"issues,omitempty"`
   875  	// LiveMigrationSteps: A set of DNS record updates and ACME challenges that
   876  	// allow you to transition domain names to Firebase Hosting with zero downtime.
   877  	// These updates allow Hosting to create an SSL certificate and establish
   878  	// ownership for your custom domain before Hosting begins serving traffic on
   879  	// it. If your domain name is already in active use with another provider, add
   880  	// one of the challenges and make the recommended DNS updates. After adding
   881  	// challenges and adjusting DNS records as necessary, wait for the
   882  	// `ownershipState` to be `OWNERSHIP_ACTIVE` and the `certState` to be
   883  	// `CERT_ACTIVE` before sending traffic to Hosting.
   884  	LiveMigrationSteps []*LiveMigrationStep `json:"liveMigrationSteps,omitempty"`
   885  	// OwnershipState: The `OwnershipState` of the domain name this `CustomDomain`
   886  	// refers to.
   887  	//
   888  	// Possible values:
   889  	//   "OWNERSHIP_STATE_UNSPECIFIED" - Your custom domain's ownership state is
   890  	// unspecified. This should never happen.
   891  	//   "OWNERSHIP_MISSING" - Your custom domain's domain name has no
   892  	// Hosting-related ownership records; no Firebase project has permission to act
   893  	// on the domain name's behalf.
   894  	//   "OWNERSHIP_UNREACHABLE" - Your custom domain's domain name can't be
   895  	// reached. Hosting services' DNS queries to find your domain name's ownership
   896  	// records resulted in errors. See your `CustomDomain` object's `issues` field
   897  	// for more details.
   898  	//   "OWNERSHIP_MISMATCH" - Your custom domain's domain name is owned by
   899  	// another Firebase project. Remove the conflicting `TXT` records and replace
   900  	// them with project-specific records for your current Firebase project.
   901  	//   "OWNERSHIP_CONFLICT" - Your custom domain's domain name has conflicting
   902  	// `TXT` records that indicate ownership by both your current Firebase project
   903  	// and another project. Remove the other project's ownership records to grant
   904  	// the current project ownership.
   905  	//   "OWNERSHIP_PENDING" - Your custom domain's DNS records are configured
   906  	// correctly. Hosting will transfer ownership of your domain to this
   907  	// `CustomDomain` within 24 hours.
   908  	//   "OWNERSHIP_ACTIVE" - Your custom domain's domain name has `TXT` records
   909  	// that grant its project permission to act on its behalf.
   910  	OwnershipState string `json:"ownershipState,omitempty"`
   911  	// QuickSetupUpdates: A set of DNS record updates that allow Hosting to serve
   912  	// secure content on your domain name. The record type determines the update's
   913  	// purpose: - `A` and `AAAA`: Updates your domain name's IP addresses so that
   914  	// they direct traffic to Hosting servers. - `TXT`: Updates ownership
   915  	// permissions on your domain name, letting Hosting know that your custom
   916  	// domain's project has permission to perform actions for that domain name. -
   917  	// `CAA`: Updates your domain name's list of authorized Certificate Authorities
   918  	// (CAs). Only present if you have existing `CAA` records that prohibit
   919  	// Hosting's CA from minting certs for your domain name. These updates include
   920  	// all DNS changes you'll need to get started with Hosting, but, if made all at
   921  	// once, can result in a brief period of downtime for your domain name--while
   922  	// Hosting creates and uploads an SSL cert, for example. If you'd like to add
   923  	// your domain name to Hosting without downtime, complete the
   924  	// `liveMigrationSteps` first, before making the remaining updates in this
   925  	// field.
   926  	QuickSetupUpdates *DnsUpdates `json:"quickSetupUpdates,omitempty"`
   927  	// ForceSendFields is a list of field names (e.g. "CertState") to
   928  	// unconditionally include in API requests. By default, fields with empty or
   929  	// default values are omitted from API requests. See
   930  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   931  	// details.
   932  	ForceSendFields []string `json:"-"`
   933  	// NullFields is a list of field names (e.g. "CertState") to include in API
   934  	// requests with the JSON null value. By default, fields with empty values are
   935  	// omitted from API requests. See
   936  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   937  	NullFields []string `json:"-"`
   938  }
   939  
   940  func (s *CustomDomainMetadata) MarshalJSON() ([]byte, error) {
   941  	type NoMethod CustomDomainMetadata
   942  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   943  }
   944  
   945  // DnsRecord: DNS records are resource records that define how systems and
   946  // services should behave when handling requests for a domain name. For
   947  // example, when you add `A` records to your domain name's DNS records, you're
   948  // informing other systems (such as your users' web browsers) to contact those
   949  // IPv4 addresses to retrieve resources relevant to your domain name (such as
   950  // your Hosting site files).
   951  type DnsRecord struct {
   952  	// DomainName: Output only. The domain name the record pertains to, e.g.
   953  	// `foo.bar.com.`.
   954  	DomainName string `json:"domainName,omitempty"`
   955  	// Rdata: Output only. The data of the record. The meaning of the value depends
   956  	// on record type: - A and AAAA: IP addresses for the domain name. - CNAME:
   957  	// Another domain to check for records. - TXT: Arbitrary text strings
   958  	// associated with the domain name. Hosting uses TXT records to determine which
   959  	// Firebase projects have permission to act on the domain name's behalf. - CAA:
   960  	// The record's flags, tag, and value, e.g. `0 issue "pki.goog".
   961  	Rdata string `json:"rdata,omitempty"`
   962  	// RequiredAction: Output only. An enum that indicates the a required action
   963  	// for this record.
   964  	//
   965  	// Possible values:
   966  	//   "NONE" - No action necessary.
   967  	//   "ADD" - Add this record to your DNS records.
   968  	//   "REMOVE" - Remove this record from your DNS records.
   969  	RequiredAction string `json:"requiredAction,omitempty"`
   970  	// Type: Output only. The record's type, which determines what data the record
   971  	// contains.
   972  	//
   973  	// Possible values:
   974  	//   "TYPE_UNSPECIFIED" - The record's type is unspecified. The message is
   975  	// invalid if this is unspecified.
   976  	//   "A" - An `A` record, as defined in [RFC
   977  	// 1035](https://tools.ietf.org/html/rfc1035). A records determine which IPv4
   978  	// addresses a domain name directs traffic towards.
   979  	//   "CNAME" - A `CNAME` record, as defined in [RFC
   980  	// 1035](https://tools.ietf.org/html/rfc1035). `CNAME` or Canonical Name
   981  	// records map a domain name to a different, canonical domain name. If a
   982  	// `CNAME` record is present, it should be the only record on the domain name.
   983  	//   "TXT" - A `TXT` record, as defined in [RFC
   984  	// 1035](https://tools.ietf.org/html/rfc1035). `TXT` records hold arbitrary
   985  	// text data on a domain name. Hosting uses `TXT` records to establish which
   986  	// Firebase Project has permission to act on a domain name.
   987  	//   "AAAA" - An AAAA record, as defined in [RFC
   988  	// 3596](https://tools.ietf.org/html/rfc3596) AAAA records determine which IPv6
   989  	// addresses a domain name directs traffic towards.
   990  	//   "CAA" - A CAA record, as defined in [RFC
   991  	// 6844](https://tools.ietf.org/html/rfc6844). CAA, or Certificate Authority
   992  	// Authorization, records determine which Certificate Authorities (SSL
   993  	// certificate minting organizations) are authorized to mint a certificate for
   994  	// the domain name. Firebase Hosting uses `pki.goog` as its primary CA. CAA
   995  	// records cascade. A CAA record on `foo.com` also applies to `bar.foo.com`
   996  	// unless `bar.foo.com` has its own set of CAA records. CAA records are
   997  	// optional. If a domain name and its parents have no CAA records, all CAs are
   998  	// authorized to mint certificates on its behalf. In general, Hosting only asks
   999  	// you to modify CAA records when doing so is required to unblock SSL cert
  1000  	// creation.
  1001  	Type string `json:"type,omitempty"`
  1002  	// ForceSendFields is a list of field names (e.g. "DomainName") to
  1003  	// unconditionally include in API requests. By default, fields with empty or
  1004  	// default values are omitted from API requests. See
  1005  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1006  	// details.
  1007  	ForceSendFields []string `json:"-"`
  1008  	// NullFields is a list of field names (e.g. "DomainName") to include in API
  1009  	// requests with the JSON null value. By default, fields with empty values are
  1010  	// omitted from API requests. See
  1011  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1012  	NullFields []string `json:"-"`
  1013  }
  1014  
  1015  func (s *DnsRecord) MarshalJSON() ([]byte, error) {
  1016  	type NoMethod DnsRecord
  1017  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1018  }
  1019  
  1020  // DnsRecordSet: A set of DNS records relevant to the setup and maintenance of
  1021  // a custom domain in Firebase Hosting.
  1022  type DnsRecordSet struct {
  1023  	// CheckError: Output only. An error Hosting services encountered when querying
  1024  	// your domain name's DNS records. Note: Hosting ignores `NXDOMAIN` errors, as
  1025  	// those generally just mean that a domain name hasn't been set up yet.
  1026  	CheckError *Status `json:"checkError,omitempty"`
  1027  	// DomainName: Output only. The domain name the record set pertains to.
  1028  	DomainName string `json:"domainName,omitempty"`
  1029  	// Records: Output only. Records on the domain.
  1030  	Records []*DnsRecord `json:"records,omitempty"`
  1031  	// ForceSendFields is a list of field names (e.g. "CheckError") to
  1032  	// unconditionally include in API requests. By default, fields with empty or
  1033  	// default values are omitted from API requests. See
  1034  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1035  	// details.
  1036  	ForceSendFields []string `json:"-"`
  1037  	// NullFields is a list of field names (e.g. "CheckError") to include in API
  1038  	// requests with the JSON null value. By default, fields with empty values are
  1039  	// omitted from API requests. See
  1040  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1041  	NullFields []string `json:"-"`
  1042  }
  1043  
  1044  func (s *DnsRecordSet) MarshalJSON() ([]byte, error) {
  1045  	type NoMethod DnsRecordSet
  1046  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1047  }
  1048  
  1049  // DnsUpdates: A set of DNS record updates that you should make to allow
  1050  // Hosting to serve secure content in response to requests against your domain
  1051  // name. These updates present the current state of your domain name's DNS
  1052  // records when Hosting last queried them, and the desired set of records that
  1053  // Hosting needs to see before your custom domain can be fully active.
  1054  type DnsUpdates struct {
  1055  	// CheckTime: The last time Hosting checked your custom domain's DNS records.
  1056  	CheckTime string `json:"checkTime,omitempty"`
  1057  	// Desired: The set of DNS records Hosting needs to serve secure content on the
  1058  	// domain.
  1059  	Desired []*DnsRecordSet `json:"desired,omitempty"`
  1060  	// Discovered: The set of DNS records Hosting discovered when inspecting a
  1061  	// domain.
  1062  	Discovered []*DnsRecordSet `json:"discovered,omitempty"`
  1063  	// ForceSendFields is a list of field names (e.g. "CheckTime") to
  1064  	// unconditionally include in API requests. By default, fields with empty or
  1065  	// default values are omitted from API requests. See
  1066  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1067  	// details.
  1068  	ForceSendFields []string `json:"-"`
  1069  	// NullFields is a list of field names (e.g. "CheckTime") to include in API
  1070  	// requests with the JSON null value. By default, fields with empty values are
  1071  	// omitted from API requests. See
  1072  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1073  	NullFields []string `json:"-"`
  1074  }
  1075  
  1076  func (s *DnsUpdates) MarshalJSON() ([]byte, error) {
  1077  	type NoMethod DnsUpdates
  1078  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1079  }
  1080  
  1081  // Domain: The intended behavior and status information of a domain.
  1082  type Domain struct {
  1083  	// DomainName: Required. The domain name of the association.
  1084  	DomainName string `json:"domainName,omitempty"`
  1085  	// DomainRedirect: If set, the domain should redirect with the provided
  1086  	// parameters.
  1087  	DomainRedirect *DomainRedirect `json:"domainRedirect,omitempty"`
  1088  	// Provisioning: Output only. Information about the provisioning of
  1089  	// certificates and the health of the DNS resolution for the domain.
  1090  	Provisioning *DomainProvisioning `json:"provisioning,omitempty"`
  1091  	// Site: Required. The site name of the association.
  1092  	Site string `json:"site,omitempty"`
  1093  	// Status: Output only. Additional status of the domain association.
  1094  	//
  1095  	// Possible values:
  1096  	//   "DOMAIN_STATUS_UNSPECIFIED" - Unspecified domain association status.
  1097  	//   "DOMAIN_CHANGE_PENDING" - An external operation is in progress on the
  1098  	// domain association and no further operations can be performed until it is
  1099  	// complete. Formerly used for metabase updates. Not currently used
  1100  	//   "DOMAIN_ACTIVE" - The domain association is active and no additional
  1101  	// action is required.
  1102  	//   "DOMAIN_VERIFICATION_REQUIRED" - The domain was previously verified in the
  1103  	// legacy system. User must reverify the domain through the ownership service.
  1104  	//   "DOMAIN_VERIFICATION_LOST" - The domain verification has been lost and the
  1105  	// domain is in the grace period before being removed from the Firebase Hosting
  1106  	// site.
  1107  	Status string `json:"status,omitempty"`
  1108  	// UpdateTime: Output only. The time at which the domain was last updated.
  1109  	UpdateTime string `json:"updateTime,omitempty"`
  1110  
  1111  	// ServerResponse contains the HTTP response code and headers from the server.
  1112  	googleapi.ServerResponse `json:"-"`
  1113  	// ForceSendFields is a list of field names (e.g. "DomainName") to
  1114  	// unconditionally include in API requests. By default, fields with empty or
  1115  	// default values are omitted from API requests. See
  1116  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1117  	// details.
  1118  	ForceSendFields []string `json:"-"`
  1119  	// NullFields is a list of field names (e.g. "DomainName") to include in API
  1120  	// requests with the JSON null value. By default, fields with empty values are
  1121  	// omitted from API requests. See
  1122  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1123  	NullFields []string `json:"-"`
  1124  }
  1125  
  1126  func (s *Domain) MarshalJSON() ([]byte, error) {
  1127  	type NoMethod Domain
  1128  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1129  }
  1130  
  1131  // DomainProvisioning: The current certificate provisioning status information
  1132  // for a domain.
  1133  type DomainProvisioning struct {
  1134  	// CertChallengeDiscoveredTxt: The TXT records (for the certificate challenge)
  1135  	// that were found at the last DNS fetch.
  1136  	CertChallengeDiscoveredTxt []string `json:"certChallengeDiscoveredTxt,omitempty"`
  1137  	// CertChallengeDns: The DNS challenge for generating a certificate.
  1138  	CertChallengeDns *CertDnsChallenge `json:"certChallengeDns,omitempty"`
  1139  	// CertChallengeHttp: The HTTP challenge for generating a certificate.
  1140  	CertChallengeHttp *CertHttpChallenge `json:"certChallengeHttp,omitempty"`
  1141  	// CertStatus: The certificate provisioning status; updated when Firebase
  1142  	// Hosting provisions an SSL certificate for the domain.
  1143  	//
  1144  	// Possible values:
  1145  	//   "CERT_STATUS_UNSPECIFIED" - Unspecified certificate provisioning status.
  1146  	//   "CERT_PENDING" - Waiting for certificate challenge to be created.
  1147  	//   "CERT_MISSING" - Waiting for certificate challenge to be met.
  1148  	//   "CERT_PROCESSING" - Certificate challenge met; attempting to
  1149  	// acquire/propagate certificate.
  1150  	//   "CERT_PROPAGATING" - Certificate obtained; propagating to the CDN.
  1151  	//   "CERT_ACTIVE" - Certificate provisioned and deployed across the CDN.
  1152  	//   "CERT_ERROR" - Certificate provisioning failed in a non-recoverable
  1153  	// manner.
  1154  	CertStatus string `json:"certStatus,omitempty"`
  1155  	// DiscoveredIps: The IPs found at the last DNS fetch.
  1156  	DiscoveredIps []string `json:"discoveredIps,omitempty"`
  1157  	// DnsFetchTime: The time at which the last DNS fetch occurred.
  1158  	DnsFetchTime string `json:"dnsFetchTime,omitempty"`
  1159  	// DnsStatus: The DNS record match status as of the last DNS fetch.
  1160  	//
  1161  	// Possible values:
  1162  	//   "DNS_STATUS_UNSPECIFIED" - Unspecified DNS status.
  1163  	//   "DNS_PENDING" - No DNS records have been specified for this domain yet.
  1164  	//   "DNS_MISSING" - None of the required DNS records have been detected on the
  1165  	// domain.
  1166  	//   "DNS_PARTIAL_MATCH" - Some of the required DNS records were detected, but
  1167  	// not all of them. No extra (non-required) DNS records were detected.
  1168  	//   "DNS_MATCH" - All required DNS records were detected. No extra
  1169  	// (non-required) DNS records were detected.
  1170  	//   "DNS_EXTRANEOUS_MATCH" - The domain has at least one of the required DNS
  1171  	// records, and it has at least one extra (non-required) DNS record.
  1172  	DnsStatus string `json:"dnsStatus,omitempty"`
  1173  	// ExpectedIps: The list of IPs to which the domain is expected to resolve.
  1174  	ExpectedIps []string `json:"expectedIps,omitempty"`
  1175  	// ForceSendFields is a list of field names (e.g. "CertChallengeDiscoveredTxt")
  1176  	// to unconditionally include in API requests. By default, fields with empty or
  1177  	// default values are omitted from API requests. See
  1178  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1179  	// details.
  1180  	ForceSendFields []string `json:"-"`
  1181  	// NullFields is a list of field names (e.g. "CertChallengeDiscoveredTxt") to
  1182  	// include in API requests with the JSON null value. By default, fields with
  1183  	// empty values are omitted from API requests. See
  1184  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1185  	NullFields []string `json:"-"`
  1186  }
  1187  
  1188  func (s *DomainProvisioning) MarshalJSON() ([]byte, error) {
  1189  	type NoMethod DomainProvisioning
  1190  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1191  }
  1192  
  1193  // DomainRedirect: Defines the behavior of a domain-level redirect. Domain
  1194  // redirects preserve the path of the redirect but replace the requested domain
  1195  // with the one specified in the redirect configuration.
  1196  type DomainRedirect struct {
  1197  	// DomainName: Required. The domain name to redirect to.
  1198  	DomainName string `json:"domainName,omitempty"`
  1199  	// Type: Required. The redirect status code.
  1200  	//
  1201  	// Possible values:
  1202  	//   "REDIRECT_TYPE_UNSPECIFIED" - The default redirect type; should not be
  1203  	// intentionlly used.
  1204  	//   "MOVED_PERMANENTLY" - The redirect will respond with an HTTP status code
  1205  	// of `301 Moved Permanently`.
  1206  	Type string `json:"type,omitempty"`
  1207  	// ForceSendFields is a list of field names (e.g. "DomainName") to
  1208  	// unconditionally include in API requests. By default, fields with empty or
  1209  	// default values are omitted from API requests. See
  1210  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1211  	// details.
  1212  	ForceSendFields []string `json:"-"`
  1213  	// NullFields is a list of field names (e.g. "DomainName") to include in API
  1214  	// requests with the JSON null value. By default, fields with empty values are
  1215  	// omitted from API requests. See
  1216  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1217  	NullFields []string `json:"-"`
  1218  }
  1219  
  1220  func (s *DomainRedirect) MarshalJSON() ([]byte, error) {
  1221  	type NoMethod DomainRedirect
  1222  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1223  }
  1224  
  1225  // Empty: A generic empty message that you can re-use to avoid defining
  1226  // duplicated empty messages in your APIs. A typical example is to use it as
  1227  // the request or the response type of an API method. For instance: service Foo
  1228  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1229  type Empty struct {
  1230  	// ServerResponse contains the HTTP response code and headers from the server.
  1231  	googleapi.ServerResponse `json:"-"`
  1232  }
  1233  
  1234  // Header: A `Header`
  1235  // (https://firebase.google.com/docs/hosting/full-config#headers) specifies a
  1236  // URL pattern that, if matched to the request URL path, triggers Hosting to
  1237  // apply the specified custom response headers.
  1238  type Header struct {
  1239  	// Glob: The user-supplied glob
  1240  	// (https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching)
  1241  	// to match against the request URL path.
  1242  	Glob string `json:"glob,omitempty"`
  1243  	// Headers: Required. The additional headers to add to the response.
  1244  	Headers map[string]string `json:"headers,omitempty"`
  1245  	// Regex: The user-supplied RE2 regular expression to match against the request
  1246  	// URL path.
  1247  	Regex string `json:"regex,omitempty"`
  1248  	// ForceSendFields is a list of field names (e.g. "Glob") to unconditionally
  1249  	// include in API requests. By default, fields with empty or default values are
  1250  	// omitted from API requests. See
  1251  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1252  	// details.
  1253  	ForceSendFields []string `json:"-"`
  1254  	// NullFields is a list of field names (e.g. "Glob") to include in API requests
  1255  	// with the JSON null value. By default, fields with empty values are omitted
  1256  	// from API requests. See
  1257  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1258  	NullFields []string `json:"-"`
  1259  }
  1260  
  1261  func (s *Header) MarshalJSON() ([]byte, error) {
  1262  	type NoMethod Header
  1263  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1264  }
  1265  
  1266  // HttpUpdate: A file you can add to your existing, non-Hosting hosting service
  1267  // that confirms your intent to allow Hosting's Certificate Authorities to
  1268  // create an SSL certificate for your domain.
  1269  type HttpUpdate struct {
  1270  	// CheckError: Output only. An error encountered during the last contents
  1271  	// check. If null, the check completed successfully.
  1272  	CheckError *Status `json:"checkError,omitempty"`
  1273  	// Desired: Output only. A text string to serve at the path.
  1274  	Desired string `json:"desired,omitempty"`
  1275  	// Discovered: Output only. Whether Hosting was able to find the required file
  1276  	// contents on the specified path during its last check.
  1277  	Discovered string `json:"discovered,omitempty"`
  1278  	// LastCheckTime: Output only. The last time Hosting systems checked for the
  1279  	// file contents.
  1280  	LastCheckTime string `json:"lastCheckTime,omitempty"`
  1281  	// Path: Output only. The path to the file.
  1282  	Path string `json:"path,omitempty"`
  1283  	// ForceSendFields is a list of field names (e.g. "CheckError") to
  1284  	// unconditionally include in API requests. By default, fields with empty or
  1285  	// default values are omitted from API requests. See
  1286  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1287  	// details.
  1288  	ForceSendFields []string `json:"-"`
  1289  	// NullFields is a list of field names (e.g. "CheckError") to include in API
  1290  	// requests with the JSON null value. By default, fields with empty values are
  1291  	// omitted from API requests. See
  1292  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1293  	NullFields []string `json:"-"`
  1294  }
  1295  
  1296  func (s *HttpUpdate) MarshalJSON() ([]byte, error) {
  1297  	type NoMethod HttpUpdate
  1298  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1299  }
  1300  
  1301  // I18nConfig: If provided, i18n rewrites are enabled.
  1302  type I18nConfig struct {
  1303  	// Root: Required. The user-supplied path where country and language specific
  1304  	// content will be looked for within the public directory.
  1305  	Root string `json:"root,omitempty"`
  1306  	// ForceSendFields is a list of field names (e.g. "Root") to unconditionally
  1307  	// include in API requests. By default, fields with empty or default values are
  1308  	// omitted from API requests. See
  1309  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1310  	// details.
  1311  	ForceSendFields []string `json:"-"`
  1312  	// NullFields is a list of field names (e.g. "Root") to include in API requests
  1313  	// with the JSON null value. By default, fields with empty values are omitted
  1314  	// from API requests. See
  1315  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1316  	NullFields []string `json:"-"`
  1317  }
  1318  
  1319  func (s *I18nConfig) MarshalJSON() ([]byte, error) {
  1320  	type NoMethod I18nConfig
  1321  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1322  }
  1323  
  1324  type ListChannelsResponse struct {
  1325  	// Channels: The list of channels.
  1326  	Channels []*Channel `json:"channels,omitempty"`
  1327  	// NextPageToken: The pagination token, if more results exist beyond the ones
  1328  	// in this response. Include this token in your next call to `ListChannels`.
  1329  	// Page tokens are short-lived and should not be stored.
  1330  	NextPageToken string `json:"nextPageToken,omitempty"`
  1331  
  1332  	// ServerResponse contains the HTTP response code and headers from the server.
  1333  	googleapi.ServerResponse `json:"-"`
  1334  	// ForceSendFields is a list of field names (e.g. "Channels") to
  1335  	// unconditionally include in API requests. By default, fields with empty or
  1336  	// default values are omitted from API requests. See
  1337  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1338  	// details.
  1339  	ForceSendFields []string `json:"-"`
  1340  	// NullFields is a list of field names (e.g. "Channels") to include in API
  1341  	// requests with the JSON null value. By default, fields with empty values are
  1342  	// omitted from API requests. See
  1343  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1344  	NullFields []string `json:"-"`
  1345  }
  1346  
  1347  func (s *ListChannelsResponse) MarshalJSON() ([]byte, error) {
  1348  	type NoMethod ListChannelsResponse
  1349  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1350  }
  1351  
  1352  // ListCustomDomainsResponse: The response from `ListCustomDomains`.
  1353  type ListCustomDomainsResponse struct {
  1354  	// CustomDomains: A list of `CustomDomain` entities associated with the
  1355  	// specified Firebase `Site`.
  1356  	CustomDomains []*CustomDomain `json:"customDomains,omitempty"`
  1357  	// NextPageToken: The pagination token, if more results exist beyond the ones
  1358  	// in this response. Include this token in your next call to
  1359  	// `ListCustomDomains`. Page tokens are short-lived and should not be stored.
  1360  	NextPageToken string `json:"nextPageToken,omitempty"`
  1361  
  1362  	// ServerResponse contains the HTTP response code and headers from the server.
  1363  	googleapi.ServerResponse `json:"-"`
  1364  	// ForceSendFields is a list of field names (e.g. "CustomDomains") to
  1365  	// unconditionally include in API requests. By default, fields with empty or
  1366  	// default values are omitted from API requests. See
  1367  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1368  	// details.
  1369  	ForceSendFields []string `json:"-"`
  1370  	// NullFields is a list of field names (e.g. "CustomDomains") to include in API
  1371  	// requests with the JSON null value. By default, fields with empty values are
  1372  	// omitted from API requests. See
  1373  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1374  	NullFields []string `json:"-"`
  1375  }
  1376  
  1377  func (s *ListCustomDomainsResponse) MarshalJSON() ([]byte, error) {
  1378  	type NoMethod ListCustomDomainsResponse
  1379  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1380  }
  1381  
  1382  // ListDomainsResponse: The response to listing Domains.
  1383  type ListDomainsResponse struct {
  1384  	// Domains: The list of domains, if any exist.
  1385  	Domains []*Domain `json:"domains,omitempty"`
  1386  	// NextPageToken: The pagination token, if more results exist.
  1387  	NextPageToken string `json:"nextPageToken,omitempty"`
  1388  
  1389  	// ServerResponse contains the HTTP response code and headers from the server.
  1390  	googleapi.ServerResponse `json:"-"`
  1391  	// ForceSendFields is a list of field names (e.g. "Domains") to unconditionally
  1392  	// include in API requests. By default, fields with empty or default values are
  1393  	// omitted from API requests. See
  1394  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1395  	// details.
  1396  	ForceSendFields []string `json:"-"`
  1397  	// NullFields is a list of field names (e.g. "Domains") to include in API
  1398  	// requests with the JSON null value. By default, fields with empty values are
  1399  	// omitted from API requests. See
  1400  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1401  	NullFields []string `json:"-"`
  1402  }
  1403  
  1404  func (s *ListDomainsResponse) MarshalJSON() ([]byte, error) {
  1405  	type NoMethod ListDomainsResponse
  1406  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1407  }
  1408  
  1409  // ListOperationsResponse: The response message for Operations.ListOperations.
  1410  type ListOperationsResponse struct {
  1411  	// NextPageToken: The standard List next-page token.
  1412  	NextPageToken string `json:"nextPageToken,omitempty"`
  1413  	// Operations: A list of operations that matches the specified filter in the
  1414  	// request.
  1415  	Operations []*Operation `json:"operations,omitempty"`
  1416  
  1417  	// ServerResponse contains the HTTP response code and headers from the server.
  1418  	googleapi.ServerResponse `json:"-"`
  1419  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1420  	// unconditionally include in API requests. By default, fields with empty or
  1421  	// default values are omitted from API requests. See
  1422  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1423  	// details.
  1424  	ForceSendFields []string `json:"-"`
  1425  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1426  	// requests with the JSON null value. By default, fields with empty values are
  1427  	// omitted from API requests. See
  1428  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1429  	NullFields []string `json:"-"`
  1430  }
  1431  
  1432  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1433  	type NoMethod ListOperationsResponse
  1434  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1435  }
  1436  
  1437  type ListReleasesResponse struct {
  1438  	// NextPageToken: The pagination token, if more results exist beyond the ones
  1439  	// in this response. Include this token in your next call to `ListReleases`.
  1440  	// Page tokens are short-lived and should not be stored.
  1441  	NextPageToken string `json:"nextPageToken,omitempty"`
  1442  	// Releases: The list of hashes of files that still need to be uploaded, if any
  1443  	// exist.
  1444  	Releases []*Release `json:"releases,omitempty"`
  1445  
  1446  	// ServerResponse contains the HTTP response code and headers from the server.
  1447  	googleapi.ServerResponse `json:"-"`
  1448  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1449  	// unconditionally include in API requests. By default, fields with empty or
  1450  	// default values are omitted from API requests. See
  1451  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1452  	// details.
  1453  	ForceSendFields []string `json:"-"`
  1454  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1455  	// requests with the JSON null value. By default, fields with empty values are
  1456  	// omitted from API requests. See
  1457  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1458  	NullFields []string `json:"-"`
  1459  }
  1460  
  1461  func (s *ListReleasesResponse) MarshalJSON() ([]byte, error) {
  1462  	type NoMethod ListReleasesResponse
  1463  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1464  }
  1465  
  1466  type ListSitesResponse struct {
  1467  	// NextPageToken: The pagination token, if more results exist beyond the ones
  1468  	// in this response. Include this token in your next call to `ListSites`. Page
  1469  	// tokens are short-lived and should not be stored.
  1470  	NextPageToken string `json:"nextPageToken,omitempty"`
  1471  	// Sites: A list of Site objects associated with the specified Firebase
  1472  	// project.
  1473  	Sites []*Site `json:"sites,omitempty"`
  1474  
  1475  	// ServerResponse contains the HTTP response code and headers from the server.
  1476  	googleapi.ServerResponse `json:"-"`
  1477  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1478  	// unconditionally include in API requests. By default, fields with empty or
  1479  	// default values are omitted from API requests. See
  1480  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1481  	// details.
  1482  	ForceSendFields []string `json:"-"`
  1483  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1484  	// requests with the JSON null value. By default, fields with empty values are
  1485  	// omitted from API requests. See
  1486  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1487  	NullFields []string `json:"-"`
  1488  }
  1489  
  1490  func (s *ListSitesResponse) MarshalJSON() ([]byte, error) {
  1491  	type NoMethod ListSitesResponse
  1492  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1493  }
  1494  
  1495  type ListVersionFilesResponse struct {
  1496  	// Files:  The list of paths to the hashes of the files in the specified
  1497  	// version.
  1498  	Files []*VersionFile `json:"files,omitempty"`
  1499  	// NextPageToken: The pagination token, if more results exist beyond the ones
  1500  	// in this response. Include this token in your next call to
  1501  	// `ListVersionFiles`. Page tokens are short-lived and should not be stored.
  1502  	NextPageToken string `json:"nextPageToken,omitempty"`
  1503  
  1504  	// ServerResponse contains the HTTP response code and headers from the server.
  1505  	googleapi.ServerResponse `json:"-"`
  1506  	// ForceSendFields is a list of field names (e.g. "Files") to unconditionally
  1507  	// include in API requests. By default, fields with empty or default values are
  1508  	// omitted from API requests. See
  1509  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1510  	// details.
  1511  	ForceSendFields []string `json:"-"`
  1512  	// NullFields is a list of field names (e.g. "Files") to include in API
  1513  	// requests with the JSON null value. By default, fields with empty values are
  1514  	// omitted from API requests. See
  1515  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1516  	NullFields []string `json:"-"`
  1517  }
  1518  
  1519  func (s *ListVersionFilesResponse) MarshalJSON() ([]byte, error) {
  1520  	type NoMethod ListVersionFilesResponse
  1521  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1522  }
  1523  
  1524  type ListVersionsResponse struct {
  1525  	// NextPageToken: The pagination token, if more results exist beyond the ones
  1526  	// in this response. Include this token in your next call to `ListVersions`.
  1527  	// Page tokens are short-lived and should not be stored.
  1528  	NextPageToken string `json:"nextPageToken,omitempty"`
  1529  	// Versions: The list of versions, if any exist.
  1530  	Versions []*Version `json:"versions,omitempty"`
  1531  
  1532  	// ServerResponse contains the HTTP response code and headers from the server.
  1533  	googleapi.ServerResponse `json:"-"`
  1534  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1535  	// unconditionally include in API requests. By default, fields with empty or
  1536  	// default values are omitted from API requests. See
  1537  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1538  	// details.
  1539  	ForceSendFields []string `json:"-"`
  1540  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1541  	// requests with the JSON null value. By default, fields with empty values are
  1542  	// omitted from API requests. See
  1543  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1544  	NullFields []string `json:"-"`
  1545  }
  1546  
  1547  func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
  1548  	type NoMethod ListVersionsResponse
  1549  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1550  }
  1551  
  1552  // LiveMigrationStep: A set of updates including ACME challenges and DNS
  1553  // records that allow Hosting to create an SSL certificate and establish
  1554  // project ownership for your domain name before you direct traffic to Hosting
  1555  // servers. Use these updates to facilitate zero downtime migrations to Hosting
  1556  // from other services. After you've made the recommended updates, check your
  1557  // custom domain's `ownershipState` and `certState`. To avoid downtime, they
  1558  // should be `OWNERSHIP_ACTIVE` and `CERT_ACTIVE`, respectively, before you
  1559  // update your `A` and `AAAA` records.
  1560  type LiveMigrationStep struct {
  1561  	// CertVerification: Output only. A pair of ACME challenges that Hosting's
  1562  	// Certificate Authority (CA) can use to create an SSL cert for your domain
  1563  	// name. Use either the DNS or HTTP challenge; it's not necessary to provide
  1564  	// both.
  1565  	CertVerification *CertVerification `json:"certVerification,omitempty"`
  1566  	// DnsUpdates: Output only. DNS updates to facilitate your domain's
  1567  	// zero-downtime migration to Hosting.
  1568  	DnsUpdates *DnsUpdates `json:"dnsUpdates,omitempty"`
  1569  	// Issues: Output only. Issues that prevent the current step from completing.
  1570  	Issues []*Status `json:"issues,omitempty"`
  1571  	// State: Output only. The state of the live migration step, indicates whether
  1572  	// you should work to complete the step now, in the future, or have already
  1573  	// completed it.
  1574  	//
  1575  	// Possible values:
  1576  	//   "STATE_UNSPECIFIED" - The step's state is unspecified. The message is
  1577  	// invalid if this is unspecified.
  1578  	//   "PREPARING" - Hosting doesn't have enough information to construct the
  1579  	// step yet. Complete any prior steps and/or resolve this step's issue to
  1580  	// proceed.
  1581  	//   "PENDING" - The step's state is pending. Complete prior steps before
  1582  	// working on a `PENDING` step.
  1583  	//   "INCOMPLETE" - The step is incomplete. You should complete any
  1584  	// `certVerification` or `dnsUpdates` changes to complete it.
  1585  	//   "PROCESSING" - You've done your part to update records and present
  1586  	// challenges as necessary. Hosting is now completing background processes to
  1587  	// complete the step, e.g. minting an SSL cert for your domain name.
  1588  	//   "COMPLETE" - The step is complete. You've already made the necessary
  1589  	// changes to your domain and/or prior hosting service to advance to the next
  1590  	// step. Once all steps are complete, Hosting is ready to serve secure content
  1591  	// on your domain.
  1592  	State string `json:"state,omitempty"`
  1593  	// ForceSendFields is a list of field names (e.g. "CertVerification") to
  1594  	// unconditionally include in API requests. By default, fields with empty or
  1595  	// default values are omitted from API requests. See
  1596  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1597  	// details.
  1598  	ForceSendFields []string `json:"-"`
  1599  	// NullFields is a list of field names (e.g. "CertVerification") to include in
  1600  	// API requests with the JSON null value. By default, fields with empty values
  1601  	// are omitted from API requests. See
  1602  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1603  	NullFields []string `json:"-"`
  1604  }
  1605  
  1606  func (s *LiveMigrationStep) MarshalJSON() ([]byte, error) {
  1607  	type NoMethod LiveMigrationStep
  1608  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1609  }
  1610  
  1611  // Operation: This resource represents a long-running operation that is the
  1612  // result of a network API call.
  1613  type Operation struct {
  1614  	// Done: If the value is `false`, it means the operation is still in progress.
  1615  	// If `true`, the operation is completed, and either `error` or `response` is
  1616  	// available.
  1617  	Done bool `json:"done,omitempty"`
  1618  	// Error: The error result of the operation in case of failure or cancellation.
  1619  	Error *Status `json:"error,omitempty"`
  1620  	// Metadata: Service-specific metadata associated with the operation. It
  1621  	// typically contains progress information and common metadata such as create
  1622  	// time. Some services might not provide such metadata. Any method that returns
  1623  	// a long-running operation should document the metadata type, if any.
  1624  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1625  	// Name: The server-assigned name, which is only unique within the same service
  1626  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1627  	// should be a resource name ending with `operations/{unique_id}`.
  1628  	Name string `json:"name,omitempty"`
  1629  	// Response: The normal, successful response of the operation. If the original
  1630  	// method returns no data on success, such as `Delete`, the response is
  1631  	// `google.protobuf.Empty`. If the original method is standard
  1632  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1633  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1634  	// original method name. For example, if the original method name is
  1635  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1636  	Response googleapi.RawMessage `json:"response,omitempty"`
  1637  
  1638  	// ServerResponse contains the HTTP response code and headers from the server.
  1639  	googleapi.ServerResponse `json:"-"`
  1640  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1641  	// include in API requests. By default, fields with empty or default values are
  1642  	// omitted from API requests. See
  1643  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1644  	// details.
  1645  	ForceSendFields []string `json:"-"`
  1646  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1647  	// with the JSON null value. By default, fields with empty values are omitted
  1648  	// from API requests. See
  1649  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1650  	NullFields []string `json:"-"`
  1651  }
  1652  
  1653  func (s *Operation) MarshalJSON() ([]byte, error) {
  1654  	type NoMethod Operation
  1655  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1656  }
  1657  
  1658  // PathFilter: A representation of filter path.
  1659  type PathFilter struct {
  1660  	// Regexes: An array of RegEx values by which to filter.
  1661  	Regexes []string `json:"regexes,omitempty"`
  1662  	// ForceSendFields is a list of field names (e.g. "Regexes") to unconditionally
  1663  	// include in API requests. By default, fields with empty or default values are
  1664  	// omitted from API requests. See
  1665  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1666  	// details.
  1667  	ForceSendFields []string `json:"-"`
  1668  	// NullFields is a list of field names (e.g. "Regexes") to include in API
  1669  	// requests with the JSON null value. By default, fields with empty values are
  1670  	// omitted from API requests. See
  1671  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1672  	NullFields []string `json:"-"`
  1673  }
  1674  
  1675  func (s *PathFilter) MarshalJSON() ([]byte, error) {
  1676  	type NoMethod PathFilter
  1677  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1678  }
  1679  
  1680  type PopulateVersionFilesRequest struct {
  1681  	// Files: A set of file paths to the hashes corresponding to assets that should
  1682  	// be added to the version. A file path to an empty hash will remove the path
  1683  	// from the version. Calculate a hash by Gzipping the file then taking the
  1684  	// SHA256 hash of the newly compressed file.
  1685  	Files map[string]string `json:"files,omitempty"`
  1686  	// ForceSendFields is a list of field names (e.g. "Files") to unconditionally
  1687  	// include in API requests. By default, fields with empty or default values are
  1688  	// omitted from API requests. See
  1689  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1690  	// details.
  1691  	ForceSendFields []string `json:"-"`
  1692  	// NullFields is a list of field names (e.g. "Files") to include in API
  1693  	// requests with the JSON null value. By default, fields with empty values are
  1694  	// omitted from API requests. See
  1695  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1696  	NullFields []string `json:"-"`
  1697  }
  1698  
  1699  func (s *PopulateVersionFilesRequest) MarshalJSON() ([]byte, error) {
  1700  	type NoMethod PopulateVersionFilesRequest
  1701  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1702  }
  1703  
  1704  type PopulateVersionFilesResponse struct {
  1705  	// UploadRequiredHashes: The content hashes of the specified files that need to
  1706  	// be uploaded to the specified URL.
  1707  	UploadRequiredHashes []string `json:"uploadRequiredHashes,omitempty"`
  1708  	// UploadUrl: The URL to which the files should be uploaded, in the format:
  1709  	// "https://upload-firebasehosting.googleapis.com/upload/sites/SITE_ID
  1710  	// /versions/VERSION_ID/files" Perform a multipart `POST` of the Gzipped file
  1711  	// contents to the URL using a forward slash and the hash of the file appended
  1712  	// to the end.
  1713  	UploadUrl string `json:"uploadUrl,omitempty"`
  1714  
  1715  	// ServerResponse contains the HTTP response code and headers from the server.
  1716  	googleapi.ServerResponse `json:"-"`
  1717  	// ForceSendFields is a list of field names (e.g. "UploadRequiredHashes") to
  1718  	// unconditionally include in API requests. By default, fields with empty or
  1719  	// default values are omitted from API requests. See
  1720  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1721  	// details.
  1722  	ForceSendFields []string `json:"-"`
  1723  	// NullFields is a list of field names (e.g. "UploadRequiredHashes") to include
  1724  	// in API requests with the JSON null value. By default, fields with empty
  1725  	// values are omitted from API requests. See
  1726  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1727  	NullFields []string `json:"-"`
  1728  }
  1729  
  1730  func (s *PopulateVersionFilesResponse) MarshalJSON() ([]byte, error) {
  1731  	type NoMethod PopulateVersionFilesResponse
  1732  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1733  }
  1734  
  1735  // Redirect: A `Redirect`
  1736  // (https://firebase.google.com/docs/hosting/full-config#redirects) specifies a
  1737  // URL pattern that, if matched to the request URL path, triggers Hosting to
  1738  // respond with a redirect to the specified destination path.
  1739  type Redirect struct {
  1740  	// Glob: The user-supplied glob
  1741  	// (https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching)
  1742  	// to match against the request URL path.
  1743  	Glob string `json:"glob,omitempty"`
  1744  	// Location: Required. The value to put in the HTTP location header of the
  1745  	// response. The location can contain capture group values from the pattern
  1746  	// using a `:` prefix to identify the segment and an optional `*` to capture
  1747  	// the rest of the URL. For example: "glob": "/:capture*", "statusCode": 301,
  1748  	// "location": "https://example.com/foo/:capture"
  1749  	Location string `json:"location,omitempty"`
  1750  	// Regex: The user-supplied RE2 regular expression to match against the request
  1751  	// URL path.
  1752  	Regex string `json:"regex,omitempty"`
  1753  	// StatusCode: Required. The status HTTP code to return in the response. It
  1754  	// must be a valid 3xx status code.
  1755  	StatusCode int64 `json:"statusCode,omitempty"`
  1756  	// ForceSendFields is a list of field names (e.g. "Glob") to unconditionally
  1757  	// include in API requests. By default, fields with empty or default values are
  1758  	// omitted from API requests. See
  1759  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1760  	// details.
  1761  	ForceSendFields []string `json:"-"`
  1762  	// NullFields is a list of field names (e.g. "Glob") to include in API requests
  1763  	// with the JSON null value. By default, fields with empty values are omitted
  1764  	// from API requests. See
  1765  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1766  	NullFields []string `json:"-"`
  1767  }
  1768  
  1769  func (s *Redirect) MarshalJSON() ([]byte, error) {
  1770  	type NoMethod Redirect
  1771  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1772  }
  1773  
  1774  // Release:  A `Release` is a particular collection of configurations and files
  1775  // (sites.versions) that is set to be public at a particular time.
  1776  type Release struct {
  1777  	// Message: The deploy description when the release was created. The value can
  1778  	// be up to 512 characters.
  1779  	Message string `json:"message,omitempty"`
  1780  	// Name: Output only. The unique identifier for the release, in either of the
  1781  	// following formats: - sites/SITE_ID/releases/RELEASE_ID -
  1782  	// sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID This name is provided
  1783  	// in the response body when you call `releases.create` (sites.releases/create)
  1784  	// or `channels.releases.create` (sites.channels.releases/create).
  1785  	Name string `json:"name,omitempty"`
  1786  	// ReleaseTime: Output only. The time at which the version is set to be public.
  1787  	ReleaseTime string `json:"releaseTime,omitempty"`
  1788  	// ReleaseUser: Output only. Identifies the user who created the release.
  1789  	ReleaseUser *ActingUser `json:"releaseUser,omitempty"`
  1790  	// Type: Explains the reason for the release. Specify a value for this field
  1791  	// only when creating a `SITE_DISABLE` type release.
  1792  	//
  1793  	// Possible values:
  1794  	//   "TYPE_UNSPECIFIED" - An unspecified type. Indicates that a version was
  1795  	// released. This is the default value when no other `type` is explicitly
  1796  	// specified.
  1797  	//   "DEPLOY" - A version was uploaded to Firebase Hosting and released.
  1798  	//   "ROLLBACK" - The release points back to a previously deployed version.
  1799  	//   "SITE_DISABLE" - The release prevents the site from serving content.
  1800  	// Firebase Hosting acts as if the site never existed.
  1801  	Type string `json:"type,omitempty"`
  1802  	// Version: Output only. The configuration and content that was released.
  1803  	Version *Version `json:"version,omitempty"`
  1804  
  1805  	// ServerResponse contains the HTTP response code and headers from the server.
  1806  	googleapi.ServerResponse `json:"-"`
  1807  	// ForceSendFields is a list of field names (e.g. "Message") to unconditionally
  1808  	// include in API requests. By default, fields with empty or default values are
  1809  	// omitted from API requests. See
  1810  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1811  	// details.
  1812  	ForceSendFields []string `json:"-"`
  1813  	// NullFields is a list of field names (e.g. "Message") to include in API
  1814  	// requests with the JSON null value. By default, fields with empty values are
  1815  	// omitted from API requests. See
  1816  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1817  	NullFields []string `json:"-"`
  1818  }
  1819  
  1820  func (s *Release) MarshalJSON() ([]byte, error) {
  1821  	type NoMethod Release
  1822  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1823  }
  1824  
  1825  // Rewrite: A `Rewrite`
  1826  // (https://firebase.google.com/docs/hosting/full-config#rewrites) specifies a
  1827  // URL pattern that, if matched to the request URL path, triggers Hosting to
  1828  // respond as if the service were given the specified destination URL.
  1829  type Rewrite struct {
  1830  	// DynamicLinks: The request will be forwarded to Firebase Dynamic Links.
  1831  	DynamicLinks bool `json:"dynamicLinks,omitempty"`
  1832  	// Function: The function to proxy requests to. Must match the exported
  1833  	// function name exactly.
  1834  	Function string `json:"function,omitempty"`
  1835  	// FunctionRegion: Optional. Specify a Cloud region for rewritten Functions
  1836  	// invocations. If not provided, defaults to us-central1.
  1837  	FunctionRegion string `json:"functionRegion,omitempty"`
  1838  	// Glob: The user-supplied glob
  1839  	// (https://firebase.google.com/docs/hosting/full-config#glob_pattern_matching)
  1840  	// to match against the request URL path.
  1841  	Glob string `json:"glob,omitempty"`
  1842  	// Path: The URL path to rewrite the request to.
  1843  	Path string `json:"path,omitempty"`
  1844  	// Regex: The user-supplied RE2 regular expression to match against the request
  1845  	// URL path.
  1846  	Regex string `json:"regex,omitempty"`
  1847  	// Run: The request will be forwarded to Cloud Run.
  1848  	Run *CloudRunRewrite `json:"run,omitempty"`
  1849  	// ForceSendFields is a list of field names (e.g. "DynamicLinks") to
  1850  	// unconditionally include in API requests. By default, fields with empty or
  1851  	// default values are omitted from API requests. See
  1852  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1853  	// details.
  1854  	ForceSendFields []string `json:"-"`
  1855  	// NullFields is a list of field names (e.g. "DynamicLinks") to include in API
  1856  	// requests with the JSON null value. By default, fields with empty values are
  1857  	// omitted from API requests. See
  1858  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1859  	NullFields []string `json:"-"`
  1860  }
  1861  
  1862  func (s *Rewrite) MarshalJSON() ([]byte, error) {
  1863  	type NoMethod Rewrite
  1864  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1865  }
  1866  
  1867  // ServingConfig: The configuration for how incoming requests to a site should
  1868  // be routed and processed before serving content. The URL request paths are
  1869  // matched against the specified URL patterns in the configuration, then
  1870  // Hosting applies the applicable configuration according to a specific
  1871  // priority order
  1872  // (https://firebase.google.com/docs/hosting/full-config#hosting_priority_order).
  1873  type ServingConfig struct {
  1874  	// AppAssociation: How to handle well known App Association files.
  1875  	//
  1876  	// Possible values:
  1877  	//   "AUTO" - The app association files will be automatically created from the
  1878  	// apps that exist in the Firebase project.
  1879  	//   "NONE" - No special handling of the app association files will occur,
  1880  	// these paths will result in a 404 unless caught with a Rewrite.
  1881  	AppAssociation string `json:"appAssociation,omitempty"`
  1882  	// CleanUrls: Defines whether to drop the file extension from uploaded files.
  1883  	CleanUrls bool `json:"cleanUrls,omitempty"`
  1884  	// Headers: An array of objects, where each object specifies a URL pattern
  1885  	// that, if matched to the request URL path, triggers Hosting to apply the
  1886  	// specified custom response headers.
  1887  	Headers []*Header `json:"headers,omitempty"`
  1888  	// I18n: Optional. Defines i18n rewrite behavior.
  1889  	I18n *I18nConfig `json:"i18n,omitempty"`
  1890  	// Redirects: An array of objects (called redirect rules), where each rule
  1891  	// specifies a URL pattern that, if matched to the request URL path, triggers
  1892  	// Hosting to respond with a redirect to the specified destination path.
  1893  	Redirects []*Redirect `json:"redirects,omitempty"`
  1894  	// Rewrites: An array of objects (called rewrite rules), where each rule
  1895  	// specifies a URL pattern that, if matched to the request URL path, triggers
  1896  	// Hosting to respond as if the service were given the specified destination
  1897  	// URL.
  1898  	Rewrites []*Rewrite `json:"rewrites,omitempty"`
  1899  	// TrailingSlashBehavior: Defines how to handle a trailing slash in the URL
  1900  	// path.
  1901  	//
  1902  	// Possible values:
  1903  	//   "TRAILING_SLASH_BEHAVIOR_UNSPECIFIED" - No behavior is specified. Files
  1904  	// are served at their exact location only, and trailing slashes are only added
  1905  	// to directory indexes.
  1906  	//   "ADD" - Trailing slashes are _added_ to directory indexes as well as to
  1907  	// any URL path not ending in a file extension.
  1908  	//   "REMOVE" - Trailing slashes are _removed_ from directory indexes as well
  1909  	// as from any URL path not ending in a file extension.
  1910  	TrailingSlashBehavior string `json:"trailingSlashBehavior,omitempty"`
  1911  	// ForceSendFields is a list of field names (e.g. "AppAssociation") to
  1912  	// unconditionally include in API requests. By default, fields with empty or
  1913  	// default values are omitted from API requests. See
  1914  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1915  	// details.
  1916  	ForceSendFields []string `json:"-"`
  1917  	// NullFields is a list of field names (e.g. "AppAssociation") to include in
  1918  	// API requests with the JSON null value. By default, fields with empty values
  1919  	// are omitted from API requests. See
  1920  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1921  	NullFields []string `json:"-"`
  1922  }
  1923  
  1924  func (s *ServingConfig) MarshalJSON() ([]byte, error) {
  1925  	type NoMethod ServingConfig
  1926  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1927  }
  1928  
  1929  // Site: A `Site` represents a Firebase Hosting site.
  1930  type Site struct {
  1931  	// AppId: Optional. The ID of a Web App
  1932  	// (https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id)
  1933  	// associated with the Hosting site.
  1934  	AppId string `json:"appId,omitempty"`
  1935  	// DefaultUrl: Output only. The default URL for the Hosting site.
  1936  	DefaultUrl string `json:"defaultUrl,omitempty"`
  1937  	// Labels: Optional. User-specified labels for the Hosting site.
  1938  	Labels map[string]string `json:"labels,omitempty"`
  1939  	// Name: Output only. The fully-qualified resource name of the Hosting site, in
  1940  	// the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID PROJECT_IDENTIFIER:
  1941  	// the Firebase project's `ProjectNumber`
  1942  	// (https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number)
  1943  	// ***(recommended)*** or its `ProjectId`
  1944  	// (https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id).
  1945  	// Learn more about using project identifiers in Google's AIP 2510 standard
  1946  	// (https://google.aip.dev/cloud/2510).
  1947  	Name string `json:"name,omitempty"`
  1948  	// Type: Output only. The type of Hosting site. Every Firebase project has a
  1949  	// `DEFAULT_SITE`, which is created when Hosting is provisioned for the
  1950  	// project. All additional sites are `USER_SITE`.
  1951  	//
  1952  	// Possible values:
  1953  	//   "TYPE_UNSPECIFIED" - Unknown state, likely the result of an error on the
  1954  	// backend.
  1955  	//   "DEFAULT_SITE" - The default Hosting site that is provisioned when a
  1956  	// Firebase project is created.
  1957  	//   "USER_SITE" - A Hosting site that the user created.
  1958  	Type string `json:"type,omitempty"`
  1959  
  1960  	// ServerResponse contains the HTTP response code and headers from the server.
  1961  	googleapi.ServerResponse `json:"-"`
  1962  	// ForceSendFields is a list of field names (e.g. "AppId") to unconditionally
  1963  	// include in API requests. By default, fields with empty or default values are
  1964  	// omitted from API requests. See
  1965  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1966  	// details.
  1967  	ForceSendFields []string `json:"-"`
  1968  	// NullFields is a list of field names (e.g. "AppId") to include in API
  1969  	// requests with the JSON null value. By default, fields with empty values are
  1970  	// omitted from API requests. See
  1971  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1972  	NullFields []string `json:"-"`
  1973  }
  1974  
  1975  func (s *Site) MarshalJSON() ([]byte, error) {
  1976  	type NoMethod Site
  1977  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1978  }
  1979  
  1980  // SiteConfig: A `SiteConfig` contains metadata associated with a specific site
  1981  // that controls Firebase Hosting serving behavior
  1982  type SiteConfig struct {
  1983  	// CloudLoggingEnabled: Whether or not web requests made by site visitors are
  1984  	// logged via Cloud Logging.
  1985  	CloudLoggingEnabled bool `json:"cloudLoggingEnabled,omitempty"`
  1986  	// MaxVersions: The number of FINALIZED versions that will be held for a site
  1987  	// before automatic deletion. When a new version is deployed, content for
  1988  	// versions in storage in excess of this number will be deleted, and will no
  1989  	// longer be billed for storage usage. Oldest versions will be deleted first;
  1990  	// sites are created with an unlimited number of max_versions by default.
  1991  	MaxVersions int64 `json:"maxVersions,omitempty,string"`
  1992  
  1993  	// ServerResponse contains the HTTP response code and headers from the server.
  1994  	googleapi.ServerResponse `json:"-"`
  1995  	// ForceSendFields is a list of field names (e.g. "CloudLoggingEnabled") to
  1996  	// unconditionally include in API requests. By default, fields with empty or
  1997  	// default values are omitted from API requests. See
  1998  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1999  	// details.
  2000  	ForceSendFields []string `json:"-"`
  2001  	// NullFields is a list of field names (e.g. "CloudLoggingEnabled") to include
  2002  	// in API requests with the JSON null value. By default, fields with empty
  2003  	// values are omitted from API requests. See
  2004  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2005  	NullFields []string `json:"-"`
  2006  }
  2007  
  2008  func (s *SiteConfig) MarshalJSON() ([]byte, error) {
  2009  	type NoMethod SiteConfig
  2010  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2011  }
  2012  
  2013  // Status: The `Status` type defines a logical error model that is suitable for
  2014  // different programming environments, including REST APIs and RPC APIs. It is
  2015  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  2016  // pieces of data: error code, error message, and error details. You can find
  2017  // out more about this error model and how to work with it in the API Design
  2018  // Guide (https://cloud.google.com/apis/design/errors).
  2019  type Status struct {
  2020  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2021  	Code int64 `json:"code,omitempty"`
  2022  	// Details: A list of messages that carry the error details. There is a common
  2023  	// set of message types for APIs to use.
  2024  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2025  	// Message: A developer-facing error message, which should be in English. Any
  2026  	// user-facing error message should be localized and sent in the
  2027  	// google.rpc.Status.details field, or localized by the client.
  2028  	Message string `json:"message,omitempty"`
  2029  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2030  	// include in API requests. By default, fields with empty or default values are
  2031  	// omitted from API requests. See
  2032  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2033  	// details.
  2034  	ForceSendFields []string `json:"-"`
  2035  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2036  	// with the JSON null value. By default, fields with empty values are omitted
  2037  	// from API requests. See
  2038  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2039  	NullFields []string `json:"-"`
  2040  }
  2041  
  2042  func (s *Status) MarshalJSON() ([]byte, error) {
  2043  	type NoMethod Status
  2044  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2045  }
  2046  
  2047  // UndeleteCustomDomainRequest: The request sent to `UndeleteCustomDomain`.
  2048  type UndeleteCustomDomainRequest struct {
  2049  	// Etag: A tag that represents the state of the `CustomDomain` as you know it.
  2050  	// If present, the supplied tag must match the current value on your
  2051  	// `CustomDomain`, or the request fails.
  2052  	Etag string `json:"etag,omitempty"`
  2053  	// ValidateOnly: If true, Hosting validates that it's possible to complete your
  2054  	// request but doesn't actually delete the `CustomDomain`.
  2055  	ValidateOnly bool `json:"validateOnly,omitempty"`
  2056  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  2057  	// include in API requests. By default, fields with empty or default values are
  2058  	// omitted from API requests. See
  2059  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2060  	// details.
  2061  	ForceSendFields []string `json:"-"`
  2062  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  2063  	// with the JSON null value. By default, fields with empty values are omitted
  2064  	// from API requests. See
  2065  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2066  	NullFields []string `json:"-"`
  2067  }
  2068  
  2069  func (s *UndeleteCustomDomainRequest) MarshalJSON() ([]byte, error) {
  2070  	type NoMethod UndeleteCustomDomainRequest
  2071  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2072  }
  2073  
  2074  // Version: A `Version` is a configuration and a collection of static files
  2075  // which determine how a site is displayed.
  2076  type Version struct {
  2077  	// Config: The configuration for the behavior of the site. This configuration
  2078  	// exists in the `firebase.json`
  2079  	// (https://firebase.google.com/docs/cli/#the_firebasejson_file) file.
  2080  	Config *ServingConfig `json:"config,omitempty"`
  2081  	// CreateTime: Output only. The time at which the version was created.
  2082  	CreateTime string `json:"createTime,omitempty"`
  2083  	// CreateUser: Output only. Identifies the user who created the version.
  2084  	CreateUser *ActingUser `json:"createUser,omitempty"`
  2085  	// DeleteTime: Output only. The time at which the version was `DELETED`.
  2086  	DeleteTime string `json:"deleteTime,omitempty"`
  2087  	// DeleteUser: Output only. Identifies the user who `DELETED` the version.
  2088  	DeleteUser *ActingUser `json:"deleteUser,omitempty"`
  2089  	// FileCount: Output only. The total number of files associated with the
  2090  	// version. This value is calculated after a version is `FINALIZED`.
  2091  	FileCount int64 `json:"fileCount,omitempty,string"`
  2092  	// FinalizeTime: Output only. The time at which the version was `FINALIZED`.
  2093  	FinalizeTime string `json:"finalizeTime,omitempty"`
  2094  	// FinalizeUser: Output only. Identifies the user who `FINALIZED` the version.
  2095  	FinalizeUser *ActingUser `json:"finalizeUser,omitempty"`
  2096  	// Labels: The labels used for extra metadata and/or filtering.
  2097  	Labels map[string]string `json:"labels,omitempty"`
  2098  	// Name: The fully-qualified resource name for the version, in the format:
  2099  	// sites/ SITE_ID/versions/VERSION_ID This name is provided in the response
  2100  	// body when you call `CreateVersion` (sites.versions/create).
  2101  	Name string `json:"name,omitempty"`
  2102  	// Status: The deploy status of the version. For a successful deploy, call
  2103  	// `CreateVersion` (sites.versions/create) to make a new version (`CREATED`
  2104  	// status), upload all desired files (sites.versions/populateFiles) to the
  2105  	// version, then update (sites.versions/patch) the version to the `FINALIZED`
  2106  	// status. Note that if you leave the version in the `CREATED` state for more
  2107  	// than 12 hours, the system will automatically mark the version as
  2108  	// `ABANDONED`. You can also change the status of a version to `DELETED` by
  2109  	// calling `DeleteVersion` (sites.versions/delete).
  2110  	//
  2111  	// Possible values:
  2112  	//   "VERSION_STATUS_UNSPECIFIED" - The default status; should not be
  2113  	// intentionally used.
  2114  	//   "CREATED" - The version has been created, and content is currently being
  2115  	// added to the version.
  2116  	//   "FINALIZED" - All content has been added to the version, and the version
  2117  	// can no longer be changed.
  2118  	//   "DELETED" - The version has been deleted.
  2119  	//   "ABANDONED" - The version was not updated to `FINALIZED` within 12 hours
  2120  	// and was automatically deleted.
  2121  	//   "EXPIRED" - The version is outside the site-configured limit for the
  2122  	// number of retained versions, so the version's content is scheduled for
  2123  	// deletion.
  2124  	//   "CLONING" - The version is being cloned from another version. All content
  2125  	// is still being copied over.
  2126  	Status string `json:"status,omitempty"`
  2127  	// VersionBytes: Output only. The total stored bytesize of the version. This
  2128  	// value is calculated after a version is `FINALIZED`.
  2129  	VersionBytes int64 `json:"versionBytes,omitempty,string"`
  2130  
  2131  	// ServerResponse contains the HTTP response code and headers from the server.
  2132  	googleapi.ServerResponse `json:"-"`
  2133  	// ForceSendFields is a list of field names (e.g. "Config") to unconditionally
  2134  	// include in API requests. By default, fields with empty or default values are
  2135  	// omitted from API requests. See
  2136  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2137  	// details.
  2138  	ForceSendFields []string `json:"-"`
  2139  	// NullFields is a list of field names (e.g. "Config") to include in API
  2140  	// requests with the JSON null value. By default, fields with empty values are
  2141  	// omitted from API requests. See
  2142  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2143  	NullFields []string `json:"-"`
  2144  }
  2145  
  2146  func (s *Version) MarshalJSON() ([]byte, error) {
  2147  	type NoMethod Version
  2148  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2149  }
  2150  
  2151  // VersionFile: A static content file that is part of a version.
  2152  type VersionFile struct {
  2153  	// Hash: The SHA256 content hash of the file.
  2154  	Hash string `json:"hash,omitempty"`
  2155  	// Path: The URI at which the file's content should display.
  2156  	Path string `json:"path,omitempty"`
  2157  	// Status: Output only. The current status of a particular file in the
  2158  	// specified version. The value will be either `pending upload` or `uploaded`.
  2159  	//
  2160  	// Possible values:
  2161  	//   "STATUS_UNSPECIFIED" - The default status; should not be intentionally
  2162  	// used.
  2163  	//   "EXPECTED" - The file has been included in the version and is expected to
  2164  	// be uploaded in the near future.
  2165  	//   "ACTIVE" - The file has already been uploaded to Firebase Hosting.
  2166  	Status string `json:"status,omitempty"`
  2167  	// ForceSendFields is a list of field names (e.g. "Hash") to unconditionally
  2168  	// include in API requests. By default, fields with empty or default values are
  2169  	// omitted from API requests. See
  2170  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2171  	// details.
  2172  	ForceSendFields []string `json:"-"`
  2173  	// NullFields is a list of field names (e.g. "Hash") to include in API requests
  2174  	// with the JSON null value. By default, fields with empty values are omitted
  2175  	// from API requests. See
  2176  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2177  	NullFields []string `json:"-"`
  2178  }
  2179  
  2180  func (s *VersionFile) MarshalJSON() ([]byte, error) {
  2181  	type NoMethod VersionFile
  2182  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2183  }
  2184  
  2185  type ProjectsOperationsGetCall struct {
  2186  	s            *Service
  2187  	name         string
  2188  	urlParams_   gensupport.URLParams
  2189  	ifNoneMatch_ string
  2190  	ctx_         context.Context
  2191  	header_      http.Header
  2192  }
  2193  
  2194  // Get: Gets the latest state of a long-running operation. Clients can use this
  2195  // method to poll the operation result at intervals as recommended by the API
  2196  // service.
  2197  //
  2198  // - name: The name of the operation resource.
  2199  func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
  2200  	c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2201  	c.name = name
  2202  	return c
  2203  }
  2204  
  2205  // Fields allows partial responses to be retrieved. See
  2206  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2207  // details.
  2208  func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
  2209  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2210  	return c
  2211  }
  2212  
  2213  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2214  // object's ETag matches the given value. This is useful for getting updates
  2215  // only after the object has changed since the last request.
  2216  func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
  2217  	c.ifNoneMatch_ = entityTag
  2218  	return c
  2219  }
  2220  
  2221  // Context sets the context to be used in this call's Do method.
  2222  func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
  2223  	c.ctx_ = ctx
  2224  	return c
  2225  }
  2226  
  2227  // Header returns a http.Header that can be modified by the caller to add
  2228  // headers to the request.
  2229  func (c *ProjectsOperationsGetCall) Header() http.Header {
  2230  	if c.header_ == nil {
  2231  		c.header_ = make(http.Header)
  2232  	}
  2233  	return c.header_
  2234  }
  2235  
  2236  func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2237  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2238  	if c.ifNoneMatch_ != "" {
  2239  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2240  	}
  2241  	var body io.Reader = nil
  2242  	c.urlParams_.Set("alt", alt)
  2243  	c.urlParams_.Set("prettyPrint", "false")
  2244  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2245  	urls += "?" + c.urlParams_.Encode()
  2246  	req, err := http.NewRequest("GET", urls, body)
  2247  	if err != nil {
  2248  		return nil, err
  2249  	}
  2250  	req.Header = reqHeaders
  2251  	googleapi.Expand(req.URL, map[string]string{
  2252  		"name": c.name,
  2253  	})
  2254  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2255  }
  2256  
  2257  // Do executes the "firebasehosting.projects.operations.get" call.
  2258  // Any non-2xx status code is an error. Response headers are in either
  2259  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2260  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2261  // whether the returned error was because http.StatusNotModified was returned.
  2262  func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2263  	gensupport.SetOptions(c.urlParams_, opts...)
  2264  	res, err := c.doRequest("json")
  2265  	if res != nil && res.StatusCode == http.StatusNotModified {
  2266  		if res.Body != nil {
  2267  			res.Body.Close()
  2268  		}
  2269  		return nil, gensupport.WrapError(&googleapi.Error{
  2270  			Code:   res.StatusCode,
  2271  			Header: res.Header,
  2272  		})
  2273  	}
  2274  	if err != nil {
  2275  		return nil, err
  2276  	}
  2277  	defer googleapi.CloseBody(res)
  2278  	if err := googleapi.CheckResponse(res); err != nil {
  2279  		return nil, gensupport.WrapError(err)
  2280  	}
  2281  	ret := &Operation{
  2282  		ServerResponse: googleapi.ServerResponse{
  2283  			Header:         res.Header,
  2284  			HTTPStatusCode: res.StatusCode,
  2285  		},
  2286  	}
  2287  	target := &ret
  2288  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2289  		return nil, err
  2290  	}
  2291  	return ret, nil
  2292  }
  2293  
  2294  type ProjectsSitesCreateCall struct {
  2295  	s          *Service
  2296  	parent     string
  2297  	site       *Site
  2298  	urlParams_ gensupport.URLParams
  2299  	ctx_       context.Context
  2300  	header_    http.Header
  2301  }
  2302  
  2303  // Create: Creates a new Hosting Site in the specified parent Firebase project.
  2304  // Note that Hosting sites can take several minutes to propagate through
  2305  // Firebase systems.
  2306  //
  2307  //   - parent: The Firebase project in which to create a Hosting site, in the
  2308  //     format: projects/PROJECT_IDENTIFIER Refer to the `Site` `name`
  2309  //     (../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER
  2310  //     values.
  2311  func (r *ProjectsSitesService) Create(parent string, site *Site) *ProjectsSitesCreateCall {
  2312  	c := &ProjectsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2313  	c.parent = parent
  2314  	c.site = site
  2315  	return c
  2316  }
  2317  
  2318  // SiteId sets the optional parameter "siteId": Required. Immutable. A globally
  2319  // unique identifier for the Hosting site. This identifier is used to construct
  2320  // the Firebase-provisioned subdomains for the site, so it must also be a valid
  2321  // domain name label.
  2322  func (c *ProjectsSitesCreateCall) SiteId(siteId string) *ProjectsSitesCreateCall {
  2323  	c.urlParams_.Set("siteId", siteId)
  2324  	return c
  2325  }
  2326  
  2327  // ValidateOnly sets the optional parameter "validateOnly": If set, validates
  2328  // that the site_id is available and that the request would succeed, returning
  2329  // the expected resulting site or error.
  2330  func (c *ProjectsSitesCreateCall) ValidateOnly(validateOnly bool) *ProjectsSitesCreateCall {
  2331  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  2332  	return c
  2333  }
  2334  
  2335  // Fields allows partial responses to be retrieved. See
  2336  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2337  // details.
  2338  func (c *ProjectsSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsSitesCreateCall {
  2339  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2340  	return c
  2341  }
  2342  
  2343  // Context sets the context to be used in this call's Do method.
  2344  func (c *ProjectsSitesCreateCall) Context(ctx context.Context) *ProjectsSitesCreateCall {
  2345  	c.ctx_ = ctx
  2346  	return c
  2347  }
  2348  
  2349  // Header returns a http.Header that can be modified by the caller to add
  2350  // headers to the request.
  2351  func (c *ProjectsSitesCreateCall) Header() http.Header {
  2352  	if c.header_ == nil {
  2353  		c.header_ = make(http.Header)
  2354  	}
  2355  	return c.header_
  2356  }
  2357  
  2358  func (c *ProjectsSitesCreateCall) doRequest(alt string) (*http.Response, error) {
  2359  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2360  	var body io.Reader = nil
  2361  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
  2362  	if err != nil {
  2363  		return nil, err
  2364  	}
  2365  	c.urlParams_.Set("alt", alt)
  2366  	c.urlParams_.Set("prettyPrint", "false")
  2367  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/sites")
  2368  	urls += "?" + c.urlParams_.Encode()
  2369  	req, err := http.NewRequest("POST", urls, body)
  2370  	if err != nil {
  2371  		return nil, err
  2372  	}
  2373  	req.Header = reqHeaders
  2374  	googleapi.Expand(req.URL, map[string]string{
  2375  		"parent": c.parent,
  2376  	})
  2377  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2378  }
  2379  
  2380  // Do executes the "firebasehosting.projects.sites.create" call.
  2381  // Any non-2xx status code is an error. Response headers are in either
  2382  // *Site.ServerResponse.Header or (if a response was returned at all) in
  2383  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2384  // whether the returned error was because http.StatusNotModified was returned.
  2385  func (c *ProjectsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
  2386  	gensupport.SetOptions(c.urlParams_, opts...)
  2387  	res, err := c.doRequest("json")
  2388  	if res != nil && res.StatusCode == http.StatusNotModified {
  2389  		if res.Body != nil {
  2390  			res.Body.Close()
  2391  		}
  2392  		return nil, gensupport.WrapError(&googleapi.Error{
  2393  			Code:   res.StatusCode,
  2394  			Header: res.Header,
  2395  		})
  2396  	}
  2397  	if err != nil {
  2398  		return nil, err
  2399  	}
  2400  	defer googleapi.CloseBody(res)
  2401  	if err := googleapi.CheckResponse(res); err != nil {
  2402  		return nil, gensupport.WrapError(err)
  2403  	}
  2404  	ret := &Site{
  2405  		ServerResponse: googleapi.ServerResponse{
  2406  			Header:         res.Header,
  2407  			HTTPStatusCode: res.StatusCode,
  2408  		},
  2409  	}
  2410  	target := &ret
  2411  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2412  		return nil, err
  2413  	}
  2414  	return ret, nil
  2415  }
  2416  
  2417  type ProjectsSitesDeleteCall struct {
  2418  	s          *Service
  2419  	name       string
  2420  	urlParams_ gensupport.URLParams
  2421  	ctx_       context.Context
  2422  	header_    http.Header
  2423  }
  2424  
  2425  // Delete: Deletes the specified Hosting Site from the specified parent
  2426  // Firebase project.
  2427  //
  2428  //   - name: The fully-qualified resource name for the Hosting site, in the
  2429  //     format: projects/PROJECT_IDENTIFIER/sites/SITE_ID Refer to the `Site`
  2430  //     `name` (../projects#Site.FIELDS.name) field for details about
  2431  //     PROJECT_IDENTIFIER values.
  2432  func (r *ProjectsSitesService) Delete(name string) *ProjectsSitesDeleteCall {
  2433  	c := &ProjectsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2434  	c.name = name
  2435  	return c
  2436  }
  2437  
  2438  // Fields allows partial responses to be retrieved. See
  2439  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2440  // details.
  2441  func (c *ProjectsSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsSitesDeleteCall {
  2442  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2443  	return c
  2444  }
  2445  
  2446  // Context sets the context to be used in this call's Do method.
  2447  func (c *ProjectsSitesDeleteCall) Context(ctx context.Context) *ProjectsSitesDeleteCall {
  2448  	c.ctx_ = ctx
  2449  	return c
  2450  }
  2451  
  2452  // Header returns a http.Header that can be modified by the caller to add
  2453  // headers to the request.
  2454  func (c *ProjectsSitesDeleteCall) Header() http.Header {
  2455  	if c.header_ == nil {
  2456  		c.header_ = make(http.Header)
  2457  	}
  2458  	return c.header_
  2459  }
  2460  
  2461  func (c *ProjectsSitesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2462  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2463  	var body io.Reader = nil
  2464  	c.urlParams_.Set("alt", alt)
  2465  	c.urlParams_.Set("prettyPrint", "false")
  2466  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2467  	urls += "?" + c.urlParams_.Encode()
  2468  	req, err := http.NewRequest("DELETE", urls, body)
  2469  	if err != nil {
  2470  		return nil, err
  2471  	}
  2472  	req.Header = reqHeaders
  2473  	googleapi.Expand(req.URL, map[string]string{
  2474  		"name": c.name,
  2475  	})
  2476  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2477  }
  2478  
  2479  // Do executes the "firebasehosting.projects.sites.delete" call.
  2480  // Any non-2xx status code is an error. Response headers are in either
  2481  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  2482  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2483  // whether the returned error was because http.StatusNotModified was returned.
  2484  func (c *ProjectsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2485  	gensupport.SetOptions(c.urlParams_, opts...)
  2486  	res, err := c.doRequest("json")
  2487  	if res != nil && res.StatusCode == http.StatusNotModified {
  2488  		if res.Body != nil {
  2489  			res.Body.Close()
  2490  		}
  2491  		return nil, gensupport.WrapError(&googleapi.Error{
  2492  			Code:   res.StatusCode,
  2493  			Header: res.Header,
  2494  		})
  2495  	}
  2496  	if err != nil {
  2497  		return nil, err
  2498  	}
  2499  	defer googleapi.CloseBody(res)
  2500  	if err := googleapi.CheckResponse(res); err != nil {
  2501  		return nil, gensupport.WrapError(err)
  2502  	}
  2503  	ret := &Empty{
  2504  		ServerResponse: googleapi.ServerResponse{
  2505  			Header:         res.Header,
  2506  			HTTPStatusCode: res.StatusCode,
  2507  		},
  2508  	}
  2509  	target := &ret
  2510  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2511  		return nil, err
  2512  	}
  2513  	return ret, nil
  2514  }
  2515  
  2516  type ProjectsSitesGetCall struct {
  2517  	s            *Service
  2518  	nameid       string
  2519  	urlParams_   gensupport.URLParams
  2520  	ifNoneMatch_ string
  2521  	ctx_         context.Context
  2522  	header_      http.Header
  2523  }
  2524  
  2525  // Get: Gets the specified Hosting Site.
  2526  //
  2527  //   - name: The fully-qualified resource name for the Hosting site, in the
  2528  //     format: projects/PROJECT_IDENTIFIER/sites/SITE_ID Refer to the `Site`
  2529  //     `name` (../projects#Site.FIELDS.name) field for details about
  2530  //     PROJECT_IDENTIFIER values. Since a SITE_ID is a globally unique
  2531  //     identifier, you can also use the unique sub-collection resource access
  2532  //     pattern, in the format: projects/-/sites/SITE_ID.
  2533  func (r *ProjectsSitesService) Get(nameid string) *ProjectsSitesGetCall {
  2534  	c := &ProjectsSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2535  	c.nameid = nameid
  2536  	return c
  2537  }
  2538  
  2539  // Fields allows partial responses to be retrieved. See
  2540  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2541  // details.
  2542  func (c *ProjectsSitesGetCall) Fields(s ...googleapi.Field) *ProjectsSitesGetCall {
  2543  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2544  	return c
  2545  }
  2546  
  2547  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2548  // object's ETag matches the given value. This is useful for getting updates
  2549  // only after the object has changed since the last request.
  2550  func (c *ProjectsSitesGetCall) IfNoneMatch(entityTag string) *ProjectsSitesGetCall {
  2551  	c.ifNoneMatch_ = entityTag
  2552  	return c
  2553  }
  2554  
  2555  // Context sets the context to be used in this call's Do method.
  2556  func (c *ProjectsSitesGetCall) Context(ctx context.Context) *ProjectsSitesGetCall {
  2557  	c.ctx_ = ctx
  2558  	return c
  2559  }
  2560  
  2561  // Header returns a http.Header that can be modified by the caller to add
  2562  // headers to the request.
  2563  func (c *ProjectsSitesGetCall) Header() http.Header {
  2564  	if c.header_ == nil {
  2565  		c.header_ = make(http.Header)
  2566  	}
  2567  	return c.header_
  2568  }
  2569  
  2570  func (c *ProjectsSitesGetCall) doRequest(alt string) (*http.Response, error) {
  2571  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2572  	if c.ifNoneMatch_ != "" {
  2573  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2574  	}
  2575  	var body io.Reader = nil
  2576  	c.urlParams_.Set("alt", alt)
  2577  	c.urlParams_.Set("prettyPrint", "false")
  2578  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2579  	urls += "?" + c.urlParams_.Encode()
  2580  	req, err := http.NewRequest("GET", urls, body)
  2581  	if err != nil {
  2582  		return nil, err
  2583  	}
  2584  	req.Header = reqHeaders
  2585  	googleapi.Expand(req.URL, map[string]string{
  2586  		"name": c.nameid,
  2587  	})
  2588  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2589  }
  2590  
  2591  // Do executes the "firebasehosting.projects.sites.get" call.
  2592  // Any non-2xx status code is an error. Response headers are in either
  2593  // *Site.ServerResponse.Header or (if a response was returned at all) in
  2594  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2595  // whether the returned error was because http.StatusNotModified was returned.
  2596  func (c *ProjectsSitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error) {
  2597  	gensupport.SetOptions(c.urlParams_, opts...)
  2598  	res, err := c.doRequest("json")
  2599  	if res != nil && res.StatusCode == http.StatusNotModified {
  2600  		if res.Body != nil {
  2601  			res.Body.Close()
  2602  		}
  2603  		return nil, gensupport.WrapError(&googleapi.Error{
  2604  			Code:   res.StatusCode,
  2605  			Header: res.Header,
  2606  		})
  2607  	}
  2608  	if err != nil {
  2609  		return nil, err
  2610  	}
  2611  	defer googleapi.CloseBody(res)
  2612  	if err := googleapi.CheckResponse(res); err != nil {
  2613  		return nil, gensupport.WrapError(err)
  2614  	}
  2615  	ret := &Site{
  2616  		ServerResponse: googleapi.ServerResponse{
  2617  			Header:         res.Header,
  2618  			HTTPStatusCode: res.StatusCode,
  2619  		},
  2620  	}
  2621  	target := &ret
  2622  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2623  		return nil, err
  2624  	}
  2625  	return ret, nil
  2626  }
  2627  
  2628  type ProjectsSitesGetConfigCall struct {
  2629  	s            *Service
  2630  	name         string
  2631  	urlParams_   gensupport.URLParams
  2632  	ifNoneMatch_ string
  2633  	ctx_         context.Context
  2634  	header_      http.Header
  2635  }
  2636  
  2637  // GetConfig: Gets the Hosting metadata for a specific site.
  2638  //
  2639  //   - name: The site for which to get the SiteConfig, in the format: sites/
  2640  //     site-name/config.
  2641  func (r *ProjectsSitesService) GetConfig(name string) *ProjectsSitesGetConfigCall {
  2642  	c := &ProjectsSitesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2643  	c.name = name
  2644  	return c
  2645  }
  2646  
  2647  // Fields allows partial responses to be retrieved. See
  2648  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2649  // details.
  2650  func (c *ProjectsSitesGetConfigCall) Fields(s ...googleapi.Field) *ProjectsSitesGetConfigCall {
  2651  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2652  	return c
  2653  }
  2654  
  2655  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2656  // object's ETag matches the given value. This is useful for getting updates
  2657  // only after the object has changed since the last request.
  2658  func (c *ProjectsSitesGetConfigCall) IfNoneMatch(entityTag string) *ProjectsSitesGetConfigCall {
  2659  	c.ifNoneMatch_ = entityTag
  2660  	return c
  2661  }
  2662  
  2663  // Context sets the context to be used in this call's Do method.
  2664  func (c *ProjectsSitesGetConfigCall) Context(ctx context.Context) *ProjectsSitesGetConfigCall {
  2665  	c.ctx_ = ctx
  2666  	return c
  2667  }
  2668  
  2669  // Header returns a http.Header that can be modified by the caller to add
  2670  // headers to the request.
  2671  func (c *ProjectsSitesGetConfigCall) Header() http.Header {
  2672  	if c.header_ == nil {
  2673  		c.header_ = make(http.Header)
  2674  	}
  2675  	return c.header_
  2676  }
  2677  
  2678  func (c *ProjectsSitesGetConfigCall) doRequest(alt string) (*http.Response, error) {
  2679  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  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 "firebasehosting.projects.sites.getConfig" call.
  2700  // Any non-2xx status code is an error. Response headers are in either
  2701  // *SiteConfig.ServerResponse.Header or (if a response was returned at all) in
  2702  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2703  // whether the returned error was because http.StatusNotModified was returned.
  2704  func (c *ProjectsSitesGetConfigCall) Do(opts ...googleapi.CallOption) (*SiteConfig, error) {
  2705  	gensupport.SetOptions(c.urlParams_, opts...)
  2706  	res, err := c.doRequest("json")
  2707  	if res != nil && res.StatusCode == http.StatusNotModified {
  2708  		if res.Body != nil {
  2709  			res.Body.Close()
  2710  		}
  2711  		return nil, gensupport.WrapError(&googleapi.Error{
  2712  			Code:   res.StatusCode,
  2713  			Header: res.Header,
  2714  		})
  2715  	}
  2716  	if err != nil {
  2717  		return nil, err
  2718  	}
  2719  	defer googleapi.CloseBody(res)
  2720  	if err := googleapi.CheckResponse(res); err != nil {
  2721  		return nil, gensupport.WrapError(err)
  2722  	}
  2723  	ret := &SiteConfig{
  2724  		ServerResponse: googleapi.ServerResponse{
  2725  			Header:         res.Header,
  2726  			HTTPStatusCode: res.StatusCode,
  2727  		},
  2728  	}
  2729  	target := &ret
  2730  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2731  		return nil, err
  2732  	}
  2733  	return ret, nil
  2734  }
  2735  
  2736  type ProjectsSitesListCall struct {
  2737  	s            *Service
  2738  	parent       string
  2739  	urlParams_   gensupport.URLParams
  2740  	ifNoneMatch_ string
  2741  	ctx_         context.Context
  2742  	header_      http.Header
  2743  }
  2744  
  2745  // List: Lists each Hosting Site associated with the specified parent Firebase
  2746  // project.
  2747  //
  2748  //   - parent: The Firebase project for which to list sites, in the format:
  2749  //     projects/PROJECT_IDENTIFIER Refer to the `Site` `name`
  2750  //     (../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER
  2751  //     values.
  2752  func (r *ProjectsSitesService) List(parent string) *ProjectsSitesListCall {
  2753  	c := &ProjectsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2754  	c.parent = parent
  2755  	return c
  2756  }
  2757  
  2758  // PageSize sets the optional parameter "pageSize": The maximum number of sites
  2759  // to return. The service may return a lower number if fewer sites exist than
  2760  // this maximum number. If unspecified, defaults to 40.
  2761  func (c *ProjectsSitesListCall) PageSize(pageSize int64) *ProjectsSitesListCall {
  2762  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2763  	return c
  2764  }
  2765  
  2766  // PageToken sets the optional parameter "pageToken": A token from a previous
  2767  // call to `ListSites` that tells the server where to resume listing.
  2768  func (c *ProjectsSitesListCall) PageToken(pageToken string) *ProjectsSitesListCall {
  2769  	c.urlParams_.Set("pageToken", pageToken)
  2770  	return c
  2771  }
  2772  
  2773  // Fields allows partial responses to be retrieved. See
  2774  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2775  // details.
  2776  func (c *ProjectsSitesListCall) Fields(s ...googleapi.Field) *ProjectsSitesListCall {
  2777  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2778  	return c
  2779  }
  2780  
  2781  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2782  // object's ETag matches the given value. This is useful for getting updates
  2783  // only after the object has changed since the last request.
  2784  func (c *ProjectsSitesListCall) IfNoneMatch(entityTag string) *ProjectsSitesListCall {
  2785  	c.ifNoneMatch_ = entityTag
  2786  	return c
  2787  }
  2788  
  2789  // Context sets the context to be used in this call's Do method.
  2790  func (c *ProjectsSitesListCall) Context(ctx context.Context) *ProjectsSitesListCall {
  2791  	c.ctx_ = ctx
  2792  	return c
  2793  }
  2794  
  2795  // Header returns a http.Header that can be modified by the caller to add
  2796  // headers to the request.
  2797  func (c *ProjectsSitesListCall) Header() http.Header {
  2798  	if c.header_ == nil {
  2799  		c.header_ = make(http.Header)
  2800  	}
  2801  	return c.header_
  2802  }
  2803  
  2804  func (c *ProjectsSitesListCall) doRequest(alt string) (*http.Response, error) {
  2805  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2806  	if c.ifNoneMatch_ != "" {
  2807  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2808  	}
  2809  	var body io.Reader = nil
  2810  	c.urlParams_.Set("alt", alt)
  2811  	c.urlParams_.Set("prettyPrint", "false")
  2812  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/sites")
  2813  	urls += "?" + c.urlParams_.Encode()
  2814  	req, err := http.NewRequest("GET", urls, body)
  2815  	if err != nil {
  2816  		return nil, err
  2817  	}
  2818  	req.Header = reqHeaders
  2819  	googleapi.Expand(req.URL, map[string]string{
  2820  		"parent": c.parent,
  2821  	})
  2822  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2823  }
  2824  
  2825  // Do executes the "firebasehosting.projects.sites.list" call.
  2826  // Any non-2xx status code is an error. Response headers are in either
  2827  // *ListSitesResponse.ServerResponse.Header or (if a response was returned at
  2828  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2829  // check whether the returned error was because http.StatusNotModified was
  2830  // returned.
  2831  func (c *ProjectsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, error) {
  2832  	gensupport.SetOptions(c.urlParams_, opts...)
  2833  	res, err := c.doRequest("json")
  2834  	if res != nil && res.StatusCode == http.StatusNotModified {
  2835  		if res.Body != nil {
  2836  			res.Body.Close()
  2837  		}
  2838  		return nil, gensupport.WrapError(&googleapi.Error{
  2839  			Code:   res.StatusCode,
  2840  			Header: res.Header,
  2841  		})
  2842  	}
  2843  	if err != nil {
  2844  		return nil, err
  2845  	}
  2846  	defer googleapi.CloseBody(res)
  2847  	if err := googleapi.CheckResponse(res); err != nil {
  2848  		return nil, gensupport.WrapError(err)
  2849  	}
  2850  	ret := &ListSitesResponse{
  2851  		ServerResponse: googleapi.ServerResponse{
  2852  			Header:         res.Header,
  2853  			HTTPStatusCode: res.StatusCode,
  2854  		},
  2855  	}
  2856  	target := &ret
  2857  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2858  		return nil, err
  2859  	}
  2860  	return ret, nil
  2861  }
  2862  
  2863  // Pages invokes f for each page of results.
  2864  // A non-nil error returned from f will halt the iteration.
  2865  // The provided context supersedes any context provided to the Context method.
  2866  func (c *ProjectsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) error) error {
  2867  	c.ctx_ = ctx
  2868  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2869  	for {
  2870  		x, err := c.Do()
  2871  		if err != nil {
  2872  			return err
  2873  		}
  2874  		if err := f(x); err != nil {
  2875  			return err
  2876  		}
  2877  		if x.NextPageToken == "" {
  2878  			return nil
  2879  		}
  2880  		c.PageToken(x.NextPageToken)
  2881  	}
  2882  }
  2883  
  2884  type ProjectsSitesPatchCall struct {
  2885  	s          *Service
  2886  	nameid     string
  2887  	site       *Site
  2888  	urlParams_ gensupport.URLParams
  2889  	ctx_       context.Context
  2890  	header_    http.Header
  2891  }
  2892  
  2893  // Patch: Updates attributes of the specified Hosting Site.
  2894  //
  2895  //   - name: Output only. The fully-qualified resource name of the Hosting site,
  2896  //     in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID
  2897  //     PROJECT_IDENTIFIER: the Firebase project's `ProjectNumber`
  2898  //     (https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number)
  2899  //     ***(recommended)*** or its `ProjectId`
  2900  //     (https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id).
  2901  //     Learn more about using project identifiers in Google's AIP 2510 standard
  2902  //     (https://google.aip.dev/cloud/2510).
  2903  func (r *ProjectsSitesService) Patch(nameid string, site *Site) *ProjectsSitesPatchCall {
  2904  	c := &ProjectsSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2905  	c.nameid = nameid
  2906  	c.site = site
  2907  	return c
  2908  }
  2909  
  2910  // UpdateMask sets the optional parameter "updateMask": A set of field names
  2911  // from your Site that you want to update.
  2912  func (c *ProjectsSitesPatchCall) UpdateMask(updateMask string) *ProjectsSitesPatchCall {
  2913  	c.urlParams_.Set("updateMask", updateMask)
  2914  	return c
  2915  }
  2916  
  2917  // Fields allows partial responses to be retrieved. See
  2918  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2919  // details.
  2920  func (c *ProjectsSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsSitesPatchCall {
  2921  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2922  	return c
  2923  }
  2924  
  2925  // Context sets the context to be used in this call's Do method.
  2926  func (c *ProjectsSitesPatchCall) Context(ctx context.Context) *ProjectsSitesPatchCall {
  2927  	c.ctx_ = ctx
  2928  	return c
  2929  }
  2930  
  2931  // Header returns a http.Header that can be modified by the caller to add
  2932  // headers to the request.
  2933  func (c *ProjectsSitesPatchCall) Header() http.Header {
  2934  	if c.header_ == nil {
  2935  		c.header_ = make(http.Header)
  2936  	}
  2937  	return c.header_
  2938  }
  2939  
  2940  func (c *ProjectsSitesPatchCall) doRequest(alt string) (*http.Response, error) {
  2941  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2942  	var body io.Reader = nil
  2943  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
  2944  	if err != nil {
  2945  		return nil, err
  2946  	}
  2947  	c.urlParams_.Set("alt", alt)
  2948  	c.urlParams_.Set("prettyPrint", "false")
  2949  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2950  	urls += "?" + c.urlParams_.Encode()
  2951  	req, err := http.NewRequest("PATCH", urls, body)
  2952  	if err != nil {
  2953  		return nil, err
  2954  	}
  2955  	req.Header = reqHeaders
  2956  	googleapi.Expand(req.URL, map[string]string{
  2957  		"name": c.nameid,
  2958  	})
  2959  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2960  }
  2961  
  2962  // Do executes the "firebasehosting.projects.sites.patch" call.
  2963  // Any non-2xx status code is an error. Response headers are in either
  2964  // *Site.ServerResponse.Header or (if a response was returned at all) in
  2965  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2966  // whether the returned error was because http.StatusNotModified was returned.
  2967  func (c *ProjectsSitesPatchCall) Do(opts ...googleapi.CallOption) (*Site, error) {
  2968  	gensupport.SetOptions(c.urlParams_, opts...)
  2969  	res, err := c.doRequest("json")
  2970  	if res != nil && res.StatusCode == http.StatusNotModified {
  2971  		if res.Body != nil {
  2972  			res.Body.Close()
  2973  		}
  2974  		return nil, gensupport.WrapError(&googleapi.Error{
  2975  			Code:   res.StatusCode,
  2976  			Header: res.Header,
  2977  		})
  2978  	}
  2979  	if err != nil {
  2980  		return nil, err
  2981  	}
  2982  	defer googleapi.CloseBody(res)
  2983  	if err := googleapi.CheckResponse(res); err != nil {
  2984  		return nil, gensupport.WrapError(err)
  2985  	}
  2986  	ret := &Site{
  2987  		ServerResponse: googleapi.ServerResponse{
  2988  			Header:         res.Header,
  2989  			HTTPStatusCode: res.StatusCode,
  2990  		},
  2991  	}
  2992  	target := &ret
  2993  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2994  		return nil, err
  2995  	}
  2996  	return ret, nil
  2997  }
  2998  
  2999  type ProjectsSitesUpdateConfigCall struct {
  3000  	s          *Service
  3001  	name       string
  3002  	siteconfig *SiteConfig
  3003  	urlParams_ gensupport.URLParams
  3004  	ctx_       context.Context
  3005  	header_    http.Header
  3006  }
  3007  
  3008  // UpdateConfig: Sets the Hosting metadata for a specific site.
  3009  //
  3010  //   - name: The site for which to update the SiteConfig, in the format: sites/
  3011  //     site-name/config.
  3012  func (r *ProjectsSitesService) UpdateConfig(name string, siteconfig *SiteConfig) *ProjectsSitesUpdateConfigCall {
  3013  	c := &ProjectsSitesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3014  	c.name = name
  3015  	c.siteconfig = siteconfig
  3016  	return c
  3017  }
  3018  
  3019  // UpdateMask sets the optional parameter "updateMask": A set of field names
  3020  // from your site configuration (../sites.SiteConfig) that you want to update.
  3021  // A field will be overwritten if, and only if, it's in the mask. If a mask is
  3022  // not provided then a default mask of only `max_versions`
  3023  // (../sites.SiteConfig.max_versions) will be used.
  3024  func (c *ProjectsSitesUpdateConfigCall) UpdateMask(updateMask string) *ProjectsSitesUpdateConfigCall {
  3025  	c.urlParams_.Set("updateMask", updateMask)
  3026  	return c
  3027  }
  3028  
  3029  // Fields allows partial responses to be retrieved. See
  3030  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3031  // details.
  3032  func (c *ProjectsSitesUpdateConfigCall) Fields(s ...googleapi.Field) *ProjectsSitesUpdateConfigCall {
  3033  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3034  	return c
  3035  }
  3036  
  3037  // Context sets the context to be used in this call's Do method.
  3038  func (c *ProjectsSitesUpdateConfigCall) Context(ctx context.Context) *ProjectsSitesUpdateConfigCall {
  3039  	c.ctx_ = ctx
  3040  	return c
  3041  }
  3042  
  3043  // Header returns a http.Header that can be modified by the caller to add
  3044  // headers to the request.
  3045  func (c *ProjectsSitesUpdateConfigCall) Header() http.Header {
  3046  	if c.header_ == nil {
  3047  		c.header_ = make(http.Header)
  3048  	}
  3049  	return c.header_
  3050  }
  3051  
  3052  func (c *ProjectsSitesUpdateConfigCall) doRequest(alt string) (*http.Response, error) {
  3053  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3054  	var body io.Reader = nil
  3055  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteconfig)
  3056  	if err != nil {
  3057  		return nil, err
  3058  	}
  3059  	c.urlParams_.Set("alt", alt)
  3060  	c.urlParams_.Set("prettyPrint", "false")
  3061  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3062  	urls += "?" + c.urlParams_.Encode()
  3063  	req, err := http.NewRequest("PATCH", urls, body)
  3064  	if err != nil {
  3065  		return nil, err
  3066  	}
  3067  	req.Header = reqHeaders
  3068  	googleapi.Expand(req.URL, map[string]string{
  3069  		"name": c.name,
  3070  	})
  3071  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3072  }
  3073  
  3074  // Do executes the "firebasehosting.projects.sites.updateConfig" call.
  3075  // Any non-2xx status code is an error. Response headers are in either
  3076  // *SiteConfig.ServerResponse.Header or (if a response was returned at all) in
  3077  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3078  // whether the returned error was because http.StatusNotModified was returned.
  3079  func (c *ProjectsSitesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*SiteConfig, error) {
  3080  	gensupport.SetOptions(c.urlParams_, opts...)
  3081  	res, err := c.doRequest("json")
  3082  	if res != nil && res.StatusCode == http.StatusNotModified {
  3083  		if res.Body != nil {
  3084  			res.Body.Close()
  3085  		}
  3086  		return nil, gensupport.WrapError(&googleapi.Error{
  3087  			Code:   res.StatusCode,
  3088  			Header: res.Header,
  3089  		})
  3090  	}
  3091  	if err != nil {
  3092  		return nil, err
  3093  	}
  3094  	defer googleapi.CloseBody(res)
  3095  	if err := googleapi.CheckResponse(res); err != nil {
  3096  		return nil, gensupport.WrapError(err)
  3097  	}
  3098  	ret := &SiteConfig{
  3099  		ServerResponse: googleapi.ServerResponse{
  3100  			Header:         res.Header,
  3101  			HTTPStatusCode: res.StatusCode,
  3102  		},
  3103  	}
  3104  	target := &ret
  3105  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3106  		return nil, err
  3107  	}
  3108  	return ret, nil
  3109  }
  3110  
  3111  type ProjectsSitesChannelsCreateCall struct {
  3112  	s          *Service
  3113  	parent     string
  3114  	channel    *Channel
  3115  	urlParams_ gensupport.URLParams
  3116  	ctx_       context.Context
  3117  	header_    http.Header
  3118  }
  3119  
  3120  // Create: Creates a new channel in the specified site.
  3121  //
  3122  //   - parent: The site in which to create this channel, in the format: sites/
  3123  //     SITE_ID.
  3124  func (r *ProjectsSitesChannelsService) Create(parent string, channel *Channel) *ProjectsSitesChannelsCreateCall {
  3125  	c := &ProjectsSitesChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3126  	c.parent = parent
  3127  	c.channel = channel
  3128  	return c
  3129  }
  3130  
  3131  // ChannelId sets the optional parameter "channelId": Required. Immutable. A
  3132  // unique ID within the site that identifies the channel.
  3133  func (c *ProjectsSitesChannelsCreateCall) ChannelId(channelId string) *ProjectsSitesChannelsCreateCall {
  3134  	c.urlParams_.Set("channelId", channelId)
  3135  	return c
  3136  }
  3137  
  3138  // Fields allows partial responses to be retrieved. See
  3139  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3140  // details.
  3141  func (c *ProjectsSitesChannelsCreateCall) Fields(s ...googleapi.Field) *ProjectsSitesChannelsCreateCall {
  3142  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3143  	return c
  3144  }
  3145  
  3146  // Context sets the context to be used in this call's Do method.
  3147  func (c *ProjectsSitesChannelsCreateCall) Context(ctx context.Context) *ProjectsSitesChannelsCreateCall {
  3148  	c.ctx_ = ctx
  3149  	return c
  3150  }
  3151  
  3152  // Header returns a http.Header that can be modified by the caller to add
  3153  // headers to the request.
  3154  func (c *ProjectsSitesChannelsCreateCall) Header() http.Header {
  3155  	if c.header_ == nil {
  3156  		c.header_ = make(http.Header)
  3157  	}
  3158  	return c.header_
  3159  }
  3160  
  3161  func (c *ProjectsSitesChannelsCreateCall) doRequest(alt string) (*http.Response, error) {
  3162  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3163  	var body io.Reader = nil
  3164  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
  3165  	if err != nil {
  3166  		return nil, err
  3167  	}
  3168  	c.urlParams_.Set("alt", alt)
  3169  	c.urlParams_.Set("prettyPrint", "false")
  3170  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/channels")
  3171  	urls += "?" + c.urlParams_.Encode()
  3172  	req, err := http.NewRequest("POST", urls, body)
  3173  	if err != nil {
  3174  		return nil, err
  3175  	}
  3176  	req.Header = reqHeaders
  3177  	googleapi.Expand(req.URL, map[string]string{
  3178  		"parent": c.parent,
  3179  	})
  3180  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3181  }
  3182  
  3183  // Do executes the "firebasehosting.projects.sites.channels.create" call.
  3184  // Any non-2xx status code is an error. Response headers are in either
  3185  // *Channel.ServerResponse.Header or (if a response was returned at all) in
  3186  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3187  // whether the returned error was because http.StatusNotModified was returned.
  3188  func (c *ProjectsSitesChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
  3189  	gensupport.SetOptions(c.urlParams_, opts...)
  3190  	res, err := c.doRequest("json")
  3191  	if res != nil && res.StatusCode == http.StatusNotModified {
  3192  		if res.Body != nil {
  3193  			res.Body.Close()
  3194  		}
  3195  		return nil, gensupport.WrapError(&googleapi.Error{
  3196  			Code:   res.StatusCode,
  3197  			Header: res.Header,
  3198  		})
  3199  	}
  3200  	if err != nil {
  3201  		return nil, err
  3202  	}
  3203  	defer googleapi.CloseBody(res)
  3204  	if err := googleapi.CheckResponse(res); err != nil {
  3205  		return nil, gensupport.WrapError(err)
  3206  	}
  3207  	ret := &Channel{
  3208  		ServerResponse: googleapi.ServerResponse{
  3209  			Header:         res.Header,
  3210  			HTTPStatusCode: res.StatusCode,
  3211  		},
  3212  	}
  3213  	target := &ret
  3214  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3215  		return nil, err
  3216  	}
  3217  	return ret, nil
  3218  }
  3219  
  3220  type ProjectsSitesChannelsDeleteCall struct {
  3221  	s          *Service
  3222  	name       string
  3223  	urlParams_ gensupport.URLParams
  3224  	ctx_       context.Context
  3225  	header_    http.Header
  3226  }
  3227  
  3228  // Delete: Deletes the specified channel of the specified site. The `live`
  3229  // channel cannot be deleted.
  3230  //
  3231  //   - name: The fully-qualified resource name for the channel, in the format:
  3232  //     sites/SITE_ID/channels/CHANNEL_ID.
  3233  func (r *ProjectsSitesChannelsService) Delete(name string) *ProjectsSitesChannelsDeleteCall {
  3234  	c := &ProjectsSitesChannelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3235  	c.name = name
  3236  	return c
  3237  }
  3238  
  3239  // Fields allows partial responses to be retrieved. See
  3240  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3241  // details.
  3242  func (c *ProjectsSitesChannelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsSitesChannelsDeleteCall {
  3243  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3244  	return c
  3245  }
  3246  
  3247  // Context sets the context to be used in this call's Do method.
  3248  func (c *ProjectsSitesChannelsDeleteCall) Context(ctx context.Context) *ProjectsSitesChannelsDeleteCall {
  3249  	c.ctx_ = ctx
  3250  	return c
  3251  }
  3252  
  3253  // Header returns a http.Header that can be modified by the caller to add
  3254  // headers to the request.
  3255  func (c *ProjectsSitesChannelsDeleteCall) Header() http.Header {
  3256  	if c.header_ == nil {
  3257  		c.header_ = make(http.Header)
  3258  	}
  3259  	return c.header_
  3260  }
  3261  
  3262  func (c *ProjectsSitesChannelsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3263  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3264  	var body io.Reader = nil
  3265  	c.urlParams_.Set("alt", alt)
  3266  	c.urlParams_.Set("prettyPrint", "false")
  3267  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3268  	urls += "?" + c.urlParams_.Encode()
  3269  	req, err := http.NewRequest("DELETE", urls, body)
  3270  	if err != nil {
  3271  		return nil, err
  3272  	}
  3273  	req.Header = reqHeaders
  3274  	googleapi.Expand(req.URL, map[string]string{
  3275  		"name": c.name,
  3276  	})
  3277  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3278  }
  3279  
  3280  // Do executes the "firebasehosting.projects.sites.channels.delete" call.
  3281  // Any non-2xx status code is an error. Response headers are in either
  3282  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3283  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3284  // whether the returned error was because http.StatusNotModified was returned.
  3285  func (c *ProjectsSitesChannelsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3286  	gensupport.SetOptions(c.urlParams_, opts...)
  3287  	res, err := c.doRequest("json")
  3288  	if res != nil && res.StatusCode == http.StatusNotModified {
  3289  		if res.Body != nil {
  3290  			res.Body.Close()
  3291  		}
  3292  		return nil, gensupport.WrapError(&googleapi.Error{
  3293  			Code:   res.StatusCode,
  3294  			Header: res.Header,
  3295  		})
  3296  	}
  3297  	if err != nil {
  3298  		return nil, err
  3299  	}
  3300  	defer googleapi.CloseBody(res)
  3301  	if err := googleapi.CheckResponse(res); err != nil {
  3302  		return nil, gensupport.WrapError(err)
  3303  	}
  3304  	ret := &Empty{
  3305  		ServerResponse: googleapi.ServerResponse{
  3306  			Header:         res.Header,
  3307  			HTTPStatusCode: res.StatusCode,
  3308  		},
  3309  	}
  3310  	target := &ret
  3311  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3312  		return nil, err
  3313  	}
  3314  	return ret, nil
  3315  }
  3316  
  3317  type ProjectsSitesChannelsGetCall struct {
  3318  	s            *Service
  3319  	name         string
  3320  	urlParams_   gensupport.URLParams
  3321  	ifNoneMatch_ string
  3322  	ctx_         context.Context
  3323  	header_      http.Header
  3324  }
  3325  
  3326  // Get: Retrieves information for the specified channel of the specified site.
  3327  //
  3328  //   - name: The fully-qualified resource name for the channel, in the format:
  3329  //     sites/SITE_ID/channels/CHANNEL_ID.
  3330  func (r *ProjectsSitesChannelsService) Get(name string) *ProjectsSitesChannelsGetCall {
  3331  	c := &ProjectsSitesChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3332  	c.name = name
  3333  	return c
  3334  }
  3335  
  3336  // Fields allows partial responses to be retrieved. See
  3337  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3338  // details.
  3339  func (c *ProjectsSitesChannelsGetCall) Fields(s ...googleapi.Field) *ProjectsSitesChannelsGetCall {
  3340  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3341  	return c
  3342  }
  3343  
  3344  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3345  // object's ETag matches the given value. This is useful for getting updates
  3346  // only after the object has changed since the last request.
  3347  func (c *ProjectsSitesChannelsGetCall) IfNoneMatch(entityTag string) *ProjectsSitesChannelsGetCall {
  3348  	c.ifNoneMatch_ = entityTag
  3349  	return c
  3350  }
  3351  
  3352  // Context sets the context to be used in this call's Do method.
  3353  func (c *ProjectsSitesChannelsGetCall) Context(ctx context.Context) *ProjectsSitesChannelsGetCall {
  3354  	c.ctx_ = ctx
  3355  	return c
  3356  }
  3357  
  3358  // Header returns a http.Header that can be modified by the caller to add
  3359  // headers to the request.
  3360  func (c *ProjectsSitesChannelsGetCall) Header() http.Header {
  3361  	if c.header_ == nil {
  3362  		c.header_ = make(http.Header)
  3363  	}
  3364  	return c.header_
  3365  }
  3366  
  3367  func (c *ProjectsSitesChannelsGetCall) doRequest(alt string) (*http.Response, error) {
  3368  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3369  	if c.ifNoneMatch_ != "" {
  3370  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3371  	}
  3372  	var body io.Reader = nil
  3373  	c.urlParams_.Set("alt", alt)
  3374  	c.urlParams_.Set("prettyPrint", "false")
  3375  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3376  	urls += "?" + c.urlParams_.Encode()
  3377  	req, err := http.NewRequest("GET", urls, body)
  3378  	if err != nil {
  3379  		return nil, err
  3380  	}
  3381  	req.Header = reqHeaders
  3382  	googleapi.Expand(req.URL, map[string]string{
  3383  		"name": c.name,
  3384  	})
  3385  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3386  }
  3387  
  3388  // Do executes the "firebasehosting.projects.sites.channels.get" call.
  3389  // Any non-2xx status code is an error. Response headers are in either
  3390  // *Channel.ServerResponse.Header or (if a response was returned at all) in
  3391  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3392  // whether the returned error was because http.StatusNotModified was returned.
  3393  func (c *ProjectsSitesChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
  3394  	gensupport.SetOptions(c.urlParams_, opts...)
  3395  	res, err := c.doRequest("json")
  3396  	if res != nil && res.StatusCode == http.StatusNotModified {
  3397  		if res.Body != nil {
  3398  			res.Body.Close()
  3399  		}
  3400  		return nil, gensupport.WrapError(&googleapi.Error{
  3401  			Code:   res.StatusCode,
  3402  			Header: res.Header,
  3403  		})
  3404  	}
  3405  	if err != nil {
  3406  		return nil, err
  3407  	}
  3408  	defer googleapi.CloseBody(res)
  3409  	if err := googleapi.CheckResponse(res); err != nil {
  3410  		return nil, gensupport.WrapError(err)
  3411  	}
  3412  	ret := &Channel{
  3413  		ServerResponse: googleapi.ServerResponse{
  3414  			Header:         res.Header,
  3415  			HTTPStatusCode: res.StatusCode,
  3416  		},
  3417  	}
  3418  	target := &ret
  3419  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3420  		return nil, err
  3421  	}
  3422  	return ret, nil
  3423  }
  3424  
  3425  type ProjectsSitesChannelsListCall struct {
  3426  	s            *Service
  3427  	parent       string
  3428  	urlParams_   gensupport.URLParams
  3429  	ifNoneMatch_ string
  3430  	ctx_         context.Context
  3431  	header_      http.Header
  3432  }
  3433  
  3434  // List: Lists the channels for the specified site. All sites have a default
  3435  // `live` channel.
  3436  //
  3437  // - parent: The site for which to list channels, in the format: sites/SITE_ID.
  3438  func (r *ProjectsSitesChannelsService) List(parent string) *ProjectsSitesChannelsListCall {
  3439  	c := &ProjectsSitesChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3440  	c.parent = parent
  3441  	return c
  3442  }
  3443  
  3444  // PageSize sets the optional parameter "pageSize": The maximum number of
  3445  // channels to return. The service may return a lower number if fewer channels
  3446  // exist than this maximum number. If unspecified, defaults to 10. The maximum
  3447  // value is 100; values above 100 will be coerced to 100.
  3448  func (c *ProjectsSitesChannelsListCall) PageSize(pageSize int64) *ProjectsSitesChannelsListCall {
  3449  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3450  	return c
  3451  }
  3452  
  3453  // PageToken sets the optional parameter "pageToken": A token from a previous
  3454  // call to `ListChannels` that tells the server where to resume listing.
  3455  func (c *ProjectsSitesChannelsListCall) PageToken(pageToken string) *ProjectsSitesChannelsListCall {
  3456  	c.urlParams_.Set("pageToken", pageToken)
  3457  	return c
  3458  }
  3459  
  3460  // Fields allows partial responses to be retrieved. See
  3461  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3462  // details.
  3463  func (c *ProjectsSitesChannelsListCall) Fields(s ...googleapi.Field) *ProjectsSitesChannelsListCall {
  3464  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3465  	return c
  3466  }
  3467  
  3468  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3469  // object's ETag matches the given value. This is useful for getting updates
  3470  // only after the object has changed since the last request.
  3471  func (c *ProjectsSitesChannelsListCall) IfNoneMatch(entityTag string) *ProjectsSitesChannelsListCall {
  3472  	c.ifNoneMatch_ = entityTag
  3473  	return c
  3474  }
  3475  
  3476  // Context sets the context to be used in this call's Do method.
  3477  func (c *ProjectsSitesChannelsListCall) Context(ctx context.Context) *ProjectsSitesChannelsListCall {
  3478  	c.ctx_ = ctx
  3479  	return c
  3480  }
  3481  
  3482  // Header returns a http.Header that can be modified by the caller to add
  3483  // headers to the request.
  3484  func (c *ProjectsSitesChannelsListCall) Header() http.Header {
  3485  	if c.header_ == nil {
  3486  		c.header_ = make(http.Header)
  3487  	}
  3488  	return c.header_
  3489  }
  3490  
  3491  func (c *ProjectsSitesChannelsListCall) doRequest(alt string) (*http.Response, error) {
  3492  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3493  	if c.ifNoneMatch_ != "" {
  3494  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3495  	}
  3496  	var body io.Reader = nil
  3497  	c.urlParams_.Set("alt", alt)
  3498  	c.urlParams_.Set("prettyPrint", "false")
  3499  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/channels")
  3500  	urls += "?" + c.urlParams_.Encode()
  3501  	req, err := http.NewRequest("GET", urls, body)
  3502  	if err != nil {
  3503  		return nil, err
  3504  	}
  3505  	req.Header = reqHeaders
  3506  	googleapi.Expand(req.URL, map[string]string{
  3507  		"parent": c.parent,
  3508  	})
  3509  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3510  }
  3511  
  3512  // Do executes the "firebasehosting.projects.sites.channels.list" call.
  3513  // Any non-2xx status code is an error. Response headers are in either
  3514  // *ListChannelsResponse.ServerResponse.Header or (if a response was returned
  3515  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3516  // check whether the returned error was because http.StatusNotModified was
  3517  // returned.
  3518  func (c *ProjectsSitesChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) {
  3519  	gensupport.SetOptions(c.urlParams_, opts...)
  3520  	res, err := c.doRequest("json")
  3521  	if res != nil && res.StatusCode == http.StatusNotModified {
  3522  		if res.Body != nil {
  3523  			res.Body.Close()
  3524  		}
  3525  		return nil, gensupport.WrapError(&googleapi.Error{
  3526  			Code:   res.StatusCode,
  3527  			Header: res.Header,
  3528  		})
  3529  	}
  3530  	if err != nil {
  3531  		return nil, err
  3532  	}
  3533  	defer googleapi.CloseBody(res)
  3534  	if err := googleapi.CheckResponse(res); err != nil {
  3535  		return nil, gensupport.WrapError(err)
  3536  	}
  3537  	ret := &ListChannelsResponse{
  3538  		ServerResponse: googleapi.ServerResponse{
  3539  			Header:         res.Header,
  3540  			HTTPStatusCode: res.StatusCode,
  3541  		},
  3542  	}
  3543  	target := &ret
  3544  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3545  		return nil, err
  3546  	}
  3547  	return ret, nil
  3548  }
  3549  
  3550  // Pages invokes f for each page of results.
  3551  // A non-nil error returned from f will halt the iteration.
  3552  // The provided context supersedes any context provided to the Context method.
  3553  func (c *ProjectsSitesChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error {
  3554  	c.ctx_ = ctx
  3555  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3556  	for {
  3557  		x, err := c.Do()
  3558  		if err != nil {
  3559  			return err
  3560  		}
  3561  		if err := f(x); err != nil {
  3562  			return err
  3563  		}
  3564  		if x.NextPageToken == "" {
  3565  			return nil
  3566  		}
  3567  		c.PageToken(x.NextPageToken)
  3568  	}
  3569  }
  3570  
  3571  type ProjectsSitesChannelsPatchCall struct {
  3572  	s          *Service
  3573  	name       string
  3574  	channel    *Channel
  3575  	urlParams_ gensupport.URLParams
  3576  	ctx_       context.Context
  3577  	header_    http.Header
  3578  }
  3579  
  3580  // Patch: Updates information for the specified channel of the specified site.
  3581  // Implicitly creates the channel if it doesn't already exist.
  3582  //
  3583  //   - name: The fully-qualified resource name for the channel, in the format:
  3584  //     sites/ SITE_ID/channels/CHANNEL_ID.
  3585  func (r *ProjectsSitesChannelsService) Patch(name string, channel *Channel) *ProjectsSitesChannelsPatchCall {
  3586  	c := &ProjectsSitesChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3587  	c.name = name
  3588  	c.channel = channel
  3589  	return c
  3590  }
  3591  
  3592  // UpdateMask sets the optional parameter "updateMask": A comma-separated list
  3593  // of fields to be updated in this request.
  3594  func (c *ProjectsSitesChannelsPatchCall) UpdateMask(updateMask string) *ProjectsSitesChannelsPatchCall {
  3595  	c.urlParams_.Set("updateMask", updateMask)
  3596  	return c
  3597  }
  3598  
  3599  // Fields allows partial responses to be retrieved. See
  3600  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3601  // details.
  3602  func (c *ProjectsSitesChannelsPatchCall) Fields(s ...googleapi.Field) *ProjectsSitesChannelsPatchCall {
  3603  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3604  	return c
  3605  }
  3606  
  3607  // Context sets the context to be used in this call's Do method.
  3608  func (c *ProjectsSitesChannelsPatchCall) Context(ctx context.Context) *ProjectsSitesChannelsPatchCall {
  3609  	c.ctx_ = ctx
  3610  	return c
  3611  }
  3612  
  3613  // Header returns a http.Header that can be modified by the caller to add
  3614  // headers to the request.
  3615  func (c *ProjectsSitesChannelsPatchCall) Header() http.Header {
  3616  	if c.header_ == nil {
  3617  		c.header_ = make(http.Header)
  3618  	}
  3619  	return c.header_
  3620  }
  3621  
  3622  func (c *ProjectsSitesChannelsPatchCall) doRequest(alt string) (*http.Response, error) {
  3623  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3624  	var body io.Reader = nil
  3625  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
  3626  	if err != nil {
  3627  		return nil, err
  3628  	}
  3629  	c.urlParams_.Set("alt", alt)
  3630  	c.urlParams_.Set("prettyPrint", "false")
  3631  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3632  	urls += "?" + c.urlParams_.Encode()
  3633  	req, err := http.NewRequest("PATCH", urls, body)
  3634  	if err != nil {
  3635  		return nil, err
  3636  	}
  3637  	req.Header = reqHeaders
  3638  	googleapi.Expand(req.URL, map[string]string{
  3639  		"name": c.name,
  3640  	})
  3641  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3642  }
  3643  
  3644  // Do executes the "firebasehosting.projects.sites.channels.patch" call.
  3645  // Any non-2xx status code is an error. Response headers are in either
  3646  // *Channel.ServerResponse.Header or (if a response was returned at all) in
  3647  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3648  // whether the returned error was because http.StatusNotModified was returned.
  3649  func (c *ProjectsSitesChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
  3650  	gensupport.SetOptions(c.urlParams_, opts...)
  3651  	res, err := c.doRequest("json")
  3652  	if res != nil && res.StatusCode == http.StatusNotModified {
  3653  		if res.Body != nil {
  3654  			res.Body.Close()
  3655  		}
  3656  		return nil, gensupport.WrapError(&googleapi.Error{
  3657  			Code:   res.StatusCode,
  3658  			Header: res.Header,
  3659  		})
  3660  	}
  3661  	if err != nil {
  3662  		return nil, err
  3663  	}
  3664  	defer googleapi.CloseBody(res)
  3665  	if err := googleapi.CheckResponse(res); err != nil {
  3666  		return nil, gensupport.WrapError(err)
  3667  	}
  3668  	ret := &Channel{
  3669  		ServerResponse: googleapi.ServerResponse{
  3670  			Header:         res.Header,
  3671  			HTTPStatusCode: res.StatusCode,
  3672  		},
  3673  	}
  3674  	target := &ret
  3675  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3676  		return nil, err
  3677  	}
  3678  	return ret, nil
  3679  }
  3680  
  3681  type ProjectsSitesChannelsReleasesCreateCall struct {
  3682  	s          *Service
  3683  	parent     string
  3684  	release    *Release
  3685  	urlParams_ gensupport.URLParams
  3686  	ctx_       context.Context
  3687  	header_    http.Header
  3688  }
  3689  
  3690  // Create: Creates a new release, which makes the content of the specified
  3691  // version actively display on the appropriate URL(s).
  3692  //
  3693  //   - parent: The site or channel to which the release belongs, in either of the
  3694  //     following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID.
  3695  func (r *ProjectsSitesChannelsReleasesService) Create(parent string, release *Release) *ProjectsSitesChannelsReleasesCreateCall {
  3696  	c := &ProjectsSitesChannelsReleasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3697  	c.parent = parent
  3698  	c.release = release
  3699  	return c
  3700  }
  3701  
  3702  // VersionName sets the optional parameter "versionName": The unique identifier
  3703  // for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID
  3704  // in this version identifier must match the SITE_ID in the `parent` parameter.
  3705  // This query parameter must be empty if the `type` field in the request body
  3706  // is `SITE_DISABLE`.
  3707  func (c *ProjectsSitesChannelsReleasesCreateCall) VersionName(versionName string) *ProjectsSitesChannelsReleasesCreateCall {
  3708  	c.urlParams_.Set("versionName", versionName)
  3709  	return c
  3710  }
  3711  
  3712  // Fields allows partial responses to be retrieved. See
  3713  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3714  // details.
  3715  func (c *ProjectsSitesChannelsReleasesCreateCall) Fields(s ...googleapi.Field) *ProjectsSitesChannelsReleasesCreateCall {
  3716  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3717  	return c
  3718  }
  3719  
  3720  // Context sets the context to be used in this call's Do method.
  3721  func (c *ProjectsSitesChannelsReleasesCreateCall) Context(ctx context.Context) *ProjectsSitesChannelsReleasesCreateCall {
  3722  	c.ctx_ = ctx
  3723  	return c
  3724  }
  3725  
  3726  // Header returns a http.Header that can be modified by the caller to add
  3727  // headers to the request.
  3728  func (c *ProjectsSitesChannelsReleasesCreateCall) Header() http.Header {
  3729  	if c.header_ == nil {
  3730  		c.header_ = make(http.Header)
  3731  	}
  3732  	return c.header_
  3733  }
  3734  
  3735  func (c *ProjectsSitesChannelsReleasesCreateCall) doRequest(alt string) (*http.Response, error) {
  3736  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3737  	var body io.Reader = nil
  3738  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.release)
  3739  	if err != nil {
  3740  		return nil, err
  3741  	}
  3742  	c.urlParams_.Set("alt", alt)
  3743  	c.urlParams_.Set("prettyPrint", "false")
  3744  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/releases")
  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 "firebasehosting.projects.sites.channels.releases.create" call.
  3758  // Any non-2xx status code is an error. Response headers are in either
  3759  // *Release.ServerResponse.Header or (if a response was returned at all) in
  3760  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3761  // whether the returned error was because http.StatusNotModified was returned.
  3762  func (c *ProjectsSitesChannelsReleasesCreateCall) Do(opts ...googleapi.CallOption) (*Release, error) {
  3763  	gensupport.SetOptions(c.urlParams_, opts...)
  3764  	res, err := c.doRequest("json")
  3765  	if res != nil && res.StatusCode == http.StatusNotModified {
  3766  		if res.Body != nil {
  3767  			res.Body.Close()
  3768  		}
  3769  		return nil, gensupport.WrapError(&googleapi.Error{
  3770  			Code:   res.StatusCode,
  3771  			Header: res.Header,
  3772  		})
  3773  	}
  3774  	if err != nil {
  3775  		return nil, err
  3776  	}
  3777  	defer googleapi.CloseBody(res)
  3778  	if err := googleapi.CheckResponse(res); err != nil {
  3779  		return nil, gensupport.WrapError(err)
  3780  	}
  3781  	ret := &Release{
  3782  		ServerResponse: googleapi.ServerResponse{
  3783  			Header:         res.Header,
  3784  			HTTPStatusCode: res.StatusCode,
  3785  		},
  3786  	}
  3787  	target := &ret
  3788  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3789  		return nil, err
  3790  	}
  3791  	return ret, nil
  3792  }
  3793  
  3794  type ProjectsSitesChannelsReleasesGetCall struct {
  3795  	s            *Service
  3796  	name         string
  3797  	urlParams_   gensupport.URLParams
  3798  	ifNoneMatch_ string
  3799  	ctx_         context.Context
  3800  	header_      http.Header
  3801  }
  3802  
  3803  // Get: Gets the specified release for a site or channel. When used to get a
  3804  // release for a site, this can get releases for both the default `live`
  3805  // channel and any active preview channels for the specified site.
  3806  //
  3807  //   - name: The fully-qualified resource name for the Hosting release, in either
  3808  //     of the following formats: -
  3809  //     sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID -
  3810  //     sites/SITE_ID/releases/RELEASE_ID.
  3811  func (r *ProjectsSitesChannelsReleasesService) Get(name string) *ProjectsSitesChannelsReleasesGetCall {
  3812  	c := &ProjectsSitesChannelsReleasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3813  	c.name = name
  3814  	return c
  3815  }
  3816  
  3817  // Fields allows partial responses to be retrieved. See
  3818  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3819  // details.
  3820  func (c *ProjectsSitesChannelsReleasesGetCall) Fields(s ...googleapi.Field) *ProjectsSitesChannelsReleasesGetCall {
  3821  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3822  	return c
  3823  }
  3824  
  3825  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3826  // object's ETag matches the given value. This is useful for getting updates
  3827  // only after the object has changed since the last request.
  3828  func (c *ProjectsSitesChannelsReleasesGetCall) IfNoneMatch(entityTag string) *ProjectsSitesChannelsReleasesGetCall {
  3829  	c.ifNoneMatch_ = entityTag
  3830  	return c
  3831  }
  3832  
  3833  // Context sets the context to be used in this call's Do method.
  3834  func (c *ProjectsSitesChannelsReleasesGetCall) Context(ctx context.Context) *ProjectsSitesChannelsReleasesGetCall {
  3835  	c.ctx_ = ctx
  3836  	return c
  3837  }
  3838  
  3839  // Header returns a http.Header that can be modified by the caller to add
  3840  // headers to the request.
  3841  func (c *ProjectsSitesChannelsReleasesGetCall) Header() http.Header {
  3842  	if c.header_ == nil {
  3843  		c.header_ = make(http.Header)
  3844  	}
  3845  	return c.header_
  3846  }
  3847  
  3848  func (c *ProjectsSitesChannelsReleasesGetCall) doRequest(alt string) (*http.Response, error) {
  3849  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3850  	if c.ifNoneMatch_ != "" {
  3851  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3852  	}
  3853  	var body io.Reader = nil
  3854  	c.urlParams_.Set("alt", alt)
  3855  	c.urlParams_.Set("prettyPrint", "false")
  3856  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3857  	urls += "?" + c.urlParams_.Encode()
  3858  	req, err := http.NewRequest("GET", urls, body)
  3859  	if err != nil {
  3860  		return nil, err
  3861  	}
  3862  	req.Header = reqHeaders
  3863  	googleapi.Expand(req.URL, map[string]string{
  3864  		"name": c.name,
  3865  	})
  3866  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3867  }
  3868  
  3869  // Do executes the "firebasehosting.projects.sites.channels.releases.get" call.
  3870  // Any non-2xx status code is an error. Response headers are in either
  3871  // *Release.ServerResponse.Header or (if a response was returned at all) in
  3872  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3873  // whether the returned error was because http.StatusNotModified was returned.
  3874  func (c *ProjectsSitesChannelsReleasesGetCall) Do(opts ...googleapi.CallOption) (*Release, error) {
  3875  	gensupport.SetOptions(c.urlParams_, opts...)
  3876  	res, err := c.doRequest("json")
  3877  	if res != nil && res.StatusCode == http.StatusNotModified {
  3878  		if res.Body != nil {
  3879  			res.Body.Close()
  3880  		}
  3881  		return nil, gensupport.WrapError(&googleapi.Error{
  3882  			Code:   res.StatusCode,
  3883  			Header: res.Header,
  3884  		})
  3885  	}
  3886  	if err != nil {
  3887  		return nil, err
  3888  	}
  3889  	defer googleapi.CloseBody(res)
  3890  	if err := googleapi.CheckResponse(res); err != nil {
  3891  		return nil, gensupport.WrapError(err)
  3892  	}
  3893  	ret := &Release{
  3894  		ServerResponse: googleapi.ServerResponse{
  3895  			Header:         res.Header,
  3896  			HTTPStatusCode: res.StatusCode,
  3897  		},
  3898  	}
  3899  	target := &ret
  3900  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3901  		return nil, err
  3902  	}
  3903  	return ret, nil
  3904  }
  3905  
  3906  type ProjectsSitesChannelsReleasesListCall struct {
  3907  	s            *Service
  3908  	parent       string
  3909  	urlParams_   gensupport.URLParams
  3910  	ifNoneMatch_ string
  3911  	ctx_         context.Context
  3912  	header_      http.Header
  3913  }
  3914  
  3915  // List: Lists the releases that have been created for the specified site or
  3916  // channel. When used to list releases for a site, this list includes releases
  3917  // for both the default `live` channel and any active preview channels for the
  3918  // specified site.
  3919  //
  3920  //   - parent: The site or channel for which to list releases, in either of the
  3921  //     following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID.
  3922  func (r *ProjectsSitesChannelsReleasesService) List(parent string) *ProjectsSitesChannelsReleasesListCall {
  3923  	c := &ProjectsSitesChannelsReleasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3924  	c.parent = parent
  3925  	return c
  3926  }
  3927  
  3928  // PageSize sets the optional parameter "pageSize": The maximum number of
  3929  // releases to return. The service may return a lower number if fewer releases
  3930  // exist than this maximum number. If unspecified, defaults to 100.
  3931  func (c *ProjectsSitesChannelsReleasesListCall) PageSize(pageSize int64) *ProjectsSitesChannelsReleasesListCall {
  3932  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3933  	return c
  3934  }
  3935  
  3936  // PageToken sets the optional parameter "pageToken": A token from a previous
  3937  // call to `releases.list` or `channels.releases.list` that tells the server
  3938  // where to resume listing.
  3939  func (c *ProjectsSitesChannelsReleasesListCall) PageToken(pageToken string) *ProjectsSitesChannelsReleasesListCall {
  3940  	c.urlParams_.Set("pageToken", pageToken)
  3941  	return c
  3942  }
  3943  
  3944  // Fields allows partial responses to be retrieved. See
  3945  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3946  // details.
  3947  func (c *ProjectsSitesChannelsReleasesListCall) Fields(s ...googleapi.Field) *ProjectsSitesChannelsReleasesListCall {
  3948  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3949  	return c
  3950  }
  3951  
  3952  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3953  // object's ETag matches the given value. This is useful for getting updates
  3954  // only after the object has changed since the last request.
  3955  func (c *ProjectsSitesChannelsReleasesListCall) IfNoneMatch(entityTag string) *ProjectsSitesChannelsReleasesListCall {
  3956  	c.ifNoneMatch_ = entityTag
  3957  	return c
  3958  }
  3959  
  3960  // Context sets the context to be used in this call's Do method.
  3961  func (c *ProjectsSitesChannelsReleasesListCall) Context(ctx context.Context) *ProjectsSitesChannelsReleasesListCall {
  3962  	c.ctx_ = ctx
  3963  	return c
  3964  }
  3965  
  3966  // Header returns a http.Header that can be modified by the caller to add
  3967  // headers to the request.
  3968  func (c *ProjectsSitesChannelsReleasesListCall) Header() http.Header {
  3969  	if c.header_ == nil {
  3970  		c.header_ = make(http.Header)
  3971  	}
  3972  	return c.header_
  3973  }
  3974  
  3975  func (c *ProjectsSitesChannelsReleasesListCall) doRequest(alt string) (*http.Response, error) {
  3976  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3977  	if c.ifNoneMatch_ != "" {
  3978  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3979  	}
  3980  	var body io.Reader = nil
  3981  	c.urlParams_.Set("alt", alt)
  3982  	c.urlParams_.Set("prettyPrint", "false")
  3983  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/releases")
  3984  	urls += "?" + c.urlParams_.Encode()
  3985  	req, err := http.NewRequest("GET", urls, body)
  3986  	if err != nil {
  3987  		return nil, err
  3988  	}
  3989  	req.Header = reqHeaders
  3990  	googleapi.Expand(req.URL, map[string]string{
  3991  		"parent": c.parent,
  3992  	})
  3993  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3994  }
  3995  
  3996  // Do executes the "firebasehosting.projects.sites.channels.releases.list" call.
  3997  // Any non-2xx status code is an error. Response headers are in either
  3998  // *ListReleasesResponse.ServerResponse.Header or (if a response was returned
  3999  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4000  // check whether the returned error was because http.StatusNotModified was
  4001  // returned.
  4002  func (c *ProjectsSitesChannelsReleasesListCall) Do(opts ...googleapi.CallOption) (*ListReleasesResponse, error) {
  4003  	gensupport.SetOptions(c.urlParams_, opts...)
  4004  	res, err := c.doRequest("json")
  4005  	if res != nil && res.StatusCode == http.StatusNotModified {
  4006  		if res.Body != nil {
  4007  			res.Body.Close()
  4008  		}
  4009  		return nil, gensupport.WrapError(&googleapi.Error{
  4010  			Code:   res.StatusCode,
  4011  			Header: res.Header,
  4012  		})
  4013  	}
  4014  	if err != nil {
  4015  		return nil, err
  4016  	}
  4017  	defer googleapi.CloseBody(res)
  4018  	if err := googleapi.CheckResponse(res); err != nil {
  4019  		return nil, gensupport.WrapError(err)
  4020  	}
  4021  	ret := &ListReleasesResponse{
  4022  		ServerResponse: googleapi.ServerResponse{
  4023  			Header:         res.Header,
  4024  			HTTPStatusCode: res.StatusCode,
  4025  		},
  4026  	}
  4027  	target := &ret
  4028  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4029  		return nil, err
  4030  	}
  4031  	return ret, nil
  4032  }
  4033  
  4034  // Pages invokes f for each page of results.
  4035  // A non-nil error returned from f will halt the iteration.
  4036  // The provided context supersedes any context provided to the Context method.
  4037  func (c *ProjectsSitesChannelsReleasesListCall) Pages(ctx context.Context, f func(*ListReleasesResponse) error) error {
  4038  	c.ctx_ = ctx
  4039  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4040  	for {
  4041  		x, err := c.Do()
  4042  		if err != nil {
  4043  			return err
  4044  		}
  4045  		if err := f(x); err != nil {
  4046  			return err
  4047  		}
  4048  		if x.NextPageToken == "" {
  4049  			return nil
  4050  		}
  4051  		c.PageToken(x.NextPageToken)
  4052  	}
  4053  }
  4054  
  4055  type ProjectsSitesCustomDomainsCreateCall struct {
  4056  	s            *Service
  4057  	parent       string
  4058  	customdomain *CustomDomain
  4059  	urlParams_   gensupport.URLParams
  4060  	ctx_         context.Context
  4061  	header_      http.Header
  4062  }
  4063  
  4064  // Create: Creates a `CustomDomain`.
  4065  //
  4066  //   - parent: The custom domain's parent, specifically a Firebase Hosting
  4067  //     `Site`.
  4068  func (r *ProjectsSitesCustomDomainsService) Create(parent string, customdomain *CustomDomain) *ProjectsSitesCustomDomainsCreateCall {
  4069  	c := &ProjectsSitesCustomDomainsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4070  	c.parent = parent
  4071  	c.customdomain = customdomain
  4072  	return c
  4073  }
  4074  
  4075  // CustomDomainId sets the optional parameter "customDomainId": Required. The
  4076  // ID of the `CustomDomain`, which is the domain name you'd like to use with
  4077  // Firebase Hosting.
  4078  func (c *ProjectsSitesCustomDomainsCreateCall) CustomDomainId(customDomainId string) *ProjectsSitesCustomDomainsCreateCall {
  4079  	c.urlParams_.Set("customDomainId", customDomainId)
  4080  	return c
  4081  }
  4082  
  4083  // ValidateOnly sets the optional parameter "validateOnly": If true, Hosting
  4084  // validates that it's possible to complete your request but doesn't actually
  4085  // create a new `CustomDomain`.
  4086  func (c *ProjectsSitesCustomDomainsCreateCall) ValidateOnly(validateOnly bool) *ProjectsSitesCustomDomainsCreateCall {
  4087  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  4088  	return c
  4089  }
  4090  
  4091  // Fields allows partial responses to be retrieved. See
  4092  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4093  // details.
  4094  func (c *ProjectsSitesCustomDomainsCreateCall) Fields(s ...googleapi.Field) *ProjectsSitesCustomDomainsCreateCall {
  4095  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4096  	return c
  4097  }
  4098  
  4099  // Context sets the context to be used in this call's Do method.
  4100  func (c *ProjectsSitesCustomDomainsCreateCall) Context(ctx context.Context) *ProjectsSitesCustomDomainsCreateCall {
  4101  	c.ctx_ = ctx
  4102  	return c
  4103  }
  4104  
  4105  // Header returns a http.Header that can be modified by the caller to add
  4106  // headers to the request.
  4107  func (c *ProjectsSitesCustomDomainsCreateCall) Header() http.Header {
  4108  	if c.header_ == nil {
  4109  		c.header_ = make(http.Header)
  4110  	}
  4111  	return c.header_
  4112  }
  4113  
  4114  func (c *ProjectsSitesCustomDomainsCreateCall) doRequest(alt string) (*http.Response, error) {
  4115  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4116  	var body io.Reader = nil
  4117  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdomain)
  4118  	if err != nil {
  4119  		return nil, err
  4120  	}
  4121  	c.urlParams_.Set("alt", alt)
  4122  	c.urlParams_.Set("prettyPrint", "false")
  4123  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/customDomains")
  4124  	urls += "?" + c.urlParams_.Encode()
  4125  	req, err := http.NewRequest("POST", urls, body)
  4126  	if err != nil {
  4127  		return nil, err
  4128  	}
  4129  	req.Header = reqHeaders
  4130  	googleapi.Expand(req.URL, map[string]string{
  4131  		"parent": c.parent,
  4132  	})
  4133  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4134  }
  4135  
  4136  // Do executes the "firebasehosting.projects.sites.customDomains.create" call.
  4137  // Any non-2xx status code is an error. Response headers are in either
  4138  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4139  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4140  // whether the returned error was because http.StatusNotModified was returned.
  4141  func (c *ProjectsSitesCustomDomainsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4142  	gensupport.SetOptions(c.urlParams_, opts...)
  4143  	res, err := c.doRequest("json")
  4144  	if res != nil && res.StatusCode == http.StatusNotModified {
  4145  		if res.Body != nil {
  4146  			res.Body.Close()
  4147  		}
  4148  		return nil, gensupport.WrapError(&googleapi.Error{
  4149  			Code:   res.StatusCode,
  4150  			Header: res.Header,
  4151  		})
  4152  	}
  4153  	if err != nil {
  4154  		return nil, err
  4155  	}
  4156  	defer googleapi.CloseBody(res)
  4157  	if err := googleapi.CheckResponse(res); err != nil {
  4158  		return nil, gensupport.WrapError(err)
  4159  	}
  4160  	ret := &Operation{
  4161  		ServerResponse: googleapi.ServerResponse{
  4162  			Header:         res.Header,
  4163  			HTTPStatusCode: res.StatusCode,
  4164  		},
  4165  	}
  4166  	target := &ret
  4167  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4168  		return nil, err
  4169  	}
  4170  	return ret, nil
  4171  }
  4172  
  4173  type ProjectsSitesCustomDomainsDeleteCall struct {
  4174  	s          *Service
  4175  	name       string
  4176  	urlParams_ gensupport.URLParams
  4177  	ctx_       context.Context
  4178  	header_    http.Header
  4179  }
  4180  
  4181  // Delete: Deletes the specified `CustomDomain`.
  4182  //
  4183  // - name: The name of the `CustomDomain` to delete.
  4184  func (r *ProjectsSitesCustomDomainsService) Delete(name string) *ProjectsSitesCustomDomainsDeleteCall {
  4185  	c := &ProjectsSitesCustomDomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4186  	c.name = name
  4187  	return c
  4188  }
  4189  
  4190  // AllowMissing sets the optional parameter "allowMissing": If true, the
  4191  // request succeeds even if the `CustomDomain` doesn't exist.
  4192  func (c *ProjectsSitesCustomDomainsDeleteCall) AllowMissing(allowMissing bool) *ProjectsSitesCustomDomainsDeleteCall {
  4193  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  4194  	return c
  4195  }
  4196  
  4197  // Etag sets the optional parameter "etag": A tag that represents the state of
  4198  // the `CustomDomain` as you know it. If present, the supplied tag must match
  4199  // the current value on your `CustomDomain`, or the request fails.
  4200  func (c *ProjectsSitesCustomDomainsDeleteCall) Etag(etag string) *ProjectsSitesCustomDomainsDeleteCall {
  4201  	c.urlParams_.Set("etag", etag)
  4202  	return c
  4203  }
  4204  
  4205  // ValidateOnly sets the optional parameter "validateOnly": If true, Hosting
  4206  // validates that it's possible to complete your request but doesn't actually
  4207  // delete the `CustomDomain`.
  4208  func (c *ProjectsSitesCustomDomainsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsSitesCustomDomainsDeleteCall {
  4209  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  4210  	return c
  4211  }
  4212  
  4213  // Fields allows partial responses to be retrieved. See
  4214  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4215  // details.
  4216  func (c *ProjectsSitesCustomDomainsDeleteCall) Fields(s ...googleapi.Field) *ProjectsSitesCustomDomainsDeleteCall {
  4217  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4218  	return c
  4219  }
  4220  
  4221  // Context sets the context to be used in this call's Do method.
  4222  func (c *ProjectsSitesCustomDomainsDeleteCall) Context(ctx context.Context) *ProjectsSitesCustomDomainsDeleteCall {
  4223  	c.ctx_ = ctx
  4224  	return c
  4225  }
  4226  
  4227  // Header returns a http.Header that can be modified by the caller to add
  4228  // headers to the request.
  4229  func (c *ProjectsSitesCustomDomainsDeleteCall) Header() http.Header {
  4230  	if c.header_ == nil {
  4231  		c.header_ = make(http.Header)
  4232  	}
  4233  	return c.header_
  4234  }
  4235  
  4236  func (c *ProjectsSitesCustomDomainsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4237  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4238  	var body io.Reader = nil
  4239  	c.urlParams_.Set("alt", alt)
  4240  	c.urlParams_.Set("prettyPrint", "false")
  4241  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4242  	urls += "?" + c.urlParams_.Encode()
  4243  	req, err := http.NewRequest("DELETE", urls, body)
  4244  	if err != nil {
  4245  		return nil, err
  4246  	}
  4247  	req.Header = reqHeaders
  4248  	googleapi.Expand(req.URL, map[string]string{
  4249  		"name": c.name,
  4250  	})
  4251  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4252  }
  4253  
  4254  // Do executes the "firebasehosting.projects.sites.customDomains.delete" call.
  4255  // Any non-2xx status code is an error. Response headers are in either
  4256  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4257  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4258  // whether the returned error was because http.StatusNotModified was returned.
  4259  func (c *ProjectsSitesCustomDomainsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4260  	gensupport.SetOptions(c.urlParams_, opts...)
  4261  	res, err := c.doRequest("json")
  4262  	if res != nil && res.StatusCode == http.StatusNotModified {
  4263  		if res.Body != nil {
  4264  			res.Body.Close()
  4265  		}
  4266  		return nil, gensupport.WrapError(&googleapi.Error{
  4267  			Code:   res.StatusCode,
  4268  			Header: res.Header,
  4269  		})
  4270  	}
  4271  	if err != nil {
  4272  		return nil, err
  4273  	}
  4274  	defer googleapi.CloseBody(res)
  4275  	if err := googleapi.CheckResponse(res); err != nil {
  4276  		return nil, gensupport.WrapError(err)
  4277  	}
  4278  	ret := &Operation{
  4279  		ServerResponse: googleapi.ServerResponse{
  4280  			Header:         res.Header,
  4281  			HTTPStatusCode: res.StatusCode,
  4282  		},
  4283  	}
  4284  	target := &ret
  4285  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4286  		return nil, err
  4287  	}
  4288  	return ret, nil
  4289  }
  4290  
  4291  type ProjectsSitesCustomDomainsGetCall struct {
  4292  	s            *Service
  4293  	name         string
  4294  	urlParams_   gensupport.URLParams
  4295  	ifNoneMatch_ string
  4296  	ctx_         context.Context
  4297  	header_      http.Header
  4298  }
  4299  
  4300  // Get: Gets the specified `CustomDomain`.
  4301  //
  4302  // - name: The name of the `CustomDomain` to get.
  4303  func (r *ProjectsSitesCustomDomainsService) Get(name string) *ProjectsSitesCustomDomainsGetCall {
  4304  	c := &ProjectsSitesCustomDomainsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4305  	c.name = name
  4306  	return c
  4307  }
  4308  
  4309  // Fields allows partial responses to be retrieved. See
  4310  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4311  // details.
  4312  func (c *ProjectsSitesCustomDomainsGetCall) Fields(s ...googleapi.Field) *ProjectsSitesCustomDomainsGetCall {
  4313  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4314  	return c
  4315  }
  4316  
  4317  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4318  // object's ETag matches the given value. This is useful for getting updates
  4319  // only after the object has changed since the last request.
  4320  func (c *ProjectsSitesCustomDomainsGetCall) IfNoneMatch(entityTag string) *ProjectsSitesCustomDomainsGetCall {
  4321  	c.ifNoneMatch_ = entityTag
  4322  	return c
  4323  }
  4324  
  4325  // Context sets the context to be used in this call's Do method.
  4326  func (c *ProjectsSitesCustomDomainsGetCall) Context(ctx context.Context) *ProjectsSitesCustomDomainsGetCall {
  4327  	c.ctx_ = ctx
  4328  	return c
  4329  }
  4330  
  4331  // Header returns a http.Header that can be modified by the caller to add
  4332  // headers to the request.
  4333  func (c *ProjectsSitesCustomDomainsGetCall) Header() http.Header {
  4334  	if c.header_ == nil {
  4335  		c.header_ = make(http.Header)
  4336  	}
  4337  	return c.header_
  4338  }
  4339  
  4340  func (c *ProjectsSitesCustomDomainsGetCall) doRequest(alt string) (*http.Response, error) {
  4341  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4342  	if c.ifNoneMatch_ != "" {
  4343  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4344  	}
  4345  	var body io.Reader = nil
  4346  	c.urlParams_.Set("alt", alt)
  4347  	c.urlParams_.Set("prettyPrint", "false")
  4348  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4349  	urls += "?" + c.urlParams_.Encode()
  4350  	req, err := http.NewRequest("GET", urls, body)
  4351  	if err != nil {
  4352  		return nil, err
  4353  	}
  4354  	req.Header = reqHeaders
  4355  	googleapi.Expand(req.URL, map[string]string{
  4356  		"name": c.name,
  4357  	})
  4358  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4359  }
  4360  
  4361  // Do executes the "firebasehosting.projects.sites.customDomains.get" call.
  4362  // Any non-2xx status code is an error. Response headers are in either
  4363  // *CustomDomain.ServerResponse.Header or (if a response was returned at all)
  4364  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4365  // whether the returned error was because http.StatusNotModified was returned.
  4366  func (c *ProjectsSitesCustomDomainsGetCall) Do(opts ...googleapi.CallOption) (*CustomDomain, error) {
  4367  	gensupport.SetOptions(c.urlParams_, opts...)
  4368  	res, err := c.doRequest("json")
  4369  	if res != nil && res.StatusCode == http.StatusNotModified {
  4370  		if res.Body != nil {
  4371  			res.Body.Close()
  4372  		}
  4373  		return nil, gensupport.WrapError(&googleapi.Error{
  4374  			Code:   res.StatusCode,
  4375  			Header: res.Header,
  4376  		})
  4377  	}
  4378  	if err != nil {
  4379  		return nil, err
  4380  	}
  4381  	defer googleapi.CloseBody(res)
  4382  	if err := googleapi.CheckResponse(res); err != nil {
  4383  		return nil, gensupport.WrapError(err)
  4384  	}
  4385  	ret := &CustomDomain{
  4386  		ServerResponse: googleapi.ServerResponse{
  4387  			Header:         res.Header,
  4388  			HTTPStatusCode: res.StatusCode,
  4389  		},
  4390  	}
  4391  	target := &ret
  4392  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4393  		return nil, err
  4394  	}
  4395  	return ret, nil
  4396  }
  4397  
  4398  type ProjectsSitesCustomDomainsListCall struct {
  4399  	s            *Service
  4400  	parent       string
  4401  	urlParams_   gensupport.URLParams
  4402  	ifNoneMatch_ string
  4403  	ctx_         context.Context
  4404  	header_      http.Header
  4405  }
  4406  
  4407  // List: Lists each `CustomDomain` associated with the specified parent Hosting
  4408  // site. Returns `CustomDomain`s in a consistent, but undefined, order to
  4409  // facilitate pagination.
  4410  //
  4411  //   - parent: The Firebase Hosting `Site` with `CustomDomain` entities you'd
  4412  //     like to list.
  4413  func (r *ProjectsSitesCustomDomainsService) List(parent string) *ProjectsSitesCustomDomainsListCall {
  4414  	c := &ProjectsSitesCustomDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4415  	c.parent = parent
  4416  	return c
  4417  }
  4418  
  4419  // PageSize sets the optional parameter "pageSize": The max number of
  4420  // `CustomDomain` entities to return in a request. Defaults to 10.
  4421  func (c *ProjectsSitesCustomDomainsListCall) PageSize(pageSize int64) *ProjectsSitesCustomDomainsListCall {
  4422  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4423  	return c
  4424  }
  4425  
  4426  // PageToken sets the optional parameter "pageToken": A token from a previous
  4427  // call to `ListCustomDomains` that tells the server where to resume listing.
  4428  func (c *ProjectsSitesCustomDomainsListCall) PageToken(pageToken string) *ProjectsSitesCustomDomainsListCall {
  4429  	c.urlParams_.Set("pageToken", pageToken)
  4430  	return c
  4431  }
  4432  
  4433  // ShowDeleted sets the optional parameter "showDeleted": If true, the request
  4434  // returns soft-deleted `CustomDomain`s that haven't been fully-deleted yet. To
  4435  // restore deleted `CustomDomain`s, make an `UndeleteCustomDomain` request.
  4436  func (c *ProjectsSitesCustomDomainsListCall) ShowDeleted(showDeleted bool) *ProjectsSitesCustomDomainsListCall {
  4437  	c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
  4438  	return c
  4439  }
  4440  
  4441  // Fields allows partial responses to be retrieved. See
  4442  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4443  // details.
  4444  func (c *ProjectsSitesCustomDomainsListCall) Fields(s ...googleapi.Field) *ProjectsSitesCustomDomainsListCall {
  4445  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4446  	return c
  4447  }
  4448  
  4449  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4450  // object's ETag matches the given value. This is useful for getting updates
  4451  // only after the object has changed since the last request.
  4452  func (c *ProjectsSitesCustomDomainsListCall) IfNoneMatch(entityTag string) *ProjectsSitesCustomDomainsListCall {
  4453  	c.ifNoneMatch_ = entityTag
  4454  	return c
  4455  }
  4456  
  4457  // Context sets the context to be used in this call's Do method.
  4458  func (c *ProjectsSitesCustomDomainsListCall) Context(ctx context.Context) *ProjectsSitesCustomDomainsListCall {
  4459  	c.ctx_ = ctx
  4460  	return c
  4461  }
  4462  
  4463  // Header returns a http.Header that can be modified by the caller to add
  4464  // headers to the request.
  4465  func (c *ProjectsSitesCustomDomainsListCall) Header() http.Header {
  4466  	if c.header_ == nil {
  4467  		c.header_ = make(http.Header)
  4468  	}
  4469  	return c.header_
  4470  }
  4471  
  4472  func (c *ProjectsSitesCustomDomainsListCall) doRequest(alt string) (*http.Response, error) {
  4473  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4474  	if c.ifNoneMatch_ != "" {
  4475  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4476  	}
  4477  	var body io.Reader = nil
  4478  	c.urlParams_.Set("alt", alt)
  4479  	c.urlParams_.Set("prettyPrint", "false")
  4480  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/customDomains")
  4481  	urls += "?" + c.urlParams_.Encode()
  4482  	req, err := http.NewRequest("GET", urls, body)
  4483  	if err != nil {
  4484  		return nil, err
  4485  	}
  4486  	req.Header = reqHeaders
  4487  	googleapi.Expand(req.URL, map[string]string{
  4488  		"parent": c.parent,
  4489  	})
  4490  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4491  }
  4492  
  4493  // Do executes the "firebasehosting.projects.sites.customDomains.list" call.
  4494  // Any non-2xx status code is an error. Response headers are in either
  4495  // *ListCustomDomainsResponse.ServerResponse.Header or (if a response was
  4496  // returned at all) in error.(*googleapi.Error).Header. Use
  4497  // googleapi.IsNotModified to check whether the returned error was because
  4498  // http.StatusNotModified was returned.
  4499  func (c *ProjectsSitesCustomDomainsListCall) Do(opts ...googleapi.CallOption) (*ListCustomDomainsResponse, error) {
  4500  	gensupport.SetOptions(c.urlParams_, opts...)
  4501  	res, err := c.doRequest("json")
  4502  	if res != nil && res.StatusCode == http.StatusNotModified {
  4503  		if res.Body != nil {
  4504  			res.Body.Close()
  4505  		}
  4506  		return nil, gensupport.WrapError(&googleapi.Error{
  4507  			Code:   res.StatusCode,
  4508  			Header: res.Header,
  4509  		})
  4510  	}
  4511  	if err != nil {
  4512  		return nil, err
  4513  	}
  4514  	defer googleapi.CloseBody(res)
  4515  	if err := googleapi.CheckResponse(res); err != nil {
  4516  		return nil, gensupport.WrapError(err)
  4517  	}
  4518  	ret := &ListCustomDomainsResponse{
  4519  		ServerResponse: googleapi.ServerResponse{
  4520  			Header:         res.Header,
  4521  			HTTPStatusCode: res.StatusCode,
  4522  		},
  4523  	}
  4524  	target := &ret
  4525  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4526  		return nil, err
  4527  	}
  4528  	return ret, nil
  4529  }
  4530  
  4531  // Pages invokes f for each page of results.
  4532  // A non-nil error returned from f will halt the iteration.
  4533  // The provided context supersedes any context provided to the Context method.
  4534  func (c *ProjectsSitesCustomDomainsListCall) Pages(ctx context.Context, f func(*ListCustomDomainsResponse) error) error {
  4535  	c.ctx_ = ctx
  4536  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4537  	for {
  4538  		x, err := c.Do()
  4539  		if err != nil {
  4540  			return err
  4541  		}
  4542  		if err := f(x); err != nil {
  4543  			return err
  4544  		}
  4545  		if x.NextPageToken == "" {
  4546  			return nil
  4547  		}
  4548  		c.PageToken(x.NextPageToken)
  4549  	}
  4550  }
  4551  
  4552  type ProjectsSitesCustomDomainsPatchCall struct {
  4553  	s            *Service
  4554  	name         string
  4555  	customdomain *CustomDomain
  4556  	urlParams_   gensupport.URLParams
  4557  	ctx_         context.Context
  4558  	header_      http.Header
  4559  }
  4560  
  4561  // Patch: Updates the specified `CustomDomain`.
  4562  //
  4563  // - name: Output only. The fully-qualified name of the `CustomDomain`.
  4564  func (r *ProjectsSitesCustomDomainsService) Patch(name string, customdomain *CustomDomain) *ProjectsSitesCustomDomainsPatchCall {
  4565  	c := &ProjectsSitesCustomDomainsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4566  	c.name = name
  4567  	c.customdomain = customdomain
  4568  	return c
  4569  }
  4570  
  4571  // AllowMissing sets the optional parameter "allowMissing": If true, Hosting
  4572  // creates the `CustomDomain` if it doesn't already exist.
  4573  func (c *ProjectsSitesCustomDomainsPatchCall) AllowMissing(allowMissing bool) *ProjectsSitesCustomDomainsPatchCall {
  4574  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  4575  	return c
  4576  }
  4577  
  4578  // UpdateMask sets the optional parameter "updateMask": The set of field names
  4579  // from your `CustomDomain` that you want to update. A field will be
  4580  // overwritten if, and only if, it's in the mask. If you don't provide a mask,
  4581  // Hosting updates the entire `CustomDomain`.
  4582  func (c *ProjectsSitesCustomDomainsPatchCall) UpdateMask(updateMask string) *ProjectsSitesCustomDomainsPatchCall {
  4583  	c.urlParams_.Set("updateMask", updateMask)
  4584  	return c
  4585  }
  4586  
  4587  // ValidateOnly sets the optional parameter "validateOnly": If true, Hosting
  4588  // validates that it's possible to complete your request but doesn't actually
  4589  // create or update the `CustomDomain`.
  4590  func (c *ProjectsSitesCustomDomainsPatchCall) ValidateOnly(validateOnly bool) *ProjectsSitesCustomDomainsPatchCall {
  4591  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  4592  	return c
  4593  }
  4594  
  4595  // Fields allows partial responses to be retrieved. See
  4596  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4597  // details.
  4598  func (c *ProjectsSitesCustomDomainsPatchCall) Fields(s ...googleapi.Field) *ProjectsSitesCustomDomainsPatchCall {
  4599  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4600  	return c
  4601  }
  4602  
  4603  // Context sets the context to be used in this call's Do method.
  4604  func (c *ProjectsSitesCustomDomainsPatchCall) Context(ctx context.Context) *ProjectsSitesCustomDomainsPatchCall {
  4605  	c.ctx_ = ctx
  4606  	return c
  4607  }
  4608  
  4609  // Header returns a http.Header that can be modified by the caller to add
  4610  // headers to the request.
  4611  func (c *ProjectsSitesCustomDomainsPatchCall) Header() http.Header {
  4612  	if c.header_ == nil {
  4613  		c.header_ = make(http.Header)
  4614  	}
  4615  	return c.header_
  4616  }
  4617  
  4618  func (c *ProjectsSitesCustomDomainsPatchCall) doRequest(alt string) (*http.Response, error) {
  4619  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4620  	var body io.Reader = nil
  4621  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdomain)
  4622  	if err != nil {
  4623  		return nil, err
  4624  	}
  4625  	c.urlParams_.Set("alt", alt)
  4626  	c.urlParams_.Set("prettyPrint", "false")
  4627  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4628  	urls += "?" + c.urlParams_.Encode()
  4629  	req, err := http.NewRequest("PATCH", urls, body)
  4630  	if err != nil {
  4631  		return nil, err
  4632  	}
  4633  	req.Header = reqHeaders
  4634  	googleapi.Expand(req.URL, map[string]string{
  4635  		"name": c.name,
  4636  	})
  4637  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4638  }
  4639  
  4640  // Do executes the "firebasehosting.projects.sites.customDomains.patch" call.
  4641  // Any non-2xx status code is an error. Response headers are in either
  4642  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4643  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4644  // whether the returned error was because http.StatusNotModified was returned.
  4645  func (c *ProjectsSitesCustomDomainsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4646  	gensupport.SetOptions(c.urlParams_, opts...)
  4647  	res, err := c.doRequest("json")
  4648  	if res != nil && res.StatusCode == http.StatusNotModified {
  4649  		if res.Body != nil {
  4650  			res.Body.Close()
  4651  		}
  4652  		return nil, gensupport.WrapError(&googleapi.Error{
  4653  			Code:   res.StatusCode,
  4654  			Header: res.Header,
  4655  		})
  4656  	}
  4657  	if err != nil {
  4658  		return nil, err
  4659  	}
  4660  	defer googleapi.CloseBody(res)
  4661  	if err := googleapi.CheckResponse(res); err != nil {
  4662  		return nil, gensupport.WrapError(err)
  4663  	}
  4664  	ret := &Operation{
  4665  		ServerResponse: googleapi.ServerResponse{
  4666  			Header:         res.Header,
  4667  			HTTPStatusCode: res.StatusCode,
  4668  		},
  4669  	}
  4670  	target := &ret
  4671  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4672  		return nil, err
  4673  	}
  4674  	return ret, nil
  4675  }
  4676  
  4677  type ProjectsSitesCustomDomainsUndeleteCall struct {
  4678  	s                           *Service
  4679  	name                        string
  4680  	undeletecustomdomainrequest *UndeleteCustomDomainRequest
  4681  	urlParams_                  gensupport.URLParams
  4682  	ctx_                        context.Context
  4683  	header_                     http.Header
  4684  }
  4685  
  4686  // Undelete: Undeletes the specified `CustomDomain` if it has been
  4687  // soft-deleted. Hosting retains soft-deleted custom domains for around 30 days
  4688  // before permanently deleting them.
  4689  //
  4690  // - name: The name of the `CustomDomain` to delete.
  4691  func (r *ProjectsSitesCustomDomainsService) Undelete(name string, undeletecustomdomainrequest *UndeleteCustomDomainRequest) *ProjectsSitesCustomDomainsUndeleteCall {
  4692  	c := &ProjectsSitesCustomDomainsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4693  	c.name = name
  4694  	c.undeletecustomdomainrequest = undeletecustomdomainrequest
  4695  	return c
  4696  }
  4697  
  4698  // Fields allows partial responses to be retrieved. See
  4699  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4700  // details.
  4701  func (c *ProjectsSitesCustomDomainsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsSitesCustomDomainsUndeleteCall {
  4702  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4703  	return c
  4704  }
  4705  
  4706  // Context sets the context to be used in this call's Do method.
  4707  func (c *ProjectsSitesCustomDomainsUndeleteCall) Context(ctx context.Context) *ProjectsSitesCustomDomainsUndeleteCall {
  4708  	c.ctx_ = ctx
  4709  	return c
  4710  }
  4711  
  4712  // Header returns a http.Header that can be modified by the caller to add
  4713  // headers to the request.
  4714  func (c *ProjectsSitesCustomDomainsUndeleteCall) Header() http.Header {
  4715  	if c.header_ == nil {
  4716  		c.header_ = make(http.Header)
  4717  	}
  4718  	return c.header_
  4719  }
  4720  
  4721  func (c *ProjectsSitesCustomDomainsUndeleteCall) doRequest(alt string) (*http.Response, error) {
  4722  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4723  	var body io.Reader = nil
  4724  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletecustomdomainrequest)
  4725  	if err != nil {
  4726  		return nil, err
  4727  	}
  4728  	c.urlParams_.Set("alt", alt)
  4729  	c.urlParams_.Set("prettyPrint", "false")
  4730  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:undelete")
  4731  	urls += "?" + c.urlParams_.Encode()
  4732  	req, err := http.NewRequest("POST", urls, body)
  4733  	if err != nil {
  4734  		return nil, err
  4735  	}
  4736  	req.Header = reqHeaders
  4737  	googleapi.Expand(req.URL, map[string]string{
  4738  		"name": c.name,
  4739  	})
  4740  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4741  }
  4742  
  4743  // Do executes the "firebasehosting.projects.sites.customDomains.undelete" call.
  4744  // Any non-2xx status code is an error. Response headers are in either
  4745  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4746  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4747  // whether the returned error was because http.StatusNotModified was returned.
  4748  func (c *ProjectsSitesCustomDomainsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4749  	gensupport.SetOptions(c.urlParams_, opts...)
  4750  	res, err := c.doRequest("json")
  4751  	if res != nil && res.StatusCode == http.StatusNotModified {
  4752  		if res.Body != nil {
  4753  			res.Body.Close()
  4754  		}
  4755  		return nil, gensupport.WrapError(&googleapi.Error{
  4756  			Code:   res.StatusCode,
  4757  			Header: res.Header,
  4758  		})
  4759  	}
  4760  	if err != nil {
  4761  		return nil, err
  4762  	}
  4763  	defer googleapi.CloseBody(res)
  4764  	if err := googleapi.CheckResponse(res); err != nil {
  4765  		return nil, gensupport.WrapError(err)
  4766  	}
  4767  	ret := &Operation{
  4768  		ServerResponse: googleapi.ServerResponse{
  4769  			Header:         res.Header,
  4770  			HTTPStatusCode: res.StatusCode,
  4771  		},
  4772  	}
  4773  	target := &ret
  4774  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4775  		return nil, err
  4776  	}
  4777  	return ret, nil
  4778  }
  4779  
  4780  type ProjectsSitesCustomDomainsOperationsGetCall struct {
  4781  	s            *Service
  4782  	name         string
  4783  	urlParams_   gensupport.URLParams
  4784  	ifNoneMatch_ string
  4785  	ctx_         context.Context
  4786  	header_      http.Header
  4787  }
  4788  
  4789  // Get: Gets the latest state of a long-running operation. Use this method to
  4790  // poll the operation result at intervals as recommended by the API service.
  4791  //
  4792  // - name: The name of the operation resource.
  4793  func (r *ProjectsSitesCustomDomainsOperationsService) Get(name string) *ProjectsSitesCustomDomainsOperationsGetCall {
  4794  	c := &ProjectsSitesCustomDomainsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4795  	c.name = name
  4796  	return c
  4797  }
  4798  
  4799  // Fields allows partial responses to be retrieved. See
  4800  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4801  // details.
  4802  func (c *ProjectsSitesCustomDomainsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsSitesCustomDomainsOperationsGetCall {
  4803  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4804  	return c
  4805  }
  4806  
  4807  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4808  // object's ETag matches the given value. This is useful for getting updates
  4809  // only after the object has changed since the last request.
  4810  func (c *ProjectsSitesCustomDomainsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsSitesCustomDomainsOperationsGetCall {
  4811  	c.ifNoneMatch_ = entityTag
  4812  	return c
  4813  }
  4814  
  4815  // Context sets the context to be used in this call's Do method.
  4816  func (c *ProjectsSitesCustomDomainsOperationsGetCall) Context(ctx context.Context) *ProjectsSitesCustomDomainsOperationsGetCall {
  4817  	c.ctx_ = ctx
  4818  	return c
  4819  }
  4820  
  4821  // Header returns a http.Header that can be modified by the caller to add
  4822  // headers to the request.
  4823  func (c *ProjectsSitesCustomDomainsOperationsGetCall) Header() http.Header {
  4824  	if c.header_ == nil {
  4825  		c.header_ = make(http.Header)
  4826  	}
  4827  	return c.header_
  4828  }
  4829  
  4830  func (c *ProjectsSitesCustomDomainsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4831  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4832  	if c.ifNoneMatch_ != "" {
  4833  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4834  	}
  4835  	var body io.Reader = nil
  4836  	c.urlParams_.Set("alt", alt)
  4837  	c.urlParams_.Set("prettyPrint", "false")
  4838  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4839  	urls += "?" + c.urlParams_.Encode()
  4840  	req, err := http.NewRequest("GET", urls, body)
  4841  	if err != nil {
  4842  		return nil, err
  4843  	}
  4844  	req.Header = reqHeaders
  4845  	googleapi.Expand(req.URL, map[string]string{
  4846  		"name": c.name,
  4847  	})
  4848  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4849  }
  4850  
  4851  // Do executes the "firebasehosting.projects.sites.customDomains.operations.get" call.
  4852  // Any non-2xx status code is an error. Response headers are in either
  4853  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4854  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4855  // whether the returned error was because http.StatusNotModified was returned.
  4856  func (c *ProjectsSitesCustomDomainsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4857  	gensupport.SetOptions(c.urlParams_, opts...)
  4858  	res, err := c.doRequest("json")
  4859  	if res != nil && res.StatusCode == http.StatusNotModified {
  4860  		if res.Body != nil {
  4861  			res.Body.Close()
  4862  		}
  4863  		return nil, gensupport.WrapError(&googleapi.Error{
  4864  			Code:   res.StatusCode,
  4865  			Header: res.Header,
  4866  		})
  4867  	}
  4868  	if err != nil {
  4869  		return nil, err
  4870  	}
  4871  	defer googleapi.CloseBody(res)
  4872  	if err := googleapi.CheckResponse(res); err != nil {
  4873  		return nil, gensupport.WrapError(err)
  4874  	}
  4875  	ret := &Operation{
  4876  		ServerResponse: googleapi.ServerResponse{
  4877  			Header:         res.Header,
  4878  			HTTPStatusCode: res.StatusCode,
  4879  		},
  4880  	}
  4881  	target := &ret
  4882  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4883  		return nil, err
  4884  	}
  4885  	return ret, nil
  4886  }
  4887  
  4888  type ProjectsSitesCustomDomainsOperationsListCall struct {
  4889  	s            *Service
  4890  	name         string
  4891  	urlParams_   gensupport.URLParams
  4892  	ifNoneMatch_ string
  4893  	ctx_         context.Context
  4894  	header_      http.Header
  4895  }
  4896  
  4897  // List: Lists operations that match the specified filter in the request.
  4898  //
  4899  // - name: The name of the operation's parent resource.
  4900  func (r *ProjectsSitesCustomDomainsOperationsService) List(name string) *ProjectsSitesCustomDomainsOperationsListCall {
  4901  	c := &ProjectsSitesCustomDomainsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4902  	c.name = name
  4903  	return c
  4904  }
  4905  
  4906  // Filter sets the optional parameter "filter": The standard list filter.
  4907  func (c *ProjectsSitesCustomDomainsOperationsListCall) Filter(filter string) *ProjectsSitesCustomDomainsOperationsListCall {
  4908  	c.urlParams_.Set("filter", filter)
  4909  	return c
  4910  }
  4911  
  4912  // PageSize sets the optional parameter "pageSize": The standard list page
  4913  // size.
  4914  func (c *ProjectsSitesCustomDomainsOperationsListCall) PageSize(pageSize int64) *ProjectsSitesCustomDomainsOperationsListCall {
  4915  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4916  	return c
  4917  }
  4918  
  4919  // PageToken sets the optional parameter "pageToken": The standard list page
  4920  // token.
  4921  func (c *ProjectsSitesCustomDomainsOperationsListCall) PageToken(pageToken string) *ProjectsSitesCustomDomainsOperationsListCall {
  4922  	c.urlParams_.Set("pageToken", pageToken)
  4923  	return c
  4924  }
  4925  
  4926  // Fields allows partial responses to be retrieved. See
  4927  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4928  // details.
  4929  func (c *ProjectsSitesCustomDomainsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsSitesCustomDomainsOperationsListCall {
  4930  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4931  	return c
  4932  }
  4933  
  4934  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4935  // object's ETag matches the given value. This is useful for getting updates
  4936  // only after the object has changed since the last request.
  4937  func (c *ProjectsSitesCustomDomainsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsSitesCustomDomainsOperationsListCall {
  4938  	c.ifNoneMatch_ = entityTag
  4939  	return c
  4940  }
  4941  
  4942  // Context sets the context to be used in this call's Do method.
  4943  func (c *ProjectsSitesCustomDomainsOperationsListCall) Context(ctx context.Context) *ProjectsSitesCustomDomainsOperationsListCall {
  4944  	c.ctx_ = ctx
  4945  	return c
  4946  }
  4947  
  4948  // Header returns a http.Header that can be modified by the caller to add
  4949  // headers to the request.
  4950  func (c *ProjectsSitesCustomDomainsOperationsListCall) Header() http.Header {
  4951  	if c.header_ == nil {
  4952  		c.header_ = make(http.Header)
  4953  	}
  4954  	return c.header_
  4955  }
  4956  
  4957  func (c *ProjectsSitesCustomDomainsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  4958  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4959  	if c.ifNoneMatch_ != "" {
  4960  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4961  	}
  4962  	var body io.Reader = nil
  4963  	c.urlParams_.Set("alt", alt)
  4964  	c.urlParams_.Set("prettyPrint", "false")
  4965  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
  4966  	urls += "?" + c.urlParams_.Encode()
  4967  	req, err := http.NewRequest("GET", urls, body)
  4968  	if err != nil {
  4969  		return nil, err
  4970  	}
  4971  	req.Header = reqHeaders
  4972  	googleapi.Expand(req.URL, map[string]string{
  4973  		"name": c.name,
  4974  	})
  4975  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4976  }
  4977  
  4978  // Do executes the "firebasehosting.projects.sites.customDomains.operations.list" call.
  4979  // Any non-2xx status code is an error. Response headers are in either
  4980  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  4981  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4982  // check whether the returned error was because http.StatusNotModified was
  4983  // returned.
  4984  func (c *ProjectsSitesCustomDomainsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  4985  	gensupport.SetOptions(c.urlParams_, opts...)
  4986  	res, err := c.doRequest("json")
  4987  	if res != nil && res.StatusCode == http.StatusNotModified {
  4988  		if res.Body != nil {
  4989  			res.Body.Close()
  4990  		}
  4991  		return nil, gensupport.WrapError(&googleapi.Error{
  4992  			Code:   res.StatusCode,
  4993  			Header: res.Header,
  4994  		})
  4995  	}
  4996  	if err != nil {
  4997  		return nil, err
  4998  	}
  4999  	defer googleapi.CloseBody(res)
  5000  	if err := googleapi.CheckResponse(res); err != nil {
  5001  		return nil, gensupport.WrapError(err)
  5002  	}
  5003  	ret := &ListOperationsResponse{
  5004  		ServerResponse: googleapi.ServerResponse{
  5005  			Header:         res.Header,
  5006  			HTTPStatusCode: res.StatusCode,
  5007  		},
  5008  	}
  5009  	target := &ret
  5010  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5011  		return nil, err
  5012  	}
  5013  	return ret, nil
  5014  }
  5015  
  5016  // Pages invokes f for each page of results.
  5017  // A non-nil error returned from f will halt the iteration.
  5018  // The provided context supersedes any context provided to the Context method.
  5019  func (c *ProjectsSitesCustomDomainsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  5020  	c.ctx_ = ctx
  5021  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5022  	for {
  5023  		x, err := c.Do()
  5024  		if err != nil {
  5025  			return err
  5026  		}
  5027  		if err := f(x); err != nil {
  5028  			return err
  5029  		}
  5030  		if x.NextPageToken == "" {
  5031  			return nil
  5032  		}
  5033  		c.PageToken(x.NextPageToken)
  5034  	}
  5035  }
  5036  
  5037  type ProjectsSitesDomainsCreateCall struct {
  5038  	s          *Service
  5039  	parent     string
  5040  	domain     *Domain
  5041  	urlParams_ gensupport.URLParams
  5042  	ctx_       context.Context
  5043  	header_    http.Header
  5044  }
  5045  
  5046  // Create: Creates a domain mapping on the specified site.
  5047  //
  5048  //   - parent: The parent to create the domain association for, in the format:
  5049  //     sites/site-name.
  5050  func (r *ProjectsSitesDomainsService) Create(parent string, domain *Domain) *ProjectsSitesDomainsCreateCall {
  5051  	c := &ProjectsSitesDomainsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5052  	c.parent = parent
  5053  	c.domain = domain
  5054  	return c
  5055  }
  5056  
  5057  // Fields allows partial responses to be retrieved. See
  5058  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5059  // details.
  5060  func (c *ProjectsSitesDomainsCreateCall) Fields(s ...googleapi.Field) *ProjectsSitesDomainsCreateCall {
  5061  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5062  	return c
  5063  }
  5064  
  5065  // Context sets the context to be used in this call's Do method.
  5066  func (c *ProjectsSitesDomainsCreateCall) Context(ctx context.Context) *ProjectsSitesDomainsCreateCall {
  5067  	c.ctx_ = ctx
  5068  	return c
  5069  }
  5070  
  5071  // Header returns a http.Header that can be modified by the caller to add
  5072  // headers to the request.
  5073  func (c *ProjectsSitesDomainsCreateCall) Header() http.Header {
  5074  	if c.header_ == nil {
  5075  		c.header_ = make(http.Header)
  5076  	}
  5077  	return c.header_
  5078  }
  5079  
  5080  func (c *ProjectsSitesDomainsCreateCall) doRequest(alt string) (*http.Response, error) {
  5081  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5082  	var body io.Reader = nil
  5083  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.domain)
  5084  	if err != nil {
  5085  		return nil, err
  5086  	}
  5087  	c.urlParams_.Set("alt", alt)
  5088  	c.urlParams_.Set("prettyPrint", "false")
  5089  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/domains")
  5090  	urls += "?" + c.urlParams_.Encode()
  5091  	req, err := http.NewRequest("POST", urls, body)
  5092  	if err != nil {
  5093  		return nil, err
  5094  	}
  5095  	req.Header = reqHeaders
  5096  	googleapi.Expand(req.URL, map[string]string{
  5097  		"parent": c.parent,
  5098  	})
  5099  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5100  }
  5101  
  5102  // Do executes the "firebasehosting.projects.sites.domains.create" call.
  5103  // Any non-2xx status code is an error. Response headers are in either
  5104  // *Domain.ServerResponse.Header or (if a response was returned at all) in
  5105  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5106  // whether the returned error was because http.StatusNotModified was returned.
  5107  func (c *ProjectsSitesDomainsCreateCall) Do(opts ...googleapi.CallOption) (*Domain, error) {
  5108  	gensupport.SetOptions(c.urlParams_, opts...)
  5109  	res, err := c.doRequest("json")
  5110  	if res != nil && res.StatusCode == http.StatusNotModified {
  5111  		if res.Body != nil {
  5112  			res.Body.Close()
  5113  		}
  5114  		return nil, gensupport.WrapError(&googleapi.Error{
  5115  			Code:   res.StatusCode,
  5116  			Header: res.Header,
  5117  		})
  5118  	}
  5119  	if err != nil {
  5120  		return nil, err
  5121  	}
  5122  	defer googleapi.CloseBody(res)
  5123  	if err := googleapi.CheckResponse(res); err != nil {
  5124  		return nil, gensupport.WrapError(err)
  5125  	}
  5126  	ret := &Domain{
  5127  		ServerResponse: googleapi.ServerResponse{
  5128  			Header:         res.Header,
  5129  			HTTPStatusCode: res.StatusCode,
  5130  		},
  5131  	}
  5132  	target := &ret
  5133  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5134  		return nil, err
  5135  	}
  5136  	return ret, nil
  5137  }
  5138  
  5139  type ProjectsSitesDomainsDeleteCall struct {
  5140  	s          *Service
  5141  	name       string
  5142  	urlParams_ gensupport.URLParams
  5143  	ctx_       context.Context
  5144  	header_    http.Header
  5145  }
  5146  
  5147  // Delete: Deletes the existing domain mapping on the specified site.
  5148  //
  5149  // - name: The name of the domain association to delete.
  5150  func (r *ProjectsSitesDomainsService) Delete(name string) *ProjectsSitesDomainsDeleteCall {
  5151  	c := &ProjectsSitesDomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5152  	c.name = name
  5153  	return c
  5154  }
  5155  
  5156  // Fields allows partial responses to be retrieved. See
  5157  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5158  // details.
  5159  func (c *ProjectsSitesDomainsDeleteCall) Fields(s ...googleapi.Field) *ProjectsSitesDomainsDeleteCall {
  5160  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5161  	return c
  5162  }
  5163  
  5164  // Context sets the context to be used in this call's Do method.
  5165  func (c *ProjectsSitesDomainsDeleteCall) Context(ctx context.Context) *ProjectsSitesDomainsDeleteCall {
  5166  	c.ctx_ = ctx
  5167  	return c
  5168  }
  5169  
  5170  // Header returns a http.Header that can be modified by the caller to add
  5171  // headers to the request.
  5172  func (c *ProjectsSitesDomainsDeleteCall) Header() http.Header {
  5173  	if c.header_ == nil {
  5174  		c.header_ = make(http.Header)
  5175  	}
  5176  	return c.header_
  5177  }
  5178  
  5179  func (c *ProjectsSitesDomainsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5180  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5181  	var body io.Reader = nil
  5182  	c.urlParams_.Set("alt", alt)
  5183  	c.urlParams_.Set("prettyPrint", "false")
  5184  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5185  	urls += "?" + c.urlParams_.Encode()
  5186  	req, err := http.NewRequest("DELETE", urls, body)
  5187  	if err != nil {
  5188  		return nil, err
  5189  	}
  5190  	req.Header = reqHeaders
  5191  	googleapi.Expand(req.URL, map[string]string{
  5192  		"name": c.name,
  5193  	})
  5194  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5195  }
  5196  
  5197  // Do executes the "firebasehosting.projects.sites.domains.delete" call.
  5198  // Any non-2xx status code is an error. Response headers are in either
  5199  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5200  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5201  // whether the returned error was because http.StatusNotModified was returned.
  5202  func (c *ProjectsSitesDomainsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5203  	gensupport.SetOptions(c.urlParams_, opts...)
  5204  	res, err := c.doRequest("json")
  5205  	if res != nil && res.StatusCode == http.StatusNotModified {
  5206  		if res.Body != nil {
  5207  			res.Body.Close()
  5208  		}
  5209  		return nil, gensupport.WrapError(&googleapi.Error{
  5210  			Code:   res.StatusCode,
  5211  			Header: res.Header,
  5212  		})
  5213  	}
  5214  	if err != nil {
  5215  		return nil, err
  5216  	}
  5217  	defer googleapi.CloseBody(res)
  5218  	if err := googleapi.CheckResponse(res); err != nil {
  5219  		return nil, gensupport.WrapError(err)
  5220  	}
  5221  	ret := &Empty{
  5222  		ServerResponse: googleapi.ServerResponse{
  5223  			Header:         res.Header,
  5224  			HTTPStatusCode: res.StatusCode,
  5225  		},
  5226  	}
  5227  	target := &ret
  5228  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5229  		return nil, err
  5230  	}
  5231  	return ret, nil
  5232  }
  5233  
  5234  type ProjectsSitesDomainsGetCall struct {
  5235  	s            *Service
  5236  	name         string
  5237  	urlParams_   gensupport.URLParams
  5238  	ifNoneMatch_ string
  5239  	ctx_         context.Context
  5240  	header_      http.Header
  5241  }
  5242  
  5243  // Get: Gets a domain mapping on the specified site.
  5244  //
  5245  // - name: The name of the domain configuration to get.
  5246  func (r *ProjectsSitesDomainsService) Get(name string) *ProjectsSitesDomainsGetCall {
  5247  	c := &ProjectsSitesDomainsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5248  	c.name = name
  5249  	return c
  5250  }
  5251  
  5252  // Fields allows partial responses to be retrieved. See
  5253  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5254  // details.
  5255  func (c *ProjectsSitesDomainsGetCall) Fields(s ...googleapi.Field) *ProjectsSitesDomainsGetCall {
  5256  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5257  	return c
  5258  }
  5259  
  5260  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5261  // object's ETag matches the given value. This is useful for getting updates
  5262  // only after the object has changed since the last request.
  5263  func (c *ProjectsSitesDomainsGetCall) IfNoneMatch(entityTag string) *ProjectsSitesDomainsGetCall {
  5264  	c.ifNoneMatch_ = entityTag
  5265  	return c
  5266  }
  5267  
  5268  // Context sets the context to be used in this call's Do method.
  5269  func (c *ProjectsSitesDomainsGetCall) Context(ctx context.Context) *ProjectsSitesDomainsGetCall {
  5270  	c.ctx_ = ctx
  5271  	return c
  5272  }
  5273  
  5274  // Header returns a http.Header that can be modified by the caller to add
  5275  // headers to the request.
  5276  func (c *ProjectsSitesDomainsGetCall) Header() http.Header {
  5277  	if c.header_ == nil {
  5278  		c.header_ = make(http.Header)
  5279  	}
  5280  	return c.header_
  5281  }
  5282  
  5283  func (c *ProjectsSitesDomainsGetCall) doRequest(alt string) (*http.Response, error) {
  5284  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5285  	if c.ifNoneMatch_ != "" {
  5286  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5287  	}
  5288  	var body io.Reader = nil
  5289  	c.urlParams_.Set("alt", alt)
  5290  	c.urlParams_.Set("prettyPrint", "false")
  5291  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5292  	urls += "?" + c.urlParams_.Encode()
  5293  	req, err := http.NewRequest("GET", urls, body)
  5294  	if err != nil {
  5295  		return nil, err
  5296  	}
  5297  	req.Header = reqHeaders
  5298  	googleapi.Expand(req.URL, map[string]string{
  5299  		"name": c.name,
  5300  	})
  5301  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5302  }
  5303  
  5304  // Do executes the "firebasehosting.projects.sites.domains.get" call.
  5305  // Any non-2xx status code is an error. Response headers are in either
  5306  // *Domain.ServerResponse.Header or (if a response was returned at all) in
  5307  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5308  // whether the returned error was because http.StatusNotModified was returned.
  5309  func (c *ProjectsSitesDomainsGetCall) Do(opts ...googleapi.CallOption) (*Domain, error) {
  5310  	gensupport.SetOptions(c.urlParams_, opts...)
  5311  	res, err := c.doRequest("json")
  5312  	if res != nil && res.StatusCode == http.StatusNotModified {
  5313  		if res.Body != nil {
  5314  			res.Body.Close()
  5315  		}
  5316  		return nil, gensupport.WrapError(&googleapi.Error{
  5317  			Code:   res.StatusCode,
  5318  			Header: res.Header,
  5319  		})
  5320  	}
  5321  	if err != nil {
  5322  		return nil, err
  5323  	}
  5324  	defer googleapi.CloseBody(res)
  5325  	if err := googleapi.CheckResponse(res); err != nil {
  5326  		return nil, gensupport.WrapError(err)
  5327  	}
  5328  	ret := &Domain{
  5329  		ServerResponse: googleapi.ServerResponse{
  5330  			Header:         res.Header,
  5331  			HTTPStatusCode: res.StatusCode,
  5332  		},
  5333  	}
  5334  	target := &ret
  5335  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5336  		return nil, err
  5337  	}
  5338  	return ret, nil
  5339  }
  5340  
  5341  type ProjectsSitesDomainsListCall struct {
  5342  	s            *Service
  5343  	parent       string
  5344  	urlParams_   gensupport.URLParams
  5345  	ifNoneMatch_ string
  5346  	ctx_         context.Context
  5347  	header_      http.Header
  5348  }
  5349  
  5350  // List: Lists the domains for the specified site.
  5351  //
  5352  //   - parent: The parent for which to list domains, in the format: sites/
  5353  //     site-name.
  5354  func (r *ProjectsSitesDomainsService) List(parent string) *ProjectsSitesDomainsListCall {
  5355  	c := &ProjectsSitesDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5356  	c.parent = parent
  5357  	return c
  5358  }
  5359  
  5360  // PageSize sets the optional parameter "pageSize": The page size to return.
  5361  // Defaults to 50.
  5362  func (c *ProjectsSitesDomainsListCall) PageSize(pageSize int64) *ProjectsSitesDomainsListCall {
  5363  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5364  	return c
  5365  }
  5366  
  5367  // PageToken sets the optional parameter "pageToken": The next_page_token from
  5368  // a previous request, if provided.
  5369  func (c *ProjectsSitesDomainsListCall) PageToken(pageToken string) *ProjectsSitesDomainsListCall {
  5370  	c.urlParams_.Set("pageToken", pageToken)
  5371  	return c
  5372  }
  5373  
  5374  // Fields allows partial responses to be retrieved. See
  5375  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5376  // details.
  5377  func (c *ProjectsSitesDomainsListCall) Fields(s ...googleapi.Field) *ProjectsSitesDomainsListCall {
  5378  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5379  	return c
  5380  }
  5381  
  5382  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5383  // object's ETag matches the given value. This is useful for getting updates
  5384  // only after the object has changed since the last request.
  5385  func (c *ProjectsSitesDomainsListCall) IfNoneMatch(entityTag string) *ProjectsSitesDomainsListCall {
  5386  	c.ifNoneMatch_ = entityTag
  5387  	return c
  5388  }
  5389  
  5390  // Context sets the context to be used in this call's Do method.
  5391  func (c *ProjectsSitesDomainsListCall) Context(ctx context.Context) *ProjectsSitesDomainsListCall {
  5392  	c.ctx_ = ctx
  5393  	return c
  5394  }
  5395  
  5396  // Header returns a http.Header that can be modified by the caller to add
  5397  // headers to the request.
  5398  func (c *ProjectsSitesDomainsListCall) Header() http.Header {
  5399  	if c.header_ == nil {
  5400  		c.header_ = make(http.Header)
  5401  	}
  5402  	return c.header_
  5403  }
  5404  
  5405  func (c *ProjectsSitesDomainsListCall) doRequest(alt string) (*http.Response, error) {
  5406  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5407  	if c.ifNoneMatch_ != "" {
  5408  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5409  	}
  5410  	var body io.Reader = nil
  5411  	c.urlParams_.Set("alt", alt)
  5412  	c.urlParams_.Set("prettyPrint", "false")
  5413  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/domains")
  5414  	urls += "?" + c.urlParams_.Encode()
  5415  	req, err := http.NewRequest("GET", urls, body)
  5416  	if err != nil {
  5417  		return nil, err
  5418  	}
  5419  	req.Header = reqHeaders
  5420  	googleapi.Expand(req.URL, map[string]string{
  5421  		"parent": c.parent,
  5422  	})
  5423  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5424  }
  5425  
  5426  // Do executes the "firebasehosting.projects.sites.domains.list" call.
  5427  // Any non-2xx status code is an error. Response headers are in either
  5428  // *ListDomainsResponse.ServerResponse.Header or (if a response was returned at
  5429  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5430  // check whether the returned error was because http.StatusNotModified was
  5431  // returned.
  5432  func (c *ProjectsSitesDomainsListCall) Do(opts ...googleapi.CallOption) (*ListDomainsResponse, error) {
  5433  	gensupport.SetOptions(c.urlParams_, opts...)
  5434  	res, err := c.doRequest("json")
  5435  	if res != nil && res.StatusCode == http.StatusNotModified {
  5436  		if res.Body != nil {
  5437  			res.Body.Close()
  5438  		}
  5439  		return nil, gensupport.WrapError(&googleapi.Error{
  5440  			Code:   res.StatusCode,
  5441  			Header: res.Header,
  5442  		})
  5443  	}
  5444  	if err != nil {
  5445  		return nil, err
  5446  	}
  5447  	defer googleapi.CloseBody(res)
  5448  	if err := googleapi.CheckResponse(res); err != nil {
  5449  		return nil, gensupport.WrapError(err)
  5450  	}
  5451  	ret := &ListDomainsResponse{
  5452  		ServerResponse: googleapi.ServerResponse{
  5453  			Header:         res.Header,
  5454  			HTTPStatusCode: res.StatusCode,
  5455  		},
  5456  	}
  5457  	target := &ret
  5458  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5459  		return nil, err
  5460  	}
  5461  	return ret, nil
  5462  }
  5463  
  5464  // Pages invokes f for each page of results.
  5465  // A non-nil error returned from f will halt the iteration.
  5466  // The provided context supersedes any context provided to the Context method.
  5467  func (c *ProjectsSitesDomainsListCall) Pages(ctx context.Context, f func(*ListDomainsResponse) error) error {
  5468  	c.ctx_ = ctx
  5469  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5470  	for {
  5471  		x, err := c.Do()
  5472  		if err != nil {
  5473  			return err
  5474  		}
  5475  		if err := f(x); err != nil {
  5476  			return err
  5477  		}
  5478  		if x.NextPageToken == "" {
  5479  			return nil
  5480  		}
  5481  		c.PageToken(x.NextPageToken)
  5482  	}
  5483  }
  5484  
  5485  type ProjectsSitesDomainsUpdateCall struct {
  5486  	s          *Service
  5487  	name       string
  5488  	domain     *Domain
  5489  	urlParams_ gensupport.URLParams
  5490  	ctx_       context.Context
  5491  	header_    http.Header
  5492  }
  5493  
  5494  // Update: Updates the specified domain mapping, creating the mapping as if it
  5495  // does not exist.
  5496  //
  5497  //   - name: The name of the domain association to update or create, if an
  5498  //     association doesn't already exist.
  5499  func (r *ProjectsSitesDomainsService) Update(name string, domain *Domain) *ProjectsSitesDomainsUpdateCall {
  5500  	c := &ProjectsSitesDomainsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5501  	c.name = name
  5502  	c.domain = domain
  5503  	return c
  5504  }
  5505  
  5506  // Fields allows partial responses to be retrieved. See
  5507  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5508  // details.
  5509  func (c *ProjectsSitesDomainsUpdateCall) Fields(s ...googleapi.Field) *ProjectsSitesDomainsUpdateCall {
  5510  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5511  	return c
  5512  }
  5513  
  5514  // Context sets the context to be used in this call's Do method.
  5515  func (c *ProjectsSitesDomainsUpdateCall) Context(ctx context.Context) *ProjectsSitesDomainsUpdateCall {
  5516  	c.ctx_ = ctx
  5517  	return c
  5518  }
  5519  
  5520  // Header returns a http.Header that can be modified by the caller to add
  5521  // headers to the request.
  5522  func (c *ProjectsSitesDomainsUpdateCall) Header() http.Header {
  5523  	if c.header_ == nil {
  5524  		c.header_ = make(http.Header)
  5525  	}
  5526  	return c.header_
  5527  }
  5528  
  5529  func (c *ProjectsSitesDomainsUpdateCall) doRequest(alt string) (*http.Response, error) {
  5530  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5531  	var body io.Reader = nil
  5532  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.domain)
  5533  	if err != nil {
  5534  		return nil, err
  5535  	}
  5536  	c.urlParams_.Set("alt", alt)
  5537  	c.urlParams_.Set("prettyPrint", "false")
  5538  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5539  	urls += "?" + c.urlParams_.Encode()
  5540  	req, err := http.NewRequest("PUT", urls, body)
  5541  	if err != nil {
  5542  		return nil, err
  5543  	}
  5544  	req.Header = reqHeaders
  5545  	googleapi.Expand(req.URL, map[string]string{
  5546  		"name": c.name,
  5547  	})
  5548  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5549  }
  5550  
  5551  // Do executes the "firebasehosting.projects.sites.domains.update" call.
  5552  // Any non-2xx status code is an error. Response headers are in either
  5553  // *Domain.ServerResponse.Header or (if a response was returned at all) in
  5554  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5555  // whether the returned error was because http.StatusNotModified was returned.
  5556  func (c *ProjectsSitesDomainsUpdateCall) Do(opts ...googleapi.CallOption) (*Domain, error) {
  5557  	gensupport.SetOptions(c.urlParams_, opts...)
  5558  	res, err := c.doRequest("json")
  5559  	if res != nil && res.StatusCode == http.StatusNotModified {
  5560  		if res.Body != nil {
  5561  			res.Body.Close()
  5562  		}
  5563  		return nil, gensupport.WrapError(&googleapi.Error{
  5564  			Code:   res.StatusCode,
  5565  			Header: res.Header,
  5566  		})
  5567  	}
  5568  	if err != nil {
  5569  		return nil, err
  5570  	}
  5571  	defer googleapi.CloseBody(res)
  5572  	if err := googleapi.CheckResponse(res); err != nil {
  5573  		return nil, gensupport.WrapError(err)
  5574  	}
  5575  	ret := &Domain{
  5576  		ServerResponse: googleapi.ServerResponse{
  5577  			Header:         res.Header,
  5578  			HTTPStatusCode: res.StatusCode,
  5579  		},
  5580  	}
  5581  	target := &ret
  5582  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5583  		return nil, err
  5584  	}
  5585  	return ret, nil
  5586  }
  5587  
  5588  type ProjectsSitesReleasesCreateCall struct {
  5589  	s          *Service
  5590  	parent     string
  5591  	release    *Release
  5592  	urlParams_ gensupport.URLParams
  5593  	ctx_       context.Context
  5594  	header_    http.Header
  5595  }
  5596  
  5597  // Create: Creates a new release, which makes the content of the specified
  5598  // version actively display on the appropriate URL(s).
  5599  //
  5600  //   - parent: The site or channel to which the release belongs, in either of the
  5601  //     following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID.
  5602  func (r *ProjectsSitesReleasesService) Create(parent string, release *Release) *ProjectsSitesReleasesCreateCall {
  5603  	c := &ProjectsSitesReleasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5604  	c.parent = parent
  5605  	c.release = release
  5606  	return c
  5607  }
  5608  
  5609  // VersionName sets the optional parameter "versionName": The unique identifier
  5610  // for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID
  5611  // in this version identifier must match the SITE_ID in the `parent` parameter.
  5612  // This query parameter must be empty if the `type` field in the request body
  5613  // is `SITE_DISABLE`.
  5614  func (c *ProjectsSitesReleasesCreateCall) VersionName(versionName string) *ProjectsSitesReleasesCreateCall {
  5615  	c.urlParams_.Set("versionName", versionName)
  5616  	return c
  5617  }
  5618  
  5619  // Fields allows partial responses to be retrieved. See
  5620  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5621  // details.
  5622  func (c *ProjectsSitesReleasesCreateCall) Fields(s ...googleapi.Field) *ProjectsSitesReleasesCreateCall {
  5623  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5624  	return c
  5625  }
  5626  
  5627  // Context sets the context to be used in this call's Do method.
  5628  func (c *ProjectsSitesReleasesCreateCall) Context(ctx context.Context) *ProjectsSitesReleasesCreateCall {
  5629  	c.ctx_ = ctx
  5630  	return c
  5631  }
  5632  
  5633  // Header returns a http.Header that can be modified by the caller to add
  5634  // headers to the request.
  5635  func (c *ProjectsSitesReleasesCreateCall) Header() http.Header {
  5636  	if c.header_ == nil {
  5637  		c.header_ = make(http.Header)
  5638  	}
  5639  	return c.header_
  5640  }
  5641  
  5642  func (c *ProjectsSitesReleasesCreateCall) doRequest(alt string) (*http.Response, error) {
  5643  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5644  	var body io.Reader = nil
  5645  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.release)
  5646  	if err != nil {
  5647  		return nil, err
  5648  	}
  5649  	c.urlParams_.Set("alt", alt)
  5650  	c.urlParams_.Set("prettyPrint", "false")
  5651  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/releases")
  5652  	urls += "?" + c.urlParams_.Encode()
  5653  	req, err := http.NewRequest("POST", urls, body)
  5654  	if err != nil {
  5655  		return nil, err
  5656  	}
  5657  	req.Header = reqHeaders
  5658  	googleapi.Expand(req.URL, map[string]string{
  5659  		"parent": c.parent,
  5660  	})
  5661  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5662  }
  5663  
  5664  // Do executes the "firebasehosting.projects.sites.releases.create" call.
  5665  // Any non-2xx status code is an error. Response headers are in either
  5666  // *Release.ServerResponse.Header or (if a response was returned at all) in
  5667  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5668  // whether the returned error was because http.StatusNotModified was returned.
  5669  func (c *ProjectsSitesReleasesCreateCall) Do(opts ...googleapi.CallOption) (*Release, error) {
  5670  	gensupport.SetOptions(c.urlParams_, opts...)
  5671  	res, err := c.doRequest("json")
  5672  	if res != nil && res.StatusCode == http.StatusNotModified {
  5673  		if res.Body != nil {
  5674  			res.Body.Close()
  5675  		}
  5676  		return nil, gensupport.WrapError(&googleapi.Error{
  5677  			Code:   res.StatusCode,
  5678  			Header: res.Header,
  5679  		})
  5680  	}
  5681  	if err != nil {
  5682  		return nil, err
  5683  	}
  5684  	defer googleapi.CloseBody(res)
  5685  	if err := googleapi.CheckResponse(res); err != nil {
  5686  		return nil, gensupport.WrapError(err)
  5687  	}
  5688  	ret := &Release{
  5689  		ServerResponse: googleapi.ServerResponse{
  5690  			Header:         res.Header,
  5691  			HTTPStatusCode: res.StatusCode,
  5692  		},
  5693  	}
  5694  	target := &ret
  5695  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5696  		return nil, err
  5697  	}
  5698  	return ret, nil
  5699  }
  5700  
  5701  type ProjectsSitesReleasesGetCall struct {
  5702  	s            *Service
  5703  	name         string
  5704  	urlParams_   gensupport.URLParams
  5705  	ifNoneMatch_ string
  5706  	ctx_         context.Context
  5707  	header_      http.Header
  5708  }
  5709  
  5710  // Get: Gets the specified release for a site or channel. When used to get a
  5711  // release for a site, this can get releases for both the default `live`
  5712  // channel and any active preview channels for the specified site.
  5713  //
  5714  //   - name: The fully-qualified resource name for the Hosting release, in either
  5715  //     of the following formats: -
  5716  //     sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID -
  5717  //     sites/SITE_ID/releases/RELEASE_ID.
  5718  func (r *ProjectsSitesReleasesService) Get(name string) *ProjectsSitesReleasesGetCall {
  5719  	c := &ProjectsSitesReleasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5720  	c.name = name
  5721  	return c
  5722  }
  5723  
  5724  // Fields allows partial responses to be retrieved. See
  5725  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5726  // details.
  5727  func (c *ProjectsSitesReleasesGetCall) Fields(s ...googleapi.Field) *ProjectsSitesReleasesGetCall {
  5728  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5729  	return c
  5730  }
  5731  
  5732  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5733  // object's ETag matches the given value. This is useful for getting updates
  5734  // only after the object has changed since the last request.
  5735  func (c *ProjectsSitesReleasesGetCall) IfNoneMatch(entityTag string) *ProjectsSitesReleasesGetCall {
  5736  	c.ifNoneMatch_ = entityTag
  5737  	return c
  5738  }
  5739  
  5740  // Context sets the context to be used in this call's Do method.
  5741  func (c *ProjectsSitesReleasesGetCall) Context(ctx context.Context) *ProjectsSitesReleasesGetCall {
  5742  	c.ctx_ = ctx
  5743  	return c
  5744  }
  5745  
  5746  // Header returns a http.Header that can be modified by the caller to add
  5747  // headers to the request.
  5748  func (c *ProjectsSitesReleasesGetCall) Header() http.Header {
  5749  	if c.header_ == nil {
  5750  		c.header_ = make(http.Header)
  5751  	}
  5752  	return c.header_
  5753  }
  5754  
  5755  func (c *ProjectsSitesReleasesGetCall) doRequest(alt string) (*http.Response, error) {
  5756  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5757  	if c.ifNoneMatch_ != "" {
  5758  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5759  	}
  5760  	var body io.Reader = nil
  5761  	c.urlParams_.Set("alt", alt)
  5762  	c.urlParams_.Set("prettyPrint", "false")
  5763  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5764  	urls += "?" + c.urlParams_.Encode()
  5765  	req, err := http.NewRequest("GET", urls, body)
  5766  	if err != nil {
  5767  		return nil, err
  5768  	}
  5769  	req.Header = reqHeaders
  5770  	googleapi.Expand(req.URL, map[string]string{
  5771  		"name": c.name,
  5772  	})
  5773  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5774  }
  5775  
  5776  // Do executes the "firebasehosting.projects.sites.releases.get" call.
  5777  // Any non-2xx status code is an error. Response headers are in either
  5778  // *Release.ServerResponse.Header or (if a response was returned at all) in
  5779  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5780  // whether the returned error was because http.StatusNotModified was returned.
  5781  func (c *ProjectsSitesReleasesGetCall) Do(opts ...googleapi.CallOption) (*Release, error) {
  5782  	gensupport.SetOptions(c.urlParams_, opts...)
  5783  	res, err := c.doRequest("json")
  5784  	if res != nil && res.StatusCode == http.StatusNotModified {
  5785  		if res.Body != nil {
  5786  			res.Body.Close()
  5787  		}
  5788  		return nil, gensupport.WrapError(&googleapi.Error{
  5789  			Code:   res.StatusCode,
  5790  			Header: res.Header,
  5791  		})
  5792  	}
  5793  	if err != nil {
  5794  		return nil, err
  5795  	}
  5796  	defer googleapi.CloseBody(res)
  5797  	if err := googleapi.CheckResponse(res); err != nil {
  5798  		return nil, gensupport.WrapError(err)
  5799  	}
  5800  	ret := &Release{
  5801  		ServerResponse: googleapi.ServerResponse{
  5802  			Header:         res.Header,
  5803  			HTTPStatusCode: res.StatusCode,
  5804  		},
  5805  	}
  5806  	target := &ret
  5807  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5808  		return nil, err
  5809  	}
  5810  	return ret, nil
  5811  }
  5812  
  5813  type ProjectsSitesReleasesListCall struct {
  5814  	s            *Service
  5815  	parent       string
  5816  	urlParams_   gensupport.URLParams
  5817  	ifNoneMatch_ string
  5818  	ctx_         context.Context
  5819  	header_      http.Header
  5820  }
  5821  
  5822  // List: Lists the releases that have been created for the specified site or
  5823  // channel. When used to list releases for a site, this list includes releases
  5824  // for both the default `live` channel and any active preview channels for the
  5825  // specified site.
  5826  //
  5827  //   - parent: The site or channel for which to list releases, in either of the
  5828  //     following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID.
  5829  func (r *ProjectsSitesReleasesService) List(parent string) *ProjectsSitesReleasesListCall {
  5830  	c := &ProjectsSitesReleasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5831  	c.parent = parent
  5832  	return c
  5833  }
  5834  
  5835  // PageSize sets the optional parameter "pageSize": The maximum number of
  5836  // releases to return. The service may return a lower number if fewer releases
  5837  // exist than this maximum number. If unspecified, defaults to 100.
  5838  func (c *ProjectsSitesReleasesListCall) PageSize(pageSize int64) *ProjectsSitesReleasesListCall {
  5839  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5840  	return c
  5841  }
  5842  
  5843  // PageToken sets the optional parameter "pageToken": A token from a previous
  5844  // call to `releases.list` or `channels.releases.list` that tells the server
  5845  // where to resume listing.
  5846  func (c *ProjectsSitesReleasesListCall) PageToken(pageToken string) *ProjectsSitesReleasesListCall {
  5847  	c.urlParams_.Set("pageToken", pageToken)
  5848  	return c
  5849  }
  5850  
  5851  // Fields allows partial responses to be retrieved. See
  5852  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5853  // details.
  5854  func (c *ProjectsSitesReleasesListCall) Fields(s ...googleapi.Field) *ProjectsSitesReleasesListCall {
  5855  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5856  	return c
  5857  }
  5858  
  5859  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5860  // object's ETag matches the given value. This is useful for getting updates
  5861  // only after the object has changed since the last request.
  5862  func (c *ProjectsSitesReleasesListCall) IfNoneMatch(entityTag string) *ProjectsSitesReleasesListCall {
  5863  	c.ifNoneMatch_ = entityTag
  5864  	return c
  5865  }
  5866  
  5867  // Context sets the context to be used in this call's Do method.
  5868  func (c *ProjectsSitesReleasesListCall) Context(ctx context.Context) *ProjectsSitesReleasesListCall {
  5869  	c.ctx_ = ctx
  5870  	return c
  5871  }
  5872  
  5873  // Header returns a http.Header that can be modified by the caller to add
  5874  // headers to the request.
  5875  func (c *ProjectsSitesReleasesListCall) Header() http.Header {
  5876  	if c.header_ == nil {
  5877  		c.header_ = make(http.Header)
  5878  	}
  5879  	return c.header_
  5880  }
  5881  
  5882  func (c *ProjectsSitesReleasesListCall) doRequest(alt string) (*http.Response, error) {
  5883  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5884  	if c.ifNoneMatch_ != "" {
  5885  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5886  	}
  5887  	var body io.Reader = nil
  5888  	c.urlParams_.Set("alt", alt)
  5889  	c.urlParams_.Set("prettyPrint", "false")
  5890  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/releases")
  5891  	urls += "?" + c.urlParams_.Encode()
  5892  	req, err := http.NewRequest("GET", urls, body)
  5893  	if err != nil {
  5894  		return nil, err
  5895  	}
  5896  	req.Header = reqHeaders
  5897  	googleapi.Expand(req.URL, map[string]string{
  5898  		"parent": c.parent,
  5899  	})
  5900  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5901  }
  5902  
  5903  // Do executes the "firebasehosting.projects.sites.releases.list" call.
  5904  // Any non-2xx status code is an error. Response headers are in either
  5905  // *ListReleasesResponse.ServerResponse.Header or (if a response was returned
  5906  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5907  // check whether the returned error was because http.StatusNotModified was
  5908  // returned.
  5909  func (c *ProjectsSitesReleasesListCall) Do(opts ...googleapi.CallOption) (*ListReleasesResponse, error) {
  5910  	gensupport.SetOptions(c.urlParams_, opts...)
  5911  	res, err := c.doRequest("json")
  5912  	if res != nil && res.StatusCode == http.StatusNotModified {
  5913  		if res.Body != nil {
  5914  			res.Body.Close()
  5915  		}
  5916  		return nil, gensupport.WrapError(&googleapi.Error{
  5917  			Code:   res.StatusCode,
  5918  			Header: res.Header,
  5919  		})
  5920  	}
  5921  	if err != nil {
  5922  		return nil, err
  5923  	}
  5924  	defer googleapi.CloseBody(res)
  5925  	if err := googleapi.CheckResponse(res); err != nil {
  5926  		return nil, gensupport.WrapError(err)
  5927  	}
  5928  	ret := &ListReleasesResponse{
  5929  		ServerResponse: googleapi.ServerResponse{
  5930  			Header:         res.Header,
  5931  			HTTPStatusCode: res.StatusCode,
  5932  		},
  5933  	}
  5934  	target := &ret
  5935  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5936  		return nil, err
  5937  	}
  5938  	return ret, nil
  5939  }
  5940  
  5941  // Pages invokes f for each page of results.
  5942  // A non-nil error returned from f will halt the iteration.
  5943  // The provided context supersedes any context provided to the Context method.
  5944  func (c *ProjectsSitesReleasesListCall) Pages(ctx context.Context, f func(*ListReleasesResponse) error) error {
  5945  	c.ctx_ = ctx
  5946  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5947  	for {
  5948  		x, err := c.Do()
  5949  		if err != nil {
  5950  			return err
  5951  		}
  5952  		if err := f(x); err != nil {
  5953  			return err
  5954  		}
  5955  		if x.NextPageToken == "" {
  5956  			return nil
  5957  		}
  5958  		c.PageToken(x.NextPageToken)
  5959  	}
  5960  }
  5961  
  5962  type ProjectsSitesVersionsCloneCall struct {
  5963  	s                   *Service
  5964  	parent              string
  5965  	cloneversionrequest *CloneVersionRequest
  5966  	urlParams_          gensupport.URLParams
  5967  	ctx_                context.Context
  5968  	header_             http.Header
  5969  }
  5970  
  5971  // Clone: Creates a new version on the specified target site using the content
  5972  // of the specified version.
  5973  //
  5974  //   - parent: The target site for the cloned version, in the format: sites/
  5975  //     SITE_ID.
  5976  func (r *ProjectsSitesVersionsService) Clone(parent string, cloneversionrequest *CloneVersionRequest) *ProjectsSitesVersionsCloneCall {
  5977  	c := &ProjectsSitesVersionsCloneCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5978  	c.parent = parent
  5979  	c.cloneversionrequest = cloneversionrequest
  5980  	return c
  5981  }
  5982  
  5983  // Fields allows partial responses to be retrieved. See
  5984  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5985  // details.
  5986  func (c *ProjectsSitesVersionsCloneCall) Fields(s ...googleapi.Field) *ProjectsSitesVersionsCloneCall {
  5987  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5988  	return c
  5989  }
  5990  
  5991  // Context sets the context to be used in this call's Do method.
  5992  func (c *ProjectsSitesVersionsCloneCall) Context(ctx context.Context) *ProjectsSitesVersionsCloneCall {
  5993  	c.ctx_ = ctx
  5994  	return c
  5995  }
  5996  
  5997  // Header returns a http.Header that can be modified by the caller to add
  5998  // headers to the request.
  5999  func (c *ProjectsSitesVersionsCloneCall) Header() http.Header {
  6000  	if c.header_ == nil {
  6001  		c.header_ = make(http.Header)
  6002  	}
  6003  	return c.header_
  6004  }
  6005  
  6006  func (c *ProjectsSitesVersionsCloneCall) doRequest(alt string) (*http.Response, error) {
  6007  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6008  	var body io.Reader = nil
  6009  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloneversionrequest)
  6010  	if err != nil {
  6011  		return nil, err
  6012  	}
  6013  	c.urlParams_.Set("alt", alt)
  6014  	c.urlParams_.Set("prettyPrint", "false")
  6015  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions:clone")
  6016  	urls += "?" + c.urlParams_.Encode()
  6017  	req, err := http.NewRequest("POST", urls, body)
  6018  	if err != nil {
  6019  		return nil, err
  6020  	}
  6021  	req.Header = reqHeaders
  6022  	googleapi.Expand(req.URL, map[string]string{
  6023  		"parent": c.parent,
  6024  	})
  6025  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6026  }
  6027  
  6028  // Do executes the "firebasehosting.projects.sites.versions.clone" call.
  6029  // Any non-2xx status code is an error. Response headers are in either
  6030  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6031  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6032  // whether the returned error was because http.StatusNotModified was returned.
  6033  func (c *ProjectsSitesVersionsCloneCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6034  	gensupport.SetOptions(c.urlParams_, opts...)
  6035  	res, err := c.doRequest("json")
  6036  	if res != nil && res.StatusCode == http.StatusNotModified {
  6037  		if res.Body != nil {
  6038  			res.Body.Close()
  6039  		}
  6040  		return nil, gensupport.WrapError(&googleapi.Error{
  6041  			Code:   res.StatusCode,
  6042  			Header: res.Header,
  6043  		})
  6044  	}
  6045  	if err != nil {
  6046  		return nil, err
  6047  	}
  6048  	defer googleapi.CloseBody(res)
  6049  	if err := googleapi.CheckResponse(res); err != nil {
  6050  		return nil, gensupport.WrapError(err)
  6051  	}
  6052  	ret := &Operation{
  6053  		ServerResponse: googleapi.ServerResponse{
  6054  			Header:         res.Header,
  6055  			HTTPStatusCode: res.StatusCode,
  6056  		},
  6057  	}
  6058  	target := &ret
  6059  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6060  		return nil, err
  6061  	}
  6062  	return ret, nil
  6063  }
  6064  
  6065  type ProjectsSitesVersionsCreateCall struct {
  6066  	s          *Service
  6067  	parent     string
  6068  	version    *Version
  6069  	urlParams_ gensupport.URLParams
  6070  	ctx_       context.Context
  6071  	header_    http.Header
  6072  }
  6073  
  6074  // Create: Creates a new version for the specified site.
  6075  //
  6076  //   - parent: The site in which to create the version, in the format: sites/
  6077  //     SITE_ID.
  6078  func (r *ProjectsSitesVersionsService) Create(parent string, version *Version) *ProjectsSitesVersionsCreateCall {
  6079  	c := &ProjectsSitesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6080  	c.parent = parent
  6081  	c.version = version
  6082  	return c
  6083  }
  6084  
  6085  // SizeBytes sets the optional parameter "sizeBytes": The self-reported size of
  6086  // the version. This value is used for a pre-emptive quota check for legacy
  6087  // version uploads.
  6088  func (c *ProjectsSitesVersionsCreateCall) SizeBytes(sizeBytes int64) *ProjectsSitesVersionsCreateCall {
  6089  	c.urlParams_.Set("sizeBytes", fmt.Sprint(sizeBytes))
  6090  	return c
  6091  }
  6092  
  6093  // VersionId sets the optional parameter "versionId": A unique id for the new
  6094  // version. This is was only specified for legacy version creations, and should
  6095  // be blank.
  6096  func (c *ProjectsSitesVersionsCreateCall) VersionId(versionId string) *ProjectsSitesVersionsCreateCall {
  6097  	c.urlParams_.Set("versionId", versionId)
  6098  	return c
  6099  }
  6100  
  6101  // Fields allows partial responses to be retrieved. See
  6102  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6103  // details.
  6104  func (c *ProjectsSitesVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsSitesVersionsCreateCall {
  6105  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6106  	return c
  6107  }
  6108  
  6109  // Context sets the context to be used in this call's Do method.
  6110  func (c *ProjectsSitesVersionsCreateCall) Context(ctx context.Context) *ProjectsSitesVersionsCreateCall {
  6111  	c.ctx_ = ctx
  6112  	return c
  6113  }
  6114  
  6115  // Header returns a http.Header that can be modified by the caller to add
  6116  // headers to the request.
  6117  func (c *ProjectsSitesVersionsCreateCall) Header() http.Header {
  6118  	if c.header_ == nil {
  6119  		c.header_ = make(http.Header)
  6120  	}
  6121  	return c.header_
  6122  }
  6123  
  6124  func (c *ProjectsSitesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  6125  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6126  	var body io.Reader = nil
  6127  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  6128  	if err != nil {
  6129  		return nil, err
  6130  	}
  6131  	c.urlParams_.Set("alt", alt)
  6132  	c.urlParams_.Set("prettyPrint", "false")
  6133  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions")
  6134  	urls += "?" + c.urlParams_.Encode()
  6135  	req, err := http.NewRequest("POST", urls, body)
  6136  	if err != nil {
  6137  		return nil, err
  6138  	}
  6139  	req.Header = reqHeaders
  6140  	googleapi.Expand(req.URL, map[string]string{
  6141  		"parent": c.parent,
  6142  	})
  6143  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6144  }
  6145  
  6146  // Do executes the "firebasehosting.projects.sites.versions.create" call.
  6147  // Any non-2xx status code is an error. Response headers are in either
  6148  // *Version.ServerResponse.Header or (if a response was returned at all) in
  6149  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6150  // whether the returned error was because http.StatusNotModified was returned.
  6151  func (c *ProjectsSitesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  6152  	gensupport.SetOptions(c.urlParams_, opts...)
  6153  	res, err := c.doRequest("json")
  6154  	if res != nil && res.StatusCode == http.StatusNotModified {
  6155  		if res.Body != nil {
  6156  			res.Body.Close()
  6157  		}
  6158  		return nil, gensupport.WrapError(&googleapi.Error{
  6159  			Code:   res.StatusCode,
  6160  			Header: res.Header,
  6161  		})
  6162  	}
  6163  	if err != nil {
  6164  		return nil, err
  6165  	}
  6166  	defer googleapi.CloseBody(res)
  6167  	if err := googleapi.CheckResponse(res); err != nil {
  6168  		return nil, gensupport.WrapError(err)
  6169  	}
  6170  	ret := &Version{
  6171  		ServerResponse: googleapi.ServerResponse{
  6172  			Header:         res.Header,
  6173  			HTTPStatusCode: res.StatusCode,
  6174  		},
  6175  	}
  6176  	target := &ret
  6177  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6178  		return nil, err
  6179  	}
  6180  	return ret, nil
  6181  }
  6182  
  6183  type ProjectsSitesVersionsDeleteCall struct {
  6184  	s          *Service
  6185  	name       string
  6186  	urlParams_ gensupport.URLParams
  6187  	ctx_       context.Context
  6188  	header_    http.Header
  6189  }
  6190  
  6191  // Delete: Deletes the specified version.
  6192  //
  6193  //   - name: The fully-qualified resource name for the version, in the format:
  6194  //     sites/SITE_ID/versions/VERSION_ID.
  6195  func (r *ProjectsSitesVersionsService) Delete(name string) *ProjectsSitesVersionsDeleteCall {
  6196  	c := &ProjectsSitesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6197  	c.name = name
  6198  	return c
  6199  }
  6200  
  6201  // Fields allows partial responses to be retrieved. See
  6202  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6203  // details.
  6204  func (c *ProjectsSitesVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsSitesVersionsDeleteCall {
  6205  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6206  	return c
  6207  }
  6208  
  6209  // Context sets the context to be used in this call's Do method.
  6210  func (c *ProjectsSitesVersionsDeleteCall) Context(ctx context.Context) *ProjectsSitesVersionsDeleteCall {
  6211  	c.ctx_ = ctx
  6212  	return c
  6213  }
  6214  
  6215  // Header returns a http.Header that can be modified by the caller to add
  6216  // headers to the request.
  6217  func (c *ProjectsSitesVersionsDeleteCall) Header() http.Header {
  6218  	if c.header_ == nil {
  6219  		c.header_ = make(http.Header)
  6220  	}
  6221  	return c.header_
  6222  }
  6223  
  6224  func (c *ProjectsSitesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6225  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6226  	var body io.Reader = nil
  6227  	c.urlParams_.Set("alt", alt)
  6228  	c.urlParams_.Set("prettyPrint", "false")
  6229  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  6230  	urls += "?" + c.urlParams_.Encode()
  6231  	req, err := http.NewRequest("DELETE", urls, body)
  6232  	if err != nil {
  6233  		return nil, err
  6234  	}
  6235  	req.Header = reqHeaders
  6236  	googleapi.Expand(req.URL, map[string]string{
  6237  		"name": c.name,
  6238  	})
  6239  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6240  }
  6241  
  6242  // Do executes the "firebasehosting.projects.sites.versions.delete" call.
  6243  // Any non-2xx status code is an error. Response headers are in either
  6244  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  6245  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6246  // whether the returned error was because http.StatusNotModified was returned.
  6247  func (c *ProjectsSitesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6248  	gensupport.SetOptions(c.urlParams_, opts...)
  6249  	res, err := c.doRequest("json")
  6250  	if res != nil && res.StatusCode == http.StatusNotModified {
  6251  		if res.Body != nil {
  6252  			res.Body.Close()
  6253  		}
  6254  		return nil, gensupport.WrapError(&googleapi.Error{
  6255  			Code:   res.StatusCode,
  6256  			Header: res.Header,
  6257  		})
  6258  	}
  6259  	if err != nil {
  6260  		return nil, err
  6261  	}
  6262  	defer googleapi.CloseBody(res)
  6263  	if err := googleapi.CheckResponse(res); err != nil {
  6264  		return nil, gensupport.WrapError(err)
  6265  	}
  6266  	ret := &Empty{
  6267  		ServerResponse: googleapi.ServerResponse{
  6268  			Header:         res.Header,
  6269  			HTTPStatusCode: res.StatusCode,
  6270  		},
  6271  	}
  6272  	target := &ret
  6273  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6274  		return nil, err
  6275  	}
  6276  	return ret, nil
  6277  }
  6278  
  6279  type ProjectsSitesVersionsGetCall struct {
  6280  	s            *Service
  6281  	name         string
  6282  	urlParams_   gensupport.URLParams
  6283  	ifNoneMatch_ string
  6284  	ctx_         context.Context
  6285  	header_      http.Header
  6286  }
  6287  
  6288  // Get: Get the specified version that has been created for the specified site.
  6289  // This can include versions that were created for the default `live` channel
  6290  // or for any active preview channels for the specified site.
  6291  //
  6292  //   - name: The fully-qualified resource name for the version, in the format:
  6293  //     sites/SITE_ID/versions/VERSION_ID.
  6294  func (r *ProjectsSitesVersionsService) Get(name string) *ProjectsSitesVersionsGetCall {
  6295  	c := &ProjectsSitesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6296  	c.name = name
  6297  	return c
  6298  }
  6299  
  6300  // Fields allows partial responses to be retrieved. See
  6301  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6302  // details.
  6303  func (c *ProjectsSitesVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsSitesVersionsGetCall {
  6304  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6305  	return c
  6306  }
  6307  
  6308  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6309  // object's ETag matches the given value. This is useful for getting updates
  6310  // only after the object has changed since the last request.
  6311  func (c *ProjectsSitesVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsSitesVersionsGetCall {
  6312  	c.ifNoneMatch_ = entityTag
  6313  	return c
  6314  }
  6315  
  6316  // Context sets the context to be used in this call's Do method.
  6317  func (c *ProjectsSitesVersionsGetCall) Context(ctx context.Context) *ProjectsSitesVersionsGetCall {
  6318  	c.ctx_ = ctx
  6319  	return c
  6320  }
  6321  
  6322  // Header returns a http.Header that can be modified by the caller to add
  6323  // headers to the request.
  6324  func (c *ProjectsSitesVersionsGetCall) Header() http.Header {
  6325  	if c.header_ == nil {
  6326  		c.header_ = make(http.Header)
  6327  	}
  6328  	return c.header_
  6329  }
  6330  
  6331  func (c *ProjectsSitesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  6332  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6333  	if c.ifNoneMatch_ != "" {
  6334  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6335  	}
  6336  	var body io.Reader = nil
  6337  	c.urlParams_.Set("alt", alt)
  6338  	c.urlParams_.Set("prettyPrint", "false")
  6339  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  6340  	urls += "?" + c.urlParams_.Encode()
  6341  	req, err := http.NewRequest("GET", urls, body)
  6342  	if err != nil {
  6343  		return nil, err
  6344  	}
  6345  	req.Header = reqHeaders
  6346  	googleapi.Expand(req.URL, map[string]string{
  6347  		"name": c.name,
  6348  	})
  6349  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6350  }
  6351  
  6352  // Do executes the "firebasehosting.projects.sites.versions.get" call.
  6353  // Any non-2xx status code is an error. Response headers are in either
  6354  // *Version.ServerResponse.Header or (if a response was returned at all) in
  6355  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6356  // whether the returned error was because http.StatusNotModified was returned.
  6357  func (c *ProjectsSitesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  6358  	gensupport.SetOptions(c.urlParams_, opts...)
  6359  	res, err := c.doRequest("json")
  6360  	if res != nil && res.StatusCode == http.StatusNotModified {
  6361  		if res.Body != nil {
  6362  			res.Body.Close()
  6363  		}
  6364  		return nil, gensupport.WrapError(&googleapi.Error{
  6365  			Code:   res.StatusCode,
  6366  			Header: res.Header,
  6367  		})
  6368  	}
  6369  	if err != nil {
  6370  		return nil, err
  6371  	}
  6372  	defer googleapi.CloseBody(res)
  6373  	if err := googleapi.CheckResponse(res); err != nil {
  6374  		return nil, gensupport.WrapError(err)
  6375  	}
  6376  	ret := &Version{
  6377  		ServerResponse: googleapi.ServerResponse{
  6378  			Header:         res.Header,
  6379  			HTTPStatusCode: res.StatusCode,
  6380  		},
  6381  	}
  6382  	target := &ret
  6383  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6384  		return nil, err
  6385  	}
  6386  	return ret, nil
  6387  }
  6388  
  6389  type ProjectsSitesVersionsListCall struct {
  6390  	s            *Service
  6391  	parent       string
  6392  	urlParams_   gensupport.URLParams
  6393  	ifNoneMatch_ string
  6394  	ctx_         context.Context
  6395  	header_      http.Header
  6396  }
  6397  
  6398  // List: Lists the versions that have been created for the specified site. This
  6399  // list includes versions for both the default `live` channel and any active
  6400  // preview channels for the specified site.
  6401  //
  6402  //   - parent: The site or channel for which to list versions, in either of the
  6403  //     following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID.
  6404  func (r *ProjectsSitesVersionsService) List(parent string) *ProjectsSitesVersionsListCall {
  6405  	c := &ProjectsSitesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6406  	c.parent = parent
  6407  	return c
  6408  }
  6409  
  6410  // Filter sets the optional parameter "filter": A filter string used to return
  6411  // a subset of versions in the response. The currently supported fields for
  6412  // filtering are: `name`, `status`, and `create_time`. Learn more about
  6413  // filtering in Google's AIP 160 standard (https://google.aip.dev/160).
  6414  func (c *ProjectsSitesVersionsListCall) Filter(filter string) *ProjectsSitesVersionsListCall {
  6415  	c.urlParams_.Set("filter", filter)
  6416  	return c
  6417  }
  6418  
  6419  // PageSize sets the optional parameter "pageSize": The maximum number of
  6420  // versions to return. The service may return a lower number if fewer versions
  6421  // exist than this maximum number. If unspecified, defaults to 25. The maximum
  6422  // value is 100; values above 100 will be coerced to 100.
  6423  func (c *ProjectsSitesVersionsListCall) PageSize(pageSize int64) *ProjectsSitesVersionsListCall {
  6424  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6425  	return c
  6426  }
  6427  
  6428  // PageToken sets the optional parameter "pageToken": A token from a previous
  6429  // call to `ListVersions` that tells the server where to resume listing.
  6430  func (c *ProjectsSitesVersionsListCall) PageToken(pageToken string) *ProjectsSitesVersionsListCall {
  6431  	c.urlParams_.Set("pageToken", pageToken)
  6432  	return c
  6433  }
  6434  
  6435  // Fields allows partial responses to be retrieved. See
  6436  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6437  // details.
  6438  func (c *ProjectsSitesVersionsListCall) Fields(s ...googleapi.Field) *ProjectsSitesVersionsListCall {
  6439  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6440  	return c
  6441  }
  6442  
  6443  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6444  // object's ETag matches the given value. This is useful for getting updates
  6445  // only after the object has changed since the last request.
  6446  func (c *ProjectsSitesVersionsListCall) IfNoneMatch(entityTag string) *ProjectsSitesVersionsListCall {
  6447  	c.ifNoneMatch_ = entityTag
  6448  	return c
  6449  }
  6450  
  6451  // Context sets the context to be used in this call's Do method.
  6452  func (c *ProjectsSitesVersionsListCall) Context(ctx context.Context) *ProjectsSitesVersionsListCall {
  6453  	c.ctx_ = ctx
  6454  	return c
  6455  }
  6456  
  6457  // Header returns a http.Header that can be modified by the caller to add
  6458  // headers to the request.
  6459  func (c *ProjectsSitesVersionsListCall) Header() http.Header {
  6460  	if c.header_ == nil {
  6461  		c.header_ = make(http.Header)
  6462  	}
  6463  	return c.header_
  6464  }
  6465  
  6466  func (c *ProjectsSitesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  6467  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6468  	if c.ifNoneMatch_ != "" {
  6469  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6470  	}
  6471  	var body io.Reader = nil
  6472  	c.urlParams_.Set("alt", alt)
  6473  	c.urlParams_.Set("prettyPrint", "false")
  6474  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions")
  6475  	urls += "?" + c.urlParams_.Encode()
  6476  	req, err := http.NewRequest("GET", urls, body)
  6477  	if err != nil {
  6478  		return nil, err
  6479  	}
  6480  	req.Header = reqHeaders
  6481  	googleapi.Expand(req.URL, map[string]string{
  6482  		"parent": c.parent,
  6483  	})
  6484  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6485  }
  6486  
  6487  // Do executes the "firebasehosting.projects.sites.versions.list" call.
  6488  // Any non-2xx status code is an error. Response headers are in either
  6489  // *ListVersionsResponse.ServerResponse.Header or (if a response was returned
  6490  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6491  // check whether the returned error was because http.StatusNotModified was
  6492  // returned.
  6493  func (c *ProjectsSitesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  6494  	gensupport.SetOptions(c.urlParams_, opts...)
  6495  	res, err := c.doRequest("json")
  6496  	if res != nil && res.StatusCode == http.StatusNotModified {
  6497  		if res.Body != nil {
  6498  			res.Body.Close()
  6499  		}
  6500  		return nil, gensupport.WrapError(&googleapi.Error{
  6501  			Code:   res.StatusCode,
  6502  			Header: res.Header,
  6503  		})
  6504  	}
  6505  	if err != nil {
  6506  		return nil, err
  6507  	}
  6508  	defer googleapi.CloseBody(res)
  6509  	if err := googleapi.CheckResponse(res); err != nil {
  6510  		return nil, gensupport.WrapError(err)
  6511  	}
  6512  	ret := &ListVersionsResponse{
  6513  		ServerResponse: googleapi.ServerResponse{
  6514  			Header:         res.Header,
  6515  			HTTPStatusCode: res.StatusCode,
  6516  		},
  6517  	}
  6518  	target := &ret
  6519  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6520  		return nil, err
  6521  	}
  6522  	return ret, nil
  6523  }
  6524  
  6525  // Pages invokes f for each page of results.
  6526  // A non-nil error returned from f will halt the iteration.
  6527  // The provided context supersedes any context provided to the Context method.
  6528  func (c *ProjectsSitesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  6529  	c.ctx_ = ctx
  6530  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6531  	for {
  6532  		x, err := c.Do()
  6533  		if err != nil {
  6534  			return err
  6535  		}
  6536  		if err := f(x); err != nil {
  6537  			return err
  6538  		}
  6539  		if x.NextPageToken == "" {
  6540  			return nil
  6541  		}
  6542  		c.PageToken(x.NextPageToken)
  6543  	}
  6544  }
  6545  
  6546  type ProjectsSitesVersionsPatchCall struct {
  6547  	s          *Service
  6548  	name       string
  6549  	version    *Version
  6550  	urlParams_ gensupport.URLParams
  6551  	ctx_       context.Context
  6552  	header_    http.Header
  6553  }
  6554  
  6555  // Patch:  Updates the specified metadata for the specified version. This
  6556  // method will fail with `FAILED_PRECONDITION` in the event of an invalid state
  6557  // transition. The supported state (../sites.versions#versionstatus)
  6558  // transitions for a version are from `CREATED` to `FINALIZED`. Use
  6559  // `DeleteVersion` (delete) to set the status of a version to `DELETED`.
  6560  //
  6561  //   - name: The fully-qualified resource name for the version, in the format:
  6562  //     sites/ SITE_ID/versions/VERSION_ID This name is provided in the response
  6563  //     body when you call `CreateVersion` (sites.versions/create).
  6564  func (r *ProjectsSitesVersionsService) Patch(name string, version *Version) *ProjectsSitesVersionsPatchCall {
  6565  	c := &ProjectsSitesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6566  	c.name = name
  6567  	c.version = version
  6568  	return c
  6569  }
  6570  
  6571  // UpdateMask sets the optional parameter "updateMask": A set of field names
  6572  // from your version (../sites.versions) that you want to update. A field will
  6573  // be overwritten if, and only if, it's in the mask. If a mask is not provided
  6574  // then a default mask of only `status`
  6575  // (../sites.versions#Version.FIELDS.status) will be used.
  6576  func (c *ProjectsSitesVersionsPatchCall) UpdateMask(updateMask string) *ProjectsSitesVersionsPatchCall {
  6577  	c.urlParams_.Set("updateMask", updateMask)
  6578  	return c
  6579  }
  6580  
  6581  // Fields allows partial responses to be retrieved. See
  6582  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6583  // details.
  6584  func (c *ProjectsSitesVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsSitesVersionsPatchCall {
  6585  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6586  	return c
  6587  }
  6588  
  6589  // Context sets the context to be used in this call's Do method.
  6590  func (c *ProjectsSitesVersionsPatchCall) Context(ctx context.Context) *ProjectsSitesVersionsPatchCall {
  6591  	c.ctx_ = ctx
  6592  	return c
  6593  }
  6594  
  6595  // Header returns a http.Header that can be modified by the caller to add
  6596  // headers to the request.
  6597  func (c *ProjectsSitesVersionsPatchCall) Header() http.Header {
  6598  	if c.header_ == nil {
  6599  		c.header_ = make(http.Header)
  6600  	}
  6601  	return c.header_
  6602  }
  6603  
  6604  func (c *ProjectsSitesVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
  6605  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6606  	var body io.Reader = nil
  6607  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  6608  	if err != nil {
  6609  		return nil, err
  6610  	}
  6611  	c.urlParams_.Set("alt", alt)
  6612  	c.urlParams_.Set("prettyPrint", "false")
  6613  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  6614  	urls += "?" + c.urlParams_.Encode()
  6615  	req, err := http.NewRequest("PATCH", urls, body)
  6616  	if err != nil {
  6617  		return nil, err
  6618  	}
  6619  	req.Header = reqHeaders
  6620  	googleapi.Expand(req.URL, map[string]string{
  6621  		"name": c.name,
  6622  	})
  6623  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6624  }
  6625  
  6626  // Do executes the "firebasehosting.projects.sites.versions.patch" call.
  6627  // Any non-2xx status code is an error. Response headers are in either
  6628  // *Version.ServerResponse.Header or (if a response was returned at all) in
  6629  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6630  // whether the returned error was because http.StatusNotModified was returned.
  6631  func (c *ProjectsSitesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  6632  	gensupport.SetOptions(c.urlParams_, opts...)
  6633  	res, err := c.doRequest("json")
  6634  	if res != nil && res.StatusCode == http.StatusNotModified {
  6635  		if res.Body != nil {
  6636  			res.Body.Close()
  6637  		}
  6638  		return nil, gensupport.WrapError(&googleapi.Error{
  6639  			Code:   res.StatusCode,
  6640  			Header: res.Header,
  6641  		})
  6642  	}
  6643  	if err != nil {
  6644  		return nil, err
  6645  	}
  6646  	defer googleapi.CloseBody(res)
  6647  	if err := googleapi.CheckResponse(res); err != nil {
  6648  		return nil, gensupport.WrapError(err)
  6649  	}
  6650  	ret := &Version{
  6651  		ServerResponse: googleapi.ServerResponse{
  6652  			Header:         res.Header,
  6653  			HTTPStatusCode: res.StatusCode,
  6654  		},
  6655  	}
  6656  	target := &ret
  6657  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6658  		return nil, err
  6659  	}
  6660  	return ret, nil
  6661  }
  6662  
  6663  type ProjectsSitesVersionsPopulateFilesCall struct {
  6664  	s                           *Service
  6665  	parent                      string
  6666  	populateversionfilesrequest *PopulateVersionFilesRequest
  6667  	urlParams_                  gensupport.URLParams
  6668  	ctx_                        context.Context
  6669  	header_                     http.Header
  6670  }
  6671  
  6672  // PopulateFiles:  Adds content files to the specified version. Each file must
  6673  // be under 2 GB.
  6674  //
  6675  //   - parent: The version to which to add files, in the format: sites/SITE_ID
  6676  //     /versions/VERSION_ID.
  6677  func (r *ProjectsSitesVersionsService) PopulateFiles(parent string, populateversionfilesrequest *PopulateVersionFilesRequest) *ProjectsSitesVersionsPopulateFilesCall {
  6678  	c := &ProjectsSitesVersionsPopulateFilesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6679  	c.parent = parent
  6680  	c.populateversionfilesrequest = populateversionfilesrequest
  6681  	return c
  6682  }
  6683  
  6684  // Fields allows partial responses to be retrieved. See
  6685  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6686  // details.
  6687  func (c *ProjectsSitesVersionsPopulateFilesCall) Fields(s ...googleapi.Field) *ProjectsSitesVersionsPopulateFilesCall {
  6688  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6689  	return c
  6690  }
  6691  
  6692  // Context sets the context to be used in this call's Do method.
  6693  func (c *ProjectsSitesVersionsPopulateFilesCall) Context(ctx context.Context) *ProjectsSitesVersionsPopulateFilesCall {
  6694  	c.ctx_ = ctx
  6695  	return c
  6696  }
  6697  
  6698  // Header returns a http.Header that can be modified by the caller to add
  6699  // headers to the request.
  6700  func (c *ProjectsSitesVersionsPopulateFilesCall) Header() http.Header {
  6701  	if c.header_ == nil {
  6702  		c.header_ = make(http.Header)
  6703  	}
  6704  	return c.header_
  6705  }
  6706  
  6707  func (c *ProjectsSitesVersionsPopulateFilesCall) doRequest(alt string) (*http.Response, error) {
  6708  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6709  	var body io.Reader = nil
  6710  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.populateversionfilesrequest)
  6711  	if err != nil {
  6712  		return nil, err
  6713  	}
  6714  	c.urlParams_.Set("alt", alt)
  6715  	c.urlParams_.Set("prettyPrint", "false")
  6716  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}:populateFiles")
  6717  	urls += "?" + c.urlParams_.Encode()
  6718  	req, err := http.NewRequest("POST", urls, body)
  6719  	if err != nil {
  6720  		return nil, err
  6721  	}
  6722  	req.Header = reqHeaders
  6723  	googleapi.Expand(req.URL, map[string]string{
  6724  		"parent": c.parent,
  6725  	})
  6726  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6727  }
  6728  
  6729  // Do executes the "firebasehosting.projects.sites.versions.populateFiles" call.
  6730  // Any non-2xx status code is an error. Response headers are in either
  6731  // *PopulateVersionFilesResponse.ServerResponse.Header or (if a response was
  6732  // returned at all) in error.(*googleapi.Error).Header. Use
  6733  // googleapi.IsNotModified to check whether the returned error was because
  6734  // http.StatusNotModified was returned.
  6735  func (c *ProjectsSitesVersionsPopulateFilesCall) Do(opts ...googleapi.CallOption) (*PopulateVersionFilesResponse, error) {
  6736  	gensupport.SetOptions(c.urlParams_, opts...)
  6737  	res, err := c.doRequest("json")
  6738  	if res != nil && res.StatusCode == http.StatusNotModified {
  6739  		if res.Body != nil {
  6740  			res.Body.Close()
  6741  		}
  6742  		return nil, gensupport.WrapError(&googleapi.Error{
  6743  			Code:   res.StatusCode,
  6744  			Header: res.Header,
  6745  		})
  6746  	}
  6747  	if err != nil {
  6748  		return nil, err
  6749  	}
  6750  	defer googleapi.CloseBody(res)
  6751  	if err := googleapi.CheckResponse(res); err != nil {
  6752  		return nil, gensupport.WrapError(err)
  6753  	}
  6754  	ret := &PopulateVersionFilesResponse{
  6755  		ServerResponse: googleapi.ServerResponse{
  6756  			Header:         res.Header,
  6757  			HTTPStatusCode: res.StatusCode,
  6758  		},
  6759  	}
  6760  	target := &ret
  6761  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6762  		return nil, err
  6763  	}
  6764  	return ret, nil
  6765  }
  6766  
  6767  type ProjectsSitesVersionsFilesListCall struct {
  6768  	s            *Service
  6769  	parent       string
  6770  	urlParams_   gensupport.URLParams
  6771  	ifNoneMatch_ string
  6772  	ctx_         context.Context
  6773  	header_      http.Header
  6774  }
  6775  
  6776  // List: Lists the remaining files to be uploaded for the specified version.
  6777  //
  6778  //   - parent: The version for which to list files, in the format: sites/SITE_ID
  6779  //     /versions/VERSION_ID.
  6780  func (r *ProjectsSitesVersionsFilesService) List(parent string) *ProjectsSitesVersionsFilesListCall {
  6781  	c := &ProjectsSitesVersionsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6782  	c.parent = parent
  6783  	return c
  6784  }
  6785  
  6786  // PageSize sets the optional parameter "pageSize": The maximum number of
  6787  // version files to return. The service may return a lower number if fewer
  6788  // version files exist than this maximum number. If unspecified, defaults to
  6789  // 1000.
  6790  func (c *ProjectsSitesVersionsFilesListCall) PageSize(pageSize int64) *ProjectsSitesVersionsFilesListCall {
  6791  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6792  	return c
  6793  }
  6794  
  6795  // PageToken sets the optional parameter "pageToken": A token from a previous
  6796  // call to `ListVersionFiles` that tells the server where to resume listing.
  6797  func (c *ProjectsSitesVersionsFilesListCall) PageToken(pageToken string) *ProjectsSitesVersionsFilesListCall {
  6798  	c.urlParams_.Set("pageToken", pageToken)
  6799  	return c
  6800  }
  6801  
  6802  // Status sets the optional parameter "status": The type of files that should
  6803  // be listed for the specified version.
  6804  //
  6805  // Possible values:
  6806  //
  6807  //	"STATUS_UNSPECIFIED" - The default status; should not be intentionally
  6808  //
  6809  // used.
  6810  //
  6811  //	"EXPECTED" - The file has been included in the version and is expected to
  6812  //
  6813  // be uploaded in the near future.
  6814  //
  6815  //	"ACTIVE" - The file has already been uploaded to Firebase Hosting.
  6816  func (c *ProjectsSitesVersionsFilesListCall) Status(status string) *ProjectsSitesVersionsFilesListCall {
  6817  	c.urlParams_.Set("status", status)
  6818  	return c
  6819  }
  6820  
  6821  // Fields allows partial responses to be retrieved. See
  6822  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6823  // details.
  6824  func (c *ProjectsSitesVersionsFilesListCall) Fields(s ...googleapi.Field) *ProjectsSitesVersionsFilesListCall {
  6825  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6826  	return c
  6827  }
  6828  
  6829  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6830  // object's ETag matches the given value. This is useful for getting updates
  6831  // only after the object has changed since the last request.
  6832  func (c *ProjectsSitesVersionsFilesListCall) IfNoneMatch(entityTag string) *ProjectsSitesVersionsFilesListCall {
  6833  	c.ifNoneMatch_ = entityTag
  6834  	return c
  6835  }
  6836  
  6837  // Context sets the context to be used in this call's Do method.
  6838  func (c *ProjectsSitesVersionsFilesListCall) Context(ctx context.Context) *ProjectsSitesVersionsFilesListCall {
  6839  	c.ctx_ = ctx
  6840  	return c
  6841  }
  6842  
  6843  // Header returns a http.Header that can be modified by the caller to add
  6844  // headers to the request.
  6845  func (c *ProjectsSitesVersionsFilesListCall) Header() http.Header {
  6846  	if c.header_ == nil {
  6847  		c.header_ = make(http.Header)
  6848  	}
  6849  	return c.header_
  6850  }
  6851  
  6852  func (c *ProjectsSitesVersionsFilesListCall) doRequest(alt string) (*http.Response, error) {
  6853  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6854  	if c.ifNoneMatch_ != "" {
  6855  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6856  	}
  6857  	var body io.Reader = nil
  6858  	c.urlParams_.Set("alt", alt)
  6859  	c.urlParams_.Set("prettyPrint", "false")
  6860  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/files")
  6861  	urls += "?" + c.urlParams_.Encode()
  6862  	req, err := http.NewRequest("GET", urls, body)
  6863  	if err != nil {
  6864  		return nil, err
  6865  	}
  6866  	req.Header = reqHeaders
  6867  	googleapi.Expand(req.URL, map[string]string{
  6868  		"parent": c.parent,
  6869  	})
  6870  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6871  }
  6872  
  6873  // Do executes the "firebasehosting.projects.sites.versions.files.list" call.
  6874  // Any non-2xx status code is an error. Response headers are in either
  6875  // *ListVersionFilesResponse.ServerResponse.Header or (if a response was
  6876  // returned at all) in error.(*googleapi.Error).Header. Use
  6877  // googleapi.IsNotModified to check whether the returned error was because
  6878  // http.StatusNotModified was returned.
  6879  func (c *ProjectsSitesVersionsFilesListCall) Do(opts ...googleapi.CallOption) (*ListVersionFilesResponse, error) {
  6880  	gensupport.SetOptions(c.urlParams_, opts...)
  6881  	res, err := c.doRequest("json")
  6882  	if res != nil && res.StatusCode == http.StatusNotModified {
  6883  		if res.Body != nil {
  6884  			res.Body.Close()
  6885  		}
  6886  		return nil, gensupport.WrapError(&googleapi.Error{
  6887  			Code:   res.StatusCode,
  6888  			Header: res.Header,
  6889  		})
  6890  	}
  6891  	if err != nil {
  6892  		return nil, err
  6893  	}
  6894  	defer googleapi.CloseBody(res)
  6895  	if err := googleapi.CheckResponse(res); err != nil {
  6896  		return nil, gensupport.WrapError(err)
  6897  	}
  6898  	ret := &ListVersionFilesResponse{
  6899  		ServerResponse: googleapi.ServerResponse{
  6900  			Header:         res.Header,
  6901  			HTTPStatusCode: res.StatusCode,
  6902  		},
  6903  	}
  6904  	target := &ret
  6905  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6906  		return nil, err
  6907  	}
  6908  	return ret, nil
  6909  }
  6910  
  6911  // Pages invokes f for each page of results.
  6912  // A non-nil error returned from f will halt the iteration.
  6913  // The provided context supersedes any context provided to the Context method.
  6914  func (c *ProjectsSitesVersionsFilesListCall) Pages(ctx context.Context, f func(*ListVersionFilesResponse) error) error {
  6915  	c.ctx_ = ctx
  6916  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6917  	for {
  6918  		x, err := c.Do()
  6919  		if err != nil {
  6920  			return err
  6921  		}
  6922  		if err := f(x); err != nil {
  6923  			return err
  6924  		}
  6925  		if x.NextPageToken == "" {
  6926  			return nil
  6927  		}
  6928  		c.PageToken(x.NextPageToken)
  6929  	}
  6930  }
  6931  
  6932  type SitesGetConfigCall struct {
  6933  	s            *Service
  6934  	name         string
  6935  	urlParams_   gensupport.URLParams
  6936  	ifNoneMatch_ string
  6937  	ctx_         context.Context
  6938  	header_      http.Header
  6939  }
  6940  
  6941  // GetConfig: Gets the Hosting metadata for a specific site.
  6942  //
  6943  //   - name: The site for which to get the SiteConfig, in the format: sites/
  6944  //     site-name/config.
  6945  func (r *SitesService) GetConfig(name string) *SitesGetConfigCall {
  6946  	c := &SitesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6947  	c.name = name
  6948  	return c
  6949  }
  6950  
  6951  // Fields allows partial responses to be retrieved. See
  6952  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6953  // details.
  6954  func (c *SitesGetConfigCall) Fields(s ...googleapi.Field) *SitesGetConfigCall {
  6955  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6956  	return c
  6957  }
  6958  
  6959  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6960  // object's ETag matches the given value. This is useful for getting updates
  6961  // only after the object has changed since the last request.
  6962  func (c *SitesGetConfigCall) IfNoneMatch(entityTag string) *SitesGetConfigCall {
  6963  	c.ifNoneMatch_ = entityTag
  6964  	return c
  6965  }
  6966  
  6967  // Context sets the context to be used in this call's Do method.
  6968  func (c *SitesGetConfigCall) Context(ctx context.Context) *SitesGetConfigCall {
  6969  	c.ctx_ = ctx
  6970  	return c
  6971  }
  6972  
  6973  // Header returns a http.Header that can be modified by the caller to add
  6974  // headers to the request.
  6975  func (c *SitesGetConfigCall) Header() http.Header {
  6976  	if c.header_ == nil {
  6977  		c.header_ = make(http.Header)
  6978  	}
  6979  	return c.header_
  6980  }
  6981  
  6982  func (c *SitesGetConfigCall) doRequest(alt string) (*http.Response, error) {
  6983  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6984  	if c.ifNoneMatch_ != "" {
  6985  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6986  	}
  6987  	var body io.Reader = nil
  6988  	c.urlParams_.Set("alt", alt)
  6989  	c.urlParams_.Set("prettyPrint", "false")
  6990  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  6991  	urls += "?" + c.urlParams_.Encode()
  6992  	req, err := http.NewRequest("GET", urls, body)
  6993  	if err != nil {
  6994  		return nil, err
  6995  	}
  6996  	req.Header = reqHeaders
  6997  	googleapi.Expand(req.URL, map[string]string{
  6998  		"name": c.name,
  6999  	})
  7000  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7001  }
  7002  
  7003  // Do executes the "firebasehosting.sites.getConfig" call.
  7004  // Any non-2xx status code is an error. Response headers are in either
  7005  // *SiteConfig.ServerResponse.Header or (if a response was returned at all) in
  7006  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7007  // whether the returned error was because http.StatusNotModified was returned.
  7008  func (c *SitesGetConfigCall) Do(opts ...googleapi.CallOption) (*SiteConfig, error) {
  7009  	gensupport.SetOptions(c.urlParams_, opts...)
  7010  	res, err := c.doRequest("json")
  7011  	if res != nil && res.StatusCode == http.StatusNotModified {
  7012  		if res.Body != nil {
  7013  			res.Body.Close()
  7014  		}
  7015  		return nil, gensupport.WrapError(&googleapi.Error{
  7016  			Code:   res.StatusCode,
  7017  			Header: res.Header,
  7018  		})
  7019  	}
  7020  	if err != nil {
  7021  		return nil, err
  7022  	}
  7023  	defer googleapi.CloseBody(res)
  7024  	if err := googleapi.CheckResponse(res); err != nil {
  7025  		return nil, gensupport.WrapError(err)
  7026  	}
  7027  	ret := &SiteConfig{
  7028  		ServerResponse: googleapi.ServerResponse{
  7029  			Header:         res.Header,
  7030  			HTTPStatusCode: res.StatusCode,
  7031  		},
  7032  	}
  7033  	target := &ret
  7034  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7035  		return nil, err
  7036  	}
  7037  	return ret, nil
  7038  }
  7039  
  7040  type SitesUpdateConfigCall struct {
  7041  	s          *Service
  7042  	name       string
  7043  	siteconfig *SiteConfig
  7044  	urlParams_ gensupport.URLParams
  7045  	ctx_       context.Context
  7046  	header_    http.Header
  7047  }
  7048  
  7049  // UpdateConfig: Sets the Hosting metadata for a specific site.
  7050  //
  7051  //   - name: The site for which to update the SiteConfig, in the format: sites/
  7052  //     site-name/config.
  7053  func (r *SitesService) UpdateConfig(name string, siteconfig *SiteConfig) *SitesUpdateConfigCall {
  7054  	c := &SitesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7055  	c.name = name
  7056  	c.siteconfig = siteconfig
  7057  	return c
  7058  }
  7059  
  7060  // UpdateMask sets the optional parameter "updateMask": A set of field names
  7061  // from your site configuration (../sites.SiteConfig) that you want to update.
  7062  // A field will be overwritten if, and only if, it's in the mask. If a mask is
  7063  // not provided then a default mask of only `max_versions`
  7064  // (../sites.SiteConfig.max_versions) will be used.
  7065  func (c *SitesUpdateConfigCall) UpdateMask(updateMask string) *SitesUpdateConfigCall {
  7066  	c.urlParams_.Set("updateMask", updateMask)
  7067  	return c
  7068  }
  7069  
  7070  // Fields allows partial responses to be retrieved. See
  7071  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7072  // details.
  7073  func (c *SitesUpdateConfigCall) Fields(s ...googleapi.Field) *SitesUpdateConfigCall {
  7074  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7075  	return c
  7076  }
  7077  
  7078  // Context sets the context to be used in this call's Do method.
  7079  func (c *SitesUpdateConfigCall) Context(ctx context.Context) *SitesUpdateConfigCall {
  7080  	c.ctx_ = ctx
  7081  	return c
  7082  }
  7083  
  7084  // Header returns a http.Header that can be modified by the caller to add
  7085  // headers to the request.
  7086  func (c *SitesUpdateConfigCall) Header() http.Header {
  7087  	if c.header_ == nil {
  7088  		c.header_ = make(http.Header)
  7089  	}
  7090  	return c.header_
  7091  }
  7092  
  7093  func (c *SitesUpdateConfigCall) doRequest(alt string) (*http.Response, error) {
  7094  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7095  	var body io.Reader = nil
  7096  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteconfig)
  7097  	if err != nil {
  7098  		return nil, err
  7099  	}
  7100  	c.urlParams_.Set("alt", alt)
  7101  	c.urlParams_.Set("prettyPrint", "false")
  7102  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  7103  	urls += "?" + c.urlParams_.Encode()
  7104  	req, err := http.NewRequest("PATCH", urls, body)
  7105  	if err != nil {
  7106  		return nil, err
  7107  	}
  7108  	req.Header = reqHeaders
  7109  	googleapi.Expand(req.URL, map[string]string{
  7110  		"name": c.name,
  7111  	})
  7112  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7113  }
  7114  
  7115  // Do executes the "firebasehosting.sites.updateConfig" call.
  7116  // Any non-2xx status code is an error. Response headers are in either
  7117  // *SiteConfig.ServerResponse.Header or (if a response was returned at all) in
  7118  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7119  // whether the returned error was because http.StatusNotModified was returned.
  7120  func (c *SitesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*SiteConfig, error) {
  7121  	gensupport.SetOptions(c.urlParams_, opts...)
  7122  	res, err := c.doRequest("json")
  7123  	if res != nil && res.StatusCode == http.StatusNotModified {
  7124  		if res.Body != nil {
  7125  			res.Body.Close()
  7126  		}
  7127  		return nil, gensupport.WrapError(&googleapi.Error{
  7128  			Code:   res.StatusCode,
  7129  			Header: res.Header,
  7130  		})
  7131  	}
  7132  	if err != nil {
  7133  		return nil, err
  7134  	}
  7135  	defer googleapi.CloseBody(res)
  7136  	if err := googleapi.CheckResponse(res); err != nil {
  7137  		return nil, gensupport.WrapError(err)
  7138  	}
  7139  	ret := &SiteConfig{
  7140  		ServerResponse: googleapi.ServerResponse{
  7141  			Header:         res.Header,
  7142  			HTTPStatusCode: res.StatusCode,
  7143  		},
  7144  	}
  7145  	target := &ret
  7146  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7147  		return nil, err
  7148  	}
  7149  	return ret, nil
  7150  }
  7151  
  7152  type SitesChannelsCreateCall struct {
  7153  	s          *Service
  7154  	parent     string
  7155  	channel    *Channel
  7156  	urlParams_ gensupport.URLParams
  7157  	ctx_       context.Context
  7158  	header_    http.Header
  7159  }
  7160  
  7161  // Create: Creates a new channel in the specified site.
  7162  //
  7163  //   - parent: The site in which to create this channel, in the format: sites/
  7164  //     SITE_ID.
  7165  func (r *SitesChannelsService) Create(parent string, channel *Channel) *SitesChannelsCreateCall {
  7166  	c := &SitesChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7167  	c.parent = parent
  7168  	c.channel = channel
  7169  	return c
  7170  }
  7171  
  7172  // ChannelId sets the optional parameter "channelId": Required. Immutable. A
  7173  // unique ID within the site that identifies the channel.
  7174  func (c *SitesChannelsCreateCall) ChannelId(channelId string) *SitesChannelsCreateCall {
  7175  	c.urlParams_.Set("channelId", channelId)
  7176  	return c
  7177  }
  7178  
  7179  // Fields allows partial responses to be retrieved. See
  7180  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7181  // details.
  7182  func (c *SitesChannelsCreateCall) Fields(s ...googleapi.Field) *SitesChannelsCreateCall {
  7183  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7184  	return c
  7185  }
  7186  
  7187  // Context sets the context to be used in this call's Do method.
  7188  func (c *SitesChannelsCreateCall) Context(ctx context.Context) *SitesChannelsCreateCall {
  7189  	c.ctx_ = ctx
  7190  	return c
  7191  }
  7192  
  7193  // Header returns a http.Header that can be modified by the caller to add
  7194  // headers to the request.
  7195  func (c *SitesChannelsCreateCall) Header() http.Header {
  7196  	if c.header_ == nil {
  7197  		c.header_ = make(http.Header)
  7198  	}
  7199  	return c.header_
  7200  }
  7201  
  7202  func (c *SitesChannelsCreateCall) doRequest(alt string) (*http.Response, error) {
  7203  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7204  	var body io.Reader = nil
  7205  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
  7206  	if err != nil {
  7207  		return nil, err
  7208  	}
  7209  	c.urlParams_.Set("alt", alt)
  7210  	c.urlParams_.Set("prettyPrint", "false")
  7211  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/channels")
  7212  	urls += "?" + c.urlParams_.Encode()
  7213  	req, err := http.NewRequest("POST", urls, body)
  7214  	if err != nil {
  7215  		return nil, err
  7216  	}
  7217  	req.Header = reqHeaders
  7218  	googleapi.Expand(req.URL, map[string]string{
  7219  		"parent": c.parent,
  7220  	})
  7221  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7222  }
  7223  
  7224  // Do executes the "firebasehosting.sites.channels.create" call.
  7225  // Any non-2xx status code is an error. Response headers are in either
  7226  // *Channel.ServerResponse.Header or (if a response was returned at all) in
  7227  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7228  // whether the returned error was because http.StatusNotModified was returned.
  7229  func (c *SitesChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
  7230  	gensupport.SetOptions(c.urlParams_, opts...)
  7231  	res, err := c.doRequest("json")
  7232  	if res != nil && res.StatusCode == http.StatusNotModified {
  7233  		if res.Body != nil {
  7234  			res.Body.Close()
  7235  		}
  7236  		return nil, gensupport.WrapError(&googleapi.Error{
  7237  			Code:   res.StatusCode,
  7238  			Header: res.Header,
  7239  		})
  7240  	}
  7241  	if err != nil {
  7242  		return nil, err
  7243  	}
  7244  	defer googleapi.CloseBody(res)
  7245  	if err := googleapi.CheckResponse(res); err != nil {
  7246  		return nil, gensupport.WrapError(err)
  7247  	}
  7248  	ret := &Channel{
  7249  		ServerResponse: googleapi.ServerResponse{
  7250  			Header:         res.Header,
  7251  			HTTPStatusCode: res.StatusCode,
  7252  		},
  7253  	}
  7254  	target := &ret
  7255  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7256  		return nil, err
  7257  	}
  7258  	return ret, nil
  7259  }
  7260  
  7261  type SitesChannelsDeleteCall struct {
  7262  	s          *Service
  7263  	name       string
  7264  	urlParams_ gensupport.URLParams
  7265  	ctx_       context.Context
  7266  	header_    http.Header
  7267  }
  7268  
  7269  // Delete: Deletes the specified channel of the specified site. The `live`
  7270  // channel cannot be deleted.
  7271  //
  7272  //   - name: The fully-qualified resource name for the channel, in the format:
  7273  //     sites/SITE_ID/channels/CHANNEL_ID.
  7274  func (r *SitesChannelsService) Delete(name string) *SitesChannelsDeleteCall {
  7275  	c := &SitesChannelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7276  	c.name = name
  7277  	return c
  7278  }
  7279  
  7280  // Fields allows partial responses to be retrieved. See
  7281  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7282  // details.
  7283  func (c *SitesChannelsDeleteCall) Fields(s ...googleapi.Field) *SitesChannelsDeleteCall {
  7284  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7285  	return c
  7286  }
  7287  
  7288  // Context sets the context to be used in this call's Do method.
  7289  func (c *SitesChannelsDeleteCall) Context(ctx context.Context) *SitesChannelsDeleteCall {
  7290  	c.ctx_ = ctx
  7291  	return c
  7292  }
  7293  
  7294  // Header returns a http.Header that can be modified by the caller to add
  7295  // headers to the request.
  7296  func (c *SitesChannelsDeleteCall) Header() http.Header {
  7297  	if c.header_ == nil {
  7298  		c.header_ = make(http.Header)
  7299  	}
  7300  	return c.header_
  7301  }
  7302  
  7303  func (c *SitesChannelsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7304  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7305  	var body io.Reader = nil
  7306  	c.urlParams_.Set("alt", alt)
  7307  	c.urlParams_.Set("prettyPrint", "false")
  7308  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  7309  	urls += "?" + c.urlParams_.Encode()
  7310  	req, err := http.NewRequest("DELETE", urls, body)
  7311  	if err != nil {
  7312  		return nil, err
  7313  	}
  7314  	req.Header = reqHeaders
  7315  	googleapi.Expand(req.URL, map[string]string{
  7316  		"name": c.name,
  7317  	})
  7318  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7319  }
  7320  
  7321  // Do executes the "firebasehosting.sites.channels.delete" call.
  7322  // Any non-2xx status code is an error. Response headers are in either
  7323  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7324  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7325  // whether the returned error was because http.StatusNotModified was returned.
  7326  func (c *SitesChannelsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7327  	gensupport.SetOptions(c.urlParams_, opts...)
  7328  	res, err := c.doRequest("json")
  7329  	if res != nil && res.StatusCode == http.StatusNotModified {
  7330  		if res.Body != nil {
  7331  			res.Body.Close()
  7332  		}
  7333  		return nil, gensupport.WrapError(&googleapi.Error{
  7334  			Code:   res.StatusCode,
  7335  			Header: res.Header,
  7336  		})
  7337  	}
  7338  	if err != nil {
  7339  		return nil, err
  7340  	}
  7341  	defer googleapi.CloseBody(res)
  7342  	if err := googleapi.CheckResponse(res); err != nil {
  7343  		return nil, gensupport.WrapError(err)
  7344  	}
  7345  	ret := &Empty{
  7346  		ServerResponse: googleapi.ServerResponse{
  7347  			Header:         res.Header,
  7348  			HTTPStatusCode: res.StatusCode,
  7349  		},
  7350  	}
  7351  	target := &ret
  7352  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7353  		return nil, err
  7354  	}
  7355  	return ret, nil
  7356  }
  7357  
  7358  type SitesChannelsGetCall struct {
  7359  	s            *Service
  7360  	name         string
  7361  	urlParams_   gensupport.URLParams
  7362  	ifNoneMatch_ string
  7363  	ctx_         context.Context
  7364  	header_      http.Header
  7365  }
  7366  
  7367  // Get: Retrieves information for the specified channel of the specified site.
  7368  //
  7369  //   - name: The fully-qualified resource name for the channel, in the format:
  7370  //     sites/SITE_ID/channels/CHANNEL_ID.
  7371  func (r *SitesChannelsService) Get(name string) *SitesChannelsGetCall {
  7372  	c := &SitesChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7373  	c.name = name
  7374  	return c
  7375  }
  7376  
  7377  // Fields allows partial responses to be retrieved. See
  7378  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7379  // details.
  7380  func (c *SitesChannelsGetCall) Fields(s ...googleapi.Field) *SitesChannelsGetCall {
  7381  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7382  	return c
  7383  }
  7384  
  7385  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7386  // object's ETag matches the given value. This is useful for getting updates
  7387  // only after the object has changed since the last request.
  7388  func (c *SitesChannelsGetCall) IfNoneMatch(entityTag string) *SitesChannelsGetCall {
  7389  	c.ifNoneMatch_ = entityTag
  7390  	return c
  7391  }
  7392  
  7393  // Context sets the context to be used in this call's Do method.
  7394  func (c *SitesChannelsGetCall) Context(ctx context.Context) *SitesChannelsGetCall {
  7395  	c.ctx_ = ctx
  7396  	return c
  7397  }
  7398  
  7399  // Header returns a http.Header that can be modified by the caller to add
  7400  // headers to the request.
  7401  func (c *SitesChannelsGetCall) Header() http.Header {
  7402  	if c.header_ == nil {
  7403  		c.header_ = make(http.Header)
  7404  	}
  7405  	return c.header_
  7406  }
  7407  
  7408  func (c *SitesChannelsGetCall) doRequest(alt string) (*http.Response, error) {
  7409  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7410  	if c.ifNoneMatch_ != "" {
  7411  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7412  	}
  7413  	var body io.Reader = nil
  7414  	c.urlParams_.Set("alt", alt)
  7415  	c.urlParams_.Set("prettyPrint", "false")
  7416  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  7417  	urls += "?" + c.urlParams_.Encode()
  7418  	req, err := http.NewRequest("GET", urls, body)
  7419  	if err != nil {
  7420  		return nil, err
  7421  	}
  7422  	req.Header = reqHeaders
  7423  	googleapi.Expand(req.URL, map[string]string{
  7424  		"name": c.name,
  7425  	})
  7426  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7427  }
  7428  
  7429  // Do executes the "firebasehosting.sites.channels.get" call.
  7430  // Any non-2xx status code is an error. Response headers are in either
  7431  // *Channel.ServerResponse.Header or (if a response was returned at all) in
  7432  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7433  // whether the returned error was because http.StatusNotModified was returned.
  7434  func (c *SitesChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
  7435  	gensupport.SetOptions(c.urlParams_, opts...)
  7436  	res, err := c.doRequest("json")
  7437  	if res != nil && res.StatusCode == http.StatusNotModified {
  7438  		if res.Body != nil {
  7439  			res.Body.Close()
  7440  		}
  7441  		return nil, gensupport.WrapError(&googleapi.Error{
  7442  			Code:   res.StatusCode,
  7443  			Header: res.Header,
  7444  		})
  7445  	}
  7446  	if err != nil {
  7447  		return nil, err
  7448  	}
  7449  	defer googleapi.CloseBody(res)
  7450  	if err := googleapi.CheckResponse(res); err != nil {
  7451  		return nil, gensupport.WrapError(err)
  7452  	}
  7453  	ret := &Channel{
  7454  		ServerResponse: googleapi.ServerResponse{
  7455  			Header:         res.Header,
  7456  			HTTPStatusCode: res.StatusCode,
  7457  		},
  7458  	}
  7459  	target := &ret
  7460  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7461  		return nil, err
  7462  	}
  7463  	return ret, nil
  7464  }
  7465  
  7466  type SitesChannelsListCall struct {
  7467  	s            *Service
  7468  	parent       string
  7469  	urlParams_   gensupport.URLParams
  7470  	ifNoneMatch_ string
  7471  	ctx_         context.Context
  7472  	header_      http.Header
  7473  }
  7474  
  7475  // List: Lists the channels for the specified site. All sites have a default
  7476  // `live` channel.
  7477  //
  7478  // - parent: The site for which to list channels, in the format: sites/SITE_ID.
  7479  func (r *SitesChannelsService) List(parent string) *SitesChannelsListCall {
  7480  	c := &SitesChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7481  	c.parent = parent
  7482  	return c
  7483  }
  7484  
  7485  // PageSize sets the optional parameter "pageSize": The maximum number of
  7486  // channels to return. The service may return a lower number if fewer channels
  7487  // exist than this maximum number. If unspecified, defaults to 10. The maximum
  7488  // value is 100; values above 100 will be coerced to 100.
  7489  func (c *SitesChannelsListCall) PageSize(pageSize int64) *SitesChannelsListCall {
  7490  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7491  	return c
  7492  }
  7493  
  7494  // PageToken sets the optional parameter "pageToken": A token from a previous
  7495  // call to `ListChannels` that tells the server where to resume listing.
  7496  func (c *SitesChannelsListCall) PageToken(pageToken string) *SitesChannelsListCall {
  7497  	c.urlParams_.Set("pageToken", pageToken)
  7498  	return c
  7499  }
  7500  
  7501  // Fields allows partial responses to be retrieved. See
  7502  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7503  // details.
  7504  func (c *SitesChannelsListCall) Fields(s ...googleapi.Field) *SitesChannelsListCall {
  7505  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7506  	return c
  7507  }
  7508  
  7509  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7510  // object's ETag matches the given value. This is useful for getting updates
  7511  // only after the object has changed since the last request.
  7512  func (c *SitesChannelsListCall) IfNoneMatch(entityTag string) *SitesChannelsListCall {
  7513  	c.ifNoneMatch_ = entityTag
  7514  	return c
  7515  }
  7516  
  7517  // Context sets the context to be used in this call's Do method.
  7518  func (c *SitesChannelsListCall) Context(ctx context.Context) *SitesChannelsListCall {
  7519  	c.ctx_ = ctx
  7520  	return c
  7521  }
  7522  
  7523  // Header returns a http.Header that can be modified by the caller to add
  7524  // headers to the request.
  7525  func (c *SitesChannelsListCall) Header() http.Header {
  7526  	if c.header_ == nil {
  7527  		c.header_ = make(http.Header)
  7528  	}
  7529  	return c.header_
  7530  }
  7531  
  7532  func (c *SitesChannelsListCall) doRequest(alt string) (*http.Response, error) {
  7533  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7534  	if c.ifNoneMatch_ != "" {
  7535  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7536  	}
  7537  	var body io.Reader = nil
  7538  	c.urlParams_.Set("alt", alt)
  7539  	c.urlParams_.Set("prettyPrint", "false")
  7540  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/channels")
  7541  	urls += "?" + c.urlParams_.Encode()
  7542  	req, err := http.NewRequest("GET", urls, body)
  7543  	if err != nil {
  7544  		return nil, err
  7545  	}
  7546  	req.Header = reqHeaders
  7547  	googleapi.Expand(req.URL, map[string]string{
  7548  		"parent": c.parent,
  7549  	})
  7550  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7551  }
  7552  
  7553  // Do executes the "firebasehosting.sites.channels.list" call.
  7554  // Any non-2xx status code is an error. Response headers are in either
  7555  // *ListChannelsResponse.ServerResponse.Header or (if a response was returned
  7556  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7557  // check whether the returned error was because http.StatusNotModified was
  7558  // returned.
  7559  func (c *SitesChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) {
  7560  	gensupport.SetOptions(c.urlParams_, opts...)
  7561  	res, err := c.doRequest("json")
  7562  	if res != nil && res.StatusCode == http.StatusNotModified {
  7563  		if res.Body != nil {
  7564  			res.Body.Close()
  7565  		}
  7566  		return nil, gensupport.WrapError(&googleapi.Error{
  7567  			Code:   res.StatusCode,
  7568  			Header: res.Header,
  7569  		})
  7570  	}
  7571  	if err != nil {
  7572  		return nil, err
  7573  	}
  7574  	defer googleapi.CloseBody(res)
  7575  	if err := googleapi.CheckResponse(res); err != nil {
  7576  		return nil, gensupport.WrapError(err)
  7577  	}
  7578  	ret := &ListChannelsResponse{
  7579  		ServerResponse: googleapi.ServerResponse{
  7580  			Header:         res.Header,
  7581  			HTTPStatusCode: res.StatusCode,
  7582  		},
  7583  	}
  7584  	target := &ret
  7585  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7586  		return nil, err
  7587  	}
  7588  	return ret, nil
  7589  }
  7590  
  7591  // Pages invokes f for each page of results.
  7592  // A non-nil error returned from f will halt the iteration.
  7593  // The provided context supersedes any context provided to the Context method.
  7594  func (c *SitesChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error {
  7595  	c.ctx_ = ctx
  7596  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7597  	for {
  7598  		x, err := c.Do()
  7599  		if err != nil {
  7600  			return err
  7601  		}
  7602  		if err := f(x); err != nil {
  7603  			return err
  7604  		}
  7605  		if x.NextPageToken == "" {
  7606  			return nil
  7607  		}
  7608  		c.PageToken(x.NextPageToken)
  7609  	}
  7610  }
  7611  
  7612  type SitesChannelsPatchCall struct {
  7613  	s          *Service
  7614  	name       string
  7615  	channel    *Channel
  7616  	urlParams_ gensupport.URLParams
  7617  	ctx_       context.Context
  7618  	header_    http.Header
  7619  }
  7620  
  7621  // Patch: Updates information for the specified channel of the specified site.
  7622  // Implicitly creates the channel if it doesn't already exist.
  7623  //
  7624  //   - name: The fully-qualified resource name for the channel, in the format:
  7625  //     sites/ SITE_ID/channels/CHANNEL_ID.
  7626  func (r *SitesChannelsService) Patch(name string, channel *Channel) *SitesChannelsPatchCall {
  7627  	c := &SitesChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7628  	c.name = name
  7629  	c.channel = channel
  7630  	return c
  7631  }
  7632  
  7633  // UpdateMask sets the optional parameter "updateMask": A comma-separated list
  7634  // of fields to be updated in this request.
  7635  func (c *SitesChannelsPatchCall) UpdateMask(updateMask string) *SitesChannelsPatchCall {
  7636  	c.urlParams_.Set("updateMask", updateMask)
  7637  	return c
  7638  }
  7639  
  7640  // Fields allows partial responses to be retrieved. See
  7641  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7642  // details.
  7643  func (c *SitesChannelsPatchCall) Fields(s ...googleapi.Field) *SitesChannelsPatchCall {
  7644  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7645  	return c
  7646  }
  7647  
  7648  // Context sets the context to be used in this call's Do method.
  7649  func (c *SitesChannelsPatchCall) Context(ctx context.Context) *SitesChannelsPatchCall {
  7650  	c.ctx_ = ctx
  7651  	return c
  7652  }
  7653  
  7654  // Header returns a http.Header that can be modified by the caller to add
  7655  // headers to the request.
  7656  func (c *SitesChannelsPatchCall) Header() http.Header {
  7657  	if c.header_ == nil {
  7658  		c.header_ = make(http.Header)
  7659  	}
  7660  	return c.header_
  7661  }
  7662  
  7663  func (c *SitesChannelsPatchCall) doRequest(alt string) (*http.Response, error) {
  7664  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7665  	var body io.Reader = nil
  7666  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
  7667  	if err != nil {
  7668  		return nil, err
  7669  	}
  7670  	c.urlParams_.Set("alt", alt)
  7671  	c.urlParams_.Set("prettyPrint", "false")
  7672  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  7673  	urls += "?" + c.urlParams_.Encode()
  7674  	req, err := http.NewRequest("PATCH", urls, body)
  7675  	if err != nil {
  7676  		return nil, err
  7677  	}
  7678  	req.Header = reqHeaders
  7679  	googleapi.Expand(req.URL, map[string]string{
  7680  		"name": c.name,
  7681  	})
  7682  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7683  }
  7684  
  7685  // Do executes the "firebasehosting.sites.channels.patch" call.
  7686  // Any non-2xx status code is an error. Response headers are in either
  7687  // *Channel.ServerResponse.Header or (if a response was returned at all) in
  7688  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7689  // whether the returned error was because http.StatusNotModified was returned.
  7690  func (c *SitesChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
  7691  	gensupport.SetOptions(c.urlParams_, opts...)
  7692  	res, err := c.doRequest("json")
  7693  	if res != nil && res.StatusCode == http.StatusNotModified {
  7694  		if res.Body != nil {
  7695  			res.Body.Close()
  7696  		}
  7697  		return nil, gensupport.WrapError(&googleapi.Error{
  7698  			Code:   res.StatusCode,
  7699  			Header: res.Header,
  7700  		})
  7701  	}
  7702  	if err != nil {
  7703  		return nil, err
  7704  	}
  7705  	defer googleapi.CloseBody(res)
  7706  	if err := googleapi.CheckResponse(res); err != nil {
  7707  		return nil, gensupport.WrapError(err)
  7708  	}
  7709  	ret := &Channel{
  7710  		ServerResponse: googleapi.ServerResponse{
  7711  			Header:         res.Header,
  7712  			HTTPStatusCode: res.StatusCode,
  7713  		},
  7714  	}
  7715  	target := &ret
  7716  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7717  		return nil, err
  7718  	}
  7719  	return ret, nil
  7720  }
  7721  
  7722  type SitesChannelsReleasesCreateCall struct {
  7723  	s          *Service
  7724  	parent     string
  7725  	release    *Release
  7726  	urlParams_ gensupport.URLParams
  7727  	ctx_       context.Context
  7728  	header_    http.Header
  7729  }
  7730  
  7731  // Create: Creates a new release, which makes the content of the specified
  7732  // version actively display on the appropriate URL(s).
  7733  //
  7734  //   - parent: The site or channel to which the release belongs, in either of the
  7735  //     following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID.
  7736  func (r *SitesChannelsReleasesService) Create(parent string, release *Release) *SitesChannelsReleasesCreateCall {
  7737  	c := &SitesChannelsReleasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7738  	c.parent = parent
  7739  	c.release = release
  7740  	return c
  7741  }
  7742  
  7743  // VersionName sets the optional parameter "versionName": The unique identifier
  7744  // for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID
  7745  // in this version identifier must match the SITE_ID in the `parent` parameter.
  7746  // This query parameter must be empty if the `type` field in the request body
  7747  // is `SITE_DISABLE`.
  7748  func (c *SitesChannelsReleasesCreateCall) VersionName(versionName string) *SitesChannelsReleasesCreateCall {
  7749  	c.urlParams_.Set("versionName", versionName)
  7750  	return c
  7751  }
  7752  
  7753  // Fields allows partial responses to be retrieved. See
  7754  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7755  // details.
  7756  func (c *SitesChannelsReleasesCreateCall) Fields(s ...googleapi.Field) *SitesChannelsReleasesCreateCall {
  7757  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7758  	return c
  7759  }
  7760  
  7761  // Context sets the context to be used in this call's Do method.
  7762  func (c *SitesChannelsReleasesCreateCall) Context(ctx context.Context) *SitesChannelsReleasesCreateCall {
  7763  	c.ctx_ = ctx
  7764  	return c
  7765  }
  7766  
  7767  // Header returns a http.Header that can be modified by the caller to add
  7768  // headers to the request.
  7769  func (c *SitesChannelsReleasesCreateCall) Header() http.Header {
  7770  	if c.header_ == nil {
  7771  		c.header_ = make(http.Header)
  7772  	}
  7773  	return c.header_
  7774  }
  7775  
  7776  func (c *SitesChannelsReleasesCreateCall) doRequest(alt string) (*http.Response, error) {
  7777  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7778  	var body io.Reader = nil
  7779  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.release)
  7780  	if err != nil {
  7781  		return nil, err
  7782  	}
  7783  	c.urlParams_.Set("alt", alt)
  7784  	c.urlParams_.Set("prettyPrint", "false")
  7785  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/releases")
  7786  	urls += "?" + c.urlParams_.Encode()
  7787  	req, err := http.NewRequest("POST", urls, body)
  7788  	if err != nil {
  7789  		return nil, err
  7790  	}
  7791  	req.Header = reqHeaders
  7792  	googleapi.Expand(req.URL, map[string]string{
  7793  		"parent": c.parent,
  7794  	})
  7795  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7796  }
  7797  
  7798  // Do executes the "firebasehosting.sites.channels.releases.create" call.
  7799  // Any non-2xx status code is an error. Response headers are in either
  7800  // *Release.ServerResponse.Header or (if a response was returned at all) in
  7801  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7802  // whether the returned error was because http.StatusNotModified was returned.
  7803  func (c *SitesChannelsReleasesCreateCall) Do(opts ...googleapi.CallOption) (*Release, error) {
  7804  	gensupport.SetOptions(c.urlParams_, opts...)
  7805  	res, err := c.doRequest("json")
  7806  	if res != nil && res.StatusCode == http.StatusNotModified {
  7807  		if res.Body != nil {
  7808  			res.Body.Close()
  7809  		}
  7810  		return nil, gensupport.WrapError(&googleapi.Error{
  7811  			Code:   res.StatusCode,
  7812  			Header: res.Header,
  7813  		})
  7814  	}
  7815  	if err != nil {
  7816  		return nil, err
  7817  	}
  7818  	defer googleapi.CloseBody(res)
  7819  	if err := googleapi.CheckResponse(res); err != nil {
  7820  		return nil, gensupport.WrapError(err)
  7821  	}
  7822  	ret := &Release{
  7823  		ServerResponse: googleapi.ServerResponse{
  7824  			Header:         res.Header,
  7825  			HTTPStatusCode: res.StatusCode,
  7826  		},
  7827  	}
  7828  	target := &ret
  7829  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7830  		return nil, err
  7831  	}
  7832  	return ret, nil
  7833  }
  7834  
  7835  type SitesChannelsReleasesGetCall struct {
  7836  	s            *Service
  7837  	name         string
  7838  	urlParams_   gensupport.URLParams
  7839  	ifNoneMatch_ string
  7840  	ctx_         context.Context
  7841  	header_      http.Header
  7842  }
  7843  
  7844  // Get: Gets the specified release for a site or channel. When used to get a
  7845  // release for a site, this can get releases for both the default `live`
  7846  // channel and any active preview channels for the specified site.
  7847  //
  7848  //   - name: The fully-qualified resource name for the Hosting release, in either
  7849  //     of the following formats: -
  7850  //     sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID -
  7851  //     sites/SITE_ID/releases/RELEASE_ID.
  7852  func (r *SitesChannelsReleasesService) Get(name string) *SitesChannelsReleasesGetCall {
  7853  	c := &SitesChannelsReleasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7854  	c.name = name
  7855  	return c
  7856  }
  7857  
  7858  // Fields allows partial responses to be retrieved. See
  7859  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7860  // details.
  7861  func (c *SitesChannelsReleasesGetCall) Fields(s ...googleapi.Field) *SitesChannelsReleasesGetCall {
  7862  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7863  	return c
  7864  }
  7865  
  7866  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7867  // object's ETag matches the given value. This is useful for getting updates
  7868  // only after the object has changed since the last request.
  7869  func (c *SitesChannelsReleasesGetCall) IfNoneMatch(entityTag string) *SitesChannelsReleasesGetCall {
  7870  	c.ifNoneMatch_ = entityTag
  7871  	return c
  7872  }
  7873  
  7874  // Context sets the context to be used in this call's Do method.
  7875  func (c *SitesChannelsReleasesGetCall) Context(ctx context.Context) *SitesChannelsReleasesGetCall {
  7876  	c.ctx_ = ctx
  7877  	return c
  7878  }
  7879  
  7880  // Header returns a http.Header that can be modified by the caller to add
  7881  // headers to the request.
  7882  func (c *SitesChannelsReleasesGetCall) Header() http.Header {
  7883  	if c.header_ == nil {
  7884  		c.header_ = make(http.Header)
  7885  	}
  7886  	return c.header_
  7887  }
  7888  
  7889  func (c *SitesChannelsReleasesGetCall) doRequest(alt string) (*http.Response, error) {
  7890  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7891  	if c.ifNoneMatch_ != "" {
  7892  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7893  	}
  7894  	var body io.Reader = nil
  7895  	c.urlParams_.Set("alt", alt)
  7896  	c.urlParams_.Set("prettyPrint", "false")
  7897  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  7898  	urls += "?" + c.urlParams_.Encode()
  7899  	req, err := http.NewRequest("GET", urls, body)
  7900  	if err != nil {
  7901  		return nil, err
  7902  	}
  7903  	req.Header = reqHeaders
  7904  	googleapi.Expand(req.URL, map[string]string{
  7905  		"name": c.name,
  7906  	})
  7907  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7908  }
  7909  
  7910  // Do executes the "firebasehosting.sites.channels.releases.get" call.
  7911  // Any non-2xx status code is an error. Response headers are in either
  7912  // *Release.ServerResponse.Header or (if a response was returned at all) in
  7913  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7914  // whether the returned error was because http.StatusNotModified was returned.
  7915  func (c *SitesChannelsReleasesGetCall) Do(opts ...googleapi.CallOption) (*Release, error) {
  7916  	gensupport.SetOptions(c.urlParams_, opts...)
  7917  	res, err := c.doRequest("json")
  7918  	if res != nil && res.StatusCode == http.StatusNotModified {
  7919  		if res.Body != nil {
  7920  			res.Body.Close()
  7921  		}
  7922  		return nil, gensupport.WrapError(&googleapi.Error{
  7923  			Code:   res.StatusCode,
  7924  			Header: res.Header,
  7925  		})
  7926  	}
  7927  	if err != nil {
  7928  		return nil, err
  7929  	}
  7930  	defer googleapi.CloseBody(res)
  7931  	if err := googleapi.CheckResponse(res); err != nil {
  7932  		return nil, gensupport.WrapError(err)
  7933  	}
  7934  	ret := &Release{
  7935  		ServerResponse: googleapi.ServerResponse{
  7936  			Header:         res.Header,
  7937  			HTTPStatusCode: res.StatusCode,
  7938  		},
  7939  	}
  7940  	target := &ret
  7941  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7942  		return nil, err
  7943  	}
  7944  	return ret, nil
  7945  }
  7946  
  7947  type SitesChannelsReleasesListCall struct {
  7948  	s            *Service
  7949  	parent       string
  7950  	urlParams_   gensupport.URLParams
  7951  	ifNoneMatch_ string
  7952  	ctx_         context.Context
  7953  	header_      http.Header
  7954  }
  7955  
  7956  // List: Lists the releases that have been created for the specified site or
  7957  // channel. When used to list releases for a site, this list includes releases
  7958  // for both the default `live` channel and any active preview channels for the
  7959  // specified site.
  7960  //
  7961  //   - parent: The site or channel for which to list releases, in either of the
  7962  //     following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID.
  7963  func (r *SitesChannelsReleasesService) List(parent string) *SitesChannelsReleasesListCall {
  7964  	c := &SitesChannelsReleasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7965  	c.parent = parent
  7966  	return c
  7967  }
  7968  
  7969  // PageSize sets the optional parameter "pageSize": The maximum number of
  7970  // releases to return. The service may return a lower number if fewer releases
  7971  // exist than this maximum number. If unspecified, defaults to 100.
  7972  func (c *SitesChannelsReleasesListCall) PageSize(pageSize int64) *SitesChannelsReleasesListCall {
  7973  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7974  	return c
  7975  }
  7976  
  7977  // PageToken sets the optional parameter "pageToken": A token from a previous
  7978  // call to `releases.list` or `channels.releases.list` that tells the server
  7979  // where to resume listing.
  7980  func (c *SitesChannelsReleasesListCall) PageToken(pageToken string) *SitesChannelsReleasesListCall {
  7981  	c.urlParams_.Set("pageToken", pageToken)
  7982  	return c
  7983  }
  7984  
  7985  // Fields allows partial responses to be retrieved. See
  7986  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7987  // details.
  7988  func (c *SitesChannelsReleasesListCall) Fields(s ...googleapi.Field) *SitesChannelsReleasesListCall {
  7989  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7990  	return c
  7991  }
  7992  
  7993  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7994  // object's ETag matches the given value. This is useful for getting updates
  7995  // only after the object has changed since the last request.
  7996  func (c *SitesChannelsReleasesListCall) IfNoneMatch(entityTag string) *SitesChannelsReleasesListCall {
  7997  	c.ifNoneMatch_ = entityTag
  7998  	return c
  7999  }
  8000  
  8001  // Context sets the context to be used in this call's Do method.
  8002  func (c *SitesChannelsReleasesListCall) Context(ctx context.Context) *SitesChannelsReleasesListCall {
  8003  	c.ctx_ = ctx
  8004  	return c
  8005  }
  8006  
  8007  // Header returns a http.Header that can be modified by the caller to add
  8008  // headers to the request.
  8009  func (c *SitesChannelsReleasesListCall) Header() http.Header {
  8010  	if c.header_ == nil {
  8011  		c.header_ = make(http.Header)
  8012  	}
  8013  	return c.header_
  8014  }
  8015  
  8016  func (c *SitesChannelsReleasesListCall) doRequest(alt string) (*http.Response, error) {
  8017  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8018  	if c.ifNoneMatch_ != "" {
  8019  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8020  	}
  8021  	var body io.Reader = nil
  8022  	c.urlParams_.Set("alt", alt)
  8023  	c.urlParams_.Set("prettyPrint", "false")
  8024  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/releases")
  8025  	urls += "?" + c.urlParams_.Encode()
  8026  	req, err := http.NewRequest("GET", urls, body)
  8027  	if err != nil {
  8028  		return nil, err
  8029  	}
  8030  	req.Header = reqHeaders
  8031  	googleapi.Expand(req.URL, map[string]string{
  8032  		"parent": c.parent,
  8033  	})
  8034  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8035  }
  8036  
  8037  // Do executes the "firebasehosting.sites.channels.releases.list" call.
  8038  // Any non-2xx status code is an error. Response headers are in either
  8039  // *ListReleasesResponse.ServerResponse.Header or (if a response was returned
  8040  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8041  // check whether the returned error was because http.StatusNotModified was
  8042  // returned.
  8043  func (c *SitesChannelsReleasesListCall) Do(opts ...googleapi.CallOption) (*ListReleasesResponse, error) {
  8044  	gensupport.SetOptions(c.urlParams_, opts...)
  8045  	res, err := c.doRequest("json")
  8046  	if res != nil && res.StatusCode == http.StatusNotModified {
  8047  		if res.Body != nil {
  8048  			res.Body.Close()
  8049  		}
  8050  		return nil, gensupport.WrapError(&googleapi.Error{
  8051  			Code:   res.StatusCode,
  8052  			Header: res.Header,
  8053  		})
  8054  	}
  8055  	if err != nil {
  8056  		return nil, err
  8057  	}
  8058  	defer googleapi.CloseBody(res)
  8059  	if err := googleapi.CheckResponse(res); err != nil {
  8060  		return nil, gensupport.WrapError(err)
  8061  	}
  8062  	ret := &ListReleasesResponse{
  8063  		ServerResponse: googleapi.ServerResponse{
  8064  			Header:         res.Header,
  8065  			HTTPStatusCode: res.StatusCode,
  8066  		},
  8067  	}
  8068  	target := &ret
  8069  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8070  		return nil, err
  8071  	}
  8072  	return ret, nil
  8073  }
  8074  
  8075  // Pages invokes f for each page of results.
  8076  // A non-nil error returned from f will halt the iteration.
  8077  // The provided context supersedes any context provided to the Context method.
  8078  func (c *SitesChannelsReleasesListCall) Pages(ctx context.Context, f func(*ListReleasesResponse) error) error {
  8079  	c.ctx_ = ctx
  8080  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8081  	for {
  8082  		x, err := c.Do()
  8083  		if err != nil {
  8084  			return err
  8085  		}
  8086  		if err := f(x); err != nil {
  8087  			return err
  8088  		}
  8089  		if x.NextPageToken == "" {
  8090  			return nil
  8091  		}
  8092  		c.PageToken(x.NextPageToken)
  8093  	}
  8094  }
  8095  
  8096  type SitesDomainsCreateCall struct {
  8097  	s          *Service
  8098  	parent     string
  8099  	domain     *Domain
  8100  	urlParams_ gensupport.URLParams
  8101  	ctx_       context.Context
  8102  	header_    http.Header
  8103  }
  8104  
  8105  // Create: Creates a domain mapping on the specified site.
  8106  //
  8107  //   - parent: The parent to create the domain association for, in the format:
  8108  //     sites/site-name.
  8109  func (r *SitesDomainsService) Create(parent string, domain *Domain) *SitesDomainsCreateCall {
  8110  	c := &SitesDomainsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8111  	c.parent = parent
  8112  	c.domain = domain
  8113  	return c
  8114  }
  8115  
  8116  // Fields allows partial responses to be retrieved. See
  8117  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8118  // details.
  8119  func (c *SitesDomainsCreateCall) Fields(s ...googleapi.Field) *SitesDomainsCreateCall {
  8120  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8121  	return c
  8122  }
  8123  
  8124  // Context sets the context to be used in this call's Do method.
  8125  func (c *SitesDomainsCreateCall) Context(ctx context.Context) *SitesDomainsCreateCall {
  8126  	c.ctx_ = ctx
  8127  	return c
  8128  }
  8129  
  8130  // Header returns a http.Header that can be modified by the caller to add
  8131  // headers to the request.
  8132  func (c *SitesDomainsCreateCall) Header() http.Header {
  8133  	if c.header_ == nil {
  8134  		c.header_ = make(http.Header)
  8135  	}
  8136  	return c.header_
  8137  }
  8138  
  8139  func (c *SitesDomainsCreateCall) doRequest(alt string) (*http.Response, error) {
  8140  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8141  	var body io.Reader = nil
  8142  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.domain)
  8143  	if err != nil {
  8144  		return nil, err
  8145  	}
  8146  	c.urlParams_.Set("alt", alt)
  8147  	c.urlParams_.Set("prettyPrint", "false")
  8148  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/domains")
  8149  	urls += "?" + c.urlParams_.Encode()
  8150  	req, err := http.NewRequest("POST", urls, body)
  8151  	if err != nil {
  8152  		return nil, err
  8153  	}
  8154  	req.Header = reqHeaders
  8155  	googleapi.Expand(req.URL, map[string]string{
  8156  		"parent": c.parent,
  8157  	})
  8158  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8159  }
  8160  
  8161  // Do executes the "firebasehosting.sites.domains.create" call.
  8162  // Any non-2xx status code is an error. Response headers are in either
  8163  // *Domain.ServerResponse.Header or (if a response was returned at all) in
  8164  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8165  // whether the returned error was because http.StatusNotModified was returned.
  8166  func (c *SitesDomainsCreateCall) Do(opts ...googleapi.CallOption) (*Domain, error) {
  8167  	gensupport.SetOptions(c.urlParams_, opts...)
  8168  	res, err := c.doRequest("json")
  8169  	if res != nil && res.StatusCode == http.StatusNotModified {
  8170  		if res.Body != nil {
  8171  			res.Body.Close()
  8172  		}
  8173  		return nil, gensupport.WrapError(&googleapi.Error{
  8174  			Code:   res.StatusCode,
  8175  			Header: res.Header,
  8176  		})
  8177  	}
  8178  	if err != nil {
  8179  		return nil, err
  8180  	}
  8181  	defer googleapi.CloseBody(res)
  8182  	if err := googleapi.CheckResponse(res); err != nil {
  8183  		return nil, gensupport.WrapError(err)
  8184  	}
  8185  	ret := &Domain{
  8186  		ServerResponse: googleapi.ServerResponse{
  8187  			Header:         res.Header,
  8188  			HTTPStatusCode: res.StatusCode,
  8189  		},
  8190  	}
  8191  	target := &ret
  8192  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8193  		return nil, err
  8194  	}
  8195  	return ret, nil
  8196  }
  8197  
  8198  type SitesDomainsDeleteCall struct {
  8199  	s          *Service
  8200  	name       string
  8201  	urlParams_ gensupport.URLParams
  8202  	ctx_       context.Context
  8203  	header_    http.Header
  8204  }
  8205  
  8206  // Delete: Deletes the existing domain mapping on the specified site.
  8207  //
  8208  // - name: The name of the domain association to delete.
  8209  func (r *SitesDomainsService) Delete(name string) *SitesDomainsDeleteCall {
  8210  	c := &SitesDomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8211  	c.name = name
  8212  	return c
  8213  }
  8214  
  8215  // Fields allows partial responses to be retrieved. See
  8216  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8217  // details.
  8218  func (c *SitesDomainsDeleteCall) Fields(s ...googleapi.Field) *SitesDomainsDeleteCall {
  8219  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8220  	return c
  8221  }
  8222  
  8223  // Context sets the context to be used in this call's Do method.
  8224  func (c *SitesDomainsDeleteCall) Context(ctx context.Context) *SitesDomainsDeleteCall {
  8225  	c.ctx_ = ctx
  8226  	return c
  8227  }
  8228  
  8229  // Header returns a http.Header that can be modified by the caller to add
  8230  // headers to the request.
  8231  func (c *SitesDomainsDeleteCall) Header() http.Header {
  8232  	if c.header_ == nil {
  8233  		c.header_ = make(http.Header)
  8234  	}
  8235  	return c.header_
  8236  }
  8237  
  8238  func (c *SitesDomainsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8239  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8240  	var body io.Reader = nil
  8241  	c.urlParams_.Set("alt", alt)
  8242  	c.urlParams_.Set("prettyPrint", "false")
  8243  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  8244  	urls += "?" + c.urlParams_.Encode()
  8245  	req, err := http.NewRequest("DELETE", urls, body)
  8246  	if err != nil {
  8247  		return nil, err
  8248  	}
  8249  	req.Header = reqHeaders
  8250  	googleapi.Expand(req.URL, map[string]string{
  8251  		"name": c.name,
  8252  	})
  8253  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8254  }
  8255  
  8256  // Do executes the "firebasehosting.sites.domains.delete" call.
  8257  // Any non-2xx status code is an error. Response headers are in either
  8258  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  8259  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8260  // whether the returned error was because http.StatusNotModified was returned.
  8261  func (c *SitesDomainsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8262  	gensupport.SetOptions(c.urlParams_, opts...)
  8263  	res, err := c.doRequest("json")
  8264  	if res != nil && res.StatusCode == http.StatusNotModified {
  8265  		if res.Body != nil {
  8266  			res.Body.Close()
  8267  		}
  8268  		return nil, gensupport.WrapError(&googleapi.Error{
  8269  			Code:   res.StatusCode,
  8270  			Header: res.Header,
  8271  		})
  8272  	}
  8273  	if err != nil {
  8274  		return nil, err
  8275  	}
  8276  	defer googleapi.CloseBody(res)
  8277  	if err := googleapi.CheckResponse(res); err != nil {
  8278  		return nil, gensupport.WrapError(err)
  8279  	}
  8280  	ret := &Empty{
  8281  		ServerResponse: googleapi.ServerResponse{
  8282  			Header:         res.Header,
  8283  			HTTPStatusCode: res.StatusCode,
  8284  		},
  8285  	}
  8286  	target := &ret
  8287  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8288  		return nil, err
  8289  	}
  8290  	return ret, nil
  8291  }
  8292  
  8293  type SitesDomainsGetCall struct {
  8294  	s            *Service
  8295  	name         string
  8296  	urlParams_   gensupport.URLParams
  8297  	ifNoneMatch_ string
  8298  	ctx_         context.Context
  8299  	header_      http.Header
  8300  }
  8301  
  8302  // Get: Gets a domain mapping on the specified site.
  8303  //
  8304  // - name: The name of the domain configuration to get.
  8305  func (r *SitesDomainsService) Get(name string) *SitesDomainsGetCall {
  8306  	c := &SitesDomainsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8307  	c.name = name
  8308  	return c
  8309  }
  8310  
  8311  // Fields allows partial responses to be retrieved. See
  8312  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8313  // details.
  8314  func (c *SitesDomainsGetCall) Fields(s ...googleapi.Field) *SitesDomainsGetCall {
  8315  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8316  	return c
  8317  }
  8318  
  8319  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8320  // object's ETag matches the given value. This is useful for getting updates
  8321  // only after the object has changed since the last request.
  8322  func (c *SitesDomainsGetCall) IfNoneMatch(entityTag string) *SitesDomainsGetCall {
  8323  	c.ifNoneMatch_ = entityTag
  8324  	return c
  8325  }
  8326  
  8327  // Context sets the context to be used in this call's Do method.
  8328  func (c *SitesDomainsGetCall) Context(ctx context.Context) *SitesDomainsGetCall {
  8329  	c.ctx_ = ctx
  8330  	return c
  8331  }
  8332  
  8333  // Header returns a http.Header that can be modified by the caller to add
  8334  // headers to the request.
  8335  func (c *SitesDomainsGetCall) Header() http.Header {
  8336  	if c.header_ == nil {
  8337  		c.header_ = make(http.Header)
  8338  	}
  8339  	return c.header_
  8340  }
  8341  
  8342  func (c *SitesDomainsGetCall) doRequest(alt string) (*http.Response, error) {
  8343  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8344  	if c.ifNoneMatch_ != "" {
  8345  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8346  	}
  8347  	var body io.Reader = nil
  8348  	c.urlParams_.Set("alt", alt)
  8349  	c.urlParams_.Set("prettyPrint", "false")
  8350  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  8351  	urls += "?" + c.urlParams_.Encode()
  8352  	req, err := http.NewRequest("GET", urls, body)
  8353  	if err != nil {
  8354  		return nil, err
  8355  	}
  8356  	req.Header = reqHeaders
  8357  	googleapi.Expand(req.URL, map[string]string{
  8358  		"name": c.name,
  8359  	})
  8360  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8361  }
  8362  
  8363  // Do executes the "firebasehosting.sites.domains.get" call.
  8364  // Any non-2xx status code is an error. Response headers are in either
  8365  // *Domain.ServerResponse.Header or (if a response was returned at all) in
  8366  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8367  // whether the returned error was because http.StatusNotModified was returned.
  8368  func (c *SitesDomainsGetCall) Do(opts ...googleapi.CallOption) (*Domain, error) {
  8369  	gensupport.SetOptions(c.urlParams_, opts...)
  8370  	res, err := c.doRequest("json")
  8371  	if res != nil && res.StatusCode == http.StatusNotModified {
  8372  		if res.Body != nil {
  8373  			res.Body.Close()
  8374  		}
  8375  		return nil, gensupport.WrapError(&googleapi.Error{
  8376  			Code:   res.StatusCode,
  8377  			Header: res.Header,
  8378  		})
  8379  	}
  8380  	if err != nil {
  8381  		return nil, err
  8382  	}
  8383  	defer googleapi.CloseBody(res)
  8384  	if err := googleapi.CheckResponse(res); err != nil {
  8385  		return nil, gensupport.WrapError(err)
  8386  	}
  8387  	ret := &Domain{
  8388  		ServerResponse: googleapi.ServerResponse{
  8389  			Header:         res.Header,
  8390  			HTTPStatusCode: res.StatusCode,
  8391  		},
  8392  	}
  8393  	target := &ret
  8394  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8395  		return nil, err
  8396  	}
  8397  	return ret, nil
  8398  }
  8399  
  8400  type SitesDomainsListCall struct {
  8401  	s            *Service
  8402  	parent       string
  8403  	urlParams_   gensupport.URLParams
  8404  	ifNoneMatch_ string
  8405  	ctx_         context.Context
  8406  	header_      http.Header
  8407  }
  8408  
  8409  // List: Lists the domains for the specified site.
  8410  //
  8411  //   - parent: The parent for which to list domains, in the format: sites/
  8412  //     site-name.
  8413  func (r *SitesDomainsService) List(parent string) *SitesDomainsListCall {
  8414  	c := &SitesDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8415  	c.parent = parent
  8416  	return c
  8417  }
  8418  
  8419  // PageSize sets the optional parameter "pageSize": The page size to return.
  8420  // Defaults to 50.
  8421  func (c *SitesDomainsListCall) PageSize(pageSize int64) *SitesDomainsListCall {
  8422  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8423  	return c
  8424  }
  8425  
  8426  // PageToken sets the optional parameter "pageToken": The next_page_token from
  8427  // a previous request, if provided.
  8428  func (c *SitesDomainsListCall) PageToken(pageToken string) *SitesDomainsListCall {
  8429  	c.urlParams_.Set("pageToken", pageToken)
  8430  	return c
  8431  }
  8432  
  8433  // Fields allows partial responses to be retrieved. See
  8434  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8435  // details.
  8436  func (c *SitesDomainsListCall) Fields(s ...googleapi.Field) *SitesDomainsListCall {
  8437  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8438  	return c
  8439  }
  8440  
  8441  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8442  // object's ETag matches the given value. This is useful for getting updates
  8443  // only after the object has changed since the last request.
  8444  func (c *SitesDomainsListCall) IfNoneMatch(entityTag string) *SitesDomainsListCall {
  8445  	c.ifNoneMatch_ = entityTag
  8446  	return c
  8447  }
  8448  
  8449  // Context sets the context to be used in this call's Do method.
  8450  func (c *SitesDomainsListCall) Context(ctx context.Context) *SitesDomainsListCall {
  8451  	c.ctx_ = ctx
  8452  	return c
  8453  }
  8454  
  8455  // Header returns a http.Header that can be modified by the caller to add
  8456  // headers to the request.
  8457  func (c *SitesDomainsListCall) Header() http.Header {
  8458  	if c.header_ == nil {
  8459  		c.header_ = make(http.Header)
  8460  	}
  8461  	return c.header_
  8462  }
  8463  
  8464  func (c *SitesDomainsListCall) doRequest(alt string) (*http.Response, error) {
  8465  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8466  	if c.ifNoneMatch_ != "" {
  8467  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8468  	}
  8469  	var body io.Reader = nil
  8470  	c.urlParams_.Set("alt", alt)
  8471  	c.urlParams_.Set("prettyPrint", "false")
  8472  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/domains")
  8473  	urls += "?" + c.urlParams_.Encode()
  8474  	req, err := http.NewRequest("GET", urls, body)
  8475  	if err != nil {
  8476  		return nil, err
  8477  	}
  8478  	req.Header = reqHeaders
  8479  	googleapi.Expand(req.URL, map[string]string{
  8480  		"parent": c.parent,
  8481  	})
  8482  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8483  }
  8484  
  8485  // Do executes the "firebasehosting.sites.domains.list" call.
  8486  // Any non-2xx status code is an error. Response headers are in either
  8487  // *ListDomainsResponse.ServerResponse.Header or (if a response was returned at
  8488  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8489  // check whether the returned error was because http.StatusNotModified was
  8490  // returned.
  8491  func (c *SitesDomainsListCall) Do(opts ...googleapi.CallOption) (*ListDomainsResponse, error) {
  8492  	gensupport.SetOptions(c.urlParams_, opts...)
  8493  	res, err := c.doRequest("json")
  8494  	if res != nil && res.StatusCode == http.StatusNotModified {
  8495  		if res.Body != nil {
  8496  			res.Body.Close()
  8497  		}
  8498  		return nil, gensupport.WrapError(&googleapi.Error{
  8499  			Code:   res.StatusCode,
  8500  			Header: res.Header,
  8501  		})
  8502  	}
  8503  	if err != nil {
  8504  		return nil, err
  8505  	}
  8506  	defer googleapi.CloseBody(res)
  8507  	if err := googleapi.CheckResponse(res); err != nil {
  8508  		return nil, gensupport.WrapError(err)
  8509  	}
  8510  	ret := &ListDomainsResponse{
  8511  		ServerResponse: googleapi.ServerResponse{
  8512  			Header:         res.Header,
  8513  			HTTPStatusCode: res.StatusCode,
  8514  		},
  8515  	}
  8516  	target := &ret
  8517  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8518  		return nil, err
  8519  	}
  8520  	return ret, nil
  8521  }
  8522  
  8523  // Pages invokes f for each page of results.
  8524  // A non-nil error returned from f will halt the iteration.
  8525  // The provided context supersedes any context provided to the Context method.
  8526  func (c *SitesDomainsListCall) Pages(ctx context.Context, f func(*ListDomainsResponse) error) error {
  8527  	c.ctx_ = ctx
  8528  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8529  	for {
  8530  		x, err := c.Do()
  8531  		if err != nil {
  8532  			return err
  8533  		}
  8534  		if err := f(x); err != nil {
  8535  			return err
  8536  		}
  8537  		if x.NextPageToken == "" {
  8538  			return nil
  8539  		}
  8540  		c.PageToken(x.NextPageToken)
  8541  	}
  8542  }
  8543  
  8544  type SitesDomainsUpdateCall struct {
  8545  	s          *Service
  8546  	name       string
  8547  	domain     *Domain
  8548  	urlParams_ gensupport.URLParams
  8549  	ctx_       context.Context
  8550  	header_    http.Header
  8551  }
  8552  
  8553  // Update: Updates the specified domain mapping, creating the mapping as if it
  8554  // does not exist.
  8555  //
  8556  //   - name: The name of the domain association to update or create, if an
  8557  //     association doesn't already exist.
  8558  func (r *SitesDomainsService) Update(name string, domain *Domain) *SitesDomainsUpdateCall {
  8559  	c := &SitesDomainsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8560  	c.name = name
  8561  	c.domain = domain
  8562  	return c
  8563  }
  8564  
  8565  // Fields allows partial responses to be retrieved. See
  8566  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8567  // details.
  8568  func (c *SitesDomainsUpdateCall) Fields(s ...googleapi.Field) *SitesDomainsUpdateCall {
  8569  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8570  	return c
  8571  }
  8572  
  8573  // Context sets the context to be used in this call's Do method.
  8574  func (c *SitesDomainsUpdateCall) Context(ctx context.Context) *SitesDomainsUpdateCall {
  8575  	c.ctx_ = ctx
  8576  	return c
  8577  }
  8578  
  8579  // Header returns a http.Header that can be modified by the caller to add
  8580  // headers to the request.
  8581  func (c *SitesDomainsUpdateCall) Header() http.Header {
  8582  	if c.header_ == nil {
  8583  		c.header_ = make(http.Header)
  8584  	}
  8585  	return c.header_
  8586  }
  8587  
  8588  func (c *SitesDomainsUpdateCall) doRequest(alt string) (*http.Response, error) {
  8589  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8590  	var body io.Reader = nil
  8591  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.domain)
  8592  	if err != nil {
  8593  		return nil, err
  8594  	}
  8595  	c.urlParams_.Set("alt", alt)
  8596  	c.urlParams_.Set("prettyPrint", "false")
  8597  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  8598  	urls += "?" + c.urlParams_.Encode()
  8599  	req, err := http.NewRequest("PUT", urls, body)
  8600  	if err != nil {
  8601  		return nil, err
  8602  	}
  8603  	req.Header = reqHeaders
  8604  	googleapi.Expand(req.URL, map[string]string{
  8605  		"name": c.name,
  8606  	})
  8607  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8608  }
  8609  
  8610  // Do executes the "firebasehosting.sites.domains.update" call.
  8611  // Any non-2xx status code is an error. Response headers are in either
  8612  // *Domain.ServerResponse.Header or (if a response was returned at all) in
  8613  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8614  // whether the returned error was because http.StatusNotModified was returned.
  8615  func (c *SitesDomainsUpdateCall) Do(opts ...googleapi.CallOption) (*Domain, error) {
  8616  	gensupport.SetOptions(c.urlParams_, opts...)
  8617  	res, err := c.doRequest("json")
  8618  	if res != nil && res.StatusCode == http.StatusNotModified {
  8619  		if res.Body != nil {
  8620  			res.Body.Close()
  8621  		}
  8622  		return nil, gensupport.WrapError(&googleapi.Error{
  8623  			Code:   res.StatusCode,
  8624  			Header: res.Header,
  8625  		})
  8626  	}
  8627  	if err != nil {
  8628  		return nil, err
  8629  	}
  8630  	defer googleapi.CloseBody(res)
  8631  	if err := googleapi.CheckResponse(res); err != nil {
  8632  		return nil, gensupport.WrapError(err)
  8633  	}
  8634  	ret := &Domain{
  8635  		ServerResponse: googleapi.ServerResponse{
  8636  			Header:         res.Header,
  8637  			HTTPStatusCode: res.StatusCode,
  8638  		},
  8639  	}
  8640  	target := &ret
  8641  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8642  		return nil, err
  8643  	}
  8644  	return ret, nil
  8645  }
  8646  
  8647  type SitesReleasesCreateCall struct {
  8648  	s          *Service
  8649  	parent     string
  8650  	release    *Release
  8651  	urlParams_ gensupport.URLParams
  8652  	ctx_       context.Context
  8653  	header_    http.Header
  8654  }
  8655  
  8656  // Create: Creates a new release, which makes the content of the specified
  8657  // version actively display on the appropriate URL(s).
  8658  //
  8659  //   - parent: The site or channel to which the release belongs, in either of the
  8660  //     following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID.
  8661  func (r *SitesReleasesService) Create(parent string, release *Release) *SitesReleasesCreateCall {
  8662  	c := &SitesReleasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8663  	c.parent = parent
  8664  	c.release = release
  8665  	return c
  8666  }
  8667  
  8668  // VersionName sets the optional parameter "versionName": The unique identifier
  8669  // for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID
  8670  // in this version identifier must match the SITE_ID in the `parent` parameter.
  8671  // This query parameter must be empty if the `type` field in the request body
  8672  // is `SITE_DISABLE`.
  8673  func (c *SitesReleasesCreateCall) VersionName(versionName string) *SitesReleasesCreateCall {
  8674  	c.urlParams_.Set("versionName", versionName)
  8675  	return c
  8676  }
  8677  
  8678  // Fields allows partial responses to be retrieved. See
  8679  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8680  // details.
  8681  func (c *SitesReleasesCreateCall) Fields(s ...googleapi.Field) *SitesReleasesCreateCall {
  8682  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8683  	return c
  8684  }
  8685  
  8686  // Context sets the context to be used in this call's Do method.
  8687  func (c *SitesReleasesCreateCall) Context(ctx context.Context) *SitesReleasesCreateCall {
  8688  	c.ctx_ = ctx
  8689  	return c
  8690  }
  8691  
  8692  // Header returns a http.Header that can be modified by the caller to add
  8693  // headers to the request.
  8694  func (c *SitesReleasesCreateCall) Header() http.Header {
  8695  	if c.header_ == nil {
  8696  		c.header_ = make(http.Header)
  8697  	}
  8698  	return c.header_
  8699  }
  8700  
  8701  func (c *SitesReleasesCreateCall) doRequest(alt string) (*http.Response, error) {
  8702  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8703  	var body io.Reader = nil
  8704  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.release)
  8705  	if err != nil {
  8706  		return nil, err
  8707  	}
  8708  	c.urlParams_.Set("alt", alt)
  8709  	c.urlParams_.Set("prettyPrint", "false")
  8710  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/releases")
  8711  	urls += "?" + c.urlParams_.Encode()
  8712  	req, err := http.NewRequest("POST", urls, body)
  8713  	if err != nil {
  8714  		return nil, err
  8715  	}
  8716  	req.Header = reqHeaders
  8717  	googleapi.Expand(req.URL, map[string]string{
  8718  		"parent": c.parent,
  8719  	})
  8720  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8721  }
  8722  
  8723  // Do executes the "firebasehosting.sites.releases.create" call.
  8724  // Any non-2xx status code is an error. Response headers are in either
  8725  // *Release.ServerResponse.Header or (if a response was returned at all) in
  8726  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8727  // whether the returned error was because http.StatusNotModified was returned.
  8728  func (c *SitesReleasesCreateCall) Do(opts ...googleapi.CallOption) (*Release, error) {
  8729  	gensupport.SetOptions(c.urlParams_, opts...)
  8730  	res, err := c.doRequest("json")
  8731  	if res != nil && res.StatusCode == http.StatusNotModified {
  8732  		if res.Body != nil {
  8733  			res.Body.Close()
  8734  		}
  8735  		return nil, gensupport.WrapError(&googleapi.Error{
  8736  			Code:   res.StatusCode,
  8737  			Header: res.Header,
  8738  		})
  8739  	}
  8740  	if err != nil {
  8741  		return nil, err
  8742  	}
  8743  	defer googleapi.CloseBody(res)
  8744  	if err := googleapi.CheckResponse(res); err != nil {
  8745  		return nil, gensupport.WrapError(err)
  8746  	}
  8747  	ret := &Release{
  8748  		ServerResponse: googleapi.ServerResponse{
  8749  			Header:         res.Header,
  8750  			HTTPStatusCode: res.StatusCode,
  8751  		},
  8752  	}
  8753  	target := &ret
  8754  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8755  		return nil, err
  8756  	}
  8757  	return ret, nil
  8758  }
  8759  
  8760  type SitesReleasesGetCall struct {
  8761  	s            *Service
  8762  	name         string
  8763  	urlParams_   gensupport.URLParams
  8764  	ifNoneMatch_ string
  8765  	ctx_         context.Context
  8766  	header_      http.Header
  8767  }
  8768  
  8769  // Get: Gets the specified release for a site or channel. When used to get a
  8770  // release for a site, this can get releases for both the default `live`
  8771  // channel and any active preview channels for the specified site.
  8772  //
  8773  //   - name: The fully-qualified resource name for the Hosting release, in either
  8774  //     of the following formats: -
  8775  //     sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID -
  8776  //     sites/SITE_ID/releases/RELEASE_ID.
  8777  func (r *SitesReleasesService) Get(name string) *SitesReleasesGetCall {
  8778  	c := &SitesReleasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8779  	c.name = name
  8780  	return c
  8781  }
  8782  
  8783  // Fields allows partial responses to be retrieved. See
  8784  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8785  // details.
  8786  func (c *SitesReleasesGetCall) Fields(s ...googleapi.Field) *SitesReleasesGetCall {
  8787  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8788  	return c
  8789  }
  8790  
  8791  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8792  // object's ETag matches the given value. This is useful for getting updates
  8793  // only after the object has changed since the last request.
  8794  func (c *SitesReleasesGetCall) IfNoneMatch(entityTag string) *SitesReleasesGetCall {
  8795  	c.ifNoneMatch_ = entityTag
  8796  	return c
  8797  }
  8798  
  8799  // Context sets the context to be used in this call's Do method.
  8800  func (c *SitesReleasesGetCall) Context(ctx context.Context) *SitesReleasesGetCall {
  8801  	c.ctx_ = ctx
  8802  	return c
  8803  }
  8804  
  8805  // Header returns a http.Header that can be modified by the caller to add
  8806  // headers to the request.
  8807  func (c *SitesReleasesGetCall) Header() http.Header {
  8808  	if c.header_ == nil {
  8809  		c.header_ = make(http.Header)
  8810  	}
  8811  	return c.header_
  8812  }
  8813  
  8814  func (c *SitesReleasesGetCall) doRequest(alt string) (*http.Response, error) {
  8815  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8816  	if c.ifNoneMatch_ != "" {
  8817  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8818  	}
  8819  	var body io.Reader = nil
  8820  	c.urlParams_.Set("alt", alt)
  8821  	c.urlParams_.Set("prettyPrint", "false")
  8822  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  8823  	urls += "?" + c.urlParams_.Encode()
  8824  	req, err := http.NewRequest("GET", urls, body)
  8825  	if err != nil {
  8826  		return nil, err
  8827  	}
  8828  	req.Header = reqHeaders
  8829  	googleapi.Expand(req.URL, map[string]string{
  8830  		"name": c.name,
  8831  	})
  8832  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8833  }
  8834  
  8835  // Do executes the "firebasehosting.sites.releases.get" call.
  8836  // Any non-2xx status code is an error. Response headers are in either
  8837  // *Release.ServerResponse.Header or (if a response was returned at all) in
  8838  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8839  // whether the returned error was because http.StatusNotModified was returned.
  8840  func (c *SitesReleasesGetCall) Do(opts ...googleapi.CallOption) (*Release, error) {
  8841  	gensupport.SetOptions(c.urlParams_, opts...)
  8842  	res, err := c.doRequest("json")
  8843  	if res != nil && res.StatusCode == http.StatusNotModified {
  8844  		if res.Body != nil {
  8845  			res.Body.Close()
  8846  		}
  8847  		return nil, gensupport.WrapError(&googleapi.Error{
  8848  			Code:   res.StatusCode,
  8849  			Header: res.Header,
  8850  		})
  8851  	}
  8852  	if err != nil {
  8853  		return nil, err
  8854  	}
  8855  	defer googleapi.CloseBody(res)
  8856  	if err := googleapi.CheckResponse(res); err != nil {
  8857  		return nil, gensupport.WrapError(err)
  8858  	}
  8859  	ret := &Release{
  8860  		ServerResponse: googleapi.ServerResponse{
  8861  			Header:         res.Header,
  8862  			HTTPStatusCode: res.StatusCode,
  8863  		},
  8864  	}
  8865  	target := &ret
  8866  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8867  		return nil, err
  8868  	}
  8869  	return ret, nil
  8870  }
  8871  
  8872  type SitesReleasesListCall struct {
  8873  	s            *Service
  8874  	parent       string
  8875  	urlParams_   gensupport.URLParams
  8876  	ifNoneMatch_ string
  8877  	ctx_         context.Context
  8878  	header_      http.Header
  8879  }
  8880  
  8881  // List: Lists the releases that have been created for the specified site or
  8882  // channel. When used to list releases for a site, this list includes releases
  8883  // for both the default `live` channel and any active preview channels for the
  8884  // specified site.
  8885  //
  8886  //   - parent: The site or channel for which to list releases, in either of the
  8887  //     following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID.
  8888  func (r *SitesReleasesService) List(parent string) *SitesReleasesListCall {
  8889  	c := &SitesReleasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8890  	c.parent = parent
  8891  	return c
  8892  }
  8893  
  8894  // PageSize sets the optional parameter "pageSize": The maximum number of
  8895  // releases to return. The service may return a lower number if fewer releases
  8896  // exist than this maximum number. If unspecified, defaults to 100.
  8897  func (c *SitesReleasesListCall) PageSize(pageSize int64) *SitesReleasesListCall {
  8898  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8899  	return c
  8900  }
  8901  
  8902  // PageToken sets the optional parameter "pageToken": A token from a previous
  8903  // call to `releases.list` or `channels.releases.list` that tells the server
  8904  // where to resume listing.
  8905  func (c *SitesReleasesListCall) PageToken(pageToken string) *SitesReleasesListCall {
  8906  	c.urlParams_.Set("pageToken", pageToken)
  8907  	return c
  8908  }
  8909  
  8910  // Fields allows partial responses to be retrieved. See
  8911  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8912  // details.
  8913  func (c *SitesReleasesListCall) Fields(s ...googleapi.Field) *SitesReleasesListCall {
  8914  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8915  	return c
  8916  }
  8917  
  8918  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8919  // object's ETag matches the given value. This is useful for getting updates
  8920  // only after the object has changed since the last request.
  8921  func (c *SitesReleasesListCall) IfNoneMatch(entityTag string) *SitesReleasesListCall {
  8922  	c.ifNoneMatch_ = entityTag
  8923  	return c
  8924  }
  8925  
  8926  // Context sets the context to be used in this call's Do method.
  8927  func (c *SitesReleasesListCall) Context(ctx context.Context) *SitesReleasesListCall {
  8928  	c.ctx_ = ctx
  8929  	return c
  8930  }
  8931  
  8932  // Header returns a http.Header that can be modified by the caller to add
  8933  // headers to the request.
  8934  func (c *SitesReleasesListCall) Header() http.Header {
  8935  	if c.header_ == nil {
  8936  		c.header_ = make(http.Header)
  8937  	}
  8938  	return c.header_
  8939  }
  8940  
  8941  func (c *SitesReleasesListCall) doRequest(alt string) (*http.Response, error) {
  8942  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8943  	if c.ifNoneMatch_ != "" {
  8944  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8945  	}
  8946  	var body io.Reader = nil
  8947  	c.urlParams_.Set("alt", alt)
  8948  	c.urlParams_.Set("prettyPrint", "false")
  8949  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/releases")
  8950  	urls += "?" + c.urlParams_.Encode()
  8951  	req, err := http.NewRequest("GET", urls, body)
  8952  	if err != nil {
  8953  		return nil, err
  8954  	}
  8955  	req.Header = reqHeaders
  8956  	googleapi.Expand(req.URL, map[string]string{
  8957  		"parent": c.parent,
  8958  	})
  8959  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8960  }
  8961  
  8962  // Do executes the "firebasehosting.sites.releases.list" call.
  8963  // Any non-2xx status code is an error. Response headers are in either
  8964  // *ListReleasesResponse.ServerResponse.Header or (if a response was returned
  8965  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8966  // check whether the returned error was because http.StatusNotModified was
  8967  // returned.
  8968  func (c *SitesReleasesListCall) Do(opts ...googleapi.CallOption) (*ListReleasesResponse, error) {
  8969  	gensupport.SetOptions(c.urlParams_, opts...)
  8970  	res, err := c.doRequest("json")
  8971  	if res != nil && res.StatusCode == http.StatusNotModified {
  8972  		if res.Body != nil {
  8973  			res.Body.Close()
  8974  		}
  8975  		return nil, gensupport.WrapError(&googleapi.Error{
  8976  			Code:   res.StatusCode,
  8977  			Header: res.Header,
  8978  		})
  8979  	}
  8980  	if err != nil {
  8981  		return nil, err
  8982  	}
  8983  	defer googleapi.CloseBody(res)
  8984  	if err := googleapi.CheckResponse(res); err != nil {
  8985  		return nil, gensupport.WrapError(err)
  8986  	}
  8987  	ret := &ListReleasesResponse{
  8988  		ServerResponse: googleapi.ServerResponse{
  8989  			Header:         res.Header,
  8990  			HTTPStatusCode: res.StatusCode,
  8991  		},
  8992  	}
  8993  	target := &ret
  8994  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8995  		return nil, err
  8996  	}
  8997  	return ret, nil
  8998  }
  8999  
  9000  // Pages invokes f for each page of results.
  9001  // A non-nil error returned from f will halt the iteration.
  9002  // The provided context supersedes any context provided to the Context method.
  9003  func (c *SitesReleasesListCall) Pages(ctx context.Context, f func(*ListReleasesResponse) error) error {
  9004  	c.ctx_ = ctx
  9005  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9006  	for {
  9007  		x, err := c.Do()
  9008  		if err != nil {
  9009  			return err
  9010  		}
  9011  		if err := f(x); err != nil {
  9012  			return err
  9013  		}
  9014  		if x.NextPageToken == "" {
  9015  			return nil
  9016  		}
  9017  		c.PageToken(x.NextPageToken)
  9018  	}
  9019  }
  9020  
  9021  type SitesVersionsCloneCall struct {
  9022  	s                   *Service
  9023  	parent              string
  9024  	cloneversionrequest *CloneVersionRequest
  9025  	urlParams_          gensupport.URLParams
  9026  	ctx_                context.Context
  9027  	header_             http.Header
  9028  }
  9029  
  9030  // Clone: Creates a new version on the specified target site using the content
  9031  // of the specified version.
  9032  //
  9033  //   - parent: The target site for the cloned version, in the format: sites/
  9034  //     SITE_ID.
  9035  func (r *SitesVersionsService) Clone(parent string, cloneversionrequest *CloneVersionRequest) *SitesVersionsCloneCall {
  9036  	c := &SitesVersionsCloneCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9037  	c.parent = parent
  9038  	c.cloneversionrequest = cloneversionrequest
  9039  	return c
  9040  }
  9041  
  9042  // Fields allows partial responses to be retrieved. See
  9043  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9044  // details.
  9045  func (c *SitesVersionsCloneCall) Fields(s ...googleapi.Field) *SitesVersionsCloneCall {
  9046  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9047  	return c
  9048  }
  9049  
  9050  // Context sets the context to be used in this call's Do method.
  9051  func (c *SitesVersionsCloneCall) Context(ctx context.Context) *SitesVersionsCloneCall {
  9052  	c.ctx_ = ctx
  9053  	return c
  9054  }
  9055  
  9056  // Header returns a http.Header that can be modified by the caller to add
  9057  // headers to the request.
  9058  func (c *SitesVersionsCloneCall) Header() http.Header {
  9059  	if c.header_ == nil {
  9060  		c.header_ = make(http.Header)
  9061  	}
  9062  	return c.header_
  9063  }
  9064  
  9065  func (c *SitesVersionsCloneCall) doRequest(alt string) (*http.Response, error) {
  9066  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9067  	var body io.Reader = nil
  9068  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloneversionrequest)
  9069  	if err != nil {
  9070  		return nil, err
  9071  	}
  9072  	c.urlParams_.Set("alt", alt)
  9073  	c.urlParams_.Set("prettyPrint", "false")
  9074  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions:clone")
  9075  	urls += "?" + c.urlParams_.Encode()
  9076  	req, err := http.NewRequest("POST", urls, body)
  9077  	if err != nil {
  9078  		return nil, err
  9079  	}
  9080  	req.Header = reqHeaders
  9081  	googleapi.Expand(req.URL, map[string]string{
  9082  		"parent": c.parent,
  9083  	})
  9084  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9085  }
  9086  
  9087  // Do executes the "firebasehosting.sites.versions.clone" call.
  9088  // Any non-2xx status code is an error. Response headers are in either
  9089  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9090  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9091  // whether the returned error was because http.StatusNotModified was returned.
  9092  func (c *SitesVersionsCloneCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9093  	gensupport.SetOptions(c.urlParams_, opts...)
  9094  	res, err := c.doRequest("json")
  9095  	if res != nil && res.StatusCode == http.StatusNotModified {
  9096  		if res.Body != nil {
  9097  			res.Body.Close()
  9098  		}
  9099  		return nil, gensupport.WrapError(&googleapi.Error{
  9100  			Code:   res.StatusCode,
  9101  			Header: res.Header,
  9102  		})
  9103  	}
  9104  	if err != nil {
  9105  		return nil, err
  9106  	}
  9107  	defer googleapi.CloseBody(res)
  9108  	if err := googleapi.CheckResponse(res); err != nil {
  9109  		return nil, gensupport.WrapError(err)
  9110  	}
  9111  	ret := &Operation{
  9112  		ServerResponse: googleapi.ServerResponse{
  9113  			Header:         res.Header,
  9114  			HTTPStatusCode: res.StatusCode,
  9115  		},
  9116  	}
  9117  	target := &ret
  9118  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9119  		return nil, err
  9120  	}
  9121  	return ret, nil
  9122  }
  9123  
  9124  type SitesVersionsCreateCall struct {
  9125  	s          *Service
  9126  	parent     string
  9127  	version    *Version
  9128  	urlParams_ gensupport.URLParams
  9129  	ctx_       context.Context
  9130  	header_    http.Header
  9131  }
  9132  
  9133  // Create: Creates a new version for the specified site.
  9134  //
  9135  //   - parent: The site in which to create the version, in the format: sites/
  9136  //     SITE_ID.
  9137  func (r *SitesVersionsService) Create(parent string, version *Version) *SitesVersionsCreateCall {
  9138  	c := &SitesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9139  	c.parent = parent
  9140  	c.version = version
  9141  	return c
  9142  }
  9143  
  9144  // SizeBytes sets the optional parameter "sizeBytes": The self-reported size of
  9145  // the version. This value is used for a pre-emptive quota check for legacy
  9146  // version uploads.
  9147  func (c *SitesVersionsCreateCall) SizeBytes(sizeBytes int64) *SitesVersionsCreateCall {
  9148  	c.urlParams_.Set("sizeBytes", fmt.Sprint(sizeBytes))
  9149  	return c
  9150  }
  9151  
  9152  // VersionId sets the optional parameter "versionId": A unique id for the new
  9153  // version. This is was only specified for legacy version creations, and should
  9154  // be blank.
  9155  func (c *SitesVersionsCreateCall) VersionId(versionId string) *SitesVersionsCreateCall {
  9156  	c.urlParams_.Set("versionId", versionId)
  9157  	return c
  9158  }
  9159  
  9160  // Fields allows partial responses to be retrieved. See
  9161  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9162  // details.
  9163  func (c *SitesVersionsCreateCall) Fields(s ...googleapi.Field) *SitesVersionsCreateCall {
  9164  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9165  	return c
  9166  }
  9167  
  9168  // Context sets the context to be used in this call's Do method.
  9169  func (c *SitesVersionsCreateCall) Context(ctx context.Context) *SitesVersionsCreateCall {
  9170  	c.ctx_ = ctx
  9171  	return c
  9172  }
  9173  
  9174  // Header returns a http.Header that can be modified by the caller to add
  9175  // headers to the request.
  9176  func (c *SitesVersionsCreateCall) Header() http.Header {
  9177  	if c.header_ == nil {
  9178  		c.header_ = make(http.Header)
  9179  	}
  9180  	return c.header_
  9181  }
  9182  
  9183  func (c *SitesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  9184  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9185  	var body io.Reader = nil
  9186  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  9187  	if err != nil {
  9188  		return nil, err
  9189  	}
  9190  	c.urlParams_.Set("alt", alt)
  9191  	c.urlParams_.Set("prettyPrint", "false")
  9192  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions")
  9193  	urls += "?" + c.urlParams_.Encode()
  9194  	req, err := http.NewRequest("POST", urls, body)
  9195  	if err != nil {
  9196  		return nil, err
  9197  	}
  9198  	req.Header = reqHeaders
  9199  	googleapi.Expand(req.URL, map[string]string{
  9200  		"parent": c.parent,
  9201  	})
  9202  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9203  }
  9204  
  9205  // Do executes the "firebasehosting.sites.versions.create" call.
  9206  // Any non-2xx status code is an error. Response headers are in either
  9207  // *Version.ServerResponse.Header or (if a response was returned at all) in
  9208  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9209  // whether the returned error was because http.StatusNotModified was returned.
  9210  func (c *SitesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  9211  	gensupport.SetOptions(c.urlParams_, opts...)
  9212  	res, err := c.doRequest("json")
  9213  	if res != nil && res.StatusCode == http.StatusNotModified {
  9214  		if res.Body != nil {
  9215  			res.Body.Close()
  9216  		}
  9217  		return nil, gensupport.WrapError(&googleapi.Error{
  9218  			Code:   res.StatusCode,
  9219  			Header: res.Header,
  9220  		})
  9221  	}
  9222  	if err != nil {
  9223  		return nil, err
  9224  	}
  9225  	defer googleapi.CloseBody(res)
  9226  	if err := googleapi.CheckResponse(res); err != nil {
  9227  		return nil, gensupport.WrapError(err)
  9228  	}
  9229  	ret := &Version{
  9230  		ServerResponse: googleapi.ServerResponse{
  9231  			Header:         res.Header,
  9232  			HTTPStatusCode: res.StatusCode,
  9233  		},
  9234  	}
  9235  	target := &ret
  9236  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9237  		return nil, err
  9238  	}
  9239  	return ret, nil
  9240  }
  9241  
  9242  type SitesVersionsDeleteCall struct {
  9243  	s          *Service
  9244  	name       string
  9245  	urlParams_ gensupport.URLParams
  9246  	ctx_       context.Context
  9247  	header_    http.Header
  9248  }
  9249  
  9250  // Delete: Deletes the specified version.
  9251  //
  9252  //   - name: The fully-qualified resource name for the version, in the format:
  9253  //     sites/SITE_ID/versions/VERSION_ID.
  9254  func (r *SitesVersionsService) Delete(name string) *SitesVersionsDeleteCall {
  9255  	c := &SitesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9256  	c.name = name
  9257  	return c
  9258  }
  9259  
  9260  // Fields allows partial responses to be retrieved. See
  9261  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9262  // details.
  9263  func (c *SitesVersionsDeleteCall) Fields(s ...googleapi.Field) *SitesVersionsDeleteCall {
  9264  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9265  	return c
  9266  }
  9267  
  9268  // Context sets the context to be used in this call's Do method.
  9269  func (c *SitesVersionsDeleteCall) Context(ctx context.Context) *SitesVersionsDeleteCall {
  9270  	c.ctx_ = ctx
  9271  	return c
  9272  }
  9273  
  9274  // Header returns a http.Header that can be modified by the caller to add
  9275  // headers to the request.
  9276  func (c *SitesVersionsDeleteCall) Header() http.Header {
  9277  	if c.header_ == nil {
  9278  		c.header_ = make(http.Header)
  9279  	}
  9280  	return c.header_
  9281  }
  9282  
  9283  func (c *SitesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9284  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9285  	var body io.Reader = nil
  9286  	c.urlParams_.Set("alt", alt)
  9287  	c.urlParams_.Set("prettyPrint", "false")
  9288  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  9289  	urls += "?" + c.urlParams_.Encode()
  9290  	req, err := http.NewRequest("DELETE", urls, body)
  9291  	if err != nil {
  9292  		return nil, err
  9293  	}
  9294  	req.Header = reqHeaders
  9295  	googleapi.Expand(req.URL, map[string]string{
  9296  		"name": c.name,
  9297  	})
  9298  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9299  }
  9300  
  9301  // Do executes the "firebasehosting.sites.versions.delete" call.
  9302  // Any non-2xx status code is an error. Response headers are in either
  9303  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  9304  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9305  // whether the returned error was because http.StatusNotModified was returned.
  9306  func (c *SitesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  9307  	gensupport.SetOptions(c.urlParams_, opts...)
  9308  	res, err := c.doRequest("json")
  9309  	if res != nil && res.StatusCode == http.StatusNotModified {
  9310  		if res.Body != nil {
  9311  			res.Body.Close()
  9312  		}
  9313  		return nil, gensupport.WrapError(&googleapi.Error{
  9314  			Code:   res.StatusCode,
  9315  			Header: res.Header,
  9316  		})
  9317  	}
  9318  	if err != nil {
  9319  		return nil, err
  9320  	}
  9321  	defer googleapi.CloseBody(res)
  9322  	if err := googleapi.CheckResponse(res); err != nil {
  9323  		return nil, gensupport.WrapError(err)
  9324  	}
  9325  	ret := &Empty{
  9326  		ServerResponse: googleapi.ServerResponse{
  9327  			Header:         res.Header,
  9328  			HTTPStatusCode: res.StatusCode,
  9329  		},
  9330  	}
  9331  	target := &ret
  9332  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9333  		return nil, err
  9334  	}
  9335  	return ret, nil
  9336  }
  9337  
  9338  type SitesVersionsGetCall struct {
  9339  	s            *Service
  9340  	name         string
  9341  	urlParams_   gensupport.URLParams
  9342  	ifNoneMatch_ string
  9343  	ctx_         context.Context
  9344  	header_      http.Header
  9345  }
  9346  
  9347  // Get: Get the specified version that has been created for the specified site.
  9348  // This can include versions that were created for the default `live` channel
  9349  // or for any active preview channels for the specified site.
  9350  //
  9351  //   - name: The fully-qualified resource name for the version, in the format:
  9352  //     sites/SITE_ID/versions/VERSION_ID.
  9353  func (r *SitesVersionsService) Get(name string) *SitesVersionsGetCall {
  9354  	c := &SitesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9355  	c.name = name
  9356  	return c
  9357  }
  9358  
  9359  // Fields allows partial responses to be retrieved. See
  9360  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9361  // details.
  9362  func (c *SitesVersionsGetCall) Fields(s ...googleapi.Field) *SitesVersionsGetCall {
  9363  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9364  	return c
  9365  }
  9366  
  9367  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9368  // object's ETag matches the given value. This is useful for getting updates
  9369  // only after the object has changed since the last request.
  9370  func (c *SitesVersionsGetCall) IfNoneMatch(entityTag string) *SitesVersionsGetCall {
  9371  	c.ifNoneMatch_ = entityTag
  9372  	return c
  9373  }
  9374  
  9375  // Context sets the context to be used in this call's Do method.
  9376  func (c *SitesVersionsGetCall) Context(ctx context.Context) *SitesVersionsGetCall {
  9377  	c.ctx_ = ctx
  9378  	return c
  9379  }
  9380  
  9381  // Header returns a http.Header that can be modified by the caller to add
  9382  // headers to the request.
  9383  func (c *SitesVersionsGetCall) Header() http.Header {
  9384  	if c.header_ == nil {
  9385  		c.header_ = make(http.Header)
  9386  	}
  9387  	return c.header_
  9388  }
  9389  
  9390  func (c *SitesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  9391  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9392  	if c.ifNoneMatch_ != "" {
  9393  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9394  	}
  9395  	var body io.Reader = nil
  9396  	c.urlParams_.Set("alt", alt)
  9397  	c.urlParams_.Set("prettyPrint", "false")
  9398  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  9399  	urls += "?" + c.urlParams_.Encode()
  9400  	req, err := http.NewRequest("GET", urls, body)
  9401  	if err != nil {
  9402  		return nil, err
  9403  	}
  9404  	req.Header = reqHeaders
  9405  	googleapi.Expand(req.URL, map[string]string{
  9406  		"name": c.name,
  9407  	})
  9408  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9409  }
  9410  
  9411  // Do executes the "firebasehosting.sites.versions.get" call.
  9412  // Any non-2xx status code is an error. Response headers are in either
  9413  // *Version.ServerResponse.Header or (if a response was returned at all) in
  9414  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9415  // whether the returned error was because http.StatusNotModified was returned.
  9416  func (c *SitesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  9417  	gensupport.SetOptions(c.urlParams_, opts...)
  9418  	res, err := c.doRequest("json")
  9419  	if res != nil && res.StatusCode == http.StatusNotModified {
  9420  		if res.Body != nil {
  9421  			res.Body.Close()
  9422  		}
  9423  		return nil, gensupport.WrapError(&googleapi.Error{
  9424  			Code:   res.StatusCode,
  9425  			Header: res.Header,
  9426  		})
  9427  	}
  9428  	if err != nil {
  9429  		return nil, err
  9430  	}
  9431  	defer googleapi.CloseBody(res)
  9432  	if err := googleapi.CheckResponse(res); err != nil {
  9433  		return nil, gensupport.WrapError(err)
  9434  	}
  9435  	ret := &Version{
  9436  		ServerResponse: googleapi.ServerResponse{
  9437  			Header:         res.Header,
  9438  			HTTPStatusCode: res.StatusCode,
  9439  		},
  9440  	}
  9441  	target := &ret
  9442  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9443  		return nil, err
  9444  	}
  9445  	return ret, nil
  9446  }
  9447  
  9448  type SitesVersionsListCall struct {
  9449  	s            *Service
  9450  	parent       string
  9451  	urlParams_   gensupport.URLParams
  9452  	ifNoneMatch_ string
  9453  	ctx_         context.Context
  9454  	header_      http.Header
  9455  }
  9456  
  9457  // List: Lists the versions that have been created for the specified site. This
  9458  // list includes versions for both the default `live` channel and any active
  9459  // preview channels for the specified site.
  9460  //
  9461  //   - parent: The site or channel for which to list versions, in either of the
  9462  //     following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID.
  9463  func (r *SitesVersionsService) List(parent string) *SitesVersionsListCall {
  9464  	c := &SitesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9465  	c.parent = parent
  9466  	return c
  9467  }
  9468  
  9469  // Filter sets the optional parameter "filter": A filter string used to return
  9470  // a subset of versions in the response. The currently supported fields for
  9471  // filtering are: `name`, `status`, and `create_time`. Learn more about
  9472  // filtering in Google's AIP 160 standard (https://google.aip.dev/160).
  9473  func (c *SitesVersionsListCall) Filter(filter string) *SitesVersionsListCall {
  9474  	c.urlParams_.Set("filter", filter)
  9475  	return c
  9476  }
  9477  
  9478  // PageSize sets the optional parameter "pageSize": The maximum number of
  9479  // versions to return. The service may return a lower number if fewer versions
  9480  // exist than this maximum number. If unspecified, defaults to 25. The maximum
  9481  // value is 100; values above 100 will be coerced to 100.
  9482  func (c *SitesVersionsListCall) PageSize(pageSize int64) *SitesVersionsListCall {
  9483  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9484  	return c
  9485  }
  9486  
  9487  // PageToken sets the optional parameter "pageToken": A token from a previous
  9488  // call to `ListVersions` that tells the server where to resume listing.
  9489  func (c *SitesVersionsListCall) PageToken(pageToken string) *SitesVersionsListCall {
  9490  	c.urlParams_.Set("pageToken", pageToken)
  9491  	return c
  9492  }
  9493  
  9494  // Fields allows partial responses to be retrieved. See
  9495  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9496  // details.
  9497  func (c *SitesVersionsListCall) Fields(s ...googleapi.Field) *SitesVersionsListCall {
  9498  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9499  	return c
  9500  }
  9501  
  9502  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9503  // object's ETag matches the given value. This is useful for getting updates
  9504  // only after the object has changed since the last request.
  9505  func (c *SitesVersionsListCall) IfNoneMatch(entityTag string) *SitesVersionsListCall {
  9506  	c.ifNoneMatch_ = entityTag
  9507  	return c
  9508  }
  9509  
  9510  // Context sets the context to be used in this call's Do method.
  9511  func (c *SitesVersionsListCall) Context(ctx context.Context) *SitesVersionsListCall {
  9512  	c.ctx_ = ctx
  9513  	return c
  9514  }
  9515  
  9516  // Header returns a http.Header that can be modified by the caller to add
  9517  // headers to the request.
  9518  func (c *SitesVersionsListCall) Header() http.Header {
  9519  	if c.header_ == nil {
  9520  		c.header_ = make(http.Header)
  9521  	}
  9522  	return c.header_
  9523  }
  9524  
  9525  func (c *SitesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  9526  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9527  	if c.ifNoneMatch_ != "" {
  9528  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9529  	}
  9530  	var body io.Reader = nil
  9531  	c.urlParams_.Set("alt", alt)
  9532  	c.urlParams_.Set("prettyPrint", "false")
  9533  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions")
  9534  	urls += "?" + c.urlParams_.Encode()
  9535  	req, err := http.NewRequest("GET", urls, body)
  9536  	if err != nil {
  9537  		return nil, err
  9538  	}
  9539  	req.Header = reqHeaders
  9540  	googleapi.Expand(req.URL, map[string]string{
  9541  		"parent": c.parent,
  9542  	})
  9543  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9544  }
  9545  
  9546  // Do executes the "firebasehosting.sites.versions.list" call.
  9547  // Any non-2xx status code is an error. Response headers are in either
  9548  // *ListVersionsResponse.ServerResponse.Header or (if a response was returned
  9549  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9550  // check whether the returned error was because http.StatusNotModified was
  9551  // returned.
  9552  func (c *SitesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  9553  	gensupport.SetOptions(c.urlParams_, opts...)
  9554  	res, err := c.doRequest("json")
  9555  	if res != nil && res.StatusCode == http.StatusNotModified {
  9556  		if res.Body != nil {
  9557  			res.Body.Close()
  9558  		}
  9559  		return nil, gensupport.WrapError(&googleapi.Error{
  9560  			Code:   res.StatusCode,
  9561  			Header: res.Header,
  9562  		})
  9563  	}
  9564  	if err != nil {
  9565  		return nil, err
  9566  	}
  9567  	defer googleapi.CloseBody(res)
  9568  	if err := googleapi.CheckResponse(res); err != nil {
  9569  		return nil, gensupport.WrapError(err)
  9570  	}
  9571  	ret := &ListVersionsResponse{
  9572  		ServerResponse: googleapi.ServerResponse{
  9573  			Header:         res.Header,
  9574  			HTTPStatusCode: res.StatusCode,
  9575  		},
  9576  	}
  9577  	target := &ret
  9578  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9579  		return nil, err
  9580  	}
  9581  	return ret, nil
  9582  }
  9583  
  9584  // Pages invokes f for each page of results.
  9585  // A non-nil error returned from f will halt the iteration.
  9586  // The provided context supersedes any context provided to the Context method.
  9587  func (c *SitesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  9588  	c.ctx_ = ctx
  9589  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9590  	for {
  9591  		x, err := c.Do()
  9592  		if err != nil {
  9593  			return err
  9594  		}
  9595  		if err := f(x); err != nil {
  9596  			return err
  9597  		}
  9598  		if x.NextPageToken == "" {
  9599  			return nil
  9600  		}
  9601  		c.PageToken(x.NextPageToken)
  9602  	}
  9603  }
  9604  
  9605  type SitesVersionsPatchCall struct {
  9606  	s          *Service
  9607  	name       string
  9608  	version    *Version
  9609  	urlParams_ gensupport.URLParams
  9610  	ctx_       context.Context
  9611  	header_    http.Header
  9612  }
  9613  
  9614  // Patch:  Updates the specified metadata for the specified version. This
  9615  // method will fail with `FAILED_PRECONDITION` in the event of an invalid state
  9616  // transition. The supported state (../sites.versions#versionstatus)
  9617  // transitions for a version are from `CREATED` to `FINALIZED`. Use
  9618  // `DeleteVersion` (delete) to set the status of a version to `DELETED`.
  9619  //
  9620  //   - name: The fully-qualified resource name for the version, in the format:
  9621  //     sites/ SITE_ID/versions/VERSION_ID This name is provided in the response
  9622  //     body when you call `CreateVersion` (sites.versions/create).
  9623  func (r *SitesVersionsService) Patch(name string, version *Version) *SitesVersionsPatchCall {
  9624  	c := &SitesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9625  	c.name = name
  9626  	c.version = version
  9627  	return c
  9628  }
  9629  
  9630  // UpdateMask sets the optional parameter "updateMask": A set of field names
  9631  // from your version (../sites.versions) that you want to update. A field will
  9632  // be overwritten if, and only if, it's in the mask. If a mask is not provided
  9633  // then a default mask of only `status`
  9634  // (../sites.versions#Version.FIELDS.status) will be used.
  9635  func (c *SitesVersionsPatchCall) UpdateMask(updateMask string) *SitesVersionsPatchCall {
  9636  	c.urlParams_.Set("updateMask", updateMask)
  9637  	return c
  9638  }
  9639  
  9640  // Fields allows partial responses to be retrieved. See
  9641  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9642  // details.
  9643  func (c *SitesVersionsPatchCall) Fields(s ...googleapi.Field) *SitesVersionsPatchCall {
  9644  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9645  	return c
  9646  }
  9647  
  9648  // Context sets the context to be used in this call's Do method.
  9649  func (c *SitesVersionsPatchCall) Context(ctx context.Context) *SitesVersionsPatchCall {
  9650  	c.ctx_ = ctx
  9651  	return c
  9652  }
  9653  
  9654  // Header returns a http.Header that can be modified by the caller to add
  9655  // headers to the request.
  9656  func (c *SitesVersionsPatchCall) Header() http.Header {
  9657  	if c.header_ == nil {
  9658  		c.header_ = make(http.Header)
  9659  	}
  9660  	return c.header_
  9661  }
  9662  
  9663  func (c *SitesVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
  9664  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9665  	var body io.Reader = nil
  9666  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
  9667  	if err != nil {
  9668  		return nil, err
  9669  	}
  9670  	c.urlParams_.Set("alt", alt)
  9671  	c.urlParams_.Set("prettyPrint", "false")
  9672  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  9673  	urls += "?" + c.urlParams_.Encode()
  9674  	req, err := http.NewRequest("PATCH", urls, body)
  9675  	if err != nil {
  9676  		return nil, err
  9677  	}
  9678  	req.Header = reqHeaders
  9679  	googleapi.Expand(req.URL, map[string]string{
  9680  		"name": c.name,
  9681  	})
  9682  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9683  }
  9684  
  9685  // Do executes the "firebasehosting.sites.versions.patch" call.
  9686  // Any non-2xx status code is an error. Response headers are in either
  9687  // *Version.ServerResponse.Header or (if a response was returned at all) in
  9688  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9689  // whether the returned error was because http.StatusNotModified was returned.
  9690  func (c *SitesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  9691  	gensupport.SetOptions(c.urlParams_, opts...)
  9692  	res, err := c.doRequest("json")
  9693  	if res != nil && res.StatusCode == http.StatusNotModified {
  9694  		if res.Body != nil {
  9695  			res.Body.Close()
  9696  		}
  9697  		return nil, gensupport.WrapError(&googleapi.Error{
  9698  			Code:   res.StatusCode,
  9699  			Header: res.Header,
  9700  		})
  9701  	}
  9702  	if err != nil {
  9703  		return nil, err
  9704  	}
  9705  	defer googleapi.CloseBody(res)
  9706  	if err := googleapi.CheckResponse(res); err != nil {
  9707  		return nil, gensupport.WrapError(err)
  9708  	}
  9709  	ret := &Version{
  9710  		ServerResponse: googleapi.ServerResponse{
  9711  			Header:         res.Header,
  9712  			HTTPStatusCode: res.StatusCode,
  9713  		},
  9714  	}
  9715  	target := &ret
  9716  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9717  		return nil, err
  9718  	}
  9719  	return ret, nil
  9720  }
  9721  
  9722  type SitesVersionsPopulateFilesCall struct {
  9723  	s                           *Service
  9724  	parent                      string
  9725  	populateversionfilesrequest *PopulateVersionFilesRequest
  9726  	urlParams_                  gensupport.URLParams
  9727  	ctx_                        context.Context
  9728  	header_                     http.Header
  9729  }
  9730  
  9731  // PopulateFiles:  Adds content files to the specified version. Each file must
  9732  // be under 2 GB.
  9733  //
  9734  //   - parent: The version to which to add files, in the format: sites/SITE_ID
  9735  //     /versions/VERSION_ID.
  9736  func (r *SitesVersionsService) PopulateFiles(parent string, populateversionfilesrequest *PopulateVersionFilesRequest) *SitesVersionsPopulateFilesCall {
  9737  	c := &SitesVersionsPopulateFilesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9738  	c.parent = parent
  9739  	c.populateversionfilesrequest = populateversionfilesrequest
  9740  	return c
  9741  }
  9742  
  9743  // Fields allows partial responses to be retrieved. See
  9744  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9745  // details.
  9746  func (c *SitesVersionsPopulateFilesCall) Fields(s ...googleapi.Field) *SitesVersionsPopulateFilesCall {
  9747  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9748  	return c
  9749  }
  9750  
  9751  // Context sets the context to be used in this call's Do method.
  9752  func (c *SitesVersionsPopulateFilesCall) Context(ctx context.Context) *SitesVersionsPopulateFilesCall {
  9753  	c.ctx_ = ctx
  9754  	return c
  9755  }
  9756  
  9757  // Header returns a http.Header that can be modified by the caller to add
  9758  // headers to the request.
  9759  func (c *SitesVersionsPopulateFilesCall) Header() http.Header {
  9760  	if c.header_ == nil {
  9761  		c.header_ = make(http.Header)
  9762  	}
  9763  	return c.header_
  9764  }
  9765  
  9766  func (c *SitesVersionsPopulateFilesCall) doRequest(alt string) (*http.Response, error) {
  9767  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9768  	var body io.Reader = nil
  9769  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.populateversionfilesrequest)
  9770  	if err != nil {
  9771  		return nil, err
  9772  	}
  9773  	c.urlParams_.Set("alt", alt)
  9774  	c.urlParams_.Set("prettyPrint", "false")
  9775  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}:populateFiles")
  9776  	urls += "?" + c.urlParams_.Encode()
  9777  	req, err := http.NewRequest("POST", urls, body)
  9778  	if err != nil {
  9779  		return nil, err
  9780  	}
  9781  	req.Header = reqHeaders
  9782  	googleapi.Expand(req.URL, map[string]string{
  9783  		"parent": c.parent,
  9784  	})
  9785  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9786  }
  9787  
  9788  // Do executes the "firebasehosting.sites.versions.populateFiles" call.
  9789  // Any non-2xx status code is an error. Response headers are in either
  9790  // *PopulateVersionFilesResponse.ServerResponse.Header or (if a response was
  9791  // returned at all) in error.(*googleapi.Error).Header. Use
  9792  // googleapi.IsNotModified to check whether the returned error was because
  9793  // http.StatusNotModified was returned.
  9794  func (c *SitesVersionsPopulateFilesCall) Do(opts ...googleapi.CallOption) (*PopulateVersionFilesResponse, error) {
  9795  	gensupport.SetOptions(c.urlParams_, opts...)
  9796  	res, err := c.doRequest("json")
  9797  	if res != nil && res.StatusCode == http.StatusNotModified {
  9798  		if res.Body != nil {
  9799  			res.Body.Close()
  9800  		}
  9801  		return nil, gensupport.WrapError(&googleapi.Error{
  9802  			Code:   res.StatusCode,
  9803  			Header: res.Header,
  9804  		})
  9805  	}
  9806  	if err != nil {
  9807  		return nil, err
  9808  	}
  9809  	defer googleapi.CloseBody(res)
  9810  	if err := googleapi.CheckResponse(res); err != nil {
  9811  		return nil, gensupport.WrapError(err)
  9812  	}
  9813  	ret := &PopulateVersionFilesResponse{
  9814  		ServerResponse: googleapi.ServerResponse{
  9815  			Header:         res.Header,
  9816  			HTTPStatusCode: res.StatusCode,
  9817  		},
  9818  	}
  9819  	target := &ret
  9820  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9821  		return nil, err
  9822  	}
  9823  	return ret, nil
  9824  }
  9825  
  9826  type SitesVersionsFilesListCall struct {
  9827  	s            *Service
  9828  	parent       string
  9829  	urlParams_   gensupport.URLParams
  9830  	ifNoneMatch_ string
  9831  	ctx_         context.Context
  9832  	header_      http.Header
  9833  }
  9834  
  9835  // List: Lists the remaining files to be uploaded for the specified version.
  9836  //
  9837  //   - parent: The version for which to list files, in the format: sites/SITE_ID
  9838  //     /versions/VERSION_ID.
  9839  func (r *SitesVersionsFilesService) List(parent string) *SitesVersionsFilesListCall {
  9840  	c := &SitesVersionsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9841  	c.parent = parent
  9842  	return c
  9843  }
  9844  
  9845  // PageSize sets the optional parameter "pageSize": The maximum number of
  9846  // version files to return. The service may return a lower number if fewer
  9847  // version files exist than this maximum number. If unspecified, defaults to
  9848  // 1000.
  9849  func (c *SitesVersionsFilesListCall) PageSize(pageSize int64) *SitesVersionsFilesListCall {
  9850  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9851  	return c
  9852  }
  9853  
  9854  // PageToken sets the optional parameter "pageToken": A token from a previous
  9855  // call to `ListVersionFiles` that tells the server where to resume listing.
  9856  func (c *SitesVersionsFilesListCall) PageToken(pageToken string) *SitesVersionsFilesListCall {
  9857  	c.urlParams_.Set("pageToken", pageToken)
  9858  	return c
  9859  }
  9860  
  9861  // Status sets the optional parameter "status": The type of files that should
  9862  // be listed for the specified version.
  9863  //
  9864  // Possible values:
  9865  //
  9866  //	"STATUS_UNSPECIFIED" - The default status; should not be intentionally
  9867  //
  9868  // used.
  9869  //
  9870  //	"EXPECTED" - The file has been included in the version and is expected to
  9871  //
  9872  // be uploaded in the near future.
  9873  //
  9874  //	"ACTIVE" - The file has already been uploaded to Firebase Hosting.
  9875  func (c *SitesVersionsFilesListCall) Status(status string) *SitesVersionsFilesListCall {
  9876  	c.urlParams_.Set("status", status)
  9877  	return c
  9878  }
  9879  
  9880  // Fields allows partial responses to be retrieved. See
  9881  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9882  // details.
  9883  func (c *SitesVersionsFilesListCall) Fields(s ...googleapi.Field) *SitesVersionsFilesListCall {
  9884  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9885  	return c
  9886  }
  9887  
  9888  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9889  // object's ETag matches the given value. This is useful for getting updates
  9890  // only after the object has changed since the last request.
  9891  func (c *SitesVersionsFilesListCall) IfNoneMatch(entityTag string) *SitesVersionsFilesListCall {
  9892  	c.ifNoneMatch_ = entityTag
  9893  	return c
  9894  }
  9895  
  9896  // Context sets the context to be used in this call's Do method.
  9897  func (c *SitesVersionsFilesListCall) Context(ctx context.Context) *SitesVersionsFilesListCall {
  9898  	c.ctx_ = ctx
  9899  	return c
  9900  }
  9901  
  9902  // Header returns a http.Header that can be modified by the caller to add
  9903  // headers to the request.
  9904  func (c *SitesVersionsFilesListCall) Header() http.Header {
  9905  	if c.header_ == nil {
  9906  		c.header_ = make(http.Header)
  9907  	}
  9908  	return c.header_
  9909  }
  9910  
  9911  func (c *SitesVersionsFilesListCall) doRequest(alt string) (*http.Response, error) {
  9912  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9913  	if c.ifNoneMatch_ != "" {
  9914  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9915  	}
  9916  	var body io.Reader = nil
  9917  	c.urlParams_.Set("alt", alt)
  9918  	c.urlParams_.Set("prettyPrint", "false")
  9919  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/files")
  9920  	urls += "?" + c.urlParams_.Encode()
  9921  	req, err := http.NewRequest("GET", urls, body)
  9922  	if err != nil {
  9923  		return nil, err
  9924  	}
  9925  	req.Header = reqHeaders
  9926  	googleapi.Expand(req.URL, map[string]string{
  9927  		"parent": c.parent,
  9928  	})
  9929  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9930  }
  9931  
  9932  // Do executes the "firebasehosting.sites.versions.files.list" call.
  9933  // Any non-2xx status code is an error. Response headers are in either
  9934  // *ListVersionFilesResponse.ServerResponse.Header or (if a response was
  9935  // returned at all) in error.(*googleapi.Error).Header. Use
  9936  // googleapi.IsNotModified to check whether the returned error was because
  9937  // http.StatusNotModified was returned.
  9938  func (c *SitesVersionsFilesListCall) Do(opts ...googleapi.CallOption) (*ListVersionFilesResponse, error) {
  9939  	gensupport.SetOptions(c.urlParams_, opts...)
  9940  	res, err := c.doRequest("json")
  9941  	if res != nil && res.StatusCode == http.StatusNotModified {
  9942  		if res.Body != nil {
  9943  			res.Body.Close()
  9944  		}
  9945  		return nil, gensupport.WrapError(&googleapi.Error{
  9946  			Code:   res.StatusCode,
  9947  			Header: res.Header,
  9948  		})
  9949  	}
  9950  	if err != nil {
  9951  		return nil, err
  9952  	}
  9953  	defer googleapi.CloseBody(res)
  9954  	if err := googleapi.CheckResponse(res); err != nil {
  9955  		return nil, gensupport.WrapError(err)
  9956  	}
  9957  	ret := &ListVersionFilesResponse{
  9958  		ServerResponse: googleapi.ServerResponse{
  9959  			Header:         res.Header,
  9960  			HTTPStatusCode: res.StatusCode,
  9961  		},
  9962  	}
  9963  	target := &ret
  9964  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9965  		return nil, err
  9966  	}
  9967  	return ret, nil
  9968  }
  9969  
  9970  // Pages invokes f for each page of results.
  9971  // A non-nil error returned from f will halt the iteration.
  9972  // The provided context supersedes any context provided to the Context method.
  9973  func (c *SitesVersionsFilesListCall) Pages(ctx context.Context, f func(*ListVersionFilesResponse) error) error {
  9974  	c.ctx_ = ctx
  9975  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9976  	for {
  9977  		x, err := c.Do()
  9978  		if err != nil {
  9979  			return err
  9980  		}
  9981  		if err := f(x); err != nil {
  9982  			return err
  9983  		}
  9984  		if x.NextPageToken == "" {
  9985  			return nil
  9986  		}
  9987  		c.PageToken(x.NextPageToken)
  9988  	}
  9989  }
  9990  

View as plain text