...

Source file src/google.golang.org/api/streetviewpublish/v1/streetviewpublish-gen.go

Documentation: google.golang.org/api/streetviewpublish/v1

     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 streetviewpublish provides access to the Street View Publish API.
     8  //
     9  // For product documentation, see: https://developers.google.com/streetview/publish/
    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/streetviewpublish/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	streetviewpublishService, err := streetviewpublish.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  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	streetviewpublishService, err := streetviewpublish.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	streetviewpublishService, err := streetviewpublish.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package streetviewpublish // import "google.golang.org/api/streetviewpublish/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "streetviewpublish:v1"
    90  const apiName = "streetviewpublish"
    91  const apiVersion = "v1"
    92  const basePath = "https://streetviewpublish.googleapis.com/"
    93  const basePathTemplate = "https://streetviewpublish.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://streetviewpublish.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// Publish and manage your 360 photos on Google Street View
    99  	StreetviewpublishScope = "https://www.googleapis.com/auth/streetviewpublish"
   100  )
   101  
   102  // NewService creates a new Service.
   103  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   104  	scopesOption := internaloption.WithDefaultScopes(
   105  		"https://www.googleapis.com/auth/streetviewpublish",
   106  	)
   107  	// NOTE: prepend, so we don't override user-specified scopes.
   108  	opts = append([]option.ClientOption{scopesOption}, opts...)
   109  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   110  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   111  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   112  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   113  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   114  	if err != nil {
   115  		return nil, err
   116  	}
   117  	s, err := New(client)
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	if endpoint != "" {
   122  		s.BasePath = endpoint
   123  	}
   124  	return s, nil
   125  }
   126  
   127  // New creates a new Service. It uses the provided http.Client for requests.
   128  //
   129  // Deprecated: please use NewService instead.
   130  // To provide a custom HTTP client, use option.WithHTTPClient.
   131  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   132  func New(client *http.Client) (*Service, error) {
   133  	if client == nil {
   134  		return nil, errors.New("client is nil")
   135  	}
   136  	s := &Service{client: client, BasePath: basePath}
   137  	s.Photo = NewPhotoService(s)
   138  	s.PhotoSequence = NewPhotoSequenceService(s)
   139  	s.PhotoSequences = NewPhotoSequencesService(s)
   140  	s.Photos = NewPhotosService(s)
   141  	return s, nil
   142  }
   143  
   144  type Service struct {
   145  	client    *http.Client
   146  	BasePath  string // API endpoint base URL
   147  	UserAgent string // optional additional User-Agent fragment
   148  
   149  	Photo *PhotoService
   150  
   151  	PhotoSequence *PhotoSequenceService
   152  
   153  	PhotoSequences *PhotoSequencesService
   154  
   155  	Photos *PhotosService
   156  }
   157  
   158  func (s *Service) userAgent() string {
   159  	if s.UserAgent == "" {
   160  		return googleapi.UserAgent
   161  	}
   162  	return googleapi.UserAgent + " " + s.UserAgent
   163  }
   164  
   165  func NewPhotoService(s *Service) *PhotoService {
   166  	rs := &PhotoService{s: s}
   167  	return rs
   168  }
   169  
   170  type PhotoService struct {
   171  	s *Service
   172  }
   173  
   174  func NewPhotoSequenceService(s *Service) *PhotoSequenceService {
   175  	rs := &PhotoSequenceService{s: s}
   176  	return rs
   177  }
   178  
   179  type PhotoSequenceService struct {
   180  	s *Service
   181  }
   182  
   183  func NewPhotoSequencesService(s *Service) *PhotoSequencesService {
   184  	rs := &PhotoSequencesService{s: s}
   185  	return rs
   186  }
   187  
   188  type PhotoSequencesService struct {
   189  	s *Service
   190  }
   191  
   192  func NewPhotosService(s *Service) *PhotosService {
   193  	rs := &PhotosService{s: s}
   194  	return rs
   195  }
   196  
   197  type PhotosService struct {
   198  	s *Service
   199  }
   200  
   201  // BatchDeletePhotosRequest: Request to delete multiple Photos.
   202  type BatchDeletePhotosRequest struct {
   203  	// PhotoIds: Required. IDs of the Photos. HTTP GET requests require the
   204  	// following syntax for the URL query parameter: `photoIds=&photoIds=&...`.
   205  	PhotoIds []string `json:"photoIds,omitempty"`
   206  	// ForceSendFields is a list of field names (e.g. "PhotoIds") to
   207  	// unconditionally include in API requests. By default, fields with empty or
   208  	// default values are omitted from API requests. See
   209  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   210  	// details.
   211  	ForceSendFields []string `json:"-"`
   212  	// NullFields is a list of field names (e.g. "PhotoIds") to include in API
   213  	// requests with the JSON null value. By default, fields with empty values are
   214  	// omitted from API requests. See
   215  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   216  	NullFields []string `json:"-"`
   217  }
   218  
   219  func (s *BatchDeletePhotosRequest) MarshalJSON() ([]byte, error) {
   220  	type NoMethod BatchDeletePhotosRequest
   221  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   222  }
   223  
   224  // BatchDeletePhotosResponse: Response to batch delete of one or more Photos.
   225  type BatchDeletePhotosResponse struct {
   226  	// Status: The status for the operation to delete a single Photo in the batch
   227  	// request.
   228  	Status []*Status `json:"status,omitempty"`
   229  
   230  	// ServerResponse contains the HTTP response code and headers from the server.
   231  	googleapi.ServerResponse `json:"-"`
   232  	// ForceSendFields is a list of field names (e.g. "Status") to unconditionally
   233  	// include in API requests. By default, fields with empty or default values are
   234  	// omitted from API requests. See
   235  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   236  	// details.
   237  	ForceSendFields []string `json:"-"`
   238  	// NullFields is a list of field names (e.g. "Status") to include in API
   239  	// requests with the JSON null value. By default, fields with empty values are
   240  	// omitted from API requests. See
   241  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   242  	NullFields []string `json:"-"`
   243  }
   244  
   245  func (s *BatchDeletePhotosResponse) MarshalJSON() ([]byte, error) {
   246  	type NoMethod BatchDeletePhotosResponse
   247  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   248  }
   249  
   250  // BatchGetPhotosResponse: Response to batch get of Photos.
   251  type BatchGetPhotosResponse struct {
   252  	// Results: List of results for each individual Photo requested, in the same
   253  	// order as the requests in BatchGetPhotos.
   254  	Results []*PhotoResponse `json:"results,omitempty"`
   255  
   256  	// ServerResponse contains the HTTP response code and headers from the server.
   257  	googleapi.ServerResponse `json:"-"`
   258  	// ForceSendFields is a list of field names (e.g. "Results") to unconditionally
   259  	// include in API requests. By default, fields with empty or default values are
   260  	// omitted from API requests. See
   261  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   262  	// details.
   263  	ForceSendFields []string `json:"-"`
   264  	// NullFields is a list of field names (e.g. "Results") to include in API
   265  	// requests with the JSON null value. By default, fields with empty values are
   266  	// omitted from API requests. See
   267  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   268  	NullFields []string `json:"-"`
   269  }
   270  
   271  func (s *BatchGetPhotosResponse) MarshalJSON() ([]byte, error) {
   272  	type NoMethod BatchGetPhotosResponse
   273  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   274  }
   275  
   276  // BatchUpdatePhotosRequest: Request to update the metadata of photos. Updating
   277  // the pixels of photos is not supported.
   278  type BatchUpdatePhotosRequest struct {
   279  	// UpdatePhotoRequests: Required. List of UpdatePhotoRequests.
   280  	UpdatePhotoRequests []*UpdatePhotoRequest `json:"updatePhotoRequests,omitempty"`
   281  	// ForceSendFields is a list of field names (e.g. "UpdatePhotoRequests") to
   282  	// unconditionally include in API requests. By default, fields with empty or
   283  	// default values are omitted from API requests. See
   284  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   285  	// details.
   286  	ForceSendFields []string `json:"-"`
   287  	// NullFields is a list of field names (e.g. "UpdatePhotoRequests") to include
   288  	// in API requests with the JSON null value. By default, fields with empty
   289  	// values are omitted from API requests. See
   290  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   291  	NullFields []string `json:"-"`
   292  }
   293  
   294  func (s *BatchUpdatePhotosRequest) MarshalJSON() ([]byte, error) {
   295  	type NoMethod BatchUpdatePhotosRequest
   296  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   297  }
   298  
   299  // BatchUpdatePhotosResponse: Response to batch update of metadata of one or
   300  // more Photos.
   301  type BatchUpdatePhotosResponse struct {
   302  	// Results: List of results for each individual Photo updated, in the same
   303  	// order as the request.
   304  	Results []*PhotoResponse `json:"results,omitempty"`
   305  
   306  	// ServerResponse contains the HTTP response code and headers from the server.
   307  	googleapi.ServerResponse `json:"-"`
   308  	// ForceSendFields is a list of field names (e.g. "Results") to unconditionally
   309  	// include in API requests. By default, fields with empty or default values are
   310  	// omitted from API requests. See
   311  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   312  	// details.
   313  	ForceSendFields []string `json:"-"`
   314  	// NullFields is a list of field names (e.g. "Results") to include in API
   315  	// requests with the JSON null value. By default, fields with empty values are
   316  	// omitted from API requests. See
   317  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   318  	NullFields []string `json:"-"`
   319  }
   320  
   321  func (s *BatchUpdatePhotosResponse) MarshalJSON() ([]byte, error) {
   322  	type NoMethod BatchUpdatePhotosResponse
   323  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   324  }
   325  
   326  // Connection: A connection is the link from a source photo to a destination
   327  // photo.
   328  type Connection struct {
   329  	// Target: Required. The destination of the connection from the containing
   330  	// photo to another photo.
   331  	Target *PhotoId `json:"target,omitempty"`
   332  	// ForceSendFields is a list of field names (e.g. "Target") to unconditionally
   333  	// include in API requests. By default, fields with empty or default values are
   334  	// omitted from API requests. See
   335  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   336  	// details.
   337  	ForceSendFields []string `json:"-"`
   338  	// NullFields is a list of field names (e.g. "Target") to include in API
   339  	// requests with the JSON null value. By default, fields with empty values are
   340  	// omitted from API requests. See
   341  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   342  	NullFields []string `json:"-"`
   343  }
   344  
   345  func (s *Connection) MarshalJSON() ([]byte, error) {
   346  	type NoMethod Connection
   347  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   348  }
   349  
   350  // Empty: A generic empty message that you can re-use to avoid defining
   351  // duplicated empty messages in your APIs. A typical example is to use it as
   352  // the request or the response type of an API method. For instance: service Foo
   353  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   354  type Empty struct {
   355  	// ServerResponse contains the HTTP response code and headers from the server.
   356  	googleapi.ServerResponse `json:"-"`
   357  }
   358  
   359  // GpsDataGapFailureDetails: Details related to
   360  // ProcessingFailureReason#GPS_DATA_GAP. If there are multiple GPS data gaps,
   361  // only the one with the largest duration is reported here.
   362  type GpsDataGapFailureDetails struct {
   363  	// GapDuration: The duration of the gap in GPS data that was found.
   364  	GapDuration string `json:"gapDuration,omitempty"`
   365  	// GapStartTime: Relative time (from the start of the video stream) when the
   366  	// gap started.
   367  	GapStartTime string `json:"gapStartTime,omitempty"`
   368  	// ForceSendFields is a list of field names (e.g. "GapDuration") to
   369  	// unconditionally include in API requests. By default, fields with empty or
   370  	// default values are omitted from API requests. See
   371  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   372  	// details.
   373  	ForceSendFields []string `json:"-"`
   374  	// NullFields is a list of field names (e.g. "GapDuration") to include in API
   375  	// requests with the JSON null value. By default, fields with empty values are
   376  	// omitted from API requests. See
   377  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   378  	NullFields []string `json:"-"`
   379  }
   380  
   381  func (s *GpsDataGapFailureDetails) MarshalJSON() ([]byte, error) {
   382  	type NoMethod GpsDataGapFailureDetails
   383  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   384  }
   385  
   386  // Imu: IMU data from the device sensors.
   387  type Imu struct {
   388  	// AccelMpsps: The accelerometer measurements in meters/sec^2 with increasing
   389  	// timestamps from devices.
   390  	AccelMpsps []*Measurement3d `json:"accelMpsps,omitempty"`
   391  	// GyroRps: The gyroscope measurements in radians/sec with increasing
   392  	// timestamps from devices.
   393  	GyroRps []*Measurement3d `json:"gyroRps,omitempty"`
   394  	// MagUt: The magnetometer measurements of the magnetic field in microtesla
   395  	// (uT) with increasing timestamps from devices.
   396  	MagUt []*Measurement3d `json:"magUt,omitempty"`
   397  	// ForceSendFields is a list of field names (e.g. "AccelMpsps") to
   398  	// unconditionally include in API requests. By default, fields with empty or
   399  	// default values are omitted from API requests. See
   400  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   401  	// details.
   402  	ForceSendFields []string `json:"-"`
   403  	// NullFields is a list of field names (e.g. "AccelMpsps") to include in API
   404  	// requests with the JSON null value. By default, fields with empty values are
   405  	// omitted from API requests. See
   406  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   407  	NullFields []string `json:"-"`
   408  }
   409  
   410  func (s *Imu) MarshalJSON() ([]byte, error) {
   411  	type NoMethod Imu
   412  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   413  }
   414  
   415  // ImuDataGapFailureDetails: Details related to
   416  // ProcessingFailureReason#IMU_DATA_GAP. If there are multiple IMU data gaps,
   417  // only the one with the largest duration is reported here.
   418  type ImuDataGapFailureDetails struct {
   419  	// GapDuration: The duration of the gap in IMU data that was found.
   420  	GapDuration string `json:"gapDuration,omitempty"`
   421  	// GapStartTime: Relative time (from the start of the video stream) when the
   422  	// gap started.
   423  	GapStartTime string `json:"gapStartTime,omitempty"`
   424  	// ForceSendFields is a list of field names (e.g. "GapDuration") to
   425  	// unconditionally include in API requests. By default, fields with empty or
   426  	// default values are omitted from API requests. See
   427  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   428  	// details.
   429  	ForceSendFields []string `json:"-"`
   430  	// NullFields is a list of field names (e.g. "GapDuration") to include in API
   431  	// requests with the JSON null value. By default, fields with empty values are
   432  	// omitted from API requests. See
   433  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   434  	NullFields []string `json:"-"`
   435  }
   436  
   437  func (s *ImuDataGapFailureDetails) MarshalJSON() ([]byte, error) {
   438  	type NoMethod ImuDataGapFailureDetails
   439  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   440  }
   441  
   442  // InsufficientGpsFailureDetails: Details related to
   443  // ProcessingFailureReason#INSUFFICIENT_GPS.
   444  type InsufficientGpsFailureDetails struct {
   445  	// GpsPointsFound: The number of GPS points that were found in the video.
   446  	GpsPointsFound int64 `json:"gpsPointsFound,omitempty"`
   447  	// ForceSendFields is a list of field names (e.g. "GpsPointsFound") to
   448  	// unconditionally include in API requests. By default, fields with empty or
   449  	// default values are 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. "GpsPointsFound") to include in
   454  	// API requests with the JSON null value. By default, fields with empty values
   455  	// are omitted 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 *InsufficientGpsFailureDetails) MarshalJSON() ([]byte, error) {
   461  	type NoMethod InsufficientGpsFailureDetails
   462  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   463  }
   464  
   465  // LatLng: An object that represents a latitude/longitude pair. This is
   466  // expressed as a pair of doubles to represent degrees latitude and degrees
   467  // longitude. Unless specified otherwise, this object must conform to the WGS84
   468  // standard. Values must be within normalized ranges.
   469  type LatLng struct {
   470  	// Latitude: The latitude in degrees. It must be in the range [-90.0, +90.0].
   471  	Latitude float64 `json:"latitude,omitempty"`
   472  	// Longitude: The longitude in degrees. It must be in the range [-180.0,
   473  	// +180.0].
   474  	Longitude float64 `json:"longitude,omitempty"`
   475  	// ForceSendFields is a list of field names (e.g. "Latitude") to
   476  	// unconditionally include in API requests. By default, fields with empty or
   477  	// default values are omitted from API requests. See
   478  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   479  	// details.
   480  	ForceSendFields []string `json:"-"`
   481  	// NullFields is a list of field names (e.g. "Latitude") to include in API
   482  	// requests with the JSON null value. By default, fields with empty values are
   483  	// omitted from API requests. See
   484  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   485  	NullFields []string `json:"-"`
   486  }
   487  
   488  func (s *LatLng) MarshalJSON() ([]byte, error) {
   489  	type NoMethod LatLng
   490  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   491  }
   492  
   493  func (s *LatLng) UnmarshalJSON(data []byte) error {
   494  	type NoMethod LatLng
   495  	var s1 struct {
   496  		Latitude  gensupport.JSONFloat64 `json:"latitude"`
   497  		Longitude gensupport.JSONFloat64 `json:"longitude"`
   498  		*NoMethod
   499  	}
   500  	s1.NoMethod = (*NoMethod)(s)
   501  	if err := json.Unmarshal(data, &s1); err != nil {
   502  		return err
   503  	}
   504  	s.Latitude = float64(s1.Latitude)
   505  	s.Longitude = float64(s1.Longitude)
   506  	return nil
   507  }
   508  
   509  // LatLngBounds: A rectangle in geographical coordinates.
   510  type LatLngBounds struct {
   511  	// Northeast: The northeast corner of these bounds.
   512  	Northeast *LatLng `json:"northeast,omitempty"`
   513  	// Southwest: The southwest corner of these bounds.
   514  	Southwest *LatLng `json:"southwest,omitempty"`
   515  	// ForceSendFields is a list of field names (e.g. "Northeast") to
   516  	// unconditionally include in API requests. By default, fields with empty or
   517  	// default values are omitted from API requests. See
   518  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   519  	// details.
   520  	ForceSendFields []string `json:"-"`
   521  	// NullFields is a list of field names (e.g. "Northeast") to include in API
   522  	// requests with the JSON null value. By default, fields with empty values are
   523  	// omitted from API requests. See
   524  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   525  	NullFields []string `json:"-"`
   526  }
   527  
   528  func (s *LatLngBounds) MarshalJSON() ([]byte, error) {
   529  	type NoMethod LatLngBounds
   530  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   531  }
   532  
   533  // Level: Level information containing level number and its corresponding name.
   534  type Level struct {
   535  	// Name: Required. A name assigned to this Level, restricted to 3 characters.
   536  	// Consider how the elevator buttons would be labeled for this level if there
   537  	// was an elevator.
   538  	Name string `json:"name,omitempty"`
   539  	// Number: Optional. Floor number, used for ordering. 0 indicates the ground
   540  	// level, 1 indicates the first level above ground level, -1 indicates the
   541  	// first level under ground level. Non-integer values are OK.
   542  	Number float64 `json:"number,omitempty"`
   543  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
   544  	// include in API requests. By default, fields with empty or default values are
   545  	// omitted from API requests. See
   546  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   547  	// details.
   548  	ForceSendFields []string `json:"-"`
   549  	// NullFields is a list of field names (e.g. "Name") to include in API requests
   550  	// with the JSON null value. By default, fields with empty values are omitted
   551  	// from API requests. See
   552  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   553  	NullFields []string `json:"-"`
   554  }
   555  
   556  func (s *Level) MarshalJSON() ([]byte, error) {
   557  	type NoMethod Level
   558  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   559  }
   560  
   561  func (s *Level) UnmarshalJSON(data []byte) error {
   562  	type NoMethod Level
   563  	var s1 struct {
   564  		Number gensupport.JSONFloat64 `json:"number"`
   565  		*NoMethod
   566  	}
   567  	s1.NoMethod = (*NoMethod)(s)
   568  	if err := json.Unmarshal(data, &s1); err != nil {
   569  		return err
   570  	}
   571  	s.Number = float64(s1.Number)
   572  	return nil
   573  }
   574  
   575  // ListPhotoSequencesResponse: Response to list all photo sequences that belong
   576  // to a user.
   577  type ListPhotoSequencesResponse struct {
   578  	// NextPageToken: Token to retrieve the next page of results, or empty if there
   579  	// are no more results in the list.
   580  	NextPageToken string `json:"nextPageToken,omitempty"`
   581  	// PhotoSequences: List of photo sequences via Operation interface. The maximum
   582  	// number of items returned is based on the pageSize field in the request. Each
   583  	// item in the list can have three possible states, * `Operation.done` = false,
   584  	// if the processing of PhotoSequence is not finished yet. * `Operation.done` =
   585  	// true and `Operation.error` is populated, if there was an error in
   586  	// processing. * `Operation.done` = true and `Operation.response` contains a
   587  	// PhotoSequence message, In each sequence, only Id is populated.
   588  	PhotoSequences []*Operation `json:"photoSequences,omitempty"`
   589  
   590  	// ServerResponse contains the HTTP response code and headers from the server.
   591  	googleapi.ServerResponse `json:"-"`
   592  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   593  	// unconditionally include in API requests. By default, fields with empty or
   594  	// default values are omitted from API requests. See
   595  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   596  	// details.
   597  	ForceSendFields []string `json:"-"`
   598  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   599  	// requests with the JSON null value. By default, fields with empty values are
   600  	// omitted from API requests. See
   601  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   602  	NullFields []string `json:"-"`
   603  }
   604  
   605  func (s *ListPhotoSequencesResponse) MarshalJSON() ([]byte, error) {
   606  	type NoMethod ListPhotoSequencesResponse
   607  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   608  }
   609  
   610  // ListPhotosResponse: Response to list all photos that belong to a user.
   611  type ListPhotosResponse struct {
   612  	// NextPageToken: Token to retrieve the next page of results, or empty if there
   613  	// are no more results in the list.
   614  	NextPageToken string `json:"nextPageToken,omitempty"`
   615  	// Photos: List of photos. The pageSize field in the request determines the
   616  	// number of items returned.
   617  	Photos []*Photo `json:"photos,omitempty"`
   618  
   619  	// ServerResponse contains the HTTP response code and headers from the server.
   620  	googleapi.ServerResponse `json:"-"`
   621  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   622  	// unconditionally include in API requests. By default, fields with empty or
   623  	// default values are omitted from API requests. See
   624  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   625  	// details.
   626  	ForceSendFields []string `json:"-"`
   627  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   628  	// requests with the JSON null value. By default, fields with empty values are
   629  	// omitted from API requests. See
   630  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   631  	NullFields []string `json:"-"`
   632  }
   633  
   634  func (s *ListPhotosResponse) MarshalJSON() ([]byte, error) {
   635  	type NoMethod ListPhotosResponse
   636  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   637  }
   638  
   639  // Measurement3d: A Generic 3d measurement sample.
   640  type Measurement3d struct {
   641  	// CaptureTime: The timestamp of the IMU measurement.
   642  	CaptureTime string `json:"captureTime,omitempty"`
   643  	// X: The sensor measurement in the x axis.
   644  	X float64 `json:"x,omitempty"`
   645  	// Y: The sensor measurement in the y axis.
   646  	Y float64 `json:"y,omitempty"`
   647  	// Z: The sensor measurement in the z axis.
   648  	Z float64 `json:"z,omitempty"`
   649  	// ForceSendFields is a list of field names (e.g. "CaptureTime") to
   650  	// unconditionally include in API requests. By default, fields with empty or
   651  	// default values are omitted from API requests. See
   652  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   653  	// details.
   654  	ForceSendFields []string `json:"-"`
   655  	// NullFields is a list of field names (e.g. "CaptureTime") to include in API
   656  	// requests with the JSON null value. By default, fields with empty values are
   657  	// omitted from API requests. See
   658  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   659  	NullFields []string `json:"-"`
   660  }
   661  
   662  func (s *Measurement3d) MarshalJSON() ([]byte, error) {
   663  	type NoMethod Measurement3d
   664  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   665  }
   666  
   667  func (s *Measurement3d) UnmarshalJSON(data []byte) error {
   668  	type NoMethod Measurement3d
   669  	var s1 struct {
   670  		X gensupport.JSONFloat64 `json:"x"`
   671  		Y gensupport.JSONFloat64 `json:"y"`
   672  		Z gensupport.JSONFloat64 `json:"z"`
   673  		*NoMethod
   674  	}
   675  	s1.NoMethod = (*NoMethod)(s)
   676  	if err := json.Unmarshal(data, &s1); err != nil {
   677  		return err
   678  	}
   679  	s.X = float64(s1.X)
   680  	s.Y = float64(s1.Y)
   681  	s.Z = float64(s1.Z)
   682  	return nil
   683  }
   684  
   685  // NoOverlapGpsFailureDetails: Details related to
   686  // PhotoSequenceProcessingFailureReason#NO_OVERLAP_GPS.
   687  type NoOverlapGpsFailureDetails struct {
   688  	// GpsEndTime: Time of last recorded GPS point.
   689  	GpsEndTime string `json:"gpsEndTime,omitempty"`
   690  	// GpsStartTime: Time of first recorded GPS point.
   691  	GpsStartTime string `json:"gpsStartTime,omitempty"`
   692  	// VideoEndTime: End time of video.
   693  	VideoEndTime string `json:"videoEndTime,omitempty"`
   694  	// VideoStartTime: Start time of video.
   695  	VideoStartTime string `json:"videoStartTime,omitempty"`
   696  	// ForceSendFields is a list of field names (e.g. "GpsEndTime") to
   697  	// unconditionally include in API requests. By default, fields with empty or
   698  	// default values are omitted from API requests. See
   699  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   700  	// details.
   701  	ForceSendFields []string `json:"-"`
   702  	// NullFields is a list of field names (e.g. "GpsEndTime") to include in API
   703  	// requests with the JSON null value. By default, fields with empty values are
   704  	// omitted from API requests. See
   705  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   706  	NullFields []string `json:"-"`
   707  }
   708  
   709  func (s *NoOverlapGpsFailureDetails) MarshalJSON() ([]byte, error) {
   710  	type NoMethod NoOverlapGpsFailureDetails
   711  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   712  }
   713  
   714  // NotOutdoorsFailureDetails: Details related to
   715  // ProcessingFailureReason#NOT_OUTDOORS. If there are multiple indoor frames
   716  // found, the first frame is recorded here.
   717  type NotOutdoorsFailureDetails struct {
   718  	// StartTime: Relative time (from the start of the video stream) when an indoor
   719  	// frame was found.
   720  	StartTime string `json:"startTime,omitempty"`
   721  	// ForceSendFields is a list of field names (e.g. "StartTime") to
   722  	// unconditionally include in API requests. By default, fields with empty or
   723  	// default values are omitted from API requests. See
   724  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   725  	// details.
   726  	ForceSendFields []string `json:"-"`
   727  	// NullFields is a list of field names (e.g. "StartTime") to include in API
   728  	// requests with the JSON null value. By default, fields with empty values are
   729  	// omitted from API requests. See
   730  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   731  	NullFields []string `json:"-"`
   732  }
   733  
   734  func (s *NotOutdoorsFailureDetails) MarshalJSON() ([]byte, error) {
   735  	type NoMethod NotOutdoorsFailureDetails
   736  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   737  }
   738  
   739  // Operation: This resource represents a long-running operation that is the
   740  // result of a network API call.
   741  type Operation struct {
   742  	// Done: If the value is `false`, it means the operation is still in progress.
   743  	// If `true`, the operation is completed, and either `error` or `response` is
   744  	// available.
   745  	Done bool `json:"done,omitempty"`
   746  	// Error: The error result of the operation in case of failure or cancellation.
   747  	Error *Status `json:"error,omitempty"`
   748  	// Metadata: Service-specific metadata associated with the operation. It
   749  	// typically contains progress information and common metadata such as create
   750  	// time. Some services might not provide such metadata. Any method that returns
   751  	// a long-running operation should document the metadata type, if any.
   752  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   753  	// Name: The server-assigned name, which is only unique within the same service
   754  	// that originally returns it. If you use the default HTTP mapping, the `name`
   755  	// should be a resource name ending with `operations/{unique_id}`.
   756  	Name string `json:"name,omitempty"`
   757  	// Response: The normal, successful response of the operation. If the original
   758  	// method returns no data on success, such as `Delete`, the response is
   759  	// `google.protobuf.Empty`. If the original method is standard
   760  	// `Get`/`Create`/`Update`, the response should be the resource. For other
   761  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
   762  	// original method name. For example, if the original method name is
   763  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
   764  	Response googleapi.RawMessage `json:"response,omitempty"`
   765  
   766  	// ServerResponse contains the HTTP response code and headers from the server.
   767  	googleapi.ServerResponse `json:"-"`
   768  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
   769  	// include in API requests. By default, fields with empty or default values are
   770  	// omitted from API requests. See
   771  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   772  	// details.
   773  	ForceSendFields []string `json:"-"`
   774  	// NullFields is a list of field names (e.g. "Done") to include in API requests
   775  	// with the JSON null value. By default, fields with empty values are omitted
   776  	// from API requests. See
   777  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   778  	NullFields []string `json:"-"`
   779  }
   780  
   781  func (s *Operation) MarshalJSON() ([]byte, error) {
   782  	type NoMethod Operation
   783  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   784  }
   785  
   786  // Photo: Photo is used to store 360 photos along with photo metadata.
   787  type Photo struct {
   788  	// CaptureTime: Optional. Absolute time when the photo was captured. When the
   789  	// photo has no exif timestamp, this is used to set a timestamp in the photo
   790  	// metadata.
   791  	CaptureTime string `json:"captureTime,omitempty"`
   792  	// Connections: Optional. Connections to other photos. A connection represents
   793  	// the link from this photo to another photo.
   794  	Connections []*Connection `json:"connections,omitempty"`
   795  	// DownloadUrl: Output only. The download URL for the photo bytes. This field
   796  	// is set only when GetPhotoRequest.view is set to
   797  	// PhotoView.INCLUDE_DOWNLOAD_URL.
   798  	DownloadUrl string `json:"downloadUrl,omitempty"`
   799  	// MapsPublishStatus: Output only. Status in Google Maps, whether this photo
   800  	// was published or rejected.
   801  	//
   802  	// Possible values:
   803  	//   "UNSPECIFIED_MAPS_PUBLISH_STATUS" - The status of the photo is unknown.
   804  	//   "PUBLISHED" - The photo is published to the public through Google Maps.
   805  	//   "REJECTED_UNKNOWN" - The photo has been rejected for an unknown reason.
   806  	MapsPublishStatus string `json:"mapsPublishStatus,omitempty"`
   807  	// PhotoId: Required. Output only. Required when updating a photo. Output only
   808  	// when creating a photo. Identifier for the photo, which is unique among all
   809  	// photos in Google.
   810  	PhotoId *PhotoId `json:"photoId,omitempty"`
   811  	// Places: Optional. Places where this photo belongs.
   812  	Places []*Place `json:"places,omitempty"`
   813  	// Pose: Optional. Pose of the photo.
   814  	Pose *Pose `json:"pose,omitempty"`
   815  	// ShareLink: Output only. The share link for the photo.
   816  	ShareLink string `json:"shareLink,omitempty"`
   817  	// ThumbnailUrl: Output only. The thumbnail URL for showing a preview of the
   818  	// given photo.
   819  	ThumbnailUrl string `json:"thumbnailUrl,omitempty"`
   820  	// TransferStatus: Output only. Status of rights transfer on this photo.
   821  	//
   822  	// Possible values:
   823  	//   "TRANSFER_STATUS_UNKNOWN" - The status of this transfer is unspecified.
   824  	//   "NEVER_TRANSFERRED" - This photo has never been in a transfer.
   825  	//   "PENDING" - This photo transfer has been initiated, but the receiver has
   826  	// not yet responded.
   827  	//   "COMPLETED" - The photo transfer has been completed, and this photo has
   828  	// been transferred to the recipient.
   829  	//   "REJECTED" - The recipient rejected this photo transfer.
   830  	//   "EXPIRED" - The photo transfer expired before the recipient took any
   831  	// action.
   832  	//   "CANCELLED" - The sender cancelled this photo transfer.
   833  	//   "RECEIVED_VIA_TRANSFER" - The recipient owns this photo due to a rights
   834  	// transfer.
   835  	TransferStatus string `json:"transferStatus,omitempty"`
   836  	// UploadReference: Input only. Required when creating a photo. Input only. The
   837  	// resource URL where the photo bytes are uploaded to.
   838  	UploadReference *UploadRef `json:"uploadReference,omitempty"`
   839  	// UploadTime: Output only. Time when the image was uploaded.
   840  	UploadTime string `json:"uploadTime,omitempty"`
   841  	// ViewCount: Output only. View count of the photo.
   842  	ViewCount int64 `json:"viewCount,omitempty,string"`
   843  
   844  	// ServerResponse contains the HTTP response code and headers from the server.
   845  	googleapi.ServerResponse `json:"-"`
   846  	// ForceSendFields is a list of field names (e.g. "CaptureTime") to
   847  	// unconditionally include in API requests. By default, fields with empty or
   848  	// default values are omitted from API requests. See
   849  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   850  	// details.
   851  	ForceSendFields []string `json:"-"`
   852  	// NullFields is a list of field names (e.g. "CaptureTime") to include in API
   853  	// requests with the JSON null value. By default, fields with empty values are
   854  	// omitted from API requests. See
   855  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   856  	NullFields []string `json:"-"`
   857  }
   858  
   859  func (s *Photo) MarshalJSON() ([]byte, error) {
   860  	type NoMethod Photo
   861  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   862  }
   863  
   864  // PhotoId: Identifier for a Photo.
   865  type PhotoId struct {
   866  	// Id: A unique identifier for a photo.
   867  	Id string `json:"id,omitempty"`
   868  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   869  	// include in API requests. By default, fields with empty or default values are
   870  	// omitted from API requests. See
   871  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   872  	// details.
   873  	ForceSendFields []string `json:"-"`
   874  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   875  	// with the JSON null value. By default, fields with empty values are omitted
   876  	// from API requests. See
   877  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   878  	NullFields []string `json:"-"`
   879  }
   880  
   881  func (s *PhotoId) MarshalJSON() ([]byte, error) {
   882  	type NoMethod PhotoId
   883  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   884  }
   885  
   886  // PhotoResponse: Response payload for a single Photo in batch operations
   887  // including BatchGetPhotos and BatchUpdatePhotos.
   888  type PhotoResponse struct {
   889  	// Photo: The Photo resource, if the request was successful.
   890  	Photo *Photo `json:"photo,omitempty"`
   891  	// Status: The status for the operation to get or update a single photo in the
   892  	// batch request.
   893  	Status *Status `json:"status,omitempty"`
   894  	// ForceSendFields is a list of field names (e.g. "Photo") to unconditionally
   895  	// include in API requests. By default, fields with empty or default values are
   896  	// omitted from API requests. See
   897  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   898  	// details.
   899  	ForceSendFields []string `json:"-"`
   900  	// NullFields is a list of field names (e.g. "Photo") to include in API
   901  	// requests with the JSON null value. By default, fields with empty values are
   902  	// omitted from API requests. See
   903  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   904  	NullFields []string `json:"-"`
   905  }
   906  
   907  func (s *PhotoResponse) MarshalJSON() ([]byte, error) {
   908  	type NoMethod PhotoResponse
   909  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   910  }
   911  
   912  // PhotoSequence: A sequence of 360 photos along with metadata.
   913  type PhotoSequence struct {
   914  	// CaptureTimeOverride: Optional. Absolute time when the photo sequence starts
   915  	// to be captured. If the photo sequence is a video, this is the start time of
   916  	// the video. If this field is populated in input, it overrides the capture
   917  	// time in the video or XDM file.
   918  	CaptureTimeOverride string `json:"captureTimeOverride,omitempty"`
   919  	// DistanceMeters: Output only. The computed distance of the photo sequence in
   920  	// meters.
   921  	DistanceMeters float64 `json:"distanceMeters,omitempty"`
   922  	// FailureDetails: Output only. If this sequence has `failure_reason` set, this
   923  	// may contain additional details about the failure.
   924  	FailureDetails *ProcessingFailureDetails `json:"failureDetails,omitempty"`
   925  	// FailureReason: Output only. If this sequence has processing_state = FAILED,
   926  	// this will contain the reason why it failed. If the processing_state is any
   927  	// other value, this field will be unset.
   928  	//
   929  	// Possible values:
   930  	//   "PROCESSING_FAILURE_REASON_UNSPECIFIED" - The failure reason is
   931  	// unspecified, this is the default value.
   932  	//   "LOW_RESOLUTION" - Video frame's resolution is too small.
   933  	//   "DUPLICATE" - This video has been uploaded before.
   934  	//   "INSUFFICIENT_GPS" - Too few GPS points.
   935  	//   "NO_OVERLAP_GPS" - No overlap between the time frame of GPS track and the
   936  	// time frame of video.
   937  	//   "INVALID_GPS" - GPS is invalid (e.x. all GPS points are at (0,0))
   938  	//   "FAILED_TO_REFINE_POSITIONS" - The sequence of photos could not be
   939  	// accurately located in the world.
   940  	//   "TAKEDOWN" - The sequence was taken down for policy reasons.
   941  	//   "CORRUPT_VIDEO" - The video file was corrupt or could not be decoded.
   942  	//   "INTERNAL" - A permanent failure in the underlying system occurred.
   943  	//   "INVALID_VIDEO_FORMAT" - The video format is invalid or unsupported.
   944  	//   "INVALID_VIDEO_DIMENSIONS" - Invalid image aspect ratio found.
   945  	//   "INVALID_CAPTURE_TIME" - Invalid capture time. Timestamps were from the
   946  	// future.
   947  	//   "GPS_DATA_GAP" - GPS data contains a gap greater than 5 seconds in
   948  	// duration.
   949  	//   "JUMPY_GPS" - GPS data is too erratic to be processed.
   950  	//   "INVALID_IMU" - IMU (Accelerometer, Gyroscope, etc.) data are not valid.
   951  	// They may be missing required fields (x, y, z or time), may not be formatted
   952  	// correctly, or any other issue that prevents our systems from parsing it.
   953  	//   "INSUFFICIENT_IMU" - Too few IMU points.
   954  	//   "INSUFFICIENT_OVERLAP_TIME_SERIES" - Insufficient overlap in the time
   955  	// frame between GPS, IMU, and other time series data.
   956  	//   "IMU_DATA_GAP" - IMU (Accelerometer, Gyroscope, etc.) data contain gaps
   957  	// greater than 0.1 seconds in duration.
   958  	//   "UNSUPPORTED_CAMERA" - The camera is not supported.
   959  	//   "NOT_OUTDOORS" - Some frames were indoors, which is unsupported.
   960  	//   "INSUFFICIENT_VIDEO_FRAMES" - Not enough video frames.
   961  	//   "INSUFFICIENT_MOVEMENT" - Not enough moving data.
   962  	//   "MAST_DOWN" - Mast is down.
   963  	//   "CAMERA_COVERED" - Camera is covered.
   964  	FailureReason string `json:"failureReason,omitempty"`
   965  	// Filename: Output only. The filename of the upload. Does not include the
   966  	// directory path. Only available if the sequence was uploaded on a platform
   967  	// that provides the filename.
   968  	Filename string `json:"filename,omitempty"`
   969  	// GpsSource: Input only. If both raw_gps_timeline and the Camera Motion
   970  	// Metadata Track (CAMM) contain GPS measurements, indicate which takes
   971  	// precedence.
   972  	//
   973  	// Possible values:
   974  	//   "PHOTO_SEQUENCE" - GPS in raw_gps_timeline takes precedence if it exists.
   975  	//   "CAMERA_MOTION_METADATA_TRACK" - GPS in Camera Motion Metadata Track
   976  	// (CAMM) takes precedence if it exists.
   977  	GpsSource string `json:"gpsSource,omitempty"`
   978  	// Id: Output only. Unique identifier for the photo sequence. This also acts as
   979  	// a long running operation ID if uploading is performed asynchronously.
   980  	Id string `json:"id,omitempty"`
   981  	// Imu: Input only. Three axis IMU data for the collection. If this data is too
   982  	// large to put in the request, then it should be put in the CAMM track for the
   983  	// video. This data always takes precedence over the equivalent CAMM data, if
   984  	// it exists.
   985  	Imu *Imu `json:"imu,omitempty"`
   986  	// Photos: Output only. Photos with increasing timestamps.
   987  	Photos []*Photo `json:"photos,omitempty"`
   988  	// ProcessingState: Output only. The processing state of this sequence.
   989  	//
   990  	// Possible values:
   991  	//   "PROCESSING_STATE_UNSPECIFIED" - The state is unspecified, this is the
   992  	// default value.
   993  	//   "PENDING" - The sequence has not yet started processing.
   994  	//   "PROCESSING" - The sequence is currently in processing.
   995  	//   "PROCESSED" - The sequence has finished processing including refining
   996  	// position.
   997  	//   "FAILED" - The sequence failed processing. See FailureReason for more
   998  	// details.
   999  	ProcessingState string `json:"processingState,omitempty"`
  1000  	// RawGpsTimeline: Input only. Raw GPS measurements with increasing timestamps
  1001  	// from the device that aren't time synced with each photo. These raw
  1002  	// measurements will be used to infer the pose of each frame. Required in input
  1003  	// when InputType is VIDEO and raw GPS measurements are not in Camera Motion
  1004  	// Metadata Track (CAMM). User can indicate which takes precedence using
  1005  	// gps_source if raw GPS measurements are provided in both raw_gps_timeline and
  1006  	// Camera Motion Metadata Track (CAMM).
  1007  	RawGpsTimeline []*Pose `json:"rawGpsTimeline,omitempty"`
  1008  	// SequenceBounds: Output only. A rectangular box that encapsulates every image
  1009  	// in this photo sequence.
  1010  	SequenceBounds *LatLngBounds `json:"sequenceBounds,omitempty"`
  1011  	// UploadReference: Input only. Required when creating photo sequence. The
  1012  	// resource name where the bytes of the photo sequence (in the form of video)
  1013  	// are uploaded.
  1014  	UploadReference *UploadRef `json:"uploadReference,omitempty"`
  1015  	// UploadTime: Output only. The time this photo sequence was created in uSV
  1016  	// Store service.
  1017  	UploadTime string `json:"uploadTime,omitempty"`
  1018  	// ViewCount: Output only. The total number of views that all the published
  1019  	// images in this PhotoSequence have received.
  1020  	ViewCount int64 `json:"viewCount,omitempty,string"`
  1021  	// ForceSendFields is a list of field names (e.g. "CaptureTimeOverride") to
  1022  	// unconditionally include in API requests. By default, fields with empty or
  1023  	// default values are omitted from API requests. See
  1024  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1025  	// details.
  1026  	ForceSendFields []string `json:"-"`
  1027  	// NullFields is a list of field names (e.g. "CaptureTimeOverride") to include
  1028  	// in API requests with the JSON null value. By default, fields with empty
  1029  	// values are omitted from API requests. See
  1030  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1031  	NullFields []string `json:"-"`
  1032  }
  1033  
  1034  func (s *PhotoSequence) MarshalJSON() ([]byte, error) {
  1035  	type NoMethod PhotoSequence
  1036  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1037  }
  1038  
  1039  func (s *PhotoSequence) UnmarshalJSON(data []byte) error {
  1040  	type NoMethod PhotoSequence
  1041  	var s1 struct {
  1042  		DistanceMeters gensupport.JSONFloat64 `json:"distanceMeters"`
  1043  		*NoMethod
  1044  	}
  1045  	s1.NoMethod = (*NoMethod)(s)
  1046  	if err := json.Unmarshal(data, &s1); err != nil {
  1047  		return err
  1048  	}
  1049  	s.DistanceMeters = float64(s1.DistanceMeters)
  1050  	return nil
  1051  }
  1052  
  1053  // Place: Place metadata for an entity.
  1054  type Place struct {
  1055  	// LanguageCode: Output only. The language_code that the name is localized
  1056  	// with. This should be the language_code specified in the request, but may be
  1057  	// a fallback.
  1058  	LanguageCode string `json:"languageCode,omitempty"`
  1059  	// Name: Output only. The name of the place, localized to the language_code.
  1060  	Name string `json:"name,omitempty"`
  1061  	// PlaceId: Place identifier, as described in
  1062  	// https://developers.google.com/places/place-id.
  1063  	PlaceId string `json:"placeId,omitempty"`
  1064  	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
  1065  	// unconditionally include in API requests. By default, fields with empty or
  1066  	// default values are omitted from API requests. See
  1067  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1068  	// details.
  1069  	ForceSendFields []string `json:"-"`
  1070  	// NullFields is a list of field names (e.g. "LanguageCode") to include in API
  1071  	// requests with the JSON null value. By default, fields with empty values are
  1072  	// omitted from API requests. See
  1073  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1074  	NullFields []string `json:"-"`
  1075  }
  1076  
  1077  func (s *Place) MarshalJSON() ([]byte, error) {
  1078  	type NoMethod Place
  1079  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1080  }
  1081  
  1082  // Pose: Raw pose measurement for an entity.
  1083  type Pose struct {
  1084  	// AccuracyMeters: The estimated horizontal accuracy of this pose in meters
  1085  	// with 68% confidence (one standard deviation). For example, on Android, this
  1086  	// value is available from this method:
  1087  	// https://developer.android.com/reference/android/location/Location#getAccuracy().
  1088  	// Other platforms have different methods of obtaining similar accuracy
  1089  	// estimations.
  1090  	AccuracyMeters float64 `json:"accuracyMeters,omitempty"`
  1091  	// Altitude: Altitude of the pose in meters above WGS84 ellipsoid. NaN
  1092  	// indicates an unmeasured quantity.
  1093  	Altitude float64 `json:"altitude,omitempty"`
  1094  	// GpsRecordTimestampUnixEpoch: Time of the GPS record since UTC epoch.
  1095  	GpsRecordTimestampUnixEpoch string `json:"gpsRecordTimestampUnixEpoch,omitempty"`
  1096  	// Heading: The following pose parameters pertain to the center of the photo.
  1097  	// They match https://developers.google.com/streetview/spherical-metadata.
  1098  	// Compass heading, measured at the center of the photo in degrees clockwise
  1099  	// from North. Value must be >=0 and <360. NaN indicates an unmeasured
  1100  	// quantity.
  1101  	Heading float64 `json:"heading,omitempty"`
  1102  	// LatLngPair: Latitude and longitude pair of the pose, as explained here:
  1103  	// https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng
  1104  	// When creating a Photo, if the latitude and longitude pair are not provided,
  1105  	// the geolocation from the exif header is used. A latitude and longitude pair
  1106  	// not provided in the photo or exif header causes the photo process to fail.
  1107  	LatLngPair *LatLng `json:"latLngPair,omitempty"`
  1108  	// Level: Level (the floor in a building) used to configure vertical
  1109  	// navigation.
  1110  	Level *Level `json:"level,omitempty"`
  1111  	// Pitch: Pitch, measured at the center of the photo in degrees. Value must be
  1112  	// >=-90 and <= 90. A value of -90 means looking directly down, and a value of
  1113  	// 90 means looking directly up. NaN indicates an unmeasured quantity.
  1114  	Pitch float64 `json:"pitch,omitempty"`
  1115  	// Roll: Roll, measured in degrees. Value must be >= 0 and <360. A value of 0
  1116  	// means level with the horizon. NaN indicates an unmeasured quantity.
  1117  	Roll float64 `json:"roll,omitempty"`
  1118  	// ForceSendFields is a list of field names (e.g. "AccuracyMeters") to
  1119  	// unconditionally include in API requests. By default, fields with empty or
  1120  	// default values are omitted from API requests. See
  1121  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1122  	// details.
  1123  	ForceSendFields []string `json:"-"`
  1124  	// NullFields is a list of field names (e.g. "AccuracyMeters") to include in
  1125  	// API requests with the JSON null value. By default, fields with empty values
  1126  	// are omitted from API requests. See
  1127  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1128  	NullFields []string `json:"-"`
  1129  }
  1130  
  1131  func (s *Pose) MarshalJSON() ([]byte, error) {
  1132  	type NoMethod Pose
  1133  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1134  }
  1135  
  1136  func (s *Pose) UnmarshalJSON(data []byte) error {
  1137  	type NoMethod Pose
  1138  	var s1 struct {
  1139  		AccuracyMeters gensupport.JSONFloat64 `json:"accuracyMeters"`
  1140  		Altitude       gensupport.JSONFloat64 `json:"altitude"`
  1141  		Heading        gensupport.JSONFloat64 `json:"heading"`
  1142  		Pitch          gensupport.JSONFloat64 `json:"pitch"`
  1143  		Roll           gensupport.JSONFloat64 `json:"roll"`
  1144  		*NoMethod
  1145  	}
  1146  	s1.NoMethod = (*NoMethod)(s)
  1147  	if err := json.Unmarshal(data, &s1); err != nil {
  1148  		return err
  1149  	}
  1150  	s.AccuracyMeters = float64(s1.AccuracyMeters)
  1151  	s.Altitude = float64(s1.Altitude)
  1152  	s.Heading = float64(s1.Heading)
  1153  	s.Pitch = float64(s1.Pitch)
  1154  	s.Roll = float64(s1.Roll)
  1155  	return nil
  1156  }
  1157  
  1158  // ProcessingFailureDetails: Additional details to accompany the
  1159  // ProcessingFailureReason enum. This message is always expected to be used in
  1160  // conjunction with ProcessingFailureReason, and the oneof value set in this
  1161  // message should match the FailureReason.
  1162  type ProcessingFailureDetails struct {
  1163  	// GpsDataGapDetails: See GpsDataGapFailureDetails.
  1164  	GpsDataGapDetails *GpsDataGapFailureDetails `json:"gpsDataGapDetails,omitempty"`
  1165  	// ImuDataGapDetails: See ImuDataGapFailureDetails.
  1166  	ImuDataGapDetails *ImuDataGapFailureDetails `json:"imuDataGapDetails,omitempty"`
  1167  	// InsufficientGpsDetails: See InsufficientGpsFailureDetails.
  1168  	InsufficientGpsDetails *InsufficientGpsFailureDetails `json:"insufficientGpsDetails,omitempty"`
  1169  	// NoOverlapGpsDetails: See NoOverlapGpsFailureDetails.
  1170  	NoOverlapGpsDetails *NoOverlapGpsFailureDetails `json:"noOverlapGpsDetails,omitempty"`
  1171  	// NotOutdoorsDetails: See NotOutdoorsFailureDetails.
  1172  	NotOutdoorsDetails *NotOutdoorsFailureDetails `json:"notOutdoorsDetails,omitempty"`
  1173  	// ForceSendFields is a list of field names (e.g. "GpsDataGapDetails") to
  1174  	// unconditionally include in API requests. By default, fields with empty or
  1175  	// default values are omitted from API requests. See
  1176  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1177  	// details.
  1178  	ForceSendFields []string `json:"-"`
  1179  	// NullFields is a list of field names (e.g. "GpsDataGapDetails") to include in
  1180  	// API requests with the JSON null value. By default, fields with empty values
  1181  	// are omitted from API requests. See
  1182  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1183  	NullFields []string `json:"-"`
  1184  }
  1185  
  1186  func (s *ProcessingFailureDetails) MarshalJSON() ([]byte, error) {
  1187  	type NoMethod ProcessingFailureDetails
  1188  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1189  }
  1190  
  1191  // Status: The `Status` type defines a logical error model that is suitable for
  1192  // different programming environments, including REST APIs and RPC APIs. It is
  1193  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1194  // pieces of data: error code, error message, and error details. You can find
  1195  // out more about this error model and how to work with it in the API Design
  1196  // Guide (https://cloud.google.com/apis/design/errors).
  1197  type Status struct {
  1198  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1199  	Code int64 `json:"code,omitempty"`
  1200  	// Details: A list of messages that carry the error details. There is a common
  1201  	// set of message types for APIs to use.
  1202  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1203  	// Message: A developer-facing error message, which should be in English. Any
  1204  	// user-facing error message should be localized and sent in the
  1205  	// google.rpc.Status.details field, or localized by the client.
  1206  	Message string `json:"message,omitempty"`
  1207  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1208  	// include in API requests. By default, fields with empty or default values are
  1209  	// 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. "Code") to include in API requests
  1214  	// with the JSON null value. By default, fields with empty values are omitted
  1215  	// 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 *Status) MarshalJSON() ([]byte, error) {
  1221  	type NoMethod Status
  1222  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1223  }
  1224  
  1225  // UpdatePhotoRequest: Request to update the metadata of a Photo. Updating the
  1226  // pixels of a photo is not supported.
  1227  type UpdatePhotoRequest struct {
  1228  	// Photo: Required. Photo object containing the new metadata.
  1229  	Photo *Photo `json:"photo,omitempty"`
  1230  	// UpdateMask: Required. Mask that identifies fields on the photo metadata to
  1231  	// update. If not present, the old Photo metadata is entirely replaced with the
  1232  	// new Photo metadata in this request. The update fails if invalid fields are
  1233  	// specified. Multiple fields can be specified in a comma-delimited list. The
  1234  	// following fields are valid: * `pose.heading` * `pose.lat_lng_pair` *
  1235  	// `pose.pitch` * `pose.roll` * `pose.level` * `pose.altitude` * `connections`
  1236  	// * `places` > Note: When updateMask contains repeated fields, the entire set
  1237  	// of repeated values get replaced with the new contents. For example, if
  1238  	// updateMask contains `connections` and `UpdatePhotoRequest.photo.connections`
  1239  	// is empty, all connections are removed.
  1240  	UpdateMask string `json:"updateMask,omitempty"`
  1241  	// ForceSendFields is a list of field names (e.g. "Photo") to unconditionally
  1242  	// include in API requests. By default, fields with empty or default values are
  1243  	// omitted from API requests. See
  1244  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1245  	// details.
  1246  	ForceSendFields []string `json:"-"`
  1247  	// NullFields is a list of field names (e.g. "Photo") to include in API
  1248  	// requests with the JSON null value. By default, fields with empty values are
  1249  	// omitted from API requests. See
  1250  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1251  	NullFields []string `json:"-"`
  1252  }
  1253  
  1254  func (s *UpdatePhotoRequest) MarshalJSON() ([]byte, error) {
  1255  	type NoMethod UpdatePhotoRequest
  1256  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1257  }
  1258  
  1259  // UploadRef: Upload reference for media files.
  1260  type UploadRef struct {
  1261  	// UploadUrl: An upload reference should be unique for each user. It follows
  1262  	// the form:
  1263  	// "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{uplo
  1264  	// ad_reference}"
  1265  	UploadUrl string `json:"uploadUrl,omitempty"`
  1266  
  1267  	// ServerResponse contains the HTTP response code and headers from the server.
  1268  	googleapi.ServerResponse `json:"-"`
  1269  	// ForceSendFields is a list of field names (e.g. "UploadUrl") to
  1270  	// unconditionally include in API requests. By default, fields with empty or
  1271  	// default values are omitted from API requests. See
  1272  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1273  	// details.
  1274  	ForceSendFields []string `json:"-"`
  1275  	// NullFields is a list of field names (e.g. "UploadUrl") to include in API
  1276  	// requests with the JSON null value. By default, fields with empty values are
  1277  	// omitted from API requests. See
  1278  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1279  	NullFields []string `json:"-"`
  1280  }
  1281  
  1282  func (s *UploadRef) MarshalJSON() ([]byte, error) {
  1283  	type NoMethod UploadRef
  1284  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1285  }
  1286  
  1287  type PhotoCreateCall struct {
  1288  	s          *Service
  1289  	photo      *Photo
  1290  	urlParams_ gensupport.URLParams
  1291  	ctx_       context.Context
  1292  	header_    http.Header
  1293  }
  1294  
  1295  // Create: After the client finishes uploading the photo with the returned
  1296  // UploadRef, CreatePhoto publishes the uploaded Photo to Street View on Google
  1297  // Maps. Currently, the only way to set heading, pitch, and roll in CreatePhoto
  1298  // is through the Photo Sphere XMP metadata
  1299  // (https://developers.google.com/streetview/spherical-metadata) in the photo
  1300  // bytes. CreatePhoto ignores the `pose.heading`, `pose.pitch`, `pose.roll`,
  1301  // `pose.altitude`, and `pose.level` fields in Pose. This method returns the
  1302  // following error codes: * google.rpc.Code.INVALID_ARGUMENT if the request is
  1303  // malformed or if the uploaded photo is not a 360 photo. *
  1304  // google.rpc.Code.NOT_FOUND if the upload reference does not exist. *
  1305  // google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the storage
  1306  // limit.
  1307  func (r *PhotoService) Create(photo *Photo) *PhotoCreateCall {
  1308  	c := &PhotoCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1309  	c.photo = photo
  1310  	return c
  1311  }
  1312  
  1313  // Fields allows partial responses to be retrieved. See
  1314  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1315  // details.
  1316  func (c *PhotoCreateCall) Fields(s ...googleapi.Field) *PhotoCreateCall {
  1317  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1318  	return c
  1319  }
  1320  
  1321  // Context sets the context to be used in this call's Do method.
  1322  func (c *PhotoCreateCall) Context(ctx context.Context) *PhotoCreateCall {
  1323  	c.ctx_ = ctx
  1324  	return c
  1325  }
  1326  
  1327  // Header returns a http.Header that can be modified by the caller to add
  1328  // headers to the request.
  1329  func (c *PhotoCreateCall) Header() http.Header {
  1330  	if c.header_ == nil {
  1331  		c.header_ = make(http.Header)
  1332  	}
  1333  	return c.header_
  1334  }
  1335  
  1336  func (c *PhotoCreateCall) doRequest(alt string) (*http.Response, error) {
  1337  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1338  	var body io.Reader = nil
  1339  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.photo)
  1340  	if err != nil {
  1341  		return nil, err
  1342  	}
  1343  	c.urlParams_.Set("alt", alt)
  1344  	c.urlParams_.Set("prettyPrint", "false")
  1345  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photo")
  1346  	urls += "?" + c.urlParams_.Encode()
  1347  	req, err := http.NewRequest("POST", urls, body)
  1348  	if err != nil {
  1349  		return nil, err
  1350  	}
  1351  	req.Header = reqHeaders
  1352  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1353  }
  1354  
  1355  // Do executes the "streetviewpublish.photo.create" call.
  1356  // Any non-2xx status code is an error. Response headers are in either
  1357  // *Photo.ServerResponse.Header or (if a response was returned at all) in
  1358  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1359  // whether the returned error was because http.StatusNotModified was returned.
  1360  func (c *PhotoCreateCall) Do(opts ...googleapi.CallOption) (*Photo, error) {
  1361  	gensupport.SetOptions(c.urlParams_, opts...)
  1362  	res, err := c.doRequest("json")
  1363  	if res != nil && res.StatusCode == http.StatusNotModified {
  1364  		if res.Body != nil {
  1365  			res.Body.Close()
  1366  		}
  1367  		return nil, gensupport.WrapError(&googleapi.Error{
  1368  			Code:   res.StatusCode,
  1369  			Header: res.Header,
  1370  		})
  1371  	}
  1372  	if err != nil {
  1373  		return nil, err
  1374  	}
  1375  	defer googleapi.CloseBody(res)
  1376  	if err := googleapi.CheckResponse(res); err != nil {
  1377  		return nil, gensupport.WrapError(err)
  1378  	}
  1379  	ret := &Photo{
  1380  		ServerResponse: googleapi.ServerResponse{
  1381  			Header:         res.Header,
  1382  			HTTPStatusCode: res.StatusCode,
  1383  		},
  1384  	}
  1385  	target := &ret
  1386  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1387  		return nil, err
  1388  	}
  1389  	return ret, nil
  1390  }
  1391  
  1392  type PhotoDeleteCall struct {
  1393  	s          *Service
  1394  	photoId    string
  1395  	urlParams_ gensupport.URLParams
  1396  	ctx_       context.Context
  1397  	header_    http.Header
  1398  }
  1399  
  1400  // Delete: Deletes a Photo and its metadata. This method returns the following
  1401  // error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did
  1402  // not create the requested photo. * google.rpc.Code.NOT_FOUND if the photo ID
  1403  // does not exist.
  1404  //
  1405  // - photoId: ID of the Photo.
  1406  func (r *PhotoService) Delete(photoId string) *PhotoDeleteCall {
  1407  	c := &PhotoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1408  	c.photoId = photoId
  1409  	return c
  1410  }
  1411  
  1412  // Fields allows partial responses to be retrieved. See
  1413  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1414  // details.
  1415  func (c *PhotoDeleteCall) Fields(s ...googleapi.Field) *PhotoDeleteCall {
  1416  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1417  	return c
  1418  }
  1419  
  1420  // Context sets the context to be used in this call's Do method.
  1421  func (c *PhotoDeleteCall) Context(ctx context.Context) *PhotoDeleteCall {
  1422  	c.ctx_ = ctx
  1423  	return c
  1424  }
  1425  
  1426  // Header returns a http.Header that can be modified by the caller to add
  1427  // headers to the request.
  1428  func (c *PhotoDeleteCall) Header() http.Header {
  1429  	if c.header_ == nil {
  1430  		c.header_ = make(http.Header)
  1431  	}
  1432  	return c.header_
  1433  }
  1434  
  1435  func (c *PhotoDeleteCall) doRequest(alt string) (*http.Response, error) {
  1436  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1437  	var body io.Reader = nil
  1438  	c.urlParams_.Set("alt", alt)
  1439  	c.urlParams_.Set("prettyPrint", "false")
  1440  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photo/{photoId}")
  1441  	urls += "?" + c.urlParams_.Encode()
  1442  	req, err := http.NewRequest("DELETE", urls, body)
  1443  	if err != nil {
  1444  		return nil, err
  1445  	}
  1446  	req.Header = reqHeaders
  1447  	googleapi.Expand(req.URL, map[string]string{
  1448  		"photoId": c.photoId,
  1449  	})
  1450  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1451  }
  1452  
  1453  // Do executes the "streetviewpublish.photo.delete" call.
  1454  // Any non-2xx status code is an error. Response headers are in either
  1455  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  1456  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1457  // whether the returned error was because http.StatusNotModified was returned.
  1458  func (c *PhotoDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  1459  	gensupport.SetOptions(c.urlParams_, opts...)
  1460  	res, err := c.doRequest("json")
  1461  	if res != nil && res.StatusCode == http.StatusNotModified {
  1462  		if res.Body != nil {
  1463  			res.Body.Close()
  1464  		}
  1465  		return nil, gensupport.WrapError(&googleapi.Error{
  1466  			Code:   res.StatusCode,
  1467  			Header: res.Header,
  1468  		})
  1469  	}
  1470  	if err != nil {
  1471  		return nil, err
  1472  	}
  1473  	defer googleapi.CloseBody(res)
  1474  	if err := googleapi.CheckResponse(res); err != nil {
  1475  		return nil, gensupport.WrapError(err)
  1476  	}
  1477  	ret := &Empty{
  1478  		ServerResponse: googleapi.ServerResponse{
  1479  			Header:         res.Header,
  1480  			HTTPStatusCode: res.StatusCode,
  1481  		},
  1482  	}
  1483  	target := &ret
  1484  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1485  		return nil, err
  1486  	}
  1487  	return ret, nil
  1488  }
  1489  
  1490  type PhotoGetCall struct {
  1491  	s            *Service
  1492  	photoId      string
  1493  	urlParams_   gensupport.URLParams
  1494  	ifNoneMatch_ string
  1495  	ctx_         context.Context
  1496  	header_      http.Header
  1497  }
  1498  
  1499  // Get: Gets the metadata of the specified Photo. This method returns the
  1500  // following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting
  1501  // user did not create the requested Photo. * google.rpc.Code.NOT_FOUND if the
  1502  // requested Photo does not exist. * google.rpc.Code.UNAVAILABLE if the
  1503  // requested Photo is still being indexed.
  1504  //
  1505  // - photoId: ID of the Photo.
  1506  func (r *PhotoService) Get(photoId string) *PhotoGetCall {
  1507  	c := &PhotoGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1508  	c.photoId = photoId
  1509  	return c
  1510  }
  1511  
  1512  // LanguageCode sets the optional parameter "languageCode": The BCP-47 language
  1513  // code, such as "en-US" or "sr-Latn". For more information, see
  1514  // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If
  1515  // language_code is unspecified, the user's language preference for Google
  1516  // services is used.
  1517  func (c *PhotoGetCall) LanguageCode(languageCode string) *PhotoGetCall {
  1518  	c.urlParams_.Set("languageCode", languageCode)
  1519  	return c
  1520  }
  1521  
  1522  // View sets the optional parameter "view": Required. Specifies if a download
  1523  // URL for the photo bytes should be returned in the Photo response.
  1524  //
  1525  // Possible values:
  1526  //
  1527  //	"BASIC" - Server responses do not include the download URL for the photo
  1528  //
  1529  // bytes. The default value.
  1530  //
  1531  //	"INCLUDE_DOWNLOAD_URL" - Server responses include the download URL for the
  1532  //
  1533  // photo bytes.
  1534  func (c *PhotoGetCall) View(view string) *PhotoGetCall {
  1535  	c.urlParams_.Set("view", view)
  1536  	return c
  1537  }
  1538  
  1539  // Fields allows partial responses to be retrieved. See
  1540  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1541  // details.
  1542  func (c *PhotoGetCall) Fields(s ...googleapi.Field) *PhotoGetCall {
  1543  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1544  	return c
  1545  }
  1546  
  1547  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1548  // object's ETag matches the given value. This is useful for getting updates
  1549  // only after the object has changed since the last request.
  1550  func (c *PhotoGetCall) IfNoneMatch(entityTag string) *PhotoGetCall {
  1551  	c.ifNoneMatch_ = entityTag
  1552  	return c
  1553  }
  1554  
  1555  // Context sets the context to be used in this call's Do method.
  1556  func (c *PhotoGetCall) Context(ctx context.Context) *PhotoGetCall {
  1557  	c.ctx_ = ctx
  1558  	return c
  1559  }
  1560  
  1561  // Header returns a http.Header that can be modified by the caller to add
  1562  // headers to the request.
  1563  func (c *PhotoGetCall) Header() http.Header {
  1564  	if c.header_ == nil {
  1565  		c.header_ = make(http.Header)
  1566  	}
  1567  	return c.header_
  1568  }
  1569  
  1570  func (c *PhotoGetCall) doRequest(alt string) (*http.Response, error) {
  1571  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1572  	if c.ifNoneMatch_ != "" {
  1573  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1574  	}
  1575  	var body io.Reader = nil
  1576  	c.urlParams_.Set("alt", alt)
  1577  	c.urlParams_.Set("prettyPrint", "false")
  1578  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photo/{photoId}")
  1579  	urls += "?" + c.urlParams_.Encode()
  1580  	req, err := http.NewRequest("GET", urls, body)
  1581  	if err != nil {
  1582  		return nil, err
  1583  	}
  1584  	req.Header = reqHeaders
  1585  	googleapi.Expand(req.URL, map[string]string{
  1586  		"photoId": c.photoId,
  1587  	})
  1588  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1589  }
  1590  
  1591  // Do executes the "streetviewpublish.photo.get" call.
  1592  // Any non-2xx status code is an error. Response headers are in either
  1593  // *Photo.ServerResponse.Header or (if a response was returned at all) in
  1594  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1595  // whether the returned error was because http.StatusNotModified was returned.
  1596  func (c *PhotoGetCall) Do(opts ...googleapi.CallOption) (*Photo, error) {
  1597  	gensupport.SetOptions(c.urlParams_, opts...)
  1598  	res, err := c.doRequest("json")
  1599  	if res != nil && res.StatusCode == http.StatusNotModified {
  1600  		if res.Body != nil {
  1601  			res.Body.Close()
  1602  		}
  1603  		return nil, gensupport.WrapError(&googleapi.Error{
  1604  			Code:   res.StatusCode,
  1605  			Header: res.Header,
  1606  		})
  1607  	}
  1608  	if err != nil {
  1609  		return nil, err
  1610  	}
  1611  	defer googleapi.CloseBody(res)
  1612  	if err := googleapi.CheckResponse(res); err != nil {
  1613  		return nil, gensupport.WrapError(err)
  1614  	}
  1615  	ret := &Photo{
  1616  		ServerResponse: googleapi.ServerResponse{
  1617  			Header:         res.Header,
  1618  			HTTPStatusCode: res.StatusCode,
  1619  		},
  1620  	}
  1621  	target := &ret
  1622  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1623  		return nil, err
  1624  	}
  1625  	return ret, nil
  1626  }
  1627  
  1628  type PhotoStartUploadCall struct {
  1629  	s          *Service
  1630  	empty      *Empty
  1631  	urlParams_ gensupport.URLParams
  1632  	ctx_       context.Context
  1633  	header_    http.Header
  1634  }
  1635  
  1636  // StartUpload: Creates an upload session to start uploading photo bytes. The
  1637  // method uses the upload URL of the returned UploadRef to upload the bytes for
  1638  // the Photo. In addition to the photo requirements shown in
  1639  // https://support.google.com/maps/answer/7012050?ref_topic=6275604, the photo
  1640  // must meet the following requirements: * Photo Sphere XMP metadata must be
  1641  // included in the photo metadata. See
  1642  // https://developers.google.com/streetview/spherical-metadata for the required
  1643  // fields. * The pixel size of the photo must meet the size requirements listed
  1644  // in https://support.google.com/maps/answer/7012050?ref_topic=6275604, and the
  1645  // photo must be a full 360 horizontally. After the upload completes, the
  1646  // method uses UploadRef with CreatePhoto to create the Photo object entry.
  1647  func (r *PhotoService) StartUpload(empty *Empty) *PhotoStartUploadCall {
  1648  	c := &PhotoStartUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1649  	c.empty = empty
  1650  	return c
  1651  }
  1652  
  1653  // Fields allows partial responses to be retrieved. See
  1654  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1655  // details.
  1656  func (c *PhotoStartUploadCall) Fields(s ...googleapi.Field) *PhotoStartUploadCall {
  1657  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1658  	return c
  1659  }
  1660  
  1661  // Context sets the context to be used in this call's Do method.
  1662  func (c *PhotoStartUploadCall) Context(ctx context.Context) *PhotoStartUploadCall {
  1663  	c.ctx_ = ctx
  1664  	return c
  1665  }
  1666  
  1667  // Header returns a http.Header that can be modified by the caller to add
  1668  // headers to the request.
  1669  func (c *PhotoStartUploadCall) Header() http.Header {
  1670  	if c.header_ == nil {
  1671  		c.header_ = make(http.Header)
  1672  	}
  1673  	return c.header_
  1674  }
  1675  
  1676  func (c *PhotoStartUploadCall) doRequest(alt string) (*http.Response, error) {
  1677  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1678  	var body io.Reader = nil
  1679  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.empty)
  1680  	if err != nil {
  1681  		return nil, err
  1682  	}
  1683  	c.urlParams_.Set("alt", alt)
  1684  	c.urlParams_.Set("prettyPrint", "false")
  1685  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photo:startUpload")
  1686  	urls += "?" + c.urlParams_.Encode()
  1687  	req, err := http.NewRequest("POST", urls, body)
  1688  	if err != nil {
  1689  		return nil, err
  1690  	}
  1691  	req.Header = reqHeaders
  1692  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1693  }
  1694  
  1695  // Do executes the "streetviewpublish.photo.startUpload" call.
  1696  // Any non-2xx status code is an error. Response headers are in either
  1697  // *UploadRef.ServerResponse.Header or (if a response was returned at all) in
  1698  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1699  // whether the returned error was because http.StatusNotModified was returned.
  1700  func (c *PhotoStartUploadCall) Do(opts ...googleapi.CallOption) (*UploadRef, error) {
  1701  	gensupport.SetOptions(c.urlParams_, opts...)
  1702  	res, err := c.doRequest("json")
  1703  	if res != nil && res.StatusCode == http.StatusNotModified {
  1704  		if res.Body != nil {
  1705  			res.Body.Close()
  1706  		}
  1707  		return nil, gensupport.WrapError(&googleapi.Error{
  1708  			Code:   res.StatusCode,
  1709  			Header: res.Header,
  1710  		})
  1711  	}
  1712  	if err != nil {
  1713  		return nil, err
  1714  	}
  1715  	defer googleapi.CloseBody(res)
  1716  	if err := googleapi.CheckResponse(res); err != nil {
  1717  		return nil, gensupport.WrapError(err)
  1718  	}
  1719  	ret := &UploadRef{
  1720  		ServerResponse: googleapi.ServerResponse{
  1721  			Header:         res.Header,
  1722  			HTTPStatusCode: res.StatusCode,
  1723  		},
  1724  	}
  1725  	target := &ret
  1726  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1727  		return nil, err
  1728  	}
  1729  	return ret, nil
  1730  }
  1731  
  1732  type PhotoUpdateCall struct {
  1733  	s          *Service
  1734  	id         string
  1735  	photo      *Photo
  1736  	urlParams_ gensupport.URLParams
  1737  	ctx_       context.Context
  1738  	header_    http.Header
  1739  }
  1740  
  1741  // Update: Updates the metadata of a Photo, such as pose, place association,
  1742  // connections, etc. Changing the pixels of a photo is not supported. Only the
  1743  // fields specified in the updateMask field are used. If `updateMask` is not
  1744  // present, the update applies to all fields. This method returns the following
  1745  // error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did
  1746  // not create the requested photo. * google.rpc.Code.INVALID_ARGUMENT if the
  1747  // request is malformed. * google.rpc.Code.NOT_FOUND if the requested photo
  1748  // does not exist. * google.rpc.Code.UNAVAILABLE if the requested Photo is
  1749  // still being indexed.
  1750  //
  1751  // - id: A unique identifier for a photo.
  1752  func (r *PhotoService) Update(id string, photo *Photo) *PhotoUpdateCall {
  1753  	c := &PhotoUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1754  	c.id = id
  1755  	c.photo = photo
  1756  	return c
  1757  }
  1758  
  1759  // UpdateMask sets the optional parameter "updateMask": Required. Mask that
  1760  // identifies fields on the photo metadata to update. If not present, the old
  1761  // Photo metadata is entirely replaced with the new Photo metadata in this
  1762  // request. The update fails if invalid fields are specified. Multiple fields
  1763  // can be specified in a comma-delimited list. The following fields are valid:
  1764  // * `pose.heading` * `pose.lat_lng_pair` * `pose.pitch` * `pose.roll` *
  1765  // `pose.level` * `pose.altitude` * `connections` * `places` > Note: When
  1766  // updateMask contains repeated fields, the entire set of repeated values get
  1767  // replaced with the new contents. For example, if updateMask contains
  1768  // `connections` and `UpdatePhotoRequest.photo.connections` is empty, all
  1769  // connections are removed.
  1770  func (c *PhotoUpdateCall) UpdateMask(updateMask string) *PhotoUpdateCall {
  1771  	c.urlParams_.Set("updateMask", updateMask)
  1772  	return c
  1773  }
  1774  
  1775  // Fields allows partial responses to be retrieved. See
  1776  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1777  // details.
  1778  func (c *PhotoUpdateCall) Fields(s ...googleapi.Field) *PhotoUpdateCall {
  1779  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1780  	return c
  1781  }
  1782  
  1783  // Context sets the context to be used in this call's Do method.
  1784  func (c *PhotoUpdateCall) Context(ctx context.Context) *PhotoUpdateCall {
  1785  	c.ctx_ = ctx
  1786  	return c
  1787  }
  1788  
  1789  // Header returns a http.Header that can be modified by the caller to add
  1790  // headers to the request.
  1791  func (c *PhotoUpdateCall) Header() http.Header {
  1792  	if c.header_ == nil {
  1793  		c.header_ = make(http.Header)
  1794  	}
  1795  	return c.header_
  1796  }
  1797  
  1798  func (c *PhotoUpdateCall) doRequest(alt string) (*http.Response, error) {
  1799  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1800  	var body io.Reader = nil
  1801  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.photo)
  1802  	if err != nil {
  1803  		return nil, err
  1804  	}
  1805  	c.urlParams_.Set("alt", alt)
  1806  	c.urlParams_.Set("prettyPrint", "false")
  1807  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photo/{id}")
  1808  	urls += "?" + c.urlParams_.Encode()
  1809  	req, err := http.NewRequest("PUT", urls, body)
  1810  	if err != nil {
  1811  		return nil, err
  1812  	}
  1813  	req.Header = reqHeaders
  1814  	googleapi.Expand(req.URL, map[string]string{
  1815  		"id": c.id,
  1816  	})
  1817  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1818  }
  1819  
  1820  // Do executes the "streetviewpublish.photo.update" call.
  1821  // Any non-2xx status code is an error. Response headers are in either
  1822  // *Photo.ServerResponse.Header or (if a response was returned at all) in
  1823  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1824  // whether the returned error was because http.StatusNotModified was returned.
  1825  func (c *PhotoUpdateCall) Do(opts ...googleapi.CallOption) (*Photo, error) {
  1826  	gensupport.SetOptions(c.urlParams_, opts...)
  1827  	res, err := c.doRequest("json")
  1828  	if res != nil && res.StatusCode == http.StatusNotModified {
  1829  		if res.Body != nil {
  1830  			res.Body.Close()
  1831  		}
  1832  		return nil, gensupport.WrapError(&googleapi.Error{
  1833  			Code:   res.StatusCode,
  1834  			Header: res.Header,
  1835  		})
  1836  	}
  1837  	if err != nil {
  1838  		return nil, err
  1839  	}
  1840  	defer googleapi.CloseBody(res)
  1841  	if err := googleapi.CheckResponse(res); err != nil {
  1842  		return nil, gensupport.WrapError(err)
  1843  	}
  1844  	ret := &Photo{
  1845  		ServerResponse: googleapi.ServerResponse{
  1846  			Header:         res.Header,
  1847  			HTTPStatusCode: res.StatusCode,
  1848  		},
  1849  	}
  1850  	target := &ret
  1851  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1852  		return nil, err
  1853  	}
  1854  	return ret, nil
  1855  }
  1856  
  1857  type PhotoSequenceCreateCall struct {
  1858  	s             *Service
  1859  	photosequence *PhotoSequence
  1860  	urlParams_    gensupport.URLParams
  1861  	ctx_          context.Context
  1862  	header_       http.Header
  1863  }
  1864  
  1865  // Create: After the client finishes uploading the PhotoSequence with the
  1866  // returned UploadRef, CreatePhotoSequence extracts a sequence of 360 photos
  1867  // from a video or Extensible Device Metadata (XDM, http://www.xdm.org/) to be
  1868  // published to Street View on Google Maps. `CreatePhotoSequence` returns an
  1869  // Operation, with the PhotoSequence Id set in the `Operation.name` field. This
  1870  // method returns the following error codes: * google.rpc.Code.INVALID_ARGUMENT
  1871  // if the request is malformed. * google.rpc.Code.NOT_FOUND if the upload
  1872  // reference does not exist.
  1873  func (r *PhotoSequenceService) Create(photosequence *PhotoSequence) *PhotoSequenceCreateCall {
  1874  	c := &PhotoSequenceCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1875  	c.photosequence = photosequence
  1876  	return c
  1877  }
  1878  
  1879  // InputType sets the optional parameter "inputType": Required. The input form
  1880  // of PhotoSequence.
  1881  //
  1882  // Possible values:
  1883  //
  1884  //	"INPUT_TYPE_UNSPECIFIED" - Not specified. Server will return
  1885  //
  1886  // google.rpc.Code.INVALID_ARGUMENT.
  1887  //
  1888  //	"VIDEO" - 360 Video.
  1889  //	"XDM" - Extensible Device Metadata, http://www.xdm.org
  1890  func (c *PhotoSequenceCreateCall) InputType(inputType string) *PhotoSequenceCreateCall {
  1891  	c.urlParams_.Set("inputType", inputType)
  1892  	return c
  1893  }
  1894  
  1895  // Fields allows partial responses to be retrieved. See
  1896  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1897  // details.
  1898  func (c *PhotoSequenceCreateCall) Fields(s ...googleapi.Field) *PhotoSequenceCreateCall {
  1899  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1900  	return c
  1901  }
  1902  
  1903  // Context sets the context to be used in this call's Do method.
  1904  func (c *PhotoSequenceCreateCall) Context(ctx context.Context) *PhotoSequenceCreateCall {
  1905  	c.ctx_ = ctx
  1906  	return c
  1907  }
  1908  
  1909  // Header returns a http.Header that can be modified by the caller to add
  1910  // headers to the request.
  1911  func (c *PhotoSequenceCreateCall) Header() http.Header {
  1912  	if c.header_ == nil {
  1913  		c.header_ = make(http.Header)
  1914  	}
  1915  	return c.header_
  1916  }
  1917  
  1918  func (c *PhotoSequenceCreateCall) doRequest(alt string) (*http.Response, error) {
  1919  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1920  	var body io.Reader = nil
  1921  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.photosequence)
  1922  	if err != nil {
  1923  		return nil, err
  1924  	}
  1925  	c.urlParams_.Set("alt", alt)
  1926  	c.urlParams_.Set("prettyPrint", "false")
  1927  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photoSequence")
  1928  	urls += "?" + c.urlParams_.Encode()
  1929  	req, err := http.NewRequest("POST", urls, body)
  1930  	if err != nil {
  1931  		return nil, err
  1932  	}
  1933  	req.Header = reqHeaders
  1934  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1935  }
  1936  
  1937  // Do executes the "streetviewpublish.photoSequence.create" call.
  1938  // Any non-2xx status code is an error. Response headers are in either
  1939  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1940  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1941  // whether the returned error was because http.StatusNotModified was returned.
  1942  func (c *PhotoSequenceCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1943  	gensupport.SetOptions(c.urlParams_, opts...)
  1944  	res, err := c.doRequest("json")
  1945  	if res != nil && res.StatusCode == http.StatusNotModified {
  1946  		if res.Body != nil {
  1947  			res.Body.Close()
  1948  		}
  1949  		return nil, gensupport.WrapError(&googleapi.Error{
  1950  			Code:   res.StatusCode,
  1951  			Header: res.Header,
  1952  		})
  1953  	}
  1954  	if err != nil {
  1955  		return nil, err
  1956  	}
  1957  	defer googleapi.CloseBody(res)
  1958  	if err := googleapi.CheckResponse(res); err != nil {
  1959  		return nil, gensupport.WrapError(err)
  1960  	}
  1961  	ret := &Operation{
  1962  		ServerResponse: googleapi.ServerResponse{
  1963  			Header:         res.Header,
  1964  			HTTPStatusCode: res.StatusCode,
  1965  		},
  1966  	}
  1967  	target := &ret
  1968  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1969  		return nil, err
  1970  	}
  1971  	return ret, nil
  1972  }
  1973  
  1974  type PhotoSequenceDeleteCall struct {
  1975  	s          *Service
  1976  	sequenceId string
  1977  	urlParams_ gensupport.URLParams
  1978  	ctx_       context.Context
  1979  	header_    http.Header
  1980  }
  1981  
  1982  // Delete: Deletes a PhotoSequence and its metadata. This method returns the
  1983  // following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting
  1984  // user did not create the requested photo sequence. *
  1985  // google.rpc.Code.NOT_FOUND if the photo sequence ID does not exist. *
  1986  // google.rpc.Code.FAILED_PRECONDITION if the photo sequence ID is not yet
  1987  // finished processing.
  1988  //
  1989  // - sequenceId: ID of the PhotoSequence.
  1990  func (r *PhotoSequenceService) Delete(sequenceId string) *PhotoSequenceDeleteCall {
  1991  	c := &PhotoSequenceDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1992  	c.sequenceId = sequenceId
  1993  	return c
  1994  }
  1995  
  1996  // Fields allows partial responses to be retrieved. See
  1997  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1998  // details.
  1999  func (c *PhotoSequenceDeleteCall) Fields(s ...googleapi.Field) *PhotoSequenceDeleteCall {
  2000  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2001  	return c
  2002  }
  2003  
  2004  // Context sets the context to be used in this call's Do method.
  2005  func (c *PhotoSequenceDeleteCall) Context(ctx context.Context) *PhotoSequenceDeleteCall {
  2006  	c.ctx_ = ctx
  2007  	return c
  2008  }
  2009  
  2010  // Header returns a http.Header that can be modified by the caller to add
  2011  // headers to the request.
  2012  func (c *PhotoSequenceDeleteCall) Header() http.Header {
  2013  	if c.header_ == nil {
  2014  		c.header_ = make(http.Header)
  2015  	}
  2016  	return c.header_
  2017  }
  2018  
  2019  func (c *PhotoSequenceDeleteCall) doRequest(alt string) (*http.Response, error) {
  2020  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2021  	var body io.Reader = nil
  2022  	c.urlParams_.Set("alt", alt)
  2023  	c.urlParams_.Set("prettyPrint", "false")
  2024  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photoSequence/{sequenceId}")
  2025  	urls += "?" + c.urlParams_.Encode()
  2026  	req, err := http.NewRequest("DELETE", urls, body)
  2027  	if err != nil {
  2028  		return nil, err
  2029  	}
  2030  	req.Header = reqHeaders
  2031  	googleapi.Expand(req.URL, map[string]string{
  2032  		"sequenceId": c.sequenceId,
  2033  	})
  2034  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2035  }
  2036  
  2037  // Do executes the "streetviewpublish.photoSequence.delete" call.
  2038  // Any non-2xx status code is an error. Response headers are in either
  2039  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  2040  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2041  // whether the returned error was because http.StatusNotModified was returned.
  2042  func (c *PhotoSequenceDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2043  	gensupport.SetOptions(c.urlParams_, opts...)
  2044  	res, err := c.doRequest("json")
  2045  	if res != nil && res.StatusCode == http.StatusNotModified {
  2046  		if res.Body != nil {
  2047  			res.Body.Close()
  2048  		}
  2049  		return nil, gensupport.WrapError(&googleapi.Error{
  2050  			Code:   res.StatusCode,
  2051  			Header: res.Header,
  2052  		})
  2053  	}
  2054  	if err != nil {
  2055  		return nil, err
  2056  	}
  2057  	defer googleapi.CloseBody(res)
  2058  	if err := googleapi.CheckResponse(res); err != nil {
  2059  		return nil, gensupport.WrapError(err)
  2060  	}
  2061  	ret := &Empty{
  2062  		ServerResponse: googleapi.ServerResponse{
  2063  			Header:         res.Header,
  2064  			HTTPStatusCode: res.StatusCode,
  2065  		},
  2066  	}
  2067  	target := &ret
  2068  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2069  		return nil, err
  2070  	}
  2071  	return ret, nil
  2072  }
  2073  
  2074  type PhotoSequenceGetCall struct {
  2075  	s            *Service
  2076  	sequenceId   string
  2077  	urlParams_   gensupport.URLParams
  2078  	ifNoneMatch_ string
  2079  	ctx_         context.Context
  2080  	header_      http.Header
  2081  }
  2082  
  2083  // Get: Gets the metadata of the specified PhotoSequence via the Operation
  2084  // interface. This method returns the following three types of responses: *
  2085  // `Operation.done` = false, if the processing of PhotoSequence is not finished
  2086  // yet. * `Operation.done` = true and `Operation.error` is populated, if there
  2087  // was an error in processing. * `Operation.done` = true and
  2088  // `Operation.response` is poulated, which contains a PhotoSequence message.
  2089  // This method returns the following error codes: *
  2090  // google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the
  2091  // requested PhotoSequence. * google.rpc.Code.NOT_FOUND if the requested
  2092  // PhotoSequence does not exist.
  2093  //
  2094  // - sequenceId: ID of the photo sequence.
  2095  func (r *PhotoSequenceService) Get(sequenceId string) *PhotoSequenceGetCall {
  2096  	c := &PhotoSequenceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2097  	c.sequenceId = sequenceId
  2098  	return c
  2099  }
  2100  
  2101  // Filter sets the optional parameter "filter": The filter expression. For
  2102  // example: `published_status=PUBLISHED`. The filters supported are:
  2103  // `published_status`. See https://google.aip.dev/160 for more information.
  2104  func (c *PhotoSequenceGetCall) Filter(filter string) *PhotoSequenceGetCall {
  2105  	c.urlParams_.Set("filter", filter)
  2106  	return c
  2107  }
  2108  
  2109  // View sets the optional parameter "view": Specifies if a download URL for the
  2110  // photo sequence should be returned in `download_url` of individual photos in
  2111  // the PhotoSequence response. > Note: Currently not implemented.
  2112  //
  2113  // Possible values:
  2114  //
  2115  //	"BASIC" - Server responses do not include the download URL for the photo
  2116  //
  2117  // bytes. The default value.
  2118  //
  2119  //	"INCLUDE_DOWNLOAD_URL" - Server responses include the download URL for the
  2120  //
  2121  // photo bytes.
  2122  func (c *PhotoSequenceGetCall) View(view string) *PhotoSequenceGetCall {
  2123  	c.urlParams_.Set("view", view)
  2124  	return c
  2125  }
  2126  
  2127  // Fields allows partial responses to be retrieved. See
  2128  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2129  // details.
  2130  func (c *PhotoSequenceGetCall) Fields(s ...googleapi.Field) *PhotoSequenceGetCall {
  2131  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2132  	return c
  2133  }
  2134  
  2135  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2136  // object's ETag matches the given value. This is useful for getting updates
  2137  // only after the object has changed since the last request.
  2138  func (c *PhotoSequenceGetCall) IfNoneMatch(entityTag string) *PhotoSequenceGetCall {
  2139  	c.ifNoneMatch_ = entityTag
  2140  	return c
  2141  }
  2142  
  2143  // Context sets the context to be used in this call's Do method.
  2144  func (c *PhotoSequenceGetCall) Context(ctx context.Context) *PhotoSequenceGetCall {
  2145  	c.ctx_ = ctx
  2146  	return c
  2147  }
  2148  
  2149  // Header returns a http.Header that can be modified by the caller to add
  2150  // headers to the request.
  2151  func (c *PhotoSequenceGetCall) Header() http.Header {
  2152  	if c.header_ == nil {
  2153  		c.header_ = make(http.Header)
  2154  	}
  2155  	return c.header_
  2156  }
  2157  
  2158  func (c *PhotoSequenceGetCall) doRequest(alt string) (*http.Response, error) {
  2159  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2160  	if c.ifNoneMatch_ != "" {
  2161  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2162  	}
  2163  	var body io.Reader = nil
  2164  	c.urlParams_.Set("alt", alt)
  2165  	c.urlParams_.Set("prettyPrint", "false")
  2166  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photoSequence/{sequenceId}")
  2167  	urls += "?" + c.urlParams_.Encode()
  2168  	req, err := http.NewRequest("GET", urls, body)
  2169  	if err != nil {
  2170  		return nil, err
  2171  	}
  2172  	req.Header = reqHeaders
  2173  	googleapi.Expand(req.URL, map[string]string{
  2174  		"sequenceId": c.sequenceId,
  2175  	})
  2176  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2177  }
  2178  
  2179  // Do executes the "streetviewpublish.photoSequence.get" call.
  2180  // Any non-2xx status code is an error. Response headers are in either
  2181  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2182  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2183  // whether the returned error was because http.StatusNotModified was returned.
  2184  func (c *PhotoSequenceGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2185  	gensupport.SetOptions(c.urlParams_, opts...)
  2186  	res, err := c.doRequest("json")
  2187  	if res != nil && res.StatusCode == http.StatusNotModified {
  2188  		if res.Body != nil {
  2189  			res.Body.Close()
  2190  		}
  2191  		return nil, gensupport.WrapError(&googleapi.Error{
  2192  			Code:   res.StatusCode,
  2193  			Header: res.Header,
  2194  		})
  2195  	}
  2196  	if err != nil {
  2197  		return nil, err
  2198  	}
  2199  	defer googleapi.CloseBody(res)
  2200  	if err := googleapi.CheckResponse(res); err != nil {
  2201  		return nil, gensupport.WrapError(err)
  2202  	}
  2203  	ret := &Operation{
  2204  		ServerResponse: googleapi.ServerResponse{
  2205  			Header:         res.Header,
  2206  			HTTPStatusCode: res.StatusCode,
  2207  		},
  2208  	}
  2209  	target := &ret
  2210  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2211  		return nil, err
  2212  	}
  2213  	return ret, nil
  2214  }
  2215  
  2216  type PhotoSequenceStartUploadCall struct {
  2217  	s          *Service
  2218  	empty      *Empty
  2219  	urlParams_ gensupport.URLParams
  2220  	ctx_       context.Context
  2221  	header_    http.Header
  2222  }
  2223  
  2224  // StartUpload: Creates an upload session to start uploading photo sequence
  2225  // data. The upload URL of the returned UploadRef is used to upload the data
  2226  // for the `photoSequence`. After the upload is complete, the UploadRef is used
  2227  // with CreatePhotoSequence to create the PhotoSequence object entry.
  2228  func (r *PhotoSequenceService) StartUpload(empty *Empty) *PhotoSequenceStartUploadCall {
  2229  	c := &PhotoSequenceStartUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2230  	c.empty = empty
  2231  	return c
  2232  }
  2233  
  2234  // Fields allows partial responses to be retrieved. See
  2235  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2236  // details.
  2237  func (c *PhotoSequenceStartUploadCall) Fields(s ...googleapi.Field) *PhotoSequenceStartUploadCall {
  2238  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2239  	return c
  2240  }
  2241  
  2242  // Context sets the context to be used in this call's Do method.
  2243  func (c *PhotoSequenceStartUploadCall) Context(ctx context.Context) *PhotoSequenceStartUploadCall {
  2244  	c.ctx_ = ctx
  2245  	return c
  2246  }
  2247  
  2248  // Header returns a http.Header that can be modified by the caller to add
  2249  // headers to the request.
  2250  func (c *PhotoSequenceStartUploadCall) Header() http.Header {
  2251  	if c.header_ == nil {
  2252  		c.header_ = make(http.Header)
  2253  	}
  2254  	return c.header_
  2255  }
  2256  
  2257  func (c *PhotoSequenceStartUploadCall) doRequest(alt string) (*http.Response, error) {
  2258  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2259  	var body io.Reader = nil
  2260  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.empty)
  2261  	if err != nil {
  2262  		return nil, err
  2263  	}
  2264  	c.urlParams_.Set("alt", alt)
  2265  	c.urlParams_.Set("prettyPrint", "false")
  2266  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photoSequence:startUpload")
  2267  	urls += "?" + c.urlParams_.Encode()
  2268  	req, err := http.NewRequest("POST", urls, body)
  2269  	if err != nil {
  2270  		return nil, err
  2271  	}
  2272  	req.Header = reqHeaders
  2273  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2274  }
  2275  
  2276  // Do executes the "streetviewpublish.photoSequence.startUpload" call.
  2277  // Any non-2xx status code is an error. Response headers are in either
  2278  // *UploadRef.ServerResponse.Header or (if a response was returned at all) in
  2279  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2280  // whether the returned error was because http.StatusNotModified was returned.
  2281  func (c *PhotoSequenceStartUploadCall) Do(opts ...googleapi.CallOption) (*UploadRef, error) {
  2282  	gensupport.SetOptions(c.urlParams_, opts...)
  2283  	res, err := c.doRequest("json")
  2284  	if res != nil && res.StatusCode == http.StatusNotModified {
  2285  		if res.Body != nil {
  2286  			res.Body.Close()
  2287  		}
  2288  		return nil, gensupport.WrapError(&googleapi.Error{
  2289  			Code:   res.StatusCode,
  2290  			Header: res.Header,
  2291  		})
  2292  	}
  2293  	if err != nil {
  2294  		return nil, err
  2295  	}
  2296  	defer googleapi.CloseBody(res)
  2297  	if err := googleapi.CheckResponse(res); err != nil {
  2298  		return nil, gensupport.WrapError(err)
  2299  	}
  2300  	ret := &UploadRef{
  2301  		ServerResponse: googleapi.ServerResponse{
  2302  			Header:         res.Header,
  2303  			HTTPStatusCode: res.StatusCode,
  2304  		},
  2305  	}
  2306  	target := &ret
  2307  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2308  		return nil, err
  2309  	}
  2310  	return ret, nil
  2311  }
  2312  
  2313  type PhotoSequencesListCall struct {
  2314  	s            *Service
  2315  	urlParams_   gensupport.URLParams
  2316  	ifNoneMatch_ string
  2317  	ctx_         context.Context
  2318  	header_      http.Header
  2319  }
  2320  
  2321  // List: Lists all the PhotoSequences that belong to the user, in descending
  2322  // CreatePhotoSequence timestamp order.
  2323  func (r *PhotoSequencesService) List() *PhotoSequencesListCall {
  2324  	c := &PhotoSequencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2325  	return c
  2326  }
  2327  
  2328  // Filter sets the optional parameter "filter": The filter expression. For
  2329  // example: `imagery_type=SPHERICAL`. The filters supported are:
  2330  // `imagery_type`, `processing_state`, `min_latitude`, `max_latitude`,
  2331  // `min_longitude`, `max_longitude`, `filename_query`,
  2332  // `min_capture_time_seconds`, `max_capture_time_seconds. See
  2333  // https://google.aip.dev/160 for more information. Filename queries should
  2334  // sent as a Phrase in order to support multiple words and special characters
  2335  // by adding escaped quotes. Ex: filename_query="example of a phrase.mp4"
  2336  func (c *PhotoSequencesListCall) Filter(filter string) *PhotoSequencesListCall {
  2337  	c.urlParams_.Set("filter", filter)
  2338  	return c
  2339  }
  2340  
  2341  // PageSize sets the optional parameter "pageSize": The maximum number of photo
  2342  // sequences to return. `pageSize` must be non-negative. If `pageSize` is zero
  2343  // or is not provided, the default page size of 100 is used. The number of
  2344  // photo sequences returned in the response may be less than `pageSize` if the
  2345  // number of matches is less than `pageSize`. This is currently unimplemented
  2346  // but is in process.
  2347  func (c *PhotoSequencesListCall) PageSize(pageSize int64) *PhotoSequencesListCall {
  2348  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2349  	return c
  2350  }
  2351  
  2352  // PageToken sets the optional parameter "pageToken": The nextPageToken value
  2353  // returned from a previous ListPhotoSequences request, if any.
  2354  func (c *PhotoSequencesListCall) PageToken(pageToken string) *PhotoSequencesListCall {
  2355  	c.urlParams_.Set("pageToken", pageToken)
  2356  	return c
  2357  }
  2358  
  2359  // Fields allows partial responses to be retrieved. See
  2360  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2361  // details.
  2362  func (c *PhotoSequencesListCall) Fields(s ...googleapi.Field) *PhotoSequencesListCall {
  2363  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2364  	return c
  2365  }
  2366  
  2367  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2368  // object's ETag matches the given value. This is useful for getting updates
  2369  // only after the object has changed since the last request.
  2370  func (c *PhotoSequencesListCall) IfNoneMatch(entityTag string) *PhotoSequencesListCall {
  2371  	c.ifNoneMatch_ = entityTag
  2372  	return c
  2373  }
  2374  
  2375  // Context sets the context to be used in this call's Do method.
  2376  func (c *PhotoSequencesListCall) Context(ctx context.Context) *PhotoSequencesListCall {
  2377  	c.ctx_ = ctx
  2378  	return c
  2379  }
  2380  
  2381  // Header returns a http.Header that can be modified by the caller to add
  2382  // headers to the request.
  2383  func (c *PhotoSequencesListCall) Header() http.Header {
  2384  	if c.header_ == nil {
  2385  		c.header_ = make(http.Header)
  2386  	}
  2387  	return c.header_
  2388  }
  2389  
  2390  func (c *PhotoSequencesListCall) doRequest(alt string) (*http.Response, error) {
  2391  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2392  	if c.ifNoneMatch_ != "" {
  2393  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2394  	}
  2395  	var body io.Reader = nil
  2396  	c.urlParams_.Set("alt", alt)
  2397  	c.urlParams_.Set("prettyPrint", "false")
  2398  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photoSequences")
  2399  	urls += "?" + c.urlParams_.Encode()
  2400  	req, err := http.NewRequest("GET", urls, body)
  2401  	if err != nil {
  2402  		return nil, err
  2403  	}
  2404  	req.Header = reqHeaders
  2405  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2406  }
  2407  
  2408  // Do executes the "streetviewpublish.photoSequences.list" call.
  2409  // Any non-2xx status code is an error. Response headers are in either
  2410  // *ListPhotoSequencesResponse.ServerResponse.Header or (if a response was
  2411  // returned at all) in error.(*googleapi.Error).Header. Use
  2412  // googleapi.IsNotModified to check whether the returned error was because
  2413  // http.StatusNotModified was returned.
  2414  func (c *PhotoSequencesListCall) Do(opts ...googleapi.CallOption) (*ListPhotoSequencesResponse, error) {
  2415  	gensupport.SetOptions(c.urlParams_, opts...)
  2416  	res, err := c.doRequest("json")
  2417  	if res != nil && res.StatusCode == http.StatusNotModified {
  2418  		if res.Body != nil {
  2419  			res.Body.Close()
  2420  		}
  2421  		return nil, gensupport.WrapError(&googleapi.Error{
  2422  			Code:   res.StatusCode,
  2423  			Header: res.Header,
  2424  		})
  2425  	}
  2426  	if err != nil {
  2427  		return nil, err
  2428  	}
  2429  	defer googleapi.CloseBody(res)
  2430  	if err := googleapi.CheckResponse(res); err != nil {
  2431  		return nil, gensupport.WrapError(err)
  2432  	}
  2433  	ret := &ListPhotoSequencesResponse{
  2434  		ServerResponse: googleapi.ServerResponse{
  2435  			Header:         res.Header,
  2436  			HTTPStatusCode: res.StatusCode,
  2437  		},
  2438  	}
  2439  	target := &ret
  2440  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2441  		return nil, err
  2442  	}
  2443  	return ret, nil
  2444  }
  2445  
  2446  // Pages invokes f for each page of results.
  2447  // A non-nil error returned from f will halt the iteration.
  2448  // The provided context supersedes any context provided to the Context method.
  2449  func (c *PhotoSequencesListCall) Pages(ctx context.Context, f func(*ListPhotoSequencesResponse) error) error {
  2450  	c.ctx_ = ctx
  2451  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2452  	for {
  2453  		x, err := c.Do()
  2454  		if err != nil {
  2455  			return err
  2456  		}
  2457  		if err := f(x); err != nil {
  2458  			return err
  2459  		}
  2460  		if x.NextPageToken == "" {
  2461  			return nil
  2462  		}
  2463  		c.PageToken(x.NextPageToken)
  2464  	}
  2465  }
  2466  
  2467  type PhotosBatchDeleteCall struct {
  2468  	s                        *Service
  2469  	batchdeletephotosrequest *BatchDeletePhotosRequest
  2470  	urlParams_               gensupport.URLParams
  2471  	ctx_                     context.Context
  2472  	header_                  http.Header
  2473  }
  2474  
  2475  // BatchDelete: Deletes a list of Photos and their metadata. Note that if
  2476  // BatchDeletePhotos fails, either critical fields are missing or there is an
  2477  // authentication error. Even if BatchDeletePhotos succeeds, individual photos
  2478  // in the batch may have failures. These failures are specified in each
  2479  // PhotoResponse.status in BatchDeletePhotosResponse.results. See DeletePhoto
  2480  // for specific failures that can occur per photo.
  2481  func (r *PhotosService) BatchDelete(batchdeletephotosrequest *BatchDeletePhotosRequest) *PhotosBatchDeleteCall {
  2482  	c := &PhotosBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2483  	c.batchdeletephotosrequest = batchdeletephotosrequest
  2484  	return c
  2485  }
  2486  
  2487  // Fields allows partial responses to be retrieved. See
  2488  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2489  // details.
  2490  func (c *PhotosBatchDeleteCall) Fields(s ...googleapi.Field) *PhotosBatchDeleteCall {
  2491  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2492  	return c
  2493  }
  2494  
  2495  // Context sets the context to be used in this call's Do method.
  2496  func (c *PhotosBatchDeleteCall) Context(ctx context.Context) *PhotosBatchDeleteCall {
  2497  	c.ctx_ = ctx
  2498  	return c
  2499  }
  2500  
  2501  // Header returns a http.Header that can be modified by the caller to add
  2502  // headers to the request.
  2503  func (c *PhotosBatchDeleteCall) Header() http.Header {
  2504  	if c.header_ == nil {
  2505  		c.header_ = make(http.Header)
  2506  	}
  2507  	return c.header_
  2508  }
  2509  
  2510  func (c *PhotosBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
  2511  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2512  	var body io.Reader = nil
  2513  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchdeletephotosrequest)
  2514  	if err != nil {
  2515  		return nil, err
  2516  	}
  2517  	c.urlParams_.Set("alt", alt)
  2518  	c.urlParams_.Set("prettyPrint", "false")
  2519  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photos:batchDelete")
  2520  	urls += "?" + c.urlParams_.Encode()
  2521  	req, err := http.NewRequest("POST", urls, body)
  2522  	if err != nil {
  2523  		return nil, err
  2524  	}
  2525  	req.Header = reqHeaders
  2526  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2527  }
  2528  
  2529  // Do executes the "streetviewpublish.photos.batchDelete" call.
  2530  // Any non-2xx status code is an error. Response headers are in either
  2531  // *BatchDeletePhotosResponse.ServerResponse.Header or (if a response was
  2532  // returned at all) in error.(*googleapi.Error).Header. Use
  2533  // googleapi.IsNotModified to check whether the returned error was because
  2534  // http.StatusNotModified was returned.
  2535  func (c *PhotosBatchDeleteCall) Do(opts ...googleapi.CallOption) (*BatchDeletePhotosResponse, error) {
  2536  	gensupport.SetOptions(c.urlParams_, opts...)
  2537  	res, err := c.doRequest("json")
  2538  	if res != nil && res.StatusCode == http.StatusNotModified {
  2539  		if res.Body != nil {
  2540  			res.Body.Close()
  2541  		}
  2542  		return nil, gensupport.WrapError(&googleapi.Error{
  2543  			Code:   res.StatusCode,
  2544  			Header: res.Header,
  2545  		})
  2546  	}
  2547  	if err != nil {
  2548  		return nil, err
  2549  	}
  2550  	defer googleapi.CloseBody(res)
  2551  	if err := googleapi.CheckResponse(res); err != nil {
  2552  		return nil, gensupport.WrapError(err)
  2553  	}
  2554  	ret := &BatchDeletePhotosResponse{
  2555  		ServerResponse: googleapi.ServerResponse{
  2556  			Header:         res.Header,
  2557  			HTTPStatusCode: res.StatusCode,
  2558  		},
  2559  	}
  2560  	target := &ret
  2561  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2562  		return nil, err
  2563  	}
  2564  	return ret, nil
  2565  }
  2566  
  2567  type PhotosBatchGetCall struct {
  2568  	s            *Service
  2569  	urlParams_   gensupport.URLParams
  2570  	ifNoneMatch_ string
  2571  	ctx_         context.Context
  2572  	header_      http.Header
  2573  }
  2574  
  2575  // BatchGet: Gets the metadata of the specified Photo batch. Note that if
  2576  // BatchGetPhotos fails, either critical fields are missing or there is an
  2577  // authentication error. Even if BatchGetPhotos succeeds, individual photos in
  2578  // the batch may have failures. These failures are specified in each
  2579  // PhotoResponse.status in BatchGetPhotosResponse.results. See GetPhoto for
  2580  // specific failures that can occur per photo.
  2581  func (r *PhotosService) BatchGet() *PhotosBatchGetCall {
  2582  	c := &PhotosBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2583  	return c
  2584  }
  2585  
  2586  // LanguageCode sets the optional parameter "languageCode": The BCP-47 language
  2587  // code, such as "en-US" or "sr-Latn". For more information, see
  2588  // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If
  2589  // language_code is unspecified, the user's language preference for Google
  2590  // services is used.
  2591  func (c *PhotosBatchGetCall) LanguageCode(languageCode string) *PhotosBatchGetCall {
  2592  	c.urlParams_.Set("languageCode", languageCode)
  2593  	return c
  2594  }
  2595  
  2596  // PhotoIds sets the optional parameter "photoIds": Required. IDs of the
  2597  // Photos. For HTTP GET requests, the URL query parameter should be
  2598  // `photoIds=&photoIds=&...`.
  2599  func (c *PhotosBatchGetCall) PhotoIds(photoIds ...string) *PhotosBatchGetCall {
  2600  	c.urlParams_.SetMulti("photoIds", append([]string{}, photoIds...))
  2601  	return c
  2602  }
  2603  
  2604  // View sets the optional parameter "view": Required. Specifies if a download
  2605  // URL for the photo bytes should be returned in the Photo response.
  2606  //
  2607  // Possible values:
  2608  //
  2609  //	"BASIC" - Server responses do not include the download URL for the photo
  2610  //
  2611  // bytes. The default value.
  2612  //
  2613  //	"INCLUDE_DOWNLOAD_URL" - Server responses include the download URL for the
  2614  //
  2615  // photo bytes.
  2616  func (c *PhotosBatchGetCall) View(view string) *PhotosBatchGetCall {
  2617  	c.urlParams_.Set("view", view)
  2618  	return c
  2619  }
  2620  
  2621  // Fields allows partial responses to be retrieved. See
  2622  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2623  // details.
  2624  func (c *PhotosBatchGetCall) Fields(s ...googleapi.Field) *PhotosBatchGetCall {
  2625  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2626  	return c
  2627  }
  2628  
  2629  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2630  // object's ETag matches the given value. This is useful for getting updates
  2631  // only after the object has changed since the last request.
  2632  func (c *PhotosBatchGetCall) IfNoneMatch(entityTag string) *PhotosBatchGetCall {
  2633  	c.ifNoneMatch_ = entityTag
  2634  	return c
  2635  }
  2636  
  2637  // Context sets the context to be used in this call's Do method.
  2638  func (c *PhotosBatchGetCall) Context(ctx context.Context) *PhotosBatchGetCall {
  2639  	c.ctx_ = ctx
  2640  	return c
  2641  }
  2642  
  2643  // Header returns a http.Header that can be modified by the caller to add
  2644  // headers to the request.
  2645  func (c *PhotosBatchGetCall) Header() http.Header {
  2646  	if c.header_ == nil {
  2647  		c.header_ = make(http.Header)
  2648  	}
  2649  	return c.header_
  2650  }
  2651  
  2652  func (c *PhotosBatchGetCall) doRequest(alt string) (*http.Response, error) {
  2653  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2654  	if c.ifNoneMatch_ != "" {
  2655  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2656  	}
  2657  	var body io.Reader = nil
  2658  	c.urlParams_.Set("alt", alt)
  2659  	c.urlParams_.Set("prettyPrint", "false")
  2660  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photos:batchGet")
  2661  	urls += "?" + c.urlParams_.Encode()
  2662  	req, err := http.NewRequest("GET", urls, body)
  2663  	if err != nil {
  2664  		return nil, err
  2665  	}
  2666  	req.Header = reqHeaders
  2667  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2668  }
  2669  
  2670  // Do executes the "streetviewpublish.photos.batchGet" call.
  2671  // Any non-2xx status code is an error. Response headers are in either
  2672  // *BatchGetPhotosResponse.ServerResponse.Header or (if a response was returned
  2673  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2674  // check whether the returned error was because http.StatusNotModified was
  2675  // returned.
  2676  func (c *PhotosBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetPhotosResponse, error) {
  2677  	gensupport.SetOptions(c.urlParams_, opts...)
  2678  	res, err := c.doRequest("json")
  2679  	if res != nil && res.StatusCode == http.StatusNotModified {
  2680  		if res.Body != nil {
  2681  			res.Body.Close()
  2682  		}
  2683  		return nil, gensupport.WrapError(&googleapi.Error{
  2684  			Code:   res.StatusCode,
  2685  			Header: res.Header,
  2686  		})
  2687  	}
  2688  	if err != nil {
  2689  		return nil, err
  2690  	}
  2691  	defer googleapi.CloseBody(res)
  2692  	if err := googleapi.CheckResponse(res); err != nil {
  2693  		return nil, gensupport.WrapError(err)
  2694  	}
  2695  	ret := &BatchGetPhotosResponse{
  2696  		ServerResponse: googleapi.ServerResponse{
  2697  			Header:         res.Header,
  2698  			HTTPStatusCode: res.StatusCode,
  2699  		},
  2700  	}
  2701  	target := &ret
  2702  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2703  		return nil, err
  2704  	}
  2705  	return ret, nil
  2706  }
  2707  
  2708  type PhotosBatchUpdateCall struct {
  2709  	s                        *Service
  2710  	batchupdatephotosrequest *BatchUpdatePhotosRequest
  2711  	urlParams_               gensupport.URLParams
  2712  	ctx_                     context.Context
  2713  	header_                  http.Header
  2714  }
  2715  
  2716  // BatchUpdate: Updates the metadata of Photos, such as pose, place
  2717  // association, connections, etc. Changing the pixels of photos is not
  2718  // supported. Note that if BatchUpdatePhotos fails, either critical fields are
  2719  // missing or there is an authentication error. Even if BatchUpdatePhotos
  2720  // succeeds, individual photos in the batch may have failures. These failures
  2721  // are specified in each PhotoResponse.status in
  2722  // BatchUpdatePhotosResponse.results. See UpdatePhoto for specific failures
  2723  // that can occur per photo. Only the fields specified in updateMask field are
  2724  // used. If `updateMask` is not present, the update applies to all fields. The
  2725  // number of UpdatePhotoRequest messages in a BatchUpdatePhotosRequest must not
  2726  // exceed 20. > Note: To update Pose.altitude, Pose.latLngPair has to be filled
  2727  // as well. Otherwise, the request will fail.
  2728  func (r *PhotosService) BatchUpdate(batchupdatephotosrequest *BatchUpdatePhotosRequest) *PhotosBatchUpdateCall {
  2729  	c := &PhotosBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2730  	c.batchupdatephotosrequest = batchupdatephotosrequest
  2731  	return c
  2732  }
  2733  
  2734  // Fields allows partial responses to be retrieved. See
  2735  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2736  // details.
  2737  func (c *PhotosBatchUpdateCall) Fields(s ...googleapi.Field) *PhotosBatchUpdateCall {
  2738  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2739  	return c
  2740  }
  2741  
  2742  // Context sets the context to be used in this call's Do method.
  2743  func (c *PhotosBatchUpdateCall) Context(ctx context.Context) *PhotosBatchUpdateCall {
  2744  	c.ctx_ = ctx
  2745  	return c
  2746  }
  2747  
  2748  // Header returns a http.Header that can be modified by the caller to add
  2749  // headers to the request.
  2750  func (c *PhotosBatchUpdateCall) Header() http.Header {
  2751  	if c.header_ == nil {
  2752  		c.header_ = make(http.Header)
  2753  	}
  2754  	return c.header_
  2755  }
  2756  
  2757  func (c *PhotosBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  2758  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2759  	var body io.Reader = nil
  2760  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatephotosrequest)
  2761  	if err != nil {
  2762  		return nil, err
  2763  	}
  2764  	c.urlParams_.Set("alt", alt)
  2765  	c.urlParams_.Set("prettyPrint", "false")
  2766  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photos:batchUpdate")
  2767  	urls += "?" + c.urlParams_.Encode()
  2768  	req, err := http.NewRequest("POST", urls, body)
  2769  	if err != nil {
  2770  		return nil, err
  2771  	}
  2772  	req.Header = reqHeaders
  2773  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2774  }
  2775  
  2776  // Do executes the "streetviewpublish.photos.batchUpdate" call.
  2777  // Any non-2xx status code is an error. Response headers are in either
  2778  // *BatchUpdatePhotosResponse.ServerResponse.Header or (if a response was
  2779  // returned at all) in error.(*googleapi.Error).Header. Use
  2780  // googleapi.IsNotModified to check whether the returned error was because
  2781  // http.StatusNotModified was returned.
  2782  func (c *PhotosBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdatePhotosResponse, error) {
  2783  	gensupport.SetOptions(c.urlParams_, opts...)
  2784  	res, err := c.doRequest("json")
  2785  	if res != nil && res.StatusCode == http.StatusNotModified {
  2786  		if res.Body != nil {
  2787  			res.Body.Close()
  2788  		}
  2789  		return nil, gensupport.WrapError(&googleapi.Error{
  2790  			Code:   res.StatusCode,
  2791  			Header: res.Header,
  2792  		})
  2793  	}
  2794  	if err != nil {
  2795  		return nil, err
  2796  	}
  2797  	defer googleapi.CloseBody(res)
  2798  	if err := googleapi.CheckResponse(res); err != nil {
  2799  		return nil, gensupport.WrapError(err)
  2800  	}
  2801  	ret := &BatchUpdatePhotosResponse{
  2802  		ServerResponse: googleapi.ServerResponse{
  2803  			Header:         res.Header,
  2804  			HTTPStatusCode: res.StatusCode,
  2805  		},
  2806  	}
  2807  	target := &ret
  2808  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2809  		return nil, err
  2810  	}
  2811  	return ret, nil
  2812  }
  2813  
  2814  type PhotosListCall struct {
  2815  	s            *Service
  2816  	urlParams_   gensupport.URLParams
  2817  	ifNoneMatch_ string
  2818  	ctx_         context.Context
  2819  	header_      http.Header
  2820  }
  2821  
  2822  // List: Lists all the Photos that belong to the user. > Note: Recently created
  2823  // photos that are still being indexed are not returned in the response.
  2824  func (r *PhotosService) List() *PhotosListCall {
  2825  	c := &PhotosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2826  	return c
  2827  }
  2828  
  2829  // Filter sets the optional parameter "filter": The filter expression. For
  2830  // example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. The filters supported are:
  2831  // `placeId`, `min_latitude`, `max_latitude`, `min_longitude`, `max_longitude`.
  2832  // See https://google.aip.dev/160 for more information.
  2833  func (c *PhotosListCall) Filter(filter string) *PhotosListCall {
  2834  	c.urlParams_.Set("filter", filter)
  2835  	return c
  2836  }
  2837  
  2838  // LanguageCode sets the optional parameter "languageCode": The BCP-47 language
  2839  // code, such as "en-US" or "sr-Latn". For more information, see
  2840  // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If
  2841  // language_code is unspecified, the user's language preference for Google
  2842  // services is used.
  2843  func (c *PhotosListCall) LanguageCode(languageCode string) *PhotosListCall {
  2844  	c.urlParams_.Set("languageCode", languageCode)
  2845  	return c
  2846  }
  2847  
  2848  // PageSize sets the optional parameter "pageSize": The maximum number of
  2849  // photos to return. `pageSize` must be non-negative. If `pageSize` is zero or
  2850  // is not provided, the default page size of 100 is used. The number of photos
  2851  // returned in the response may be less than `pageSize` if the number of photos
  2852  // that belong to the user is less than `pageSize`.
  2853  func (c *PhotosListCall) PageSize(pageSize int64) *PhotosListCall {
  2854  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2855  	return c
  2856  }
  2857  
  2858  // PageToken sets the optional parameter "pageToken": The nextPageToken value
  2859  // returned from a previous ListPhotos request, if any.
  2860  func (c *PhotosListCall) PageToken(pageToken string) *PhotosListCall {
  2861  	c.urlParams_.Set("pageToken", pageToken)
  2862  	return c
  2863  }
  2864  
  2865  // View sets the optional parameter "view": Required. Specifies if a download
  2866  // URL for the photos bytes should be returned in the Photos response.
  2867  //
  2868  // Possible values:
  2869  //
  2870  //	"BASIC" - Server responses do not include the download URL for the photo
  2871  //
  2872  // bytes. The default value.
  2873  //
  2874  //	"INCLUDE_DOWNLOAD_URL" - Server responses include the download URL for the
  2875  //
  2876  // photo bytes.
  2877  func (c *PhotosListCall) View(view string) *PhotosListCall {
  2878  	c.urlParams_.Set("view", view)
  2879  	return c
  2880  }
  2881  
  2882  // Fields allows partial responses to be retrieved. See
  2883  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2884  // details.
  2885  func (c *PhotosListCall) Fields(s ...googleapi.Field) *PhotosListCall {
  2886  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2887  	return c
  2888  }
  2889  
  2890  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2891  // object's ETag matches the given value. This is useful for getting updates
  2892  // only after the object has changed since the last request.
  2893  func (c *PhotosListCall) IfNoneMatch(entityTag string) *PhotosListCall {
  2894  	c.ifNoneMatch_ = entityTag
  2895  	return c
  2896  }
  2897  
  2898  // Context sets the context to be used in this call's Do method.
  2899  func (c *PhotosListCall) Context(ctx context.Context) *PhotosListCall {
  2900  	c.ctx_ = ctx
  2901  	return c
  2902  }
  2903  
  2904  // Header returns a http.Header that can be modified by the caller to add
  2905  // headers to the request.
  2906  func (c *PhotosListCall) Header() http.Header {
  2907  	if c.header_ == nil {
  2908  		c.header_ = make(http.Header)
  2909  	}
  2910  	return c.header_
  2911  }
  2912  
  2913  func (c *PhotosListCall) doRequest(alt string) (*http.Response, error) {
  2914  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2915  	if c.ifNoneMatch_ != "" {
  2916  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2917  	}
  2918  	var body io.Reader = nil
  2919  	c.urlParams_.Set("alt", alt)
  2920  	c.urlParams_.Set("prettyPrint", "false")
  2921  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photos")
  2922  	urls += "?" + c.urlParams_.Encode()
  2923  	req, err := http.NewRequest("GET", urls, body)
  2924  	if err != nil {
  2925  		return nil, err
  2926  	}
  2927  	req.Header = reqHeaders
  2928  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2929  }
  2930  
  2931  // Do executes the "streetviewpublish.photos.list" call.
  2932  // Any non-2xx status code is an error. Response headers are in either
  2933  // *ListPhotosResponse.ServerResponse.Header or (if a response was returned at
  2934  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2935  // check whether the returned error was because http.StatusNotModified was
  2936  // returned.
  2937  func (c *PhotosListCall) Do(opts ...googleapi.CallOption) (*ListPhotosResponse, error) {
  2938  	gensupport.SetOptions(c.urlParams_, opts...)
  2939  	res, err := c.doRequest("json")
  2940  	if res != nil && res.StatusCode == http.StatusNotModified {
  2941  		if res.Body != nil {
  2942  			res.Body.Close()
  2943  		}
  2944  		return nil, gensupport.WrapError(&googleapi.Error{
  2945  			Code:   res.StatusCode,
  2946  			Header: res.Header,
  2947  		})
  2948  	}
  2949  	if err != nil {
  2950  		return nil, err
  2951  	}
  2952  	defer googleapi.CloseBody(res)
  2953  	if err := googleapi.CheckResponse(res); err != nil {
  2954  		return nil, gensupport.WrapError(err)
  2955  	}
  2956  	ret := &ListPhotosResponse{
  2957  		ServerResponse: googleapi.ServerResponse{
  2958  			Header:         res.Header,
  2959  			HTTPStatusCode: res.StatusCode,
  2960  		},
  2961  	}
  2962  	target := &ret
  2963  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2964  		return nil, err
  2965  	}
  2966  	return ret, nil
  2967  }
  2968  
  2969  // Pages invokes f for each page of results.
  2970  // A non-nil error returned from f will halt the iteration.
  2971  // The provided context supersedes any context provided to the Context method.
  2972  func (c *PhotosListCall) Pages(ctx context.Context, f func(*ListPhotosResponse) error) error {
  2973  	c.ctx_ = ctx
  2974  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2975  	for {
  2976  		x, err := c.Do()
  2977  		if err != nil {
  2978  			return err
  2979  		}
  2980  		if err := f(x); err != nil {
  2981  			return err
  2982  		}
  2983  		if x.NextPageToken == "" {
  2984  			return nil
  2985  		}
  2986  		c.PageToken(x.NextPageToken)
  2987  	}
  2988  }
  2989  

View as plain text