1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package streetviewpublish provides access to the Street View Publish API.
8//
9// For product documentation, see: https://developers.google.com/streetview/publish/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/streetviewpublish/v1"
16//   ...
17//   ctx := context.Background()
18//   streetviewpublishService, err := streetviewpublish.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   streetviewpublishService, err := streetviewpublish.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   streetviewpublishService, err := streetviewpublish.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package streetviewpublish // import "google.golang.org/api/streetviewpublish/v1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "streetviewpublish:v1"
75const apiName = "streetviewpublish"
76const apiVersion = "v1"
77const basePath = "https://streetviewpublish.googleapis.com/"
78const mtlsBasePath = "https://streetviewpublish.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// Publish and manage your 360 photos on Google Street View
83	StreetviewpublishScope = "https://www.googleapis.com/auth/streetviewpublish"
84)
85
86// NewService creates a new Service.
87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
88	scopesOption := option.WithScopes(
89		"https://www.googleapis.com/auth/streetviewpublish",
90	)
91	// NOTE: prepend, so we don't override user-specified scopes.
92	opts = append([]option.ClientOption{scopesOption}, opts...)
93	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
94	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
95	client, endpoint, err := htransport.NewClient(ctx, opts...)
96	if err != nil {
97		return nil, err
98	}
99	s, err := New(client)
100	if err != nil {
101		return nil, err
102	}
103	if endpoint != "" {
104		s.BasePath = endpoint
105	}
106	return s, nil
107}
108
109// New creates a new Service. It uses the provided http.Client for requests.
110//
111// Deprecated: please use NewService instead.
112// To provide a custom HTTP client, use option.WithHTTPClient.
113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
114func New(client *http.Client) (*Service, error) {
115	if client == nil {
116		return nil, errors.New("client is nil")
117	}
118	s := &Service{client: client, BasePath: basePath}
119	s.Photo = NewPhotoService(s)
120	s.Photos = NewPhotosService(s)
121	return s, nil
122}
123
124type Service struct {
125	client    *http.Client
126	BasePath  string // API endpoint base URL
127	UserAgent string // optional additional User-Agent fragment
128
129	Photo *PhotoService
130
131	Photos *PhotosService
132}
133
134func (s *Service) userAgent() string {
135	if s.UserAgent == "" {
136		return googleapi.UserAgent
137	}
138	return googleapi.UserAgent + " " + s.UserAgent
139}
140
141func NewPhotoService(s *Service) *PhotoService {
142	rs := &PhotoService{s: s}
143	return rs
144}
145
146type PhotoService struct {
147	s *Service
148}
149
150func NewPhotosService(s *Service) *PhotosService {
151	rs := &PhotosService{s: s}
152	return rs
153}
154
155type PhotosService struct {
156	s *Service
157}
158
159// BatchDeletePhotosRequest: Request to delete multiple Photos.
160type BatchDeletePhotosRequest struct {
161	// PhotoIds: Required. IDs of the Photos. HTTP GET requests require the
162	// following syntax for the URL query parameter:
163	// `photoIds=&photoIds=&...`.
164	PhotoIds []string `json:"photoIds,omitempty"`
165
166	// ForceSendFields is a list of field names (e.g. "PhotoIds") to
167	// unconditionally include in API requests. By default, fields with
168	// empty values are omitted from API requests. However, any non-pointer,
169	// non-interface field appearing in ForceSendFields will be sent to the
170	// server regardless of whether the field is empty or not. This may be
171	// used to include empty fields in Patch requests.
172	ForceSendFields []string `json:"-"`
173
174	// NullFields is a list of field names (e.g. "PhotoIds") to include in
175	// API requests with the JSON null value. By default, fields with empty
176	// values are omitted from API requests. However, any field with an
177	// empty value appearing in NullFields will be sent to the server as
178	// null. It is an error if a field in this list has a non-empty value.
179	// This may be used to include null fields in Patch requests.
180	NullFields []string `json:"-"`
181}
182
183func (s *BatchDeletePhotosRequest) MarshalJSON() ([]byte, error) {
184	type NoMethod BatchDeletePhotosRequest
185	raw := NoMethod(*s)
186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
187}
188
189// BatchDeletePhotosResponse: Response to batch delete of one or more
190// Photos.
191type BatchDeletePhotosResponse struct {
192	// Status: The status for the operation to delete a single Photo in the
193	// batch request.
194	Status []*Status `json:"status,omitempty"`
195
196	// ServerResponse contains the HTTP response code and headers from the
197	// server.
198	googleapi.ServerResponse `json:"-"`
199
200	// ForceSendFields is a list of field names (e.g. "Status") to
201	// unconditionally include in API requests. By default, fields with
202	// empty values are omitted from API requests. However, any non-pointer,
203	// non-interface field appearing in ForceSendFields will be sent to the
204	// server regardless of whether the field is empty or not. This may be
205	// used to include empty fields in Patch requests.
206	ForceSendFields []string `json:"-"`
207
208	// NullFields is a list of field names (e.g. "Status") to include in API
209	// requests with the JSON null value. By default, fields with empty
210	// values are omitted from API requests. However, any field with an
211	// empty value appearing in NullFields will be sent to the server as
212	// null. It is an error if a field in this list has a non-empty value.
213	// This may be used to include null fields in Patch requests.
214	NullFields []string `json:"-"`
215}
216
217func (s *BatchDeletePhotosResponse) MarshalJSON() ([]byte, error) {
218	type NoMethod BatchDeletePhotosResponse
219	raw := NoMethod(*s)
220	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
221}
222
223// BatchGetPhotosResponse: Response to batch get of Photos.
224type BatchGetPhotosResponse struct {
225	// Results: List of results for each individual Photo requested, in the
226	// same order as the requests in BatchGetPhotos.
227	Results []*PhotoResponse `json:"results,omitempty"`
228
229	// ServerResponse contains the HTTP response code and headers from the
230	// server.
231	googleapi.ServerResponse `json:"-"`
232
233	// ForceSendFields is a list of field names (e.g. "Results") to
234	// unconditionally include in API requests. By default, fields with
235	// empty values are omitted from API requests. However, any non-pointer,
236	// non-interface field appearing in ForceSendFields will be sent to the
237	// server regardless of whether the field is empty or not. This may be
238	// used to include empty fields in Patch requests.
239	ForceSendFields []string `json:"-"`
240
241	// NullFields is a list of field names (e.g. "Results") to include in
242	// API requests with the JSON null value. By default, fields with empty
243	// values are omitted from API requests. However, any field with an
244	// empty value appearing in NullFields will be sent to the server as
245	// null. It is an error if a field in this list has a non-empty value.
246	// This may be used to include null fields in Patch requests.
247	NullFields []string `json:"-"`
248}
249
250func (s *BatchGetPhotosResponse) MarshalJSON() ([]byte, error) {
251	type NoMethod BatchGetPhotosResponse
252	raw := NoMethod(*s)
253	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
254}
255
256// BatchUpdatePhotosRequest: Request to update the metadata of photos.
257// Updating the pixels of photos is not supported.
258type BatchUpdatePhotosRequest struct {
259	// UpdatePhotoRequests: Required. List of UpdatePhotoRequests.
260	UpdatePhotoRequests []*UpdatePhotoRequest `json:"updatePhotoRequests,omitempty"`
261
262	// ForceSendFields is a list of field names (e.g. "UpdatePhotoRequests")
263	// to unconditionally include in API requests. By default, fields with
264	// empty values are omitted from API requests. However, any non-pointer,
265	// non-interface field appearing in ForceSendFields will be sent to the
266	// server regardless of whether the field is empty or not. This may be
267	// used to include empty fields in Patch requests.
268	ForceSendFields []string `json:"-"`
269
270	// NullFields is a list of field names (e.g. "UpdatePhotoRequests") to
271	// include in API requests with the JSON null value. By default, fields
272	// with empty values are omitted from API requests. However, any field
273	// with an empty value appearing in NullFields will be sent to the
274	// server as null. It is an error if a field in this list has a
275	// non-empty value. This may be used to include null fields in Patch
276	// requests.
277	NullFields []string `json:"-"`
278}
279
280func (s *BatchUpdatePhotosRequest) MarshalJSON() ([]byte, error) {
281	type NoMethod BatchUpdatePhotosRequest
282	raw := NoMethod(*s)
283	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
284}
285
286// BatchUpdatePhotosResponse: Response to batch update of metadata of
287// one or more Photos.
288type BatchUpdatePhotosResponse struct {
289	// Results: List of results for each individual Photo updated, in the
290	// same order as the request.
291	Results []*PhotoResponse `json:"results,omitempty"`
292
293	// ServerResponse contains the HTTP response code and headers from the
294	// server.
295	googleapi.ServerResponse `json:"-"`
296
297	// ForceSendFields is a list of field names (e.g. "Results") to
298	// unconditionally include in API requests. By default, fields with
299	// empty values are omitted from API requests. However, any non-pointer,
300	// non-interface field appearing in ForceSendFields will be sent to the
301	// server regardless of whether the field is empty or not. This may be
302	// used to include empty fields in Patch requests.
303	ForceSendFields []string `json:"-"`
304
305	// NullFields is a list of field names (e.g. "Results") to include in
306	// API requests with the JSON null value. By default, fields with empty
307	// values are omitted from API requests. However, any field with an
308	// empty value appearing in NullFields will be sent to the server as
309	// null. It is an error if a field in this list has a non-empty value.
310	// This may be used to include null fields in Patch requests.
311	NullFields []string `json:"-"`
312}
313
314func (s *BatchUpdatePhotosResponse) MarshalJSON() ([]byte, error) {
315	type NoMethod BatchUpdatePhotosResponse
316	raw := NoMethod(*s)
317	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
318}
319
320// Connection: A connection is the link from a source photo to a
321// destination photo.
322type Connection struct {
323	// Target: Required. The destination of the connection from the
324	// containing photo to another photo.
325	Target *PhotoId `json:"target,omitempty"`
326
327	// ForceSendFields is a list of field names (e.g. "Target") to
328	// unconditionally include in API requests. By default, fields with
329	// empty values are omitted from API requests. However, any non-pointer,
330	// non-interface field appearing in ForceSendFields will be sent to the
331	// server regardless of whether the field is empty or not. This may be
332	// used to include empty fields in Patch requests.
333	ForceSendFields []string `json:"-"`
334
335	// NullFields is a list of field names (e.g. "Target") to include in API
336	// requests with the JSON null value. By default, fields with empty
337	// values are omitted from API requests. However, any field with an
338	// empty value appearing in NullFields will be sent to the server as
339	// null. It is an error if a field in this list has a non-empty value.
340	// This may be used to include null fields in Patch requests.
341	NullFields []string `json:"-"`
342}
343
344func (s *Connection) MarshalJSON() ([]byte, error) {
345	type NoMethod Connection
346	raw := NoMethod(*s)
347	return gensupport.MarshalJSON(raw, 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
352// it as the request or the response type of an API method. For
353// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
354// (google.protobuf.Empty); } The JSON representation for `Empty` is
355// empty JSON object `{}`.
356type Empty struct {
357	// ServerResponse contains the HTTP response code and headers from the
358	// server.
359	googleapi.ServerResponse `json:"-"`
360}
361
362// LatLng: An object that represents a latitude/longitude pair. This is
363// expressed as a pair of doubles to represent degrees latitude and
364// degrees longitude. Unless specified otherwise, this must conform to
365// the WGS84 standard. Values must be within normalized ranges.
366type LatLng struct {
367	// Latitude: The latitude in degrees. It must be in the range [-90.0,
368	// +90.0].
369	Latitude float64 `json:"latitude,omitempty"`
370
371	// Longitude: The longitude in degrees. It must be in the range [-180.0,
372	// +180.0].
373	Longitude float64 `json:"longitude,omitempty"`
374
375	// ForceSendFields is a list of field names (e.g. "Latitude") to
376	// unconditionally include in API requests. By default, fields with
377	// empty values are omitted from API requests. However, any non-pointer,
378	// non-interface field appearing in ForceSendFields will be sent to the
379	// server regardless of whether the field is empty or not. This may be
380	// used to include empty fields in Patch requests.
381	ForceSendFields []string `json:"-"`
382
383	// NullFields is a list of field names (e.g. "Latitude") to include in
384	// API requests with the JSON null value. By default, fields with empty
385	// values are omitted from API requests. However, any field with an
386	// empty value appearing in NullFields will be sent to the server as
387	// null. It is an error if a field in this list has a non-empty value.
388	// This may be used to include null fields in Patch requests.
389	NullFields []string `json:"-"`
390}
391
392func (s *LatLng) MarshalJSON() ([]byte, error) {
393	type NoMethod LatLng
394	raw := NoMethod(*s)
395	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
396}
397
398func (s *LatLng) UnmarshalJSON(data []byte) error {
399	type NoMethod LatLng
400	var s1 struct {
401		Latitude  gensupport.JSONFloat64 `json:"latitude"`
402		Longitude gensupport.JSONFloat64 `json:"longitude"`
403		*NoMethod
404	}
405	s1.NoMethod = (*NoMethod)(s)
406	if err := json.Unmarshal(data, &s1); err != nil {
407		return err
408	}
409	s.Latitude = float64(s1.Latitude)
410	s.Longitude = float64(s1.Longitude)
411	return nil
412}
413
414// Level: Level information containing level number and its
415// corresponding name.
416type Level struct {
417	// Name: Required. A name assigned to this Level, restricted to 3
418	// characters. Consider how the elevator buttons would be labeled for
419	// this level if there was an elevator.
420	Name string `json:"name,omitempty"`
421
422	// Number: Floor number, used for ordering. 0 indicates the ground
423	// level, 1 indicates the first level above ground level, -1 indicates
424	// the first level under ground level. Non-integer values are OK.
425	Number float64 `json:"number,omitempty"`
426
427	// ForceSendFields is a list of field names (e.g. "Name") to
428	// unconditionally include in API requests. By default, fields with
429	// empty values are omitted from API requests. However, any non-pointer,
430	// non-interface field appearing in ForceSendFields will be sent to the
431	// server regardless of whether the field is empty or not. This may be
432	// used to include empty fields in Patch requests.
433	ForceSendFields []string `json:"-"`
434
435	// NullFields is a list of field names (e.g. "Name") to include in API
436	// requests with the JSON null value. By default, fields with empty
437	// values are omitted from API requests. However, any field with an
438	// empty value appearing in NullFields will be sent to the server as
439	// null. It is an error if a field in this list has a non-empty value.
440	// This may be used to include null fields in Patch requests.
441	NullFields []string `json:"-"`
442}
443
444func (s *Level) MarshalJSON() ([]byte, error) {
445	type NoMethod Level
446	raw := NoMethod(*s)
447	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
448}
449
450func (s *Level) UnmarshalJSON(data []byte) error {
451	type NoMethod Level
452	var s1 struct {
453		Number gensupport.JSONFloat64 `json:"number"`
454		*NoMethod
455	}
456	s1.NoMethod = (*NoMethod)(s)
457	if err := json.Unmarshal(data, &s1); err != nil {
458		return err
459	}
460	s.Number = float64(s1.Number)
461	return nil
462}
463
464// ListPhotosResponse: Response to list all photos that belong to a
465// user.
466type ListPhotosResponse struct {
467	// NextPageToken: Token to retrieve the next page of results, or empty
468	// if there are no more results in the list.
469	NextPageToken string `json:"nextPageToken,omitempty"`
470
471	// Photos: List of photos. The pageSize field in the request determines
472	// the number of items returned.
473	Photos []*Photo `json:"photos,omitempty"`
474
475	// ServerResponse contains the HTTP response code and headers from the
476	// server.
477	googleapi.ServerResponse `json:"-"`
478
479	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
480	// unconditionally include in API requests. By default, fields with
481	// empty values are omitted from API requests. However, any non-pointer,
482	// non-interface field appearing in ForceSendFields will be sent to the
483	// server regardless of whether the field is empty or not. This may be
484	// used to include empty fields in Patch requests.
485	ForceSendFields []string `json:"-"`
486
487	// NullFields is a list of field names (e.g. "NextPageToken") to include
488	// in API requests with the JSON null value. By default, fields with
489	// empty values are omitted from API requests. However, any field with
490	// an empty value appearing in NullFields will be sent to the server as
491	// null. It is an error if a field in this list has a non-empty value.
492	// This may be used to include null fields in Patch requests.
493	NullFields []string `json:"-"`
494}
495
496func (s *ListPhotosResponse) MarshalJSON() ([]byte, error) {
497	type NoMethod ListPhotosResponse
498	raw := NoMethod(*s)
499	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
500}
501
502// Operation: This resource represents a long-running operation that is
503// the result of a network API call.
504type Operation struct {
505	// Done: If the value is `false`, it means the operation is still in
506	// progress. If `true`, the operation is completed, and either `error`
507	// or `response` is available.
508	Done bool `json:"done,omitempty"`
509
510	// Error: The error result of the operation in case of failure or
511	// cancellation.
512	Error *Status `json:"error,omitempty"`
513
514	// Metadata: Service-specific metadata associated with the operation. It
515	// typically contains progress information and common metadata such as
516	// create time. Some services might not provide such metadata. Any
517	// method that returns a long-running operation should document the
518	// metadata type, if any.
519	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
520
521	// Name: The server-assigned name, which is only unique within the same
522	// service that originally returns it. If you use the default HTTP
523	// mapping, the `name` should be a resource name ending with
524	// `operations/{unique_id}`.
525	Name string `json:"name,omitempty"`
526
527	// Response: The normal response of the operation in case of success. If
528	// the original method returns no data on success, such as `Delete`, the
529	// response is `google.protobuf.Empty`. If the original method is
530	// standard `Get`/`Create`/`Update`, the response should be the
531	// resource. For other methods, the response should have the type
532	// `XxxResponse`, where `Xxx` is the original method name. For example,
533	// if the original method name is `TakeSnapshot()`, the inferred
534	// response type is `TakeSnapshotResponse`.
535	Response googleapi.RawMessage `json:"response,omitempty"`
536
537	// ForceSendFields is a list of field names (e.g. "Done") to
538	// unconditionally include in API requests. By default, fields with
539	// empty values are omitted from API requests. However, any non-pointer,
540	// non-interface field appearing in ForceSendFields will be sent to the
541	// server regardless of whether the field is empty or not. This may be
542	// used to include empty fields in Patch requests.
543	ForceSendFields []string `json:"-"`
544
545	// NullFields is a list of field names (e.g. "Done") to include in API
546	// requests with the JSON null value. By default, fields with empty
547	// values are omitted from API requests. However, any field with an
548	// empty value appearing in NullFields will be sent to the server as
549	// null. It is an error if a field in this list has a non-empty value.
550	// This may be used to include null fields in Patch requests.
551	NullFields []string `json:"-"`
552}
553
554func (s *Operation) MarshalJSON() ([]byte, error) {
555	type NoMethod Operation
556	raw := NoMethod(*s)
557	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
558}
559
560// Photo: Photo is used to store 360 photos along with photo metadata.
561type Photo struct {
562	// CaptureTime: Absolute time when the photo was captured. When the
563	// photo has no exif timestamp, this is used to set a timestamp in the
564	// photo metadata.
565	CaptureTime string `json:"captureTime,omitempty"`
566
567	// Connections: Connections to other photos. A connection represents the
568	// link from this photo to another photo.
569	Connections []*Connection `json:"connections,omitempty"`
570
571	// DownloadUrl: Output only. The download URL for the photo bytes. This
572	// field is set only when GetPhotoRequest.view is set to
573	// PhotoView.INCLUDE_DOWNLOAD_URL.
574	DownloadUrl string `json:"downloadUrl,omitempty"`
575
576	// MapsPublishStatus: Output only. Status in Google Maps, whether this
577	// photo was published or rejected. Not currently populated.
578	//
579	// Possible values:
580	//   "UNSPECIFIED_MAPS_PUBLISH_STATUS" - The status of the photo is
581	// unknown.
582	//   "PUBLISHED" - The photo is published to the public through Google
583	// Maps.
584	//   "REJECTED_UNKNOWN" - The photo has been rejected for an unknown
585	// reason.
586	MapsPublishStatus string `json:"mapsPublishStatus,omitempty"`
587
588	// PhotoId: Required when updating a photo. Output only when creating a
589	// photo. Identifier for the photo, which is unique among all photos in
590	// Google.
591	PhotoId *PhotoId `json:"photoId,omitempty"`
592
593	// Places: Places where this photo belongs.
594	Places []*Place `json:"places,omitempty"`
595
596	// Pose: Pose of the photo.
597	Pose *Pose `json:"pose,omitempty"`
598
599	// ShareLink: Output only. The share link for the photo.
600	ShareLink string `json:"shareLink,omitempty"`
601
602	// ThumbnailUrl: Output only. The thumbnail URL for showing a preview of
603	// the given photo.
604	ThumbnailUrl string `json:"thumbnailUrl,omitempty"`
605
606	// TransferStatus: Output only. Status of rights transfer on this photo.
607	//
608	// Possible values:
609	//   "TRANSFER_STATUS_UNKNOWN" - The status of this transfer is
610	// unspecified.
611	//   "NEVER_TRANSFERRED" - This photo has never been in a transfer.
612	//   "PENDING" - This photo transfer has been initiated, but the
613	// receiver has not yet responded.
614	//   "COMPLETED" - The photo transfer has been completed, and this photo
615	// has been transferred to the recipient.
616	//   "REJECTED" - The recipient rejected this photo transfer.
617	//   "EXPIRED" - The photo transfer expired before the recipient took
618	// any action.
619	//   "CANCELLED" - The sender cancelled this photo transfer.
620	//   "RECEIVED_VIA_TRANSFER" - The recipient owns this photo due to a
621	// rights transfer.
622	TransferStatus string `json:"transferStatus,omitempty"`
623
624	// UploadReference: Required when creating a photo. Input only. The
625	// resource URL where the photo bytes are uploaded to.
626	UploadReference *UploadRef `json:"uploadReference,omitempty"`
627
628	// ViewCount: Output only. View count of the photo.
629	ViewCount int64 `json:"viewCount,omitempty,string"`
630
631	// ServerResponse contains the HTTP response code and headers from the
632	// server.
633	googleapi.ServerResponse `json:"-"`
634
635	// ForceSendFields is a list of field names (e.g. "CaptureTime") to
636	// unconditionally include in API requests. By default, fields with
637	// empty values are omitted from API requests. However, any non-pointer,
638	// non-interface field appearing in ForceSendFields will be sent to the
639	// server regardless of whether the field is empty or not. This may be
640	// used to include empty fields in Patch requests.
641	ForceSendFields []string `json:"-"`
642
643	// NullFields is a list of field names (e.g. "CaptureTime") to include
644	// in API requests with the JSON null value. By default, fields with
645	// empty values are omitted from API requests. However, any field with
646	// an empty value appearing in NullFields will be sent to the server as
647	// null. It is an error if a field in this list has a non-empty value.
648	// This may be used to include null fields in Patch requests.
649	NullFields []string `json:"-"`
650}
651
652func (s *Photo) MarshalJSON() ([]byte, error) {
653	type NoMethod Photo
654	raw := NoMethod(*s)
655	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
656}
657
658// PhotoId: Identifier for a Photo.
659type PhotoId struct {
660	// Id: Required. A unique identifier for a photo.
661	Id string `json:"id,omitempty"`
662
663	// ForceSendFields is a list of field names (e.g. "Id") to
664	// unconditionally include in API requests. By default, fields with
665	// empty values are omitted from API requests. However, any non-pointer,
666	// non-interface field appearing in ForceSendFields will be sent to the
667	// server regardless of whether the field is empty or not. This may be
668	// used to include empty fields in Patch requests.
669	ForceSendFields []string `json:"-"`
670
671	// NullFields is a list of field names (e.g. "Id") to include in API
672	// requests with the JSON null value. By default, fields with empty
673	// values are omitted from API requests. However, any field with an
674	// empty value appearing in NullFields will be sent to the server as
675	// null. It is an error if a field in this list has a non-empty value.
676	// This may be used to include null fields in Patch requests.
677	NullFields []string `json:"-"`
678}
679
680func (s *PhotoId) MarshalJSON() ([]byte, error) {
681	type NoMethod PhotoId
682	raw := NoMethod(*s)
683	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
684}
685
686// PhotoResponse: Response payload for a single Photo in batch
687// operations including BatchGetPhotos and BatchUpdatePhotos.
688type PhotoResponse struct {
689	// Photo: The Photo resource, if the request was successful.
690	Photo *Photo `json:"photo,omitempty"`
691
692	// Status: The status for the operation to get or update a single photo
693	// in the batch request.
694	Status *Status `json:"status,omitempty"`
695
696	// ForceSendFields is a list of field names (e.g. "Photo") to
697	// unconditionally include in API requests. By default, fields with
698	// empty values are omitted from API requests. However, any non-pointer,
699	// non-interface field appearing in ForceSendFields will be sent to the
700	// server regardless of whether the field is empty or not. This may be
701	// used to include empty fields in Patch requests.
702	ForceSendFields []string `json:"-"`
703
704	// NullFields is a list of field names (e.g. "Photo") to include in API
705	// requests with the JSON null value. By default, fields with empty
706	// values are omitted from API requests. However, any field with an
707	// empty value appearing in NullFields will be sent to the server as
708	// null. It is an error if a field in this list has a non-empty value.
709	// This may be used to include null fields in Patch requests.
710	NullFields []string `json:"-"`
711}
712
713func (s *PhotoResponse) MarshalJSON() ([]byte, error) {
714	type NoMethod PhotoResponse
715	raw := NoMethod(*s)
716	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
717}
718
719// Place: Place metadata for an entity.
720type Place struct {
721	// LanguageCode: Output-only. The language_code that the name is
722	// localized with. This should be the language_code specified in the
723	// request, but may be a fallback.
724	LanguageCode string `json:"languageCode,omitempty"`
725
726	// Name: Output-only. The name of the place, localized to the
727	// language_code.
728	Name string `json:"name,omitempty"`
729
730	// PlaceId: Place identifier, as described in
731	// https://developers.google.com/places/place-id.
732	PlaceId string `json:"placeId,omitempty"`
733
734	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
735	// unconditionally include in API requests. By default, fields with
736	// empty values are omitted from API requests. However, any non-pointer,
737	// non-interface field appearing in ForceSendFields will be sent to the
738	// server regardless of whether the field is empty or not. This may be
739	// used to include empty fields in Patch requests.
740	ForceSendFields []string `json:"-"`
741
742	// NullFields is a list of field names (e.g. "LanguageCode") to include
743	// in API requests with the JSON null value. By default, fields with
744	// empty values are omitted from API requests. However, any field with
745	// an empty value appearing in NullFields will be sent to the server as
746	// null. It is an error if a field in this list has a non-empty value.
747	// This may be used to include null fields in Patch requests.
748	NullFields []string `json:"-"`
749}
750
751func (s *Place) MarshalJSON() ([]byte, error) {
752	type NoMethod Place
753	raw := NoMethod(*s)
754	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
755}
756
757// Pose: Raw pose measurement for an entity.
758type Pose struct {
759	// AccuracyMeters: The estimated horizontal accuracy of this pose in
760	// meters with 68% confidence (one standard deviation). For example, on
761	// Android, this value is available from this method:
762	// https://developer.android.com/reference/android/location/Location#getAccuracy().
763	// Other platforms have different methods of obtaining similar accuracy
764	// estimations.
765	AccuracyMeters float64 `json:"accuracyMeters,omitempty"`
766
767	// Altitude: Altitude of the pose in meters above WGS84 ellipsoid. NaN
768	// indicates an unmeasured quantity.
769	Altitude float64 `json:"altitude,omitempty"`
770
771	// Heading: Compass heading, measured at the center of the photo in
772	// degrees clockwise from North. Value must be >=0 and <360. NaN
773	// indicates an unmeasured quantity.
774	Heading float64 `json:"heading,omitempty"`
775
776	// LatLngPair: Latitude and longitude pair of the pose, as explained
777	// here:
778	// https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng
779	// When creating a Photo, if the latitude and longitude pair are not
780	// provided, the geolocation from the exif header is used. A latitude
781	// and longitude pair not provided in the photo or exif header causes
782	// the photo process to fail.
783	LatLngPair *LatLng `json:"latLngPair,omitempty"`
784
785	// Level: Level (the floor in a building) used to configure vertical
786	// navigation.
787	Level *Level `json:"level,omitempty"`
788
789	// Pitch: Pitch, measured at the center of the photo in degrees. Value
790	// must be >=-90 and <= 90. A value of -90 means looking directly down,
791	// and a value of 90 means looking directly up. NaN indicates an
792	// unmeasured quantity.
793	Pitch float64 `json:"pitch,omitempty"`
794
795	// Roll: Roll, measured in degrees. Value must be >= 0 and <360. A value
796	// of 0 means level with the horizon. NaN indicates an unmeasured
797	// quantity.
798	Roll float64 `json:"roll,omitempty"`
799
800	// ForceSendFields is a list of field names (e.g. "AccuracyMeters") to
801	// unconditionally include in API requests. By default, fields with
802	// empty values are omitted from API requests. However, any non-pointer,
803	// non-interface field appearing in ForceSendFields will be sent to the
804	// server regardless of whether the field is empty or not. This may be
805	// used to include empty fields in Patch requests.
806	ForceSendFields []string `json:"-"`
807
808	// NullFields is a list of field names (e.g. "AccuracyMeters") to
809	// include in API requests with the JSON null value. By default, fields
810	// with empty values are omitted from API requests. However, any field
811	// with an empty value appearing in NullFields will be sent to the
812	// server as null. It is an error if a field in this list has a
813	// non-empty value. This may be used to include null fields in Patch
814	// requests.
815	NullFields []string `json:"-"`
816}
817
818func (s *Pose) MarshalJSON() ([]byte, error) {
819	type NoMethod Pose
820	raw := NoMethod(*s)
821	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
822}
823
824func (s *Pose) UnmarshalJSON(data []byte) error {
825	type NoMethod Pose
826	var s1 struct {
827		AccuracyMeters gensupport.JSONFloat64 `json:"accuracyMeters"`
828		Altitude       gensupport.JSONFloat64 `json:"altitude"`
829		Heading        gensupport.JSONFloat64 `json:"heading"`
830		Pitch          gensupport.JSONFloat64 `json:"pitch"`
831		Roll           gensupport.JSONFloat64 `json:"roll"`
832		*NoMethod
833	}
834	s1.NoMethod = (*NoMethod)(s)
835	if err := json.Unmarshal(data, &s1); err != nil {
836		return err
837	}
838	s.AccuracyMeters = float64(s1.AccuracyMeters)
839	s.Altitude = float64(s1.Altitude)
840	s.Heading = float64(s1.Heading)
841	s.Pitch = float64(s1.Pitch)
842	s.Roll = float64(s1.Roll)
843	return nil
844}
845
846// Status: The `Status` type defines a logical error model that is
847// suitable for different programming environments, including REST APIs
848// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
849// `Status` message contains three pieces of data: error code, error
850// message, and error details. You can find out more about this error
851// model and how to work with it in the API Design Guide
852// (https://cloud.google.com/apis/design/errors).
853type Status struct {
854	// Code: The status code, which should be an enum value of
855	// google.rpc.Code.
856	Code int64 `json:"code,omitempty"`
857
858	// Details: A list of messages that carry the error details. There is a
859	// common set of message types for APIs to use.
860	Details []googleapi.RawMessage `json:"details,omitempty"`
861
862	// Message: A developer-facing error message, which should be in
863	// English. Any user-facing error message should be localized and sent
864	// in the google.rpc.Status.details field, or localized by the client.
865	Message string `json:"message,omitempty"`
866
867	// ForceSendFields is a list of field names (e.g. "Code") to
868	// unconditionally include in API requests. By default, fields with
869	// empty values are omitted from API requests. However, any non-pointer,
870	// non-interface field appearing in ForceSendFields will be sent to the
871	// server regardless of whether the field is empty or not. This may be
872	// used to include empty fields in Patch requests.
873	ForceSendFields []string `json:"-"`
874
875	// NullFields is a list of field names (e.g. "Code") to include in API
876	// requests with the JSON null value. By default, fields with empty
877	// values are omitted from API requests. However, any field with an
878	// empty value appearing in NullFields will be sent to the server as
879	// null. It is an error if a field in this list has a non-empty value.
880	// This may be used to include null fields in Patch requests.
881	NullFields []string `json:"-"`
882}
883
884func (s *Status) MarshalJSON() ([]byte, error) {
885	type NoMethod Status
886	raw := NoMethod(*s)
887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
888}
889
890// UpdatePhotoRequest: Request to update the metadata of a Photo.
891// Updating the pixels of a photo is not supported.
892type UpdatePhotoRequest struct {
893	// Photo: Required. Photo object containing the new metadata.
894	Photo *Photo `json:"photo,omitempty"`
895
896	// UpdateMask: Required. Mask that identifies fields on the photo
897	// metadata to update. If not present, the old Photo metadata is
898	// entirely replaced with the new Photo metadata in this request. The
899	// update fails if invalid fields are specified. Multiple fields can be
900	// specified in a comma-delimited list. The following fields are valid:
901	// * `pose.heading` * `pose.latLngPair` * `pose.pitch` * `pose.roll` *
902	// `pose.level` * `pose.altitude` * `connections` * `places` *Note:*
903	// When updateMask contains repeated fields, the entire set of repeated
904	// values get replaced with the new contents. For example, if updateMask
905	// contains `connections` and `UpdatePhotoRequest.photo.connections` is
906	// empty, all connections are removed.
907	UpdateMask string `json:"updateMask,omitempty"`
908
909	// ForceSendFields is a list of field names (e.g. "Photo") to
910	// unconditionally include in API requests. By default, fields with
911	// empty values are omitted from API requests. However, any non-pointer,
912	// non-interface field appearing in ForceSendFields will be sent to the
913	// server regardless of whether the field is empty or not. This may be
914	// used to include empty fields in Patch requests.
915	ForceSendFields []string `json:"-"`
916
917	// NullFields is a list of field names (e.g. "Photo") to include in API
918	// requests with the JSON null value. By default, fields with empty
919	// values are omitted from API requests. However, any field with an
920	// empty value appearing in NullFields will be sent to the server as
921	// null. It is an error if a field in this list has a non-empty value.
922	// This may be used to include null fields in Patch requests.
923	NullFields []string `json:"-"`
924}
925
926func (s *UpdatePhotoRequest) MarshalJSON() ([]byte, error) {
927	type NoMethod UpdatePhotoRequest
928	raw := NoMethod(*s)
929	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
930}
931
932// UploadRef: Upload reference for media files.
933type UploadRef struct {
934	// UploadUrl: An upload reference should be unique for each user. It
935	// follows the form:
936	// "https://streetviewpublish.googleapis.com/media/user/{account_id}/phot
937	// o/{upload_reference}"
938	UploadUrl string `json:"uploadUrl,omitempty"`
939
940	// ServerResponse contains the HTTP response code and headers from the
941	// server.
942	googleapi.ServerResponse `json:"-"`
943
944	// ForceSendFields is a list of field names (e.g. "UploadUrl") to
945	// unconditionally include in API requests. By default, fields with
946	// empty values are omitted from API requests. However, any non-pointer,
947	// non-interface field appearing in ForceSendFields will be sent to the
948	// server regardless of whether the field is empty or not. This may be
949	// used to include empty fields in Patch requests.
950	ForceSendFields []string `json:"-"`
951
952	// NullFields is a list of field names (e.g. "UploadUrl") to include in
953	// API requests with the JSON null value. By default, fields with empty
954	// values are omitted from API requests. However, any field with an
955	// empty value appearing in NullFields will be sent to the server as
956	// null. It is an error if a field in this list has a non-empty value.
957	// This may be used to include null fields in Patch requests.
958	NullFields []string `json:"-"`
959}
960
961func (s *UploadRef) MarshalJSON() ([]byte, error) {
962	type NoMethod UploadRef
963	raw := NoMethod(*s)
964	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
965}
966
967// method id "streetviewpublish.photo.create":
968
969type PhotoCreateCall struct {
970	s          *Service
971	photo      *Photo
972	urlParams_ gensupport.URLParams
973	ctx_       context.Context
974	header_    http.Header
975}
976
977// Create: After the client finishes uploading the photo with the
978// returned UploadRef, CreatePhoto publishes the uploaded Photo to
979// Street View on Google Maps. Currently, the only way to set heading,
980// pitch, and roll in CreatePhoto is through the Photo Sphere XMP
981// metadata
982// (https://developers.google.com/streetview/spherical-metadata) in the
983// photo bytes. CreatePhoto ignores the `pose.heading`, `pose.pitch`,
984// `pose.roll`, `pose.altitude`, and `pose.level` fields in Pose. This
985// method returns the following error codes: *
986// google.rpc.Code.INVALID_ARGUMENT if the request is malformed or if
987// the uploaded photo is not a 360 photo. * google.rpc.Code.NOT_FOUND if
988// the upload reference does not exist. *
989// google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the
990// storage limit.
991func (r *PhotoService) Create(photo *Photo) *PhotoCreateCall {
992	c := &PhotoCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
993	c.photo = photo
994	return c
995}
996
997// Fields allows partial responses to be retrieved. See
998// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
999// for more information.
1000func (c *PhotoCreateCall) Fields(s ...googleapi.Field) *PhotoCreateCall {
1001	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1002	return c
1003}
1004
1005// Context sets the context to be used in this call's Do method. Any
1006// pending HTTP request will be aborted if the provided context is
1007// canceled.
1008func (c *PhotoCreateCall) Context(ctx context.Context) *PhotoCreateCall {
1009	c.ctx_ = ctx
1010	return c
1011}
1012
1013// Header returns an http.Header that can be modified by the caller to
1014// add HTTP headers to the request.
1015func (c *PhotoCreateCall) Header() http.Header {
1016	if c.header_ == nil {
1017		c.header_ = make(http.Header)
1018	}
1019	return c.header_
1020}
1021
1022func (c *PhotoCreateCall) doRequest(alt string) (*http.Response, error) {
1023	reqHeaders := make(http.Header)
1024	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1025	for k, v := range c.header_ {
1026		reqHeaders[k] = v
1027	}
1028	reqHeaders.Set("User-Agent", c.s.userAgent())
1029	var body io.Reader = nil
1030	body, err := googleapi.WithoutDataWrapper.JSONReader(c.photo)
1031	if err != nil {
1032		return nil, err
1033	}
1034	reqHeaders.Set("Content-Type", "application/json")
1035	c.urlParams_.Set("alt", alt)
1036	c.urlParams_.Set("prettyPrint", "false")
1037	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photo")
1038	urls += "?" + c.urlParams_.Encode()
1039	req, err := http.NewRequest("POST", urls, body)
1040	if err != nil {
1041		return nil, err
1042	}
1043	req.Header = reqHeaders
1044	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1045}
1046
1047// Do executes the "streetviewpublish.photo.create" call.
1048// Exactly one of *Photo or error will be non-nil. Any non-2xx status
1049// code is an error. Response headers are in either
1050// *Photo.ServerResponse.Header or (if a response was returned at all)
1051// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1052// check whether the returned error was because http.StatusNotModified
1053// was returned.
1054func (c *PhotoCreateCall) Do(opts ...googleapi.CallOption) (*Photo, error) {
1055	gensupport.SetOptions(c.urlParams_, opts...)
1056	res, err := c.doRequest("json")
1057	if res != nil && res.StatusCode == http.StatusNotModified {
1058		if res.Body != nil {
1059			res.Body.Close()
1060		}
1061		return nil, &googleapi.Error{
1062			Code:   res.StatusCode,
1063			Header: res.Header,
1064		}
1065	}
1066	if err != nil {
1067		return nil, err
1068	}
1069	defer googleapi.CloseBody(res)
1070	if err := googleapi.CheckResponse(res); err != nil {
1071		return nil, err
1072	}
1073	ret := &Photo{
1074		ServerResponse: googleapi.ServerResponse{
1075			Header:         res.Header,
1076			HTTPStatusCode: res.StatusCode,
1077		},
1078	}
1079	target := &ret
1080	if err := gensupport.DecodeResponse(target, res); err != nil {
1081		return nil, err
1082	}
1083	return ret, nil
1084	// {
1085	//   "description": "After the client finishes uploading the photo with the returned UploadRef, CreatePhoto publishes the uploaded Photo to Street View on Google Maps. Currently, the only way to set heading, pitch, and roll in CreatePhoto is through the [Photo Sphere XMP metadata](https://developers.google.com/streetview/spherical-metadata) in the photo bytes. CreatePhoto ignores the `pose.heading`, `pose.pitch`, `pose.roll`, `pose.altitude`, and `pose.level` fields in Pose. This method returns the following error codes: * google.rpc.Code.INVALID_ARGUMENT if the request is malformed or if the uploaded photo is not a 360 photo. * google.rpc.Code.NOT_FOUND if the upload reference does not exist. * google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the storage limit.",
1086	//   "flatPath": "v1/photo",
1087	//   "httpMethod": "POST",
1088	//   "id": "streetviewpublish.photo.create",
1089	//   "parameterOrder": [],
1090	//   "parameters": {},
1091	//   "path": "v1/photo",
1092	//   "request": {
1093	//     "$ref": "Photo"
1094	//   },
1095	//   "response": {
1096	//     "$ref": "Photo"
1097	//   },
1098	//   "scopes": [
1099	//     "https://www.googleapis.com/auth/streetviewpublish"
1100	//   ]
1101	// }
1102
1103}
1104
1105// method id "streetviewpublish.photo.delete":
1106
1107type PhotoDeleteCall struct {
1108	s          *Service
1109	photoId    string
1110	urlParams_ gensupport.URLParams
1111	ctx_       context.Context
1112	header_    http.Header
1113}
1114
1115// Delete: Deletes a Photo and its metadata. This method returns the
1116// following error codes: * google.rpc.Code.PERMISSION_DENIED if the
1117// requesting user did not create the requested photo. *
1118// google.rpc.Code.NOT_FOUND if the photo ID does not exist.
1119//
1120// - photoId: ID of the Photo.
1121func (r *PhotoService) Delete(photoId string) *PhotoDeleteCall {
1122	c := &PhotoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1123	c.photoId = photoId
1124	return c
1125}
1126
1127// Fields allows partial responses to be retrieved. See
1128// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1129// for more information.
1130func (c *PhotoDeleteCall) Fields(s ...googleapi.Field) *PhotoDeleteCall {
1131	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1132	return c
1133}
1134
1135// Context sets the context to be used in this call's Do method. Any
1136// pending HTTP request will be aborted if the provided context is
1137// canceled.
1138func (c *PhotoDeleteCall) Context(ctx context.Context) *PhotoDeleteCall {
1139	c.ctx_ = ctx
1140	return c
1141}
1142
1143// Header returns an http.Header that can be modified by the caller to
1144// add HTTP headers to the request.
1145func (c *PhotoDeleteCall) Header() http.Header {
1146	if c.header_ == nil {
1147		c.header_ = make(http.Header)
1148	}
1149	return c.header_
1150}
1151
1152func (c *PhotoDeleteCall) doRequest(alt string) (*http.Response, error) {
1153	reqHeaders := make(http.Header)
1154	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1155	for k, v := range c.header_ {
1156		reqHeaders[k] = v
1157	}
1158	reqHeaders.Set("User-Agent", c.s.userAgent())
1159	var body io.Reader = nil
1160	c.urlParams_.Set("alt", alt)
1161	c.urlParams_.Set("prettyPrint", "false")
1162	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photo/{photoId}")
1163	urls += "?" + c.urlParams_.Encode()
1164	req, err := http.NewRequest("DELETE", urls, body)
1165	if err != nil {
1166		return nil, err
1167	}
1168	req.Header = reqHeaders
1169	googleapi.Expand(req.URL, map[string]string{
1170		"photoId": c.photoId,
1171	})
1172	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1173}
1174
1175// Do executes the "streetviewpublish.photo.delete" call.
1176// Exactly one of *Empty or error will be non-nil. Any non-2xx status
1177// code is an error. Response headers are in either
1178// *Empty.ServerResponse.Header or (if a response was returned at all)
1179// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1180// check whether the returned error was because http.StatusNotModified
1181// was returned.
1182func (c *PhotoDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
1183	gensupport.SetOptions(c.urlParams_, opts...)
1184	res, err := c.doRequest("json")
1185	if res != nil && res.StatusCode == http.StatusNotModified {
1186		if res.Body != nil {
1187			res.Body.Close()
1188		}
1189		return nil, &googleapi.Error{
1190			Code:   res.StatusCode,
1191			Header: res.Header,
1192		}
1193	}
1194	if err != nil {
1195		return nil, err
1196	}
1197	defer googleapi.CloseBody(res)
1198	if err := googleapi.CheckResponse(res); err != nil {
1199		return nil, err
1200	}
1201	ret := &Empty{
1202		ServerResponse: googleapi.ServerResponse{
1203			Header:         res.Header,
1204			HTTPStatusCode: res.StatusCode,
1205		},
1206	}
1207	target := &ret
1208	if err := gensupport.DecodeResponse(target, res); err != nil {
1209		return nil, err
1210	}
1211	return ret, nil
1212	// {
1213	//   "description": "Deletes a Photo and its metadata. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo. * google.rpc.Code.NOT_FOUND if the photo ID does not exist.",
1214	//   "flatPath": "v1/photo/{photoId}",
1215	//   "httpMethod": "DELETE",
1216	//   "id": "streetviewpublish.photo.delete",
1217	//   "parameterOrder": [
1218	//     "photoId"
1219	//   ],
1220	//   "parameters": {
1221	//     "photoId": {
1222	//       "description": "Required. ID of the Photo.",
1223	//       "location": "path",
1224	//       "required": true,
1225	//       "type": "string"
1226	//     }
1227	//   },
1228	//   "path": "v1/photo/{photoId}",
1229	//   "response": {
1230	//     "$ref": "Empty"
1231	//   },
1232	//   "scopes": [
1233	//     "https://www.googleapis.com/auth/streetviewpublish"
1234	//   ]
1235	// }
1236
1237}
1238
1239// method id "streetviewpublish.photo.get":
1240
1241type PhotoGetCall struct {
1242	s            *Service
1243	photoId      string
1244	urlParams_   gensupport.URLParams
1245	ifNoneMatch_ string
1246	ctx_         context.Context
1247	header_      http.Header
1248}
1249
1250// Get: Gets the metadata of the specified Photo. This method returns
1251// the following error codes: * google.rpc.Code.PERMISSION_DENIED if the
1252// requesting user did not create the requested Photo. *
1253// google.rpc.Code.NOT_FOUND if the requested Photo does not exist. *
1254// google.rpc.Code.UNAVAILABLE if the requested Photo is still being
1255// indexed.
1256//
1257// - photoId: ID of the Photo.
1258func (r *PhotoService) Get(photoId string) *PhotoGetCall {
1259	c := &PhotoGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1260	c.photoId = photoId
1261	return c
1262}
1263
1264// LanguageCode sets the optional parameter "languageCode": The BCP-47
1265// language code, such as "en-US" or "sr-Latn". For more information,
1266// see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1267// If language_code is unspecified, the user's language preference for
1268// Google services is used.
1269func (c *PhotoGetCall) LanguageCode(languageCode string) *PhotoGetCall {
1270	c.urlParams_.Set("languageCode", languageCode)
1271	return c
1272}
1273
1274// View sets the optional parameter "view": Required. Specifies if a
1275// download URL for the photo bytes should be returned in the Photo
1276// response.
1277//
1278// Possible values:
1279//   "BASIC" - Server reponses do not include the download URL for the
1280// photo bytes. The default value.
1281//   "INCLUDE_DOWNLOAD_URL" - Server responses include the download URL
1282// for the photo bytes.
1283func (c *PhotoGetCall) View(view string) *PhotoGetCall {
1284	c.urlParams_.Set("view", view)
1285	return c
1286}
1287
1288// Fields allows partial responses to be retrieved. See
1289// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1290// for more information.
1291func (c *PhotoGetCall) Fields(s ...googleapi.Field) *PhotoGetCall {
1292	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1293	return c
1294}
1295
1296// IfNoneMatch sets the optional parameter which makes the operation
1297// fail if the object's ETag matches the given value. This is useful for
1298// getting updates only after the object has changed since the last
1299// request. Use googleapi.IsNotModified to check whether the response
1300// error from Do is the result of In-None-Match.
1301func (c *PhotoGetCall) IfNoneMatch(entityTag string) *PhotoGetCall {
1302	c.ifNoneMatch_ = entityTag
1303	return c
1304}
1305
1306// Context sets the context to be used in this call's Do method. Any
1307// pending HTTP request will be aborted if the provided context is
1308// canceled.
1309func (c *PhotoGetCall) Context(ctx context.Context) *PhotoGetCall {
1310	c.ctx_ = ctx
1311	return c
1312}
1313
1314// Header returns an http.Header that can be modified by the caller to
1315// add HTTP headers to the request.
1316func (c *PhotoGetCall) Header() http.Header {
1317	if c.header_ == nil {
1318		c.header_ = make(http.Header)
1319	}
1320	return c.header_
1321}
1322
1323func (c *PhotoGetCall) doRequest(alt string) (*http.Response, error) {
1324	reqHeaders := make(http.Header)
1325	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1326	for k, v := range c.header_ {
1327		reqHeaders[k] = v
1328	}
1329	reqHeaders.Set("User-Agent", c.s.userAgent())
1330	if c.ifNoneMatch_ != "" {
1331		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1332	}
1333	var body io.Reader = nil
1334	c.urlParams_.Set("alt", alt)
1335	c.urlParams_.Set("prettyPrint", "false")
1336	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photo/{photoId}")
1337	urls += "?" + c.urlParams_.Encode()
1338	req, err := http.NewRequest("GET", urls, body)
1339	if err != nil {
1340		return nil, err
1341	}
1342	req.Header = reqHeaders
1343	googleapi.Expand(req.URL, map[string]string{
1344		"photoId": c.photoId,
1345	})
1346	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1347}
1348
1349// Do executes the "streetviewpublish.photo.get" call.
1350// Exactly one of *Photo or error will be non-nil. Any non-2xx status
1351// code is an error. Response headers are in either
1352// *Photo.ServerResponse.Header or (if a response was returned at all)
1353// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1354// check whether the returned error was because http.StatusNotModified
1355// was returned.
1356func (c *PhotoGetCall) Do(opts ...googleapi.CallOption) (*Photo, error) {
1357	gensupport.SetOptions(c.urlParams_, opts...)
1358	res, err := c.doRequest("json")
1359	if res != nil && res.StatusCode == http.StatusNotModified {
1360		if res.Body != nil {
1361			res.Body.Close()
1362		}
1363		return nil, &googleapi.Error{
1364			Code:   res.StatusCode,
1365			Header: res.Header,
1366		}
1367	}
1368	if err != nil {
1369		return nil, err
1370	}
1371	defer googleapi.CloseBody(res)
1372	if err := googleapi.CheckResponse(res); err != nil {
1373		return nil, err
1374	}
1375	ret := &Photo{
1376		ServerResponse: googleapi.ServerResponse{
1377			Header:         res.Header,
1378			HTTPStatusCode: res.StatusCode,
1379		},
1380	}
1381	target := &ret
1382	if err := gensupport.DecodeResponse(target, res); err != nil {
1383		return nil, err
1384	}
1385	return ret, nil
1386	// {
1387	//   "description": "Gets the metadata of the specified Photo. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested Photo. * google.rpc.Code.NOT_FOUND if the requested Photo does not exist. * google.rpc.Code.UNAVAILABLE if the requested Photo is still being indexed.",
1388	//   "flatPath": "v1/photo/{photoId}",
1389	//   "httpMethod": "GET",
1390	//   "id": "streetviewpublish.photo.get",
1391	//   "parameterOrder": [
1392	//     "photoId"
1393	//   ],
1394	//   "parameters": {
1395	//     "languageCode": {
1396	//       "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified, the user's language preference for Google services is used.",
1397	//       "location": "query",
1398	//       "type": "string"
1399	//     },
1400	//     "photoId": {
1401	//       "description": "Required. ID of the Photo.",
1402	//       "location": "path",
1403	//       "required": true,
1404	//       "type": "string"
1405	//     },
1406	//     "view": {
1407	//       "description": "Required. Specifies if a download URL for the photo bytes should be returned in the Photo response.",
1408	//       "enum": [
1409	//         "BASIC",
1410	//         "INCLUDE_DOWNLOAD_URL"
1411	//       ],
1412	//       "enumDescriptions": [
1413	//         "Server reponses do not include the download URL for the photo bytes. The default value.",
1414	//         "Server responses include the download URL for the photo bytes."
1415	//       ],
1416	//       "location": "query",
1417	//       "type": "string"
1418	//     }
1419	//   },
1420	//   "path": "v1/photo/{photoId}",
1421	//   "response": {
1422	//     "$ref": "Photo"
1423	//   },
1424	//   "scopes": [
1425	//     "https://www.googleapis.com/auth/streetviewpublish"
1426	//   ]
1427	// }
1428
1429}
1430
1431// method id "streetviewpublish.photo.startUpload":
1432
1433type PhotoStartUploadCall struct {
1434	s          *Service
1435	empty      *Empty
1436	urlParams_ gensupport.URLParams
1437	ctx_       context.Context
1438	header_    http.Header
1439}
1440
1441// StartUpload: Creates an upload session to start uploading photo
1442// bytes. The method uses the upload URL of the returned UploadRef to
1443// upload the bytes for the Photo. In addition to the photo requirements
1444// shown in
1445// https://support.google.com/maps/answer/7012050?ref_topic=6275604, the
1446// photo must meet the following requirements: * Photo Sphere XMP
1447// metadata must be included in the photo metadata. See
1448// https://developers.google.com/streetview/spherical-metadata for the
1449// required fields. * The pixel size of the photo must meet the size
1450// requirements listed in
1451// https://support.google.com/maps/answer/7012050?ref_topic=6275604, and
1452// the photo must be a full 360 horizontally. After the upload
1453// completes, the method uses UploadRef with CreatePhoto to create the
1454// Photo object entry.
1455func (r *PhotoService) StartUpload(empty *Empty) *PhotoStartUploadCall {
1456	c := &PhotoStartUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1457	c.empty = empty
1458	return c
1459}
1460
1461// Fields allows partial responses to be retrieved. See
1462// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1463// for more information.
1464func (c *PhotoStartUploadCall) Fields(s ...googleapi.Field) *PhotoStartUploadCall {
1465	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1466	return c
1467}
1468
1469// Context sets the context to be used in this call's Do method. Any
1470// pending HTTP request will be aborted if the provided context is
1471// canceled.
1472func (c *PhotoStartUploadCall) Context(ctx context.Context) *PhotoStartUploadCall {
1473	c.ctx_ = ctx
1474	return c
1475}
1476
1477// Header returns an http.Header that can be modified by the caller to
1478// add HTTP headers to the request.
1479func (c *PhotoStartUploadCall) Header() http.Header {
1480	if c.header_ == nil {
1481		c.header_ = make(http.Header)
1482	}
1483	return c.header_
1484}
1485
1486func (c *PhotoStartUploadCall) doRequest(alt string) (*http.Response, error) {
1487	reqHeaders := make(http.Header)
1488	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1489	for k, v := range c.header_ {
1490		reqHeaders[k] = v
1491	}
1492	reqHeaders.Set("User-Agent", c.s.userAgent())
1493	var body io.Reader = nil
1494	body, err := googleapi.WithoutDataWrapper.JSONReader(c.empty)
1495	if err != nil {
1496		return nil, err
1497	}
1498	reqHeaders.Set("Content-Type", "application/json")
1499	c.urlParams_.Set("alt", alt)
1500	c.urlParams_.Set("prettyPrint", "false")
1501	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photo:startUpload")
1502	urls += "?" + c.urlParams_.Encode()
1503	req, err := http.NewRequest("POST", urls, body)
1504	if err != nil {
1505		return nil, err
1506	}
1507	req.Header = reqHeaders
1508	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1509}
1510
1511// Do executes the "streetviewpublish.photo.startUpload" call.
1512// Exactly one of *UploadRef or error will be non-nil. Any non-2xx
1513// status code is an error. Response headers are in either
1514// *UploadRef.ServerResponse.Header or (if a response was returned at
1515// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1516// to check whether the returned error was because
1517// http.StatusNotModified was returned.
1518func (c *PhotoStartUploadCall) Do(opts ...googleapi.CallOption) (*UploadRef, error) {
1519	gensupport.SetOptions(c.urlParams_, opts...)
1520	res, err := c.doRequest("json")
1521	if res != nil && res.StatusCode == http.StatusNotModified {
1522		if res.Body != nil {
1523			res.Body.Close()
1524		}
1525		return nil, &googleapi.Error{
1526			Code:   res.StatusCode,
1527			Header: res.Header,
1528		}
1529	}
1530	if err != nil {
1531		return nil, err
1532	}
1533	defer googleapi.CloseBody(res)
1534	if err := googleapi.CheckResponse(res); err != nil {
1535		return nil, err
1536	}
1537	ret := &UploadRef{
1538		ServerResponse: googleapi.ServerResponse{
1539			Header:         res.Header,
1540			HTTPStatusCode: res.StatusCode,
1541		},
1542	}
1543	target := &ret
1544	if err := gensupport.DecodeResponse(target, res); err != nil {
1545		return nil, err
1546	}
1547	return ret, nil
1548	// {
1549	//   "description": "Creates an upload session to start uploading photo bytes. The method uses the upload URL of the returned UploadRef to upload the bytes for the Photo. In addition to the photo requirements shown in https://support.google.com/maps/answer/7012050?ref_topic=6275604, the photo must meet the following requirements: * Photo Sphere XMP metadata must be included in the photo metadata. See https://developers.google.com/streetview/spherical-metadata for the required fields. * The pixel size of the photo must meet the size requirements listed in https://support.google.com/maps/answer/7012050?ref_topic=6275604, and the photo must be a full 360 horizontally. After the upload completes, the method uses UploadRef with CreatePhoto to create the Photo object entry.",
1550	//   "flatPath": "v1/photo:startUpload",
1551	//   "httpMethod": "POST",
1552	//   "id": "streetviewpublish.photo.startUpload",
1553	//   "parameterOrder": [],
1554	//   "parameters": {},
1555	//   "path": "v1/photo:startUpload",
1556	//   "request": {
1557	//     "$ref": "Empty"
1558	//   },
1559	//   "response": {
1560	//     "$ref": "UploadRef"
1561	//   },
1562	//   "scopes": [
1563	//     "https://www.googleapis.com/auth/streetviewpublish"
1564	//   ]
1565	// }
1566
1567}
1568
1569// method id "streetviewpublish.photo.update":
1570
1571type PhotoUpdateCall struct {
1572	s          *Service
1573	id         string
1574	photo      *Photo
1575	urlParams_ gensupport.URLParams
1576	ctx_       context.Context
1577	header_    http.Header
1578}
1579
1580// Update: Updates the metadata of a Photo, such as pose, place
1581// association, connections, etc. Changing the pixels of a photo is not
1582// supported. Only the fields specified in the updateMask field are
1583// used. If `updateMask` is not present, the update applies to all
1584// fields. This method returns the following error codes: *
1585// google.rpc.Code.PERMISSION_DENIED if the requesting user did not
1586// create the requested photo. * google.rpc.Code.INVALID_ARGUMENT if the
1587// request is malformed. * google.rpc.Code.NOT_FOUND if the requested
1588// photo does not exist. * google.rpc.Code.UNAVAILABLE if the requested
1589// Photo is still being indexed.
1590//
1591// - id: A unique identifier for a photo.
1592func (r *PhotoService) Update(id string, photo *Photo) *PhotoUpdateCall {
1593	c := &PhotoUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1594	c.id = id
1595	c.photo = photo
1596	return c
1597}
1598
1599// UpdateMask sets the optional parameter "updateMask": Required. Mask
1600// that identifies fields on the photo metadata to update. If not
1601// present, the old Photo metadata is entirely replaced with the new
1602// Photo metadata in this request. The update fails if invalid fields
1603// are specified. Multiple fields can be specified in a comma-delimited
1604// list. The following fields are valid: * `pose.heading` *
1605// `pose.latLngPair` * `pose.pitch` * `pose.roll` * `pose.level` *
1606// `pose.altitude` * `connections` * `places` *Note:* When updateMask
1607// contains repeated fields, the entire set of repeated values get
1608// replaced with the new contents. For example, if updateMask contains
1609// `connections` and `UpdatePhotoRequest.photo.connections` is empty,
1610// all connections are removed.
1611func (c *PhotoUpdateCall) UpdateMask(updateMask string) *PhotoUpdateCall {
1612	c.urlParams_.Set("updateMask", updateMask)
1613	return c
1614}
1615
1616// Fields allows partial responses to be retrieved. See
1617// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1618// for more information.
1619func (c *PhotoUpdateCall) Fields(s ...googleapi.Field) *PhotoUpdateCall {
1620	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1621	return c
1622}
1623
1624// Context sets the context to be used in this call's Do method. Any
1625// pending HTTP request will be aborted if the provided context is
1626// canceled.
1627func (c *PhotoUpdateCall) Context(ctx context.Context) *PhotoUpdateCall {
1628	c.ctx_ = ctx
1629	return c
1630}
1631
1632// Header returns an http.Header that can be modified by the caller to
1633// add HTTP headers to the request.
1634func (c *PhotoUpdateCall) Header() http.Header {
1635	if c.header_ == nil {
1636		c.header_ = make(http.Header)
1637	}
1638	return c.header_
1639}
1640
1641func (c *PhotoUpdateCall) doRequest(alt string) (*http.Response, error) {
1642	reqHeaders := make(http.Header)
1643	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1644	for k, v := range c.header_ {
1645		reqHeaders[k] = v
1646	}
1647	reqHeaders.Set("User-Agent", c.s.userAgent())
1648	var body io.Reader = nil
1649	body, err := googleapi.WithoutDataWrapper.JSONReader(c.photo)
1650	if err != nil {
1651		return nil, err
1652	}
1653	reqHeaders.Set("Content-Type", "application/json")
1654	c.urlParams_.Set("alt", alt)
1655	c.urlParams_.Set("prettyPrint", "false")
1656	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photo/{id}")
1657	urls += "?" + c.urlParams_.Encode()
1658	req, err := http.NewRequest("PUT", urls, body)
1659	if err != nil {
1660		return nil, err
1661	}
1662	req.Header = reqHeaders
1663	googleapi.Expand(req.URL, map[string]string{
1664		"id": c.id,
1665	})
1666	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1667}
1668
1669// Do executes the "streetviewpublish.photo.update" call.
1670// Exactly one of *Photo or error will be non-nil. Any non-2xx status
1671// code is an error. Response headers are in either
1672// *Photo.ServerResponse.Header or (if a response was returned at all)
1673// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1674// check whether the returned error was because http.StatusNotModified
1675// was returned.
1676func (c *PhotoUpdateCall) Do(opts ...googleapi.CallOption) (*Photo, error) {
1677	gensupport.SetOptions(c.urlParams_, opts...)
1678	res, err := c.doRequest("json")
1679	if res != nil && res.StatusCode == http.StatusNotModified {
1680		if res.Body != nil {
1681			res.Body.Close()
1682		}
1683		return nil, &googleapi.Error{
1684			Code:   res.StatusCode,
1685			Header: res.Header,
1686		}
1687	}
1688	if err != nil {
1689		return nil, err
1690	}
1691	defer googleapi.CloseBody(res)
1692	if err := googleapi.CheckResponse(res); err != nil {
1693		return nil, err
1694	}
1695	ret := &Photo{
1696		ServerResponse: googleapi.ServerResponse{
1697			Header:         res.Header,
1698			HTTPStatusCode: res.StatusCode,
1699		},
1700	}
1701	target := &ret
1702	if err := gensupport.DecodeResponse(target, res); err != nil {
1703		return nil, err
1704	}
1705	return ret, nil
1706	// {
1707	//   "description": "Updates the metadata of a Photo, such as pose, place association, connections, etc. Changing the pixels of a photo is not supported. Only the fields specified in the updateMask field are used. If `updateMask` is not present, the update applies to all fields. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo. * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the requested photo does not exist. * google.rpc.Code.UNAVAILABLE if the requested Photo is still being indexed.",
1708	//   "flatPath": "v1/photo/{id}",
1709	//   "httpMethod": "PUT",
1710	//   "id": "streetviewpublish.photo.update",
1711	//   "parameterOrder": [
1712	//     "id"
1713	//   ],
1714	//   "parameters": {
1715	//     "id": {
1716	//       "description": "Required. A unique identifier for a photo.",
1717	//       "location": "path",
1718	//       "required": true,
1719	//       "type": "string"
1720	//     },
1721	//     "updateMask": {
1722	//       "description": "Required. Mask that identifies fields on the photo metadata to update. If not present, the old Photo metadata is entirely replaced with the new Photo metadata in this request. The update fails if invalid fields are specified. Multiple fields can be specified in a comma-delimited list. The following fields are valid: * `pose.heading` * `pose.latLngPair` * `pose.pitch` * `pose.roll` * `pose.level` * `pose.altitude` * `connections` * `places` *Note:* When updateMask contains repeated fields, the entire set of repeated values get replaced with the new contents. For example, if updateMask contains `connections` and `UpdatePhotoRequest.photo.connections` is empty, all connections are removed.",
1723	//       "format": "google-fieldmask",
1724	//       "location": "query",
1725	//       "type": "string"
1726	//     }
1727	//   },
1728	//   "path": "v1/photo/{id}",
1729	//   "request": {
1730	//     "$ref": "Photo"
1731	//   },
1732	//   "response": {
1733	//     "$ref": "Photo"
1734	//   },
1735	//   "scopes": [
1736	//     "https://www.googleapis.com/auth/streetviewpublish"
1737	//   ]
1738	// }
1739
1740}
1741
1742// method id "streetviewpublish.photos.batchDelete":
1743
1744type PhotosBatchDeleteCall struct {
1745	s                        *Service
1746	batchdeletephotosrequest *BatchDeletePhotosRequest
1747	urlParams_               gensupport.URLParams
1748	ctx_                     context.Context
1749	header_                  http.Header
1750}
1751
1752// BatchDelete: Deletes a list of Photos and their metadata. Note that
1753// if BatchDeletePhotos fails, either critical fields are missing or
1754// there is an authentication error. Even if BatchDeletePhotos succeeds,
1755// individual photos in the batch may have failures. These failures are
1756// specified in each PhotoResponse.status in
1757// BatchDeletePhotosResponse.results. See DeletePhoto for specific
1758// failures that can occur per photo.
1759func (r *PhotosService) BatchDelete(batchdeletephotosrequest *BatchDeletePhotosRequest) *PhotosBatchDeleteCall {
1760	c := &PhotosBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1761	c.batchdeletephotosrequest = batchdeletephotosrequest
1762	return c
1763}
1764
1765// Fields allows partial responses to be retrieved. See
1766// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1767// for more information.
1768func (c *PhotosBatchDeleteCall) Fields(s ...googleapi.Field) *PhotosBatchDeleteCall {
1769	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1770	return c
1771}
1772
1773// Context sets the context to be used in this call's Do method. Any
1774// pending HTTP request will be aborted if the provided context is
1775// canceled.
1776func (c *PhotosBatchDeleteCall) Context(ctx context.Context) *PhotosBatchDeleteCall {
1777	c.ctx_ = ctx
1778	return c
1779}
1780
1781// Header returns an http.Header that can be modified by the caller to
1782// add HTTP headers to the request.
1783func (c *PhotosBatchDeleteCall) Header() http.Header {
1784	if c.header_ == nil {
1785		c.header_ = make(http.Header)
1786	}
1787	return c.header_
1788}
1789
1790func (c *PhotosBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
1791	reqHeaders := make(http.Header)
1792	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1793	for k, v := range c.header_ {
1794		reqHeaders[k] = v
1795	}
1796	reqHeaders.Set("User-Agent", c.s.userAgent())
1797	var body io.Reader = nil
1798	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchdeletephotosrequest)
1799	if err != nil {
1800		return nil, err
1801	}
1802	reqHeaders.Set("Content-Type", "application/json")
1803	c.urlParams_.Set("alt", alt)
1804	c.urlParams_.Set("prettyPrint", "false")
1805	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photos:batchDelete")
1806	urls += "?" + c.urlParams_.Encode()
1807	req, err := http.NewRequest("POST", urls, body)
1808	if err != nil {
1809		return nil, err
1810	}
1811	req.Header = reqHeaders
1812	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1813}
1814
1815// Do executes the "streetviewpublish.photos.batchDelete" call.
1816// Exactly one of *BatchDeletePhotosResponse or error will be non-nil.
1817// Any non-2xx status code is an error. Response headers are in either
1818// *BatchDeletePhotosResponse.ServerResponse.Header or (if a response
1819// was returned at all) in error.(*googleapi.Error).Header. Use
1820// googleapi.IsNotModified to check whether the returned error was
1821// because http.StatusNotModified was returned.
1822func (c *PhotosBatchDeleteCall) Do(opts ...googleapi.CallOption) (*BatchDeletePhotosResponse, error) {
1823	gensupport.SetOptions(c.urlParams_, opts...)
1824	res, err := c.doRequest("json")
1825	if res != nil && res.StatusCode == http.StatusNotModified {
1826		if res.Body != nil {
1827			res.Body.Close()
1828		}
1829		return nil, &googleapi.Error{
1830			Code:   res.StatusCode,
1831			Header: res.Header,
1832		}
1833	}
1834	if err != nil {
1835		return nil, err
1836	}
1837	defer googleapi.CloseBody(res)
1838	if err := googleapi.CheckResponse(res); err != nil {
1839		return nil, err
1840	}
1841	ret := &BatchDeletePhotosResponse{
1842		ServerResponse: googleapi.ServerResponse{
1843			Header:         res.Header,
1844			HTTPStatusCode: res.StatusCode,
1845		},
1846	}
1847	target := &ret
1848	if err := gensupport.DecodeResponse(target, res); err != nil {
1849		return nil, err
1850	}
1851	return ret, nil
1852	// {
1853	//   "description": "Deletes a list of Photos and their metadata. Note that if BatchDeletePhotos fails, either critical fields are missing or there is an authentication error. Even if BatchDeletePhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchDeletePhotosResponse.results. See DeletePhoto for specific failures that can occur per photo.",
1854	//   "flatPath": "v1/photos:batchDelete",
1855	//   "httpMethod": "POST",
1856	//   "id": "streetviewpublish.photos.batchDelete",
1857	//   "parameterOrder": [],
1858	//   "parameters": {},
1859	//   "path": "v1/photos:batchDelete",
1860	//   "request": {
1861	//     "$ref": "BatchDeletePhotosRequest"
1862	//   },
1863	//   "response": {
1864	//     "$ref": "BatchDeletePhotosResponse"
1865	//   },
1866	//   "scopes": [
1867	//     "https://www.googleapis.com/auth/streetviewpublish"
1868	//   ]
1869	// }
1870
1871}
1872
1873// method id "streetviewpublish.photos.batchGet":
1874
1875type PhotosBatchGetCall struct {
1876	s            *Service
1877	urlParams_   gensupport.URLParams
1878	ifNoneMatch_ string
1879	ctx_         context.Context
1880	header_      http.Header
1881}
1882
1883// BatchGet: Gets the metadata of the specified Photo batch. Note that
1884// if BatchGetPhotos fails, either critical fields are missing or there
1885// is an authentication error. Even if BatchGetPhotos succeeds,
1886// individual photos in the batch may have failures. These failures are
1887// specified in each PhotoResponse.status in
1888// BatchGetPhotosResponse.results. See GetPhoto for specific failures
1889// that can occur per photo.
1890func (r *PhotosService) BatchGet() *PhotosBatchGetCall {
1891	c := &PhotosBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1892	return c
1893}
1894
1895// LanguageCode sets the optional parameter "languageCode": The BCP-47
1896// language code, such as "en-US" or "sr-Latn". For more information,
1897// see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1898// If language_code is unspecified, the user's language preference for
1899// Google services is used.
1900func (c *PhotosBatchGetCall) LanguageCode(languageCode string) *PhotosBatchGetCall {
1901	c.urlParams_.Set("languageCode", languageCode)
1902	return c
1903}
1904
1905// PhotoIds sets the optional parameter "photoIds": Required. IDs of the
1906// Photos. For HTTP GET requests, the URL query parameter should be
1907// `photoIds=&photoIds=&...`.
1908func (c *PhotosBatchGetCall) PhotoIds(photoIds ...string) *PhotosBatchGetCall {
1909	c.urlParams_.SetMulti("photoIds", append([]string{}, photoIds...))
1910	return c
1911}
1912
1913// View sets the optional parameter "view": Required. Specifies if a
1914// download URL for the photo bytes should be returned in the Photo
1915// response.
1916//
1917// Possible values:
1918//   "BASIC" - Server reponses do not include the download URL for the
1919// photo bytes. The default value.
1920//   "INCLUDE_DOWNLOAD_URL" - Server responses include the download URL
1921// for the photo bytes.
1922func (c *PhotosBatchGetCall) View(view string) *PhotosBatchGetCall {
1923	c.urlParams_.Set("view", view)
1924	return c
1925}
1926
1927// Fields allows partial responses to be retrieved. See
1928// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1929// for more information.
1930func (c *PhotosBatchGetCall) Fields(s ...googleapi.Field) *PhotosBatchGetCall {
1931	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1932	return c
1933}
1934
1935// IfNoneMatch sets the optional parameter which makes the operation
1936// fail if the object's ETag matches the given value. This is useful for
1937// getting updates only after the object has changed since the last
1938// request. Use googleapi.IsNotModified to check whether the response
1939// error from Do is the result of In-None-Match.
1940func (c *PhotosBatchGetCall) IfNoneMatch(entityTag string) *PhotosBatchGetCall {
1941	c.ifNoneMatch_ = entityTag
1942	return c
1943}
1944
1945// Context sets the context to be used in this call's Do method. Any
1946// pending HTTP request will be aborted if the provided context is
1947// canceled.
1948func (c *PhotosBatchGetCall) Context(ctx context.Context) *PhotosBatchGetCall {
1949	c.ctx_ = ctx
1950	return c
1951}
1952
1953// Header returns an http.Header that can be modified by the caller to
1954// add HTTP headers to the request.
1955func (c *PhotosBatchGetCall) Header() http.Header {
1956	if c.header_ == nil {
1957		c.header_ = make(http.Header)
1958	}
1959	return c.header_
1960}
1961
1962func (c *PhotosBatchGetCall) doRequest(alt string) (*http.Response, error) {
1963	reqHeaders := make(http.Header)
1964	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1965	for k, v := range c.header_ {
1966		reqHeaders[k] = v
1967	}
1968	reqHeaders.Set("User-Agent", c.s.userAgent())
1969	if c.ifNoneMatch_ != "" {
1970		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1971	}
1972	var body io.Reader = nil
1973	c.urlParams_.Set("alt", alt)
1974	c.urlParams_.Set("prettyPrint", "false")
1975	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photos:batchGet")
1976	urls += "?" + c.urlParams_.Encode()
1977	req, err := http.NewRequest("GET", urls, body)
1978	if err != nil {
1979		return nil, err
1980	}
1981	req.Header = reqHeaders
1982	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1983}
1984
1985// Do executes the "streetviewpublish.photos.batchGet" call.
1986// Exactly one of *BatchGetPhotosResponse or error will be non-nil. Any
1987// non-2xx status code is an error. Response headers are in either
1988// *BatchGetPhotosResponse.ServerResponse.Header or (if a response was
1989// returned at all) in error.(*googleapi.Error).Header. Use
1990// googleapi.IsNotModified to check whether the returned error was
1991// because http.StatusNotModified was returned.
1992func (c *PhotosBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetPhotosResponse, error) {
1993	gensupport.SetOptions(c.urlParams_, opts...)
1994	res, err := c.doRequest("json")
1995	if res != nil && res.StatusCode == http.StatusNotModified {
1996		if res.Body != nil {
1997			res.Body.Close()
1998		}
1999		return nil, &googleapi.Error{
2000			Code:   res.StatusCode,
2001			Header: res.Header,
2002		}
2003	}
2004	if err != nil {
2005		return nil, err
2006	}
2007	defer googleapi.CloseBody(res)
2008	if err := googleapi.CheckResponse(res); err != nil {
2009		return nil, err
2010	}
2011	ret := &BatchGetPhotosResponse{
2012		ServerResponse: googleapi.ServerResponse{
2013			Header:         res.Header,
2014			HTTPStatusCode: res.StatusCode,
2015		},
2016	}
2017	target := &ret
2018	if err := gensupport.DecodeResponse(target, res); err != nil {
2019		return nil, err
2020	}
2021	return ret, nil
2022	// {
2023	//   "description": "Gets the metadata of the specified Photo batch. Note that if BatchGetPhotos fails, either critical fields are missing or there is an authentication error. Even if BatchGetPhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchGetPhotosResponse.results. See GetPhoto for specific failures that can occur per photo.",
2024	//   "flatPath": "v1/photos:batchGet",
2025	//   "httpMethod": "GET",
2026	//   "id": "streetviewpublish.photos.batchGet",
2027	//   "parameterOrder": [],
2028	//   "parameters": {
2029	//     "languageCode": {
2030	//       "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified, the user's language preference for Google services is used.",
2031	//       "location": "query",
2032	//       "type": "string"
2033	//     },
2034	//     "photoIds": {
2035	//       "description": "Required. IDs of the Photos. For HTTP GET requests, the URL query parameter should be `photoIds=\u0026photoIds=\u0026...`.",
2036	//       "location": "query",
2037	//       "repeated": true,
2038	//       "type": "string"
2039	//     },
2040	//     "view": {
2041	//       "description": "Required. Specifies if a download URL for the photo bytes should be returned in the Photo response.",
2042	//       "enum": [
2043	//         "BASIC",
2044	//         "INCLUDE_DOWNLOAD_URL"
2045	//       ],
2046	//       "enumDescriptions": [
2047	//         "Server reponses do not include the download URL for the photo bytes. The default value.",
2048	//         "Server responses include the download URL for the photo bytes."
2049	//       ],
2050	//       "location": "query",
2051	//       "type": "string"
2052	//     }
2053	//   },
2054	//   "path": "v1/photos:batchGet",
2055	//   "response": {
2056	//     "$ref": "BatchGetPhotosResponse"
2057	//   },
2058	//   "scopes": [
2059	//     "https://www.googleapis.com/auth/streetviewpublish"
2060	//   ]
2061	// }
2062
2063}
2064
2065// method id "streetviewpublish.photos.batchUpdate":
2066
2067type PhotosBatchUpdateCall struct {
2068	s                        *Service
2069	batchupdatephotosrequest *BatchUpdatePhotosRequest
2070	urlParams_               gensupport.URLParams
2071	ctx_                     context.Context
2072	header_                  http.Header
2073}
2074
2075// BatchUpdate: Updates the metadata of Photos, such as pose, place
2076// association, connections, etc. Changing the pixels of photos is not
2077// supported. Note that if BatchUpdatePhotos fails, either critical
2078// fields are missing or there is an authentication error. Even if
2079// BatchUpdatePhotos succeeds, individual photos in the batch may have
2080// failures. These failures are specified in each PhotoResponse.status
2081// in BatchUpdatePhotosResponse.results. See UpdatePhoto for specific
2082// failures that can occur per photo. Only the fields specified in
2083// updateMask field are used. If `updateMask` is not present, the update
2084// applies to all fields. The number of UpdatePhotoRequest messages in a
2085// BatchUpdatePhotosRequest must not exceed 20. *Note:* To update
2086// Pose.altitude, Pose.latLngPair has to be filled as well. Otherwise,
2087// the request will fail.
2088func (r *PhotosService) BatchUpdate(batchupdatephotosrequest *BatchUpdatePhotosRequest) *PhotosBatchUpdateCall {
2089	c := &PhotosBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2090	c.batchupdatephotosrequest = batchupdatephotosrequest
2091	return c
2092}
2093
2094// Fields allows partial responses to be retrieved. See
2095// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2096// for more information.
2097func (c *PhotosBatchUpdateCall) Fields(s ...googleapi.Field) *PhotosBatchUpdateCall {
2098	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2099	return c
2100}
2101
2102// Context sets the context to be used in this call's Do method. Any
2103// pending HTTP request will be aborted if the provided context is
2104// canceled.
2105func (c *PhotosBatchUpdateCall) Context(ctx context.Context) *PhotosBatchUpdateCall {
2106	c.ctx_ = ctx
2107	return c
2108}
2109
2110// Header returns an http.Header that can be modified by the caller to
2111// add HTTP headers to the request.
2112func (c *PhotosBatchUpdateCall) Header() http.Header {
2113	if c.header_ == nil {
2114		c.header_ = make(http.Header)
2115	}
2116	return c.header_
2117}
2118
2119func (c *PhotosBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
2120	reqHeaders := make(http.Header)
2121	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2122	for k, v := range c.header_ {
2123		reqHeaders[k] = v
2124	}
2125	reqHeaders.Set("User-Agent", c.s.userAgent())
2126	var body io.Reader = nil
2127	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatephotosrequest)
2128	if err != nil {
2129		return nil, err
2130	}
2131	reqHeaders.Set("Content-Type", "application/json")
2132	c.urlParams_.Set("alt", alt)
2133	c.urlParams_.Set("prettyPrint", "false")
2134	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photos:batchUpdate")
2135	urls += "?" + c.urlParams_.Encode()
2136	req, err := http.NewRequest("POST", urls, body)
2137	if err != nil {
2138		return nil, err
2139	}
2140	req.Header = reqHeaders
2141	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2142}
2143
2144// Do executes the "streetviewpublish.photos.batchUpdate" call.
2145// Exactly one of *BatchUpdatePhotosResponse or error will be non-nil.
2146// Any non-2xx status code is an error. Response headers are in either
2147// *BatchUpdatePhotosResponse.ServerResponse.Header or (if a response
2148// was returned at all) in error.(*googleapi.Error).Header. Use
2149// googleapi.IsNotModified to check whether the returned error was
2150// because http.StatusNotModified was returned.
2151func (c *PhotosBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdatePhotosResponse, error) {
2152	gensupport.SetOptions(c.urlParams_, opts...)
2153	res, err := c.doRequest("json")
2154	if res != nil && res.StatusCode == http.StatusNotModified {
2155		if res.Body != nil {
2156			res.Body.Close()
2157		}
2158		return nil, &googleapi.Error{
2159			Code:   res.StatusCode,
2160			Header: res.Header,
2161		}
2162	}
2163	if err != nil {
2164		return nil, err
2165	}
2166	defer googleapi.CloseBody(res)
2167	if err := googleapi.CheckResponse(res); err != nil {
2168		return nil, err
2169	}
2170	ret := &BatchUpdatePhotosResponse{
2171		ServerResponse: googleapi.ServerResponse{
2172			Header:         res.Header,
2173			HTTPStatusCode: res.StatusCode,
2174		},
2175	}
2176	target := &ret
2177	if err := gensupport.DecodeResponse(target, res); err != nil {
2178		return nil, err
2179	}
2180	return ret, nil
2181	// {
2182	//   "description": "Updates the metadata of Photos, such as pose, place association, connections, etc. Changing the pixels of photos is not supported. Note that if BatchUpdatePhotos fails, either critical fields are missing or there is an authentication error. Even if BatchUpdatePhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchUpdatePhotosResponse.results. See UpdatePhoto for specific failures that can occur per photo. Only the fields specified in updateMask field are used. If `updateMask` is not present, the update applies to all fields. The number of UpdatePhotoRequest messages in a BatchUpdatePhotosRequest must not exceed 20. *Note:* To update Pose.altitude, Pose.latLngPair has to be filled as well. Otherwise, the request will fail.",
2183	//   "flatPath": "v1/photos:batchUpdate",
2184	//   "httpMethod": "POST",
2185	//   "id": "streetviewpublish.photos.batchUpdate",
2186	//   "parameterOrder": [],
2187	//   "parameters": {},
2188	//   "path": "v1/photos:batchUpdate",
2189	//   "request": {
2190	//     "$ref": "BatchUpdatePhotosRequest"
2191	//   },
2192	//   "response": {
2193	//     "$ref": "BatchUpdatePhotosResponse"
2194	//   },
2195	//   "scopes": [
2196	//     "https://www.googleapis.com/auth/streetviewpublish"
2197	//   ]
2198	// }
2199
2200}
2201
2202// method id "streetviewpublish.photos.list":
2203
2204type PhotosListCall struct {
2205	s            *Service
2206	urlParams_   gensupport.URLParams
2207	ifNoneMatch_ string
2208	ctx_         context.Context
2209	header_      http.Header
2210}
2211
2212// List: Lists all the Photos that belong to the user. *Note:* Recently
2213// created photos that are still being indexed are not returned in the
2214// response.
2215func (r *PhotosService) List() *PhotosListCall {
2216	c := &PhotosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2217	return c
2218}
2219
2220// Filter sets the optional parameter "filter": Required. The filter
2221// expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. The
2222// only filter supported at the moment is `placeId`.
2223func (c *PhotosListCall) Filter(filter string) *PhotosListCall {
2224	c.urlParams_.Set("filter", filter)
2225	return c
2226}
2227
2228// LanguageCode sets the optional parameter "languageCode": The BCP-47
2229// language code, such as "en-US" or "sr-Latn". For more information,
2230// see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
2231// If language_code is unspecified, the user's language preference for
2232// Google services is used.
2233func (c *PhotosListCall) LanguageCode(languageCode string) *PhotosListCall {
2234	c.urlParams_.Set("languageCode", languageCode)
2235	return c
2236}
2237
2238// PageSize sets the optional parameter "pageSize": The maximum number
2239// of photos to return. `pageSize` must be non-negative. If `pageSize`
2240// is zero or is not provided, the default page size of 100 is used. The
2241// number of photos returned in the response may be less than `pageSize`
2242// if the number of photos that belong to the user is less than
2243// `pageSize`.
2244func (c *PhotosListCall) PageSize(pageSize int64) *PhotosListCall {
2245	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2246	return c
2247}
2248
2249// PageToken sets the optional parameter "pageToken": The nextPageToken
2250// value returned from a previous ListPhotos request, if any.
2251func (c *PhotosListCall) PageToken(pageToken string) *PhotosListCall {
2252	c.urlParams_.Set("pageToken", pageToken)
2253	return c
2254}
2255
2256// View sets the optional parameter "view": Required. Specifies if a
2257// download URL for the photos bytes should be returned in the Photos
2258// response.
2259//
2260// Possible values:
2261//   "BASIC" - Server reponses do not include the download URL for the
2262// photo bytes. The default value.
2263//   "INCLUDE_DOWNLOAD_URL" - Server responses include the download URL
2264// for the photo bytes.
2265func (c *PhotosListCall) View(view string) *PhotosListCall {
2266	c.urlParams_.Set("view", view)
2267	return c
2268}
2269
2270// Fields allows partial responses to be retrieved. See
2271// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2272// for more information.
2273func (c *PhotosListCall) Fields(s ...googleapi.Field) *PhotosListCall {
2274	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2275	return c
2276}
2277
2278// IfNoneMatch sets the optional parameter which makes the operation
2279// fail if the object's ETag matches the given value. This is useful for
2280// getting updates only after the object has changed since the last
2281// request. Use googleapi.IsNotModified to check whether the response
2282// error from Do is the result of In-None-Match.
2283func (c *PhotosListCall) IfNoneMatch(entityTag string) *PhotosListCall {
2284	c.ifNoneMatch_ = entityTag
2285	return c
2286}
2287
2288// Context sets the context to be used in this call's Do method. Any
2289// pending HTTP request will be aborted if the provided context is
2290// canceled.
2291func (c *PhotosListCall) Context(ctx context.Context) *PhotosListCall {
2292	c.ctx_ = ctx
2293	return c
2294}
2295
2296// Header returns an http.Header that can be modified by the caller to
2297// add HTTP headers to the request.
2298func (c *PhotosListCall) Header() http.Header {
2299	if c.header_ == nil {
2300		c.header_ = make(http.Header)
2301	}
2302	return c.header_
2303}
2304
2305func (c *PhotosListCall) doRequest(alt string) (*http.Response, error) {
2306	reqHeaders := make(http.Header)
2307	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2308	for k, v := range c.header_ {
2309		reqHeaders[k] = v
2310	}
2311	reqHeaders.Set("User-Agent", c.s.userAgent())
2312	if c.ifNoneMatch_ != "" {
2313		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2314	}
2315	var body io.Reader = nil
2316	c.urlParams_.Set("alt", alt)
2317	c.urlParams_.Set("prettyPrint", "false")
2318	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photos")
2319	urls += "?" + c.urlParams_.Encode()
2320	req, err := http.NewRequest("GET", urls, body)
2321	if err != nil {
2322		return nil, err
2323	}
2324	req.Header = reqHeaders
2325	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2326}
2327
2328// Do executes the "streetviewpublish.photos.list" call.
2329// Exactly one of *ListPhotosResponse or error will be non-nil. Any
2330// non-2xx status code is an error. Response headers are in either
2331// *ListPhotosResponse.ServerResponse.Header or (if a response was
2332// returned at all) in error.(*googleapi.Error).Header. Use
2333// googleapi.IsNotModified to check whether the returned error was
2334// because http.StatusNotModified was returned.
2335func (c *PhotosListCall) Do(opts ...googleapi.CallOption) (*ListPhotosResponse, error) {
2336	gensupport.SetOptions(c.urlParams_, opts...)
2337	res, err := c.doRequest("json")
2338	if res != nil && res.StatusCode == http.StatusNotModified {
2339		if res.Body != nil {
2340			res.Body.Close()
2341		}
2342		return nil, &googleapi.Error{
2343			Code:   res.StatusCode,
2344			Header: res.Header,
2345		}
2346	}
2347	if err != nil {
2348		return nil, err
2349	}
2350	defer googleapi.CloseBody(res)
2351	if err := googleapi.CheckResponse(res); err != nil {
2352		return nil, err
2353	}
2354	ret := &ListPhotosResponse{
2355		ServerResponse: googleapi.ServerResponse{
2356			Header:         res.Header,
2357			HTTPStatusCode: res.StatusCode,
2358		},
2359	}
2360	target := &ret
2361	if err := gensupport.DecodeResponse(target, res); err != nil {
2362		return nil, err
2363	}
2364	return ret, nil
2365	// {
2366	//   "description": "Lists all the Photos that belong to the user. *Note:* Recently created photos that are still being indexed are not returned in the response.",
2367	//   "flatPath": "v1/photos",
2368	//   "httpMethod": "GET",
2369	//   "id": "streetviewpublish.photos.list",
2370	//   "parameterOrder": [],
2371	//   "parameters": {
2372	//     "filter": {
2373	//       "description": "Required. The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. The only filter supported at the moment is `placeId`.",
2374	//       "location": "query",
2375	//       "type": "string"
2376	//     },
2377	//     "languageCode": {
2378	//       "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified, the user's language preference for Google services is used.",
2379	//       "location": "query",
2380	//       "type": "string"
2381	//     },
2382	//     "pageSize": {
2383	//       "description": "The maximum number of photos to return. `pageSize` must be non-negative. If `pageSize` is zero or is not provided, the default page size of 100 is used. The number of photos returned in the response may be less than `pageSize` if the number of photos that belong to the user is less than `pageSize`.",
2384	//       "format": "int32",
2385	//       "location": "query",
2386	//       "type": "integer"
2387	//     },
2388	//     "pageToken": {
2389	//       "description": "The nextPageToken value returned from a previous ListPhotos request, if any.",
2390	//       "location": "query",
2391	//       "type": "string"
2392	//     },
2393	//     "view": {
2394	//       "description": "Required. Specifies if a download URL for the photos bytes should be returned in the Photos response.",
2395	//       "enum": [
2396	//         "BASIC",
2397	//         "INCLUDE_DOWNLOAD_URL"
2398	//       ],
2399	//       "enumDescriptions": [
2400	//         "Server reponses do not include the download URL for the photo bytes. The default value.",
2401	//         "Server responses include the download URL for the photo bytes."
2402	//       ],
2403	//       "location": "query",
2404	//       "type": "string"
2405	//     }
2406	//   },
2407	//   "path": "v1/photos",
2408	//   "response": {
2409	//     "$ref": "ListPhotosResponse"
2410	//   },
2411	//   "scopes": [
2412	//     "https://www.googleapis.com/auth/streetviewpublish"
2413	//   ]
2414	// }
2415
2416}
2417
2418// Pages invokes f for each page of results.
2419// A non-nil error returned from f will halt the iteration.
2420// The provided context supersedes any context provided to the Context method.
2421func (c *PhotosListCall) Pages(ctx context.Context, f func(*ListPhotosResponse) error) error {
2422	c.ctx_ = ctx
2423	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2424	for {
2425		x, err := c.Do()
2426		if err != nil {
2427			return err
2428		}
2429		if err := f(x); err != nil {
2430			return err
2431		}
2432		if x.NextPageToken == "" {
2433			return nil
2434		}
2435		c.PageToken(x.NextPageToken)
2436	}
2437}
2438