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 blogger provides access to the Blogger API v3.
8//
9// For product documentation, see: https://developers.google.com/blogger/docs/3.0/getting_started
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/blogger/v2"
16//   ...
17//   ctx := context.Background()
18//   bloggerService, err := blogger.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//   bloggerService, err := blogger.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//   bloggerService, err := blogger.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package blogger // import "google.golang.org/api/blogger/v2"
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 = "blogger:v2"
75const apiName = "blogger"
76const apiVersion = "v2"
77const basePath = "https://blogger.googleapis.com/"
78const mtlsBasePath = "https://blogger.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// Manage your Blogger account
83	BloggerScope = "https://www.googleapis.com/auth/blogger"
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/blogger",
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.Blogs = NewBlogsService(s)
120	s.Comments = NewCommentsService(s)
121	s.Pages = NewPagesService(s)
122	s.Posts = NewPostsService(s)
123	s.Users = NewUsersService(s)
124	return s, nil
125}
126
127type Service struct {
128	client    *http.Client
129	BasePath  string // API endpoint base URL
130	UserAgent string // optional additional User-Agent fragment
131
132	Blogs *BlogsService
133
134	Comments *CommentsService
135
136	Pages *PagesService
137
138	Posts *PostsService
139
140	Users *UsersService
141}
142
143func (s *Service) userAgent() string {
144	if s.UserAgent == "" {
145		return googleapi.UserAgent
146	}
147	return googleapi.UserAgent + " " + s.UserAgent
148}
149
150func NewBlogsService(s *Service) *BlogsService {
151	rs := &BlogsService{s: s}
152	return rs
153}
154
155type BlogsService struct {
156	s *Service
157}
158
159func NewCommentsService(s *Service) *CommentsService {
160	rs := &CommentsService{s: s}
161	return rs
162}
163
164type CommentsService struct {
165	s *Service
166}
167
168func NewPagesService(s *Service) *PagesService {
169	rs := &PagesService{s: s}
170	return rs
171}
172
173type PagesService struct {
174	s *Service
175}
176
177func NewPostsService(s *Service) *PostsService {
178	rs := &PostsService{s: s}
179	return rs
180}
181
182type PostsService struct {
183	s *Service
184}
185
186func NewUsersService(s *Service) *UsersService {
187	rs := &UsersService{s: s}
188	return rs
189}
190
191type UsersService struct {
192	s *Service
193}
194
195type Blog struct {
196	// CustomMetaData: The JSON custom meta-data for the Blog.
197	CustomMetaData string `json:"customMetaData,omitempty"`
198
199	// Description: The description of this blog. This is displayed
200	// underneath the title.
201	Description string `json:"description,omitempty"`
202
203	// Id: The identifier for this resource.
204	Id string `json:"id,omitempty"`
205
206	// Kind: The kind of this entry. Always blogger#blog.
207	Kind string `json:"kind,omitempty"`
208
209	// Locale: The locale this Blog is set to.
210	Locale *BlogLocale `json:"locale,omitempty"`
211
212	// Name: The name of this blog. This is displayed as the title.
213	Name string `json:"name,omitempty"`
214
215	// Pages: The container of pages in this blog.
216	Pages *BlogPages `json:"pages,omitempty"`
217
218	// Posts: The container of posts in this blog.
219	Posts *BlogPosts `json:"posts,omitempty"`
220
221	// Published: RFC 3339 date-time when this blog was published.
222	Published string `json:"published,omitempty"`
223
224	// SelfLink: The API REST URL to fetch this resource from.
225	SelfLink string `json:"selfLink,omitempty"`
226
227	// Status: The status of the blog.
228	//
229	// Possible values:
230	//   "LIVE"
231	//   "DELETED"
232	Status string `json:"status,omitempty"`
233
234	// Updated: RFC 3339 date-time when this blog was last updated.
235	Updated string `json:"updated,omitempty"`
236
237	// Url: The URL where this blog is published.
238	Url string `json:"url,omitempty"`
239
240	// ServerResponse contains the HTTP response code and headers from the
241	// server.
242	googleapi.ServerResponse `json:"-"`
243
244	// ForceSendFields is a list of field names (e.g. "CustomMetaData") to
245	// unconditionally include in API requests. By default, fields with
246	// empty values are omitted from API requests. However, any non-pointer,
247	// non-interface field appearing in ForceSendFields will be sent to the
248	// server regardless of whether the field is empty or not. This may be
249	// used to include empty fields in Patch requests.
250	ForceSendFields []string `json:"-"`
251
252	// NullFields is a list of field names (e.g. "CustomMetaData") to
253	// include in API requests with the JSON null value. By default, fields
254	// with empty values are omitted from API requests. However, any field
255	// with an empty value appearing in NullFields will be sent to the
256	// server as null. It is an error if a field in this list has a
257	// non-empty value. This may be used to include null fields in Patch
258	// requests.
259	NullFields []string `json:"-"`
260}
261
262func (s *Blog) MarshalJSON() ([]byte, error) {
263	type NoMethod Blog
264	raw := NoMethod(*s)
265	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
266}
267
268// BlogLocale: The locale this Blog is set to.
269type BlogLocale struct {
270	// Country: The country this blog's locale is set to.
271	Country string `json:"country,omitempty"`
272
273	// Language: The language this blog is authored in.
274	Language string `json:"language,omitempty"`
275
276	// Variant: The language variant this blog is authored in.
277	Variant string `json:"variant,omitempty"`
278
279	// ForceSendFields is a list of field names (e.g. "Country") to
280	// unconditionally include in API requests. By default, fields with
281	// empty values are omitted from API requests. However, any non-pointer,
282	// non-interface field appearing in ForceSendFields will be sent to the
283	// server regardless of whether the field is empty or not. This may be
284	// used to include empty fields in Patch requests.
285	ForceSendFields []string `json:"-"`
286
287	// NullFields is a list of field names (e.g. "Country") to include in
288	// API requests with the JSON null value. By default, fields with empty
289	// values are omitted from API requests. However, any field with an
290	// empty value appearing in NullFields will be sent to the server as
291	// null. It is an error if a field in this list has a non-empty value.
292	// This may be used to include null fields in Patch requests.
293	NullFields []string `json:"-"`
294}
295
296func (s *BlogLocale) MarshalJSON() ([]byte, error) {
297	type NoMethod BlogLocale
298	raw := NoMethod(*s)
299	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
300}
301
302// BlogPages: The container of pages in this blog.
303type BlogPages struct {
304	// SelfLink: The URL of the container for pages in this blog.
305	SelfLink string `json:"selfLink,omitempty"`
306
307	// TotalItems: The count of pages in this blog.
308	TotalItems int64 `json:"totalItems,omitempty"`
309
310	// ForceSendFields is a list of field names (e.g. "SelfLink") to
311	// unconditionally include in API requests. By default, fields with
312	// empty values are omitted from API requests. However, any non-pointer,
313	// non-interface field appearing in ForceSendFields will be sent to the
314	// server regardless of whether the field is empty or not. This may be
315	// used to include empty fields in Patch requests.
316	ForceSendFields []string `json:"-"`
317
318	// NullFields is a list of field names (e.g. "SelfLink") to include in
319	// API requests with the JSON null value. By default, fields with empty
320	// values are omitted from API requests. However, any field with an
321	// empty value appearing in NullFields will be sent to the server as
322	// null. It is an error if a field in this list has a non-empty value.
323	// This may be used to include null fields in Patch requests.
324	NullFields []string `json:"-"`
325}
326
327func (s *BlogPages) MarshalJSON() ([]byte, error) {
328	type NoMethod BlogPages
329	raw := NoMethod(*s)
330	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
331}
332
333// BlogPosts: The container of posts in this blog.
334type BlogPosts struct {
335	// Items: The List of Posts for this Blog.
336	Items []*Post `json:"items,omitempty"`
337
338	// SelfLink: The URL of the container for posts in this blog.
339	SelfLink string `json:"selfLink,omitempty"`
340
341	// TotalItems: The count of posts in this blog.
342	TotalItems int64 `json:"totalItems,omitempty"`
343
344	// ForceSendFields is a list of field names (e.g. "Items") to
345	// unconditionally include in API requests. By default, fields with
346	// empty values are omitted from API requests. However, any non-pointer,
347	// non-interface field appearing in ForceSendFields will be sent to the
348	// server regardless of whether the field is empty or not. This may be
349	// used to include empty fields in Patch requests.
350	ForceSendFields []string `json:"-"`
351
352	// NullFields is a list of field names (e.g. "Items") to include in API
353	// requests with the JSON null value. By default, fields with empty
354	// values are omitted from API requests. However, any field with an
355	// empty value appearing in NullFields will be sent to the server as
356	// null. It is an error if a field in this list has a non-empty value.
357	// This may be used to include null fields in Patch requests.
358	NullFields []string `json:"-"`
359}
360
361func (s *BlogPosts) MarshalJSON() ([]byte, error) {
362	type NoMethod BlogPosts
363	raw := NoMethod(*s)
364	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
365}
366
367type BlogList struct {
368	// BlogUserInfos: Admin level list of blog per-user information.
369	BlogUserInfos []*BlogUserInfo `json:"blogUserInfos,omitempty"`
370
371	// Items: The list of Blogs this user has Authorship or Admin rights
372	// over.
373	Items []*Blog `json:"items,omitempty"`
374
375	// Kind: The kind of this entity. Always blogger#blogList.
376	Kind string `json:"kind,omitempty"`
377
378	// ServerResponse contains the HTTP response code and headers from the
379	// server.
380	googleapi.ServerResponse `json:"-"`
381
382	// ForceSendFields is a list of field names (e.g. "BlogUserInfos") to
383	// unconditionally include in API requests. By default, fields with
384	// empty values are omitted from API requests. However, any non-pointer,
385	// non-interface field appearing in ForceSendFields will be sent to the
386	// server regardless of whether the field is empty or not. This may be
387	// used to include empty fields in Patch requests.
388	ForceSendFields []string `json:"-"`
389
390	// NullFields is a list of field names (e.g. "BlogUserInfos") to include
391	// in API requests with the JSON null value. By default, fields with
392	// empty values are omitted from API requests. However, any field with
393	// an empty value appearing in NullFields will be sent to the server as
394	// null. It is an error if a field in this list has a non-empty value.
395	// This may be used to include null fields in Patch requests.
396	NullFields []string `json:"-"`
397}
398
399func (s *BlogList) MarshalJSON() ([]byte, error) {
400	type NoMethod BlogList
401	raw := NoMethod(*s)
402	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
403}
404
405type BlogPerUserInfo struct {
406	// BlogId: ID of the Blog resource.
407	BlogId string `json:"blogId,omitempty"`
408
409	// HasAdminAccess: True if the user has Admin level access to the blog.
410	HasAdminAccess bool `json:"hasAdminAccess,omitempty"`
411
412	// Kind: The kind of this entity. Always blogger#blogPerUserInfo.
413	Kind string `json:"kind,omitempty"`
414
415	// PhotosAlbumKey: The Photo Album Key for the user when adding photos
416	// to the blog.
417	PhotosAlbumKey string `json:"photosAlbumKey,omitempty"`
418
419	// Role: Access permissions that the user has for the blog (ADMIN,
420	// AUTHOR, or READER).
421	//
422	// Possible values:
423	//   "VIEW_TYPE_UNSPECIFIED"
424	//   "READER"
425	//   "AUTHOR"
426	//   "ADMIN"
427	Role string `json:"role,omitempty"`
428
429	// UserId: ID of the User.
430	UserId string `json:"userId,omitempty"`
431
432	// ForceSendFields is a list of field names (e.g. "BlogId") to
433	// unconditionally include in API requests. By default, fields with
434	// empty values are omitted from API requests. However, any non-pointer,
435	// non-interface field appearing in ForceSendFields will be sent to the
436	// server regardless of whether the field is empty or not. This may be
437	// used to include empty fields in Patch requests.
438	ForceSendFields []string `json:"-"`
439
440	// NullFields is a list of field names (e.g. "BlogId") to include in API
441	// requests with the JSON null value. By default, fields with empty
442	// values are omitted from API requests. However, any field with an
443	// empty value appearing in NullFields will be sent to the server as
444	// null. It is an error if a field in this list has a non-empty value.
445	// This may be used to include null fields in Patch requests.
446	NullFields []string `json:"-"`
447}
448
449func (s *BlogPerUserInfo) MarshalJSON() ([]byte, error) {
450	type NoMethod BlogPerUserInfo
451	raw := NoMethod(*s)
452	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
453}
454
455type BlogUserInfo struct {
456	// Blog: The Blog resource.
457	Blog *Blog `json:"blog,omitempty"`
458
459	// BlogUserInfo: Information about a User for the Blog.
460	BlogUserInfo *BlogPerUserInfo `json:"blog_user_info,omitempty"`
461
462	// Kind: The kind of this entity. Always blogger#blogUserInfo.
463	Kind string `json:"kind,omitempty"`
464
465	// ForceSendFields is a list of field names (e.g. "Blog") to
466	// unconditionally include in API requests. By default, fields with
467	// empty values are omitted from API requests. However, any non-pointer,
468	// non-interface field appearing in ForceSendFields will be sent to the
469	// server regardless of whether the field is empty or not. This may be
470	// used to include empty fields in Patch requests.
471	ForceSendFields []string `json:"-"`
472
473	// NullFields is a list of field names (e.g. "Blog") to include in API
474	// requests with the JSON null value. By default, fields with empty
475	// values are omitted from API requests. However, any field with an
476	// empty value appearing in NullFields will be sent to the server as
477	// null. It is an error if a field in this list has a non-empty value.
478	// This may be used to include null fields in Patch requests.
479	NullFields []string `json:"-"`
480}
481
482func (s *BlogUserInfo) MarshalJSON() ([]byte, error) {
483	type NoMethod BlogUserInfo
484	raw := NoMethod(*s)
485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
486}
487
488type Comment struct {
489	// Author: The author of this Comment.
490	Author *CommentAuthor `json:"author,omitempty"`
491
492	// Blog: Data about the blog containing this comment.
493	Blog *CommentBlog `json:"blog,omitempty"`
494
495	// Content: The actual content of the comment. May include HTML markup.
496	Content string `json:"content,omitempty"`
497
498	// Id: The identifier for this resource.
499	Id string `json:"id,omitempty"`
500
501	// InReplyTo: Data about the comment this is in reply to.
502	InReplyTo *CommentInReplyTo `json:"inReplyTo,omitempty"`
503
504	// Kind: The kind of this entry. Always blogger#comment.
505	Kind string `json:"kind,omitempty"`
506
507	// Post: Data about the post containing this comment.
508	Post *CommentPost `json:"post,omitempty"`
509
510	// Published: RFC 3339 date-time when this comment was published.
511	Published string `json:"published,omitempty"`
512
513	// SelfLink: The API REST URL to fetch this resource from.
514	SelfLink string `json:"selfLink,omitempty"`
515
516	// Status: The status of the comment (only populated for admin users).
517	//
518	// Possible values:
519	//   "LIVE"
520	//   "EMPTIED"
521	//   "PENDING"
522	//   "SPAM"
523	Status string `json:"status,omitempty"`
524
525	// Updated: RFC 3339 date-time when this comment was last updated.
526	Updated string `json:"updated,omitempty"`
527
528	// ServerResponse contains the HTTP response code and headers from the
529	// server.
530	googleapi.ServerResponse `json:"-"`
531
532	// ForceSendFields is a list of field names (e.g. "Author") to
533	// unconditionally include in API requests. By default, fields with
534	// empty values are omitted from API requests. However, any non-pointer,
535	// non-interface field appearing in ForceSendFields will be sent to the
536	// server regardless of whether the field is empty or not. This may be
537	// used to include empty fields in Patch requests.
538	ForceSendFields []string `json:"-"`
539
540	// NullFields is a list of field names (e.g. "Author") to include in API
541	// requests with the JSON null value. By default, fields with empty
542	// values are omitted from API requests. However, any field with an
543	// empty value appearing in NullFields will be sent to the server as
544	// null. It is an error if a field in this list has a non-empty value.
545	// This may be used to include null fields in Patch requests.
546	NullFields []string `json:"-"`
547}
548
549func (s *Comment) MarshalJSON() ([]byte, error) {
550	type NoMethod Comment
551	raw := NoMethod(*s)
552	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
553}
554
555// CommentAuthor: The author of this Comment.
556type CommentAuthor struct {
557	// DisplayName: The display name.
558	DisplayName string `json:"displayName,omitempty"`
559
560	// Id: The identifier of the creator.
561	Id string `json:"id,omitempty"`
562
563	// Image: The creator's avatar.
564	Image *CommentAuthorImage `json:"image,omitempty"`
565
566	// Url: The URL of the creator's Profile page.
567	Url string `json:"url,omitempty"`
568
569	// ForceSendFields is a list of field names (e.g. "DisplayName") to
570	// unconditionally include in API requests. By default, fields with
571	// empty values are omitted from API requests. However, any non-pointer,
572	// non-interface field appearing in ForceSendFields will be sent to the
573	// server regardless of whether the field is empty or not. This may be
574	// used to include empty fields in Patch requests.
575	ForceSendFields []string `json:"-"`
576
577	// NullFields is a list of field names (e.g. "DisplayName") to include
578	// in API requests with the JSON null value. By default, fields with
579	// empty values are omitted from API requests. However, any field with
580	// an empty value appearing in NullFields will be sent to the server as
581	// null. It is an error if a field in this list has a non-empty value.
582	// This may be used to include null fields in Patch requests.
583	NullFields []string `json:"-"`
584}
585
586func (s *CommentAuthor) MarshalJSON() ([]byte, error) {
587	type NoMethod CommentAuthor
588	raw := NoMethod(*s)
589	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
590}
591
592// CommentAuthorImage: The creator's avatar.
593type CommentAuthorImage struct {
594	// Url: The creator's avatar URL.
595	Url string `json:"url,omitempty"`
596
597	// ForceSendFields is a list of field names (e.g. "Url") to
598	// unconditionally include in API requests. By default, fields with
599	// empty values are omitted from API requests. However, any non-pointer,
600	// non-interface field appearing in ForceSendFields will be sent to the
601	// server regardless of whether the field is empty or not. This may be
602	// used to include empty fields in Patch requests.
603	ForceSendFields []string `json:"-"`
604
605	// NullFields is a list of field names (e.g. "Url") to include in API
606	// requests with the JSON null value. By default, fields with empty
607	// values are omitted from API requests. However, any field with an
608	// empty value appearing in NullFields will be sent to the server as
609	// null. It is an error if a field in this list has a non-empty value.
610	// This may be used to include null fields in Patch requests.
611	NullFields []string `json:"-"`
612}
613
614func (s *CommentAuthorImage) MarshalJSON() ([]byte, error) {
615	type NoMethod CommentAuthorImage
616	raw := NoMethod(*s)
617	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
618}
619
620// CommentBlog: Data about the blog containing this comment.
621type CommentBlog struct {
622	// Id: The identifier of the blog containing this comment.
623	Id string `json:"id,omitempty"`
624
625	// ForceSendFields is a list of field names (e.g. "Id") to
626	// unconditionally include in API requests. By default, fields with
627	// empty values are omitted from API requests. However, any non-pointer,
628	// non-interface field appearing in ForceSendFields will be sent to the
629	// server regardless of whether the field is empty or not. This may be
630	// used to include empty fields in Patch requests.
631	ForceSendFields []string `json:"-"`
632
633	// NullFields is a list of field names (e.g. "Id") to include in API
634	// requests with the JSON null value. By default, fields with empty
635	// values are omitted from API requests. However, any field with an
636	// empty value appearing in NullFields will be sent to the server as
637	// null. It is an error if a field in this list has a non-empty value.
638	// This may be used to include null fields in Patch requests.
639	NullFields []string `json:"-"`
640}
641
642func (s *CommentBlog) MarshalJSON() ([]byte, error) {
643	type NoMethod CommentBlog
644	raw := NoMethod(*s)
645	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
646}
647
648// CommentInReplyTo: Data about the comment this is in reply to.
649type CommentInReplyTo struct {
650	// Id: The identified of the parent of this comment.
651	Id string `json:"id,omitempty"`
652
653	// ForceSendFields is a list of field names (e.g. "Id") to
654	// unconditionally include in API requests. By default, fields with
655	// empty values are omitted from API requests. However, any non-pointer,
656	// non-interface field appearing in ForceSendFields will be sent to the
657	// server regardless of whether the field is empty or not. This may be
658	// used to include empty fields in Patch requests.
659	ForceSendFields []string `json:"-"`
660
661	// NullFields is a list of field names (e.g. "Id") to include in API
662	// requests with the JSON null value. By default, fields with empty
663	// values are omitted from API requests. However, any field with an
664	// empty value appearing in NullFields will be sent to the server as
665	// null. It is an error if a field in this list has a non-empty value.
666	// This may be used to include null fields in Patch requests.
667	NullFields []string `json:"-"`
668}
669
670func (s *CommentInReplyTo) MarshalJSON() ([]byte, error) {
671	type NoMethod CommentInReplyTo
672	raw := NoMethod(*s)
673	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
674}
675
676// CommentPost: Data about the post containing this comment.
677type CommentPost struct {
678	// Id: The identifier of the post containing this comment.
679	Id string `json:"id,omitempty"`
680
681	// ForceSendFields is a list of field names (e.g. "Id") to
682	// unconditionally include in API requests. By default, fields with
683	// empty values are omitted from API requests. However, any non-pointer,
684	// non-interface field appearing in ForceSendFields will be sent to the
685	// server regardless of whether the field is empty or not. This may be
686	// used to include empty fields in Patch requests.
687	ForceSendFields []string `json:"-"`
688
689	// NullFields is a list of field names (e.g. "Id") to include in API
690	// requests with the JSON null value. By default, fields with empty
691	// values are omitted from API requests. However, any field with an
692	// empty value appearing in NullFields will be sent to the server as
693	// null. It is an error if a field in this list has a non-empty value.
694	// This may be used to include null fields in Patch requests.
695	NullFields []string `json:"-"`
696}
697
698func (s *CommentPost) MarshalJSON() ([]byte, error) {
699	type NoMethod CommentPost
700	raw := NoMethod(*s)
701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
702}
703
704type CommentList struct {
705	// Etag: Etag of the response.
706	Etag string `json:"etag,omitempty"`
707
708	// Items: The List of Comments for a Post.
709	Items []*Comment `json:"items,omitempty"`
710
711	// Kind: The kind of this entry. Always blogger#commentList.
712	Kind string `json:"kind,omitempty"`
713
714	// NextPageToken: Pagination token to fetch the next page, if one
715	// exists.
716	NextPageToken string `json:"nextPageToken,omitempty"`
717
718	// PrevPageToken: Pagination token to fetch the previous page, if one
719	// exists.
720	PrevPageToken string `json:"prevPageToken,omitempty"`
721
722	// ServerResponse contains the HTTP response code and headers from the
723	// server.
724	googleapi.ServerResponse `json:"-"`
725
726	// ForceSendFields is a list of field names (e.g. "Etag") to
727	// unconditionally include in API requests. By default, fields with
728	// empty values are omitted from API requests. However, any non-pointer,
729	// non-interface field appearing in ForceSendFields will be sent to the
730	// server regardless of whether the field is empty or not. This may be
731	// used to include empty fields in Patch requests.
732	ForceSendFields []string `json:"-"`
733
734	// NullFields is a list of field names (e.g. "Etag") to include in API
735	// requests with the JSON null value. By default, fields with empty
736	// values are omitted from API requests. However, any field with an
737	// empty value appearing in NullFields will be sent to the server as
738	// null. It is an error if a field in this list has a non-empty value.
739	// This may be used to include null fields in Patch requests.
740	NullFields []string `json:"-"`
741}
742
743func (s *CommentList) MarshalJSON() ([]byte, error) {
744	type NoMethod CommentList
745	raw := NoMethod(*s)
746	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
747}
748
749type Page struct {
750	// Author: The author of this Page.
751	Author *PageAuthor `json:"author,omitempty"`
752
753	// Blog: Data about the blog containing this Page.
754	Blog *PageBlog `json:"blog,omitempty"`
755
756	// Content: The body content of this Page, in HTML.
757	Content string `json:"content,omitempty"`
758
759	// Etag: Etag of the resource.
760	Etag string `json:"etag,omitempty"`
761
762	// Id: The identifier for this resource.
763	Id string `json:"id,omitempty"`
764
765	// Kind: The kind of this entity. Always blogger#page.
766	Kind string `json:"kind,omitempty"`
767
768	// Published: RFC 3339 date-time when this Page was published.
769	Published string `json:"published,omitempty"`
770
771	// SelfLink: The API REST URL to fetch this resource from.
772	SelfLink string `json:"selfLink,omitempty"`
773
774	// Status: The status of the page for admin resources (either LIVE or
775	// DRAFT).
776	//
777	// Possible values:
778	//   "LIVE"
779	//   "DRAFT"
780	Status string `json:"status,omitempty"`
781
782	// Title: The title of this entity. This is the name displayed in the
783	// Admin user interface.
784	Title string `json:"title,omitempty"`
785
786	// Updated: RFC 3339 date-time when this Page was last updated.
787	Updated string `json:"updated,omitempty"`
788
789	// Url: The URL that this Page is displayed at.
790	Url string `json:"url,omitempty"`
791
792	// ServerResponse contains the HTTP response code and headers from the
793	// server.
794	googleapi.ServerResponse `json:"-"`
795
796	// ForceSendFields is a list of field names (e.g. "Author") to
797	// unconditionally include in API requests. By default, fields with
798	// empty values are omitted from API requests. However, any non-pointer,
799	// non-interface field appearing in ForceSendFields will be sent to the
800	// server regardless of whether the field is empty or not. This may be
801	// used to include empty fields in Patch requests.
802	ForceSendFields []string `json:"-"`
803
804	// NullFields is a list of field names (e.g. "Author") to include in API
805	// requests with the JSON null value. By default, fields with empty
806	// values are omitted from API requests. However, any field with an
807	// empty value appearing in NullFields will be sent to the server as
808	// null. It is an error if a field in this list has a non-empty value.
809	// This may be used to include null fields in Patch requests.
810	NullFields []string `json:"-"`
811}
812
813func (s *Page) MarshalJSON() ([]byte, error) {
814	type NoMethod Page
815	raw := NoMethod(*s)
816	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
817}
818
819// PageAuthor: The author of this Page.
820type PageAuthor struct {
821	// DisplayName: The display name.
822	DisplayName string `json:"displayName,omitempty"`
823
824	// Id: The identifier of the creator.
825	Id string `json:"id,omitempty"`
826
827	// Image: The creator's avatar.
828	Image *PageAuthorImage `json:"image,omitempty"`
829
830	// Url: The URL of the creator's Profile page.
831	Url string `json:"url,omitempty"`
832
833	// ForceSendFields is a list of field names (e.g. "DisplayName") to
834	// unconditionally include in API requests. By default, fields with
835	// empty values are omitted from API requests. However, any non-pointer,
836	// non-interface field appearing in ForceSendFields will be sent to the
837	// server regardless of whether the field is empty or not. This may be
838	// used to include empty fields in Patch requests.
839	ForceSendFields []string `json:"-"`
840
841	// NullFields is a list of field names (e.g. "DisplayName") to include
842	// in API requests with the JSON null value. By default, fields with
843	// empty values are omitted from API requests. However, any field with
844	// an empty value appearing in NullFields will be sent to the server as
845	// null. It is an error if a field in this list has a non-empty value.
846	// This may be used to include null fields in Patch requests.
847	NullFields []string `json:"-"`
848}
849
850func (s *PageAuthor) MarshalJSON() ([]byte, error) {
851	type NoMethod PageAuthor
852	raw := NoMethod(*s)
853	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
854}
855
856// PageAuthorImage: The creator's avatar.
857type PageAuthorImage struct {
858	// Url: The creator's avatar URL.
859	Url string `json:"url,omitempty"`
860
861	// ForceSendFields is a list of field names (e.g. "Url") to
862	// unconditionally include in API requests. By default, fields with
863	// empty values are omitted from API requests. However, any non-pointer,
864	// non-interface field appearing in ForceSendFields will be sent to the
865	// server regardless of whether the field is empty or not. This may be
866	// used to include empty fields in Patch requests.
867	ForceSendFields []string `json:"-"`
868
869	// NullFields is a list of field names (e.g. "Url") to include in API
870	// requests with the JSON null value. By default, fields with empty
871	// values are omitted from API requests. However, any field with an
872	// empty value appearing in NullFields will be sent to the server as
873	// null. It is an error if a field in this list has a non-empty value.
874	// This may be used to include null fields in Patch requests.
875	NullFields []string `json:"-"`
876}
877
878func (s *PageAuthorImage) MarshalJSON() ([]byte, error) {
879	type NoMethod PageAuthorImage
880	raw := NoMethod(*s)
881	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
882}
883
884// PageBlog: Data about the blog containing this Page.
885type PageBlog struct {
886	// Id: The identifier of the blog containing this page.
887	Id string `json:"id,omitempty"`
888
889	// ForceSendFields is a list of field names (e.g. "Id") to
890	// unconditionally include in API requests. By default, fields with
891	// empty values are omitted from API requests. However, any non-pointer,
892	// non-interface field appearing in ForceSendFields will be sent to the
893	// server regardless of whether the field is empty or not. This may be
894	// used to include empty fields in Patch requests.
895	ForceSendFields []string `json:"-"`
896
897	// NullFields is a list of field names (e.g. "Id") to include in API
898	// requests with the JSON null value. By default, fields with empty
899	// values are omitted from API requests. However, any field with an
900	// empty value appearing in NullFields will be sent to the server as
901	// null. It is an error if a field in this list has a non-empty value.
902	// This may be used to include null fields in Patch requests.
903	NullFields []string `json:"-"`
904}
905
906func (s *PageBlog) MarshalJSON() ([]byte, error) {
907	type NoMethod PageBlog
908	raw := NoMethod(*s)
909	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
910}
911
912type PageList struct {
913	// Etag: Etag of the response.
914	Etag string `json:"etag,omitempty"`
915
916	// Items: The list of Pages for a Blog.
917	Items []*Page `json:"items,omitempty"`
918
919	// Kind: The kind of this entity. Always blogger#pageList.
920	Kind string `json:"kind,omitempty"`
921
922	// NextPageToken: Pagination token to fetch the next page, if one
923	// exists.
924	NextPageToken string `json:"nextPageToken,omitempty"`
925
926	// ServerResponse contains the HTTP response code and headers from the
927	// server.
928	googleapi.ServerResponse `json:"-"`
929
930	// ForceSendFields is a list of field names (e.g. "Etag") to
931	// unconditionally include in API requests. By default, fields with
932	// empty values are omitted from API requests. However, any non-pointer,
933	// non-interface field appearing in ForceSendFields will be sent to the
934	// server regardless of whether the field is empty or not. This may be
935	// used to include empty fields in Patch requests.
936	ForceSendFields []string `json:"-"`
937
938	// NullFields is a list of field names (e.g. "Etag") to include in API
939	// requests with the JSON null value. By default, fields with empty
940	// values are omitted from API requests. However, any field with an
941	// empty value appearing in NullFields will be sent to the server as
942	// null. It is an error if a field in this list has a non-empty value.
943	// This may be used to include null fields in Patch requests.
944	NullFields []string `json:"-"`
945}
946
947func (s *PageList) MarshalJSON() ([]byte, error) {
948	type NoMethod PageList
949	raw := NoMethod(*s)
950	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
951}
952
953type Post struct {
954	// Author: The author of this Post.
955	Author *PostAuthor `json:"author,omitempty"`
956
957	// Blog: Data about the blog containing this Post.
958	Blog *PostBlog `json:"blog,omitempty"`
959
960	// Content: The content of the Post. May contain HTML markup.
961	Content string `json:"content,omitempty"`
962
963	// CustomMetaData: The JSON meta-data for the Post.
964	CustomMetaData string `json:"customMetaData,omitempty"`
965
966	// Etag: Etag of the resource.
967	Etag string `json:"etag,omitempty"`
968
969	// Id: The identifier of this Post.
970	Id string `json:"id,omitempty"`
971
972	// Images: Display image for the Post.
973	Images []*PostImages `json:"images,omitempty"`
974
975	// Kind: The kind of this entity. Always blogger#post.
976	Kind string `json:"kind,omitempty"`
977
978	// Labels: The list of labels this Post was tagged with.
979	Labels []string `json:"labels,omitempty"`
980
981	// Location: The location for geotagged posts.
982	Location *PostLocation `json:"location,omitempty"`
983
984	// Published: RFC 3339 date-time when this Post was published.
985	Published string `json:"published,omitempty"`
986
987	// ReaderComments: Comment control and display setting for readers of
988	// this post.
989	//
990	// Possible values:
991	//   "ALLOW"
992	//   "DONT_ALLOW_SHOW_EXISTING"
993	//   "DONT_ALLOW_HIDE_EXISTING"
994	ReaderComments string `json:"readerComments,omitempty"`
995
996	// Replies: The container of comments on this Post.
997	Replies *PostReplies `json:"replies,omitempty"`
998
999	// SelfLink: The API REST URL to fetch this resource from.
1000	SelfLink string `json:"selfLink,omitempty"`
1001
1002	// Status: Status of the post. Only set for admin-level requests.
1003	//
1004	// Possible values:
1005	//   "LIVE"
1006	//   "DRAFT"
1007	//   "SCHEDULED"
1008	Status string `json:"status,omitempty"`
1009
1010	// Title: The title of the Post.
1011	Title string `json:"title,omitempty"`
1012
1013	// TitleLink: The title link URL, similar to atom's related link.
1014	TitleLink string `json:"titleLink,omitempty"`
1015
1016	// Updated: RFC 3339 date-time when this Post was last updated.
1017	Updated string `json:"updated,omitempty"`
1018
1019	// Url: The URL where this Post is displayed.
1020	Url string `json:"url,omitempty"`
1021
1022	// ServerResponse contains the HTTP response code and headers from the
1023	// server.
1024	googleapi.ServerResponse `json:"-"`
1025
1026	// ForceSendFields is a list of field names (e.g. "Author") to
1027	// unconditionally include in API requests. By default, fields with
1028	// empty values are omitted from API requests. However, any non-pointer,
1029	// non-interface field appearing in ForceSendFields will be sent to the
1030	// server regardless of whether the field is empty or not. This may be
1031	// used to include empty fields in Patch requests.
1032	ForceSendFields []string `json:"-"`
1033
1034	// NullFields is a list of field names (e.g. "Author") to include in API
1035	// requests with the JSON null value. By default, fields with empty
1036	// values are omitted from API requests. However, any field with an
1037	// empty value appearing in NullFields will be sent to the server as
1038	// null. It is an error if a field in this list has a non-empty value.
1039	// This may be used to include null fields in Patch requests.
1040	NullFields []string `json:"-"`
1041}
1042
1043func (s *Post) MarshalJSON() ([]byte, error) {
1044	type NoMethod Post
1045	raw := NoMethod(*s)
1046	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1047}
1048
1049// PostAuthor: The author of this Post.
1050type PostAuthor struct {
1051	// DisplayName: The display name.
1052	DisplayName string `json:"displayName,omitempty"`
1053
1054	// Id: The identifier of the creator.
1055	Id string `json:"id,omitempty"`
1056
1057	// Image: The creator's avatar.
1058	Image *PostAuthorImage `json:"image,omitempty"`
1059
1060	// Url: The URL of the creator's Profile page.
1061	Url string `json:"url,omitempty"`
1062
1063	// ForceSendFields is a list of field names (e.g. "DisplayName") to
1064	// unconditionally include in API requests. By default, fields with
1065	// empty values are omitted from API requests. However, any non-pointer,
1066	// non-interface field appearing in ForceSendFields will be sent to the
1067	// server regardless of whether the field is empty or not. This may be
1068	// used to include empty fields in Patch requests.
1069	ForceSendFields []string `json:"-"`
1070
1071	// NullFields is a list of field names (e.g. "DisplayName") to include
1072	// in API requests with the JSON null value. By default, fields with
1073	// empty values are omitted from API requests. However, any field with
1074	// an empty value appearing in NullFields will be sent to the server as
1075	// null. It is an error if a field in this list has a non-empty value.
1076	// This may be used to include null fields in Patch requests.
1077	NullFields []string `json:"-"`
1078}
1079
1080func (s *PostAuthor) MarshalJSON() ([]byte, error) {
1081	type NoMethod PostAuthor
1082	raw := NoMethod(*s)
1083	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1084}
1085
1086// PostAuthorImage: The creator's avatar.
1087type PostAuthorImage struct {
1088	// Url: The creator's avatar URL.
1089	Url string `json:"url,omitempty"`
1090
1091	// ForceSendFields is a list of field names (e.g. "Url") to
1092	// unconditionally include in API requests. By default, fields with
1093	// empty values are omitted from API requests. However, any non-pointer,
1094	// non-interface field appearing in ForceSendFields will be sent to the
1095	// server regardless of whether the field is empty or not. This may be
1096	// used to include empty fields in Patch requests.
1097	ForceSendFields []string `json:"-"`
1098
1099	// NullFields is a list of field names (e.g. "Url") to include in API
1100	// requests with the JSON null value. By default, fields with empty
1101	// values are omitted from API requests. However, any field with an
1102	// empty value appearing in NullFields will be sent to the server as
1103	// null. It is an error if a field in this list has a non-empty value.
1104	// This may be used to include null fields in Patch requests.
1105	NullFields []string `json:"-"`
1106}
1107
1108func (s *PostAuthorImage) MarshalJSON() ([]byte, error) {
1109	type NoMethod PostAuthorImage
1110	raw := NoMethod(*s)
1111	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1112}
1113
1114// PostBlog: Data about the blog containing this Post.
1115type PostBlog struct {
1116	// Id: The identifier of the Blog that contains this Post.
1117	Id string `json:"id,omitempty"`
1118
1119	// ForceSendFields is a list of field names (e.g. "Id") to
1120	// unconditionally include in API requests. By default, fields with
1121	// empty values are omitted from API requests. However, any non-pointer,
1122	// non-interface field appearing in ForceSendFields will be sent to the
1123	// server regardless of whether the field is empty or not. This may be
1124	// used to include empty fields in Patch requests.
1125	ForceSendFields []string `json:"-"`
1126
1127	// NullFields is a list of field names (e.g. "Id") to include in API
1128	// requests with the JSON null value. By default, fields with empty
1129	// values are omitted from API requests. However, any field with an
1130	// empty value appearing in NullFields will be sent to the server as
1131	// null. It is an error if a field in this list has a non-empty value.
1132	// This may be used to include null fields in Patch requests.
1133	NullFields []string `json:"-"`
1134}
1135
1136func (s *PostBlog) MarshalJSON() ([]byte, error) {
1137	type NoMethod PostBlog
1138	raw := NoMethod(*s)
1139	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1140}
1141
1142type PostImages struct {
1143	Url string `json:"url,omitempty"`
1144
1145	// ForceSendFields is a list of field names (e.g. "Url") to
1146	// unconditionally include in API requests. By default, fields with
1147	// empty values are omitted from API requests. However, any non-pointer,
1148	// non-interface field appearing in ForceSendFields will be sent to the
1149	// server regardless of whether the field is empty or not. This may be
1150	// used to include empty fields in Patch requests.
1151	ForceSendFields []string `json:"-"`
1152
1153	// NullFields is a list of field names (e.g. "Url") to include in API
1154	// requests with the JSON null value. By default, fields with empty
1155	// values are omitted from API requests. However, any field with an
1156	// empty value appearing in NullFields will be sent to the server as
1157	// null. It is an error if a field in this list has a non-empty value.
1158	// This may be used to include null fields in Patch requests.
1159	NullFields []string `json:"-"`
1160}
1161
1162func (s *PostImages) MarshalJSON() ([]byte, error) {
1163	type NoMethod PostImages
1164	raw := NoMethod(*s)
1165	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1166}
1167
1168// PostLocation: The location for geotagged posts.
1169type PostLocation struct {
1170	// Lat: Location's latitude.
1171	Lat float64 `json:"lat,omitempty"`
1172
1173	// Lng: Location's longitude.
1174	Lng float64 `json:"lng,omitempty"`
1175
1176	// Name: Location name.
1177	Name string `json:"name,omitempty"`
1178
1179	// Span: Location's viewport span. Can be used when rendering a map
1180	// preview.
1181	Span string `json:"span,omitempty"`
1182
1183	// ForceSendFields is a list of field names (e.g. "Lat") to
1184	// unconditionally include in API requests. By default, fields with
1185	// empty values are omitted from API requests. However, any non-pointer,
1186	// non-interface field appearing in ForceSendFields will be sent to the
1187	// server regardless of whether the field is empty or not. This may be
1188	// used to include empty fields in Patch requests.
1189	ForceSendFields []string `json:"-"`
1190
1191	// NullFields is a list of field names (e.g. "Lat") to include in API
1192	// requests with the JSON null value. By default, fields with empty
1193	// values are omitted from API requests. However, any field with an
1194	// empty value appearing in NullFields will be sent to the server as
1195	// null. It is an error if a field in this list has a non-empty value.
1196	// This may be used to include null fields in Patch requests.
1197	NullFields []string `json:"-"`
1198}
1199
1200func (s *PostLocation) MarshalJSON() ([]byte, error) {
1201	type NoMethod PostLocation
1202	raw := NoMethod(*s)
1203	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1204}
1205
1206func (s *PostLocation) UnmarshalJSON(data []byte) error {
1207	type NoMethod PostLocation
1208	var s1 struct {
1209		Lat gensupport.JSONFloat64 `json:"lat"`
1210		Lng gensupport.JSONFloat64 `json:"lng"`
1211		*NoMethod
1212	}
1213	s1.NoMethod = (*NoMethod)(s)
1214	if err := json.Unmarshal(data, &s1); err != nil {
1215		return err
1216	}
1217	s.Lat = float64(s1.Lat)
1218	s.Lng = float64(s1.Lng)
1219	return nil
1220}
1221
1222// PostReplies: The container of comments on this Post.
1223type PostReplies struct {
1224	// Items: The List of Comments for this Post.
1225	Items []*Comment `json:"items,omitempty"`
1226
1227	// SelfLink: The URL of the comments on this post.
1228	SelfLink string `json:"selfLink,omitempty"`
1229
1230	// TotalItems: The count of comments on this post.
1231	TotalItems int64 `json:"totalItems,omitempty,string"`
1232
1233	// ForceSendFields is a list of field names (e.g. "Items") to
1234	// unconditionally include in API requests. By default, fields with
1235	// empty values are omitted from API requests. However, any non-pointer,
1236	// non-interface field appearing in ForceSendFields will be sent to the
1237	// server regardless of whether the field is empty or not. This may be
1238	// used to include empty fields in Patch requests.
1239	ForceSendFields []string `json:"-"`
1240
1241	// NullFields is a list of field names (e.g. "Items") to include in API
1242	// requests with the JSON null value. By default, fields with empty
1243	// values are omitted from API requests. However, any field with an
1244	// empty value appearing in NullFields will be sent to the server as
1245	// null. It is an error if a field in this list has a non-empty value.
1246	// This may be used to include null fields in Patch requests.
1247	NullFields []string `json:"-"`
1248}
1249
1250func (s *PostReplies) MarshalJSON() ([]byte, error) {
1251	type NoMethod PostReplies
1252	raw := NoMethod(*s)
1253	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1254}
1255
1256type PostList struct {
1257	// Etag: Etag of the response.
1258	Etag string `json:"etag,omitempty"`
1259
1260	// Items: The list of Posts for this Blog.
1261	Items []*Post `json:"items,omitempty"`
1262
1263	// Kind: The kind of this entity. Always blogger#postList.
1264	Kind string `json:"kind,omitempty"`
1265
1266	// NextPageToken: Pagination token to fetch the next page, if one
1267	// exists.
1268	NextPageToken string `json:"nextPageToken,omitempty"`
1269
1270	// PrevPageToken: Pagination token to fetch the previous page, if one
1271	// exists.
1272	PrevPageToken string `json:"prevPageToken,omitempty"`
1273
1274	// ServerResponse contains the HTTP response code and headers from the
1275	// server.
1276	googleapi.ServerResponse `json:"-"`
1277
1278	// ForceSendFields is a list of field names (e.g. "Etag") to
1279	// unconditionally include in API requests. By default, fields with
1280	// empty values are omitted from API requests. However, any non-pointer,
1281	// non-interface field appearing in ForceSendFields will be sent to the
1282	// server regardless of whether the field is empty or not. This may be
1283	// used to include empty fields in Patch requests.
1284	ForceSendFields []string `json:"-"`
1285
1286	// NullFields is a list of field names (e.g. "Etag") to include in API
1287	// requests with the JSON null value. By default, fields with empty
1288	// values are omitted from API requests. However, any field with an
1289	// empty value appearing in NullFields will be sent to the server as
1290	// null. It is an error if a field in this list has a non-empty value.
1291	// This may be used to include null fields in Patch requests.
1292	NullFields []string `json:"-"`
1293}
1294
1295func (s *PostList) MarshalJSON() ([]byte, error) {
1296	type NoMethod PostList
1297	raw := NoMethod(*s)
1298	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1299}
1300
1301type User struct {
1302	// About: Profile summary information.
1303	About string `json:"about,omitempty"`
1304
1305	// Blogs: The container of blogs for this user.
1306	Blogs *UserBlogs `json:"blogs,omitempty"`
1307
1308	// Created: The timestamp of when this profile was created, in seconds
1309	// since epoch.
1310	Created string `json:"created,omitempty"`
1311
1312	// DisplayName: The display name.
1313	DisplayName string `json:"displayName,omitempty"`
1314
1315	// Id: The identifier for this User.
1316	Id string `json:"id,omitempty"`
1317
1318	// Kind: The kind of this entity. Always blogger#user.
1319	Kind string `json:"kind,omitempty"`
1320
1321	// Locale: This user's locale
1322	Locale *UserLocale `json:"locale,omitempty"`
1323
1324	// SelfLink: The API REST URL to fetch this resource from.
1325	SelfLink string `json:"selfLink,omitempty"`
1326
1327	// Url: The user's profile page.
1328	Url string `json:"url,omitempty"`
1329
1330	// ServerResponse contains the HTTP response code and headers from the
1331	// server.
1332	googleapi.ServerResponse `json:"-"`
1333
1334	// ForceSendFields is a list of field names (e.g. "About") to
1335	// unconditionally include in API requests. By default, fields with
1336	// empty values are omitted from API requests. However, any non-pointer,
1337	// non-interface field appearing in ForceSendFields will be sent to the
1338	// server regardless of whether the field is empty or not. This may be
1339	// used to include empty fields in Patch requests.
1340	ForceSendFields []string `json:"-"`
1341
1342	// NullFields is a list of field names (e.g. "About") to include in API
1343	// requests with the JSON null value. By default, fields with empty
1344	// values are omitted from API requests. However, any field with an
1345	// empty value appearing in NullFields will be sent to the server as
1346	// null. It is an error if a field in this list has a non-empty value.
1347	// This may be used to include null fields in Patch requests.
1348	NullFields []string `json:"-"`
1349}
1350
1351func (s *User) MarshalJSON() ([]byte, error) {
1352	type NoMethod User
1353	raw := NoMethod(*s)
1354	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1355}
1356
1357// UserBlogs: The container of blogs for this user.
1358type UserBlogs struct {
1359	// SelfLink: The URL of the Blogs for this user.
1360	SelfLink string `json:"selfLink,omitempty"`
1361
1362	// ForceSendFields is a list of field names (e.g. "SelfLink") to
1363	// unconditionally include in API requests. By default, fields with
1364	// empty values are omitted from API requests. However, any non-pointer,
1365	// non-interface field appearing in ForceSendFields will be sent to the
1366	// server regardless of whether the field is empty or not. This may be
1367	// used to include empty fields in Patch requests.
1368	ForceSendFields []string `json:"-"`
1369
1370	// NullFields is a list of field names (e.g. "SelfLink") to include in
1371	// API requests with the JSON null value. By default, fields with empty
1372	// values are omitted from API requests. However, any field with an
1373	// empty value appearing in NullFields will be sent to the server as
1374	// null. It is an error if a field in this list has a non-empty value.
1375	// This may be used to include null fields in Patch requests.
1376	NullFields []string `json:"-"`
1377}
1378
1379func (s *UserBlogs) MarshalJSON() ([]byte, error) {
1380	type NoMethod UserBlogs
1381	raw := NoMethod(*s)
1382	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1383}
1384
1385// UserLocale: This user's locale
1386type UserLocale struct {
1387	// Country: The country this blog's locale is set to.
1388	Country string `json:"country,omitempty"`
1389
1390	// Language: The language this blog is authored in.
1391	Language string `json:"language,omitempty"`
1392
1393	// Variant: The language variant this blog is authored in.
1394	Variant string `json:"variant,omitempty"`
1395
1396	// ForceSendFields is a list of field names (e.g. "Country") to
1397	// unconditionally include in API requests. By default, fields with
1398	// empty values are omitted from API requests. However, any non-pointer,
1399	// non-interface field appearing in ForceSendFields will be sent to the
1400	// server regardless of whether the field is empty or not. This may be
1401	// used to include empty fields in Patch requests.
1402	ForceSendFields []string `json:"-"`
1403
1404	// NullFields is a list of field names (e.g. "Country") to include in
1405	// API requests with the JSON null value. By default, fields with empty
1406	// values are omitted from API requests. However, any field with an
1407	// empty value appearing in NullFields will be sent to the server as
1408	// null. It is an error if a field in this list has a non-empty value.
1409	// This may be used to include null fields in Patch requests.
1410	NullFields []string `json:"-"`
1411}
1412
1413func (s *UserLocale) MarshalJSON() ([]byte, error) {
1414	type NoMethod UserLocale
1415	raw := NoMethod(*s)
1416	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1417}
1418
1419// method id "blogger.blogs.get":
1420
1421type BlogsGetCall struct {
1422	s            *Service
1423	blogId       string
1424	urlParams_   gensupport.URLParams
1425	ifNoneMatch_ string
1426	ctx_         context.Context
1427	header_      http.Header
1428}
1429
1430// Get: Gets a blog by id.
1431//
1432// - blogId: .
1433func (r *BlogsService) Get(blogId string) *BlogsGetCall {
1434	c := &BlogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1435	c.blogId = blogId
1436	return c
1437}
1438
1439// Fields allows partial responses to be retrieved. See
1440// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1441// for more information.
1442func (c *BlogsGetCall) Fields(s ...googleapi.Field) *BlogsGetCall {
1443	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1444	return c
1445}
1446
1447// IfNoneMatch sets the optional parameter which makes the operation
1448// fail if the object's ETag matches the given value. This is useful for
1449// getting updates only after the object has changed since the last
1450// request. Use googleapi.IsNotModified to check whether the response
1451// error from Do is the result of In-None-Match.
1452func (c *BlogsGetCall) IfNoneMatch(entityTag string) *BlogsGetCall {
1453	c.ifNoneMatch_ = entityTag
1454	return c
1455}
1456
1457// Context sets the context to be used in this call's Do method. Any
1458// pending HTTP request will be aborted if the provided context is
1459// canceled.
1460func (c *BlogsGetCall) Context(ctx context.Context) *BlogsGetCall {
1461	c.ctx_ = ctx
1462	return c
1463}
1464
1465// Header returns an http.Header that can be modified by the caller to
1466// add HTTP headers to the request.
1467func (c *BlogsGetCall) Header() http.Header {
1468	if c.header_ == nil {
1469		c.header_ = make(http.Header)
1470	}
1471	return c.header_
1472}
1473
1474func (c *BlogsGetCall) doRequest(alt string) (*http.Response, error) {
1475	reqHeaders := make(http.Header)
1476	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1477	for k, v := range c.header_ {
1478		reqHeaders[k] = v
1479	}
1480	reqHeaders.Set("User-Agent", c.s.userAgent())
1481	if c.ifNoneMatch_ != "" {
1482		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1483	}
1484	var body io.Reader = nil
1485	c.urlParams_.Set("alt", alt)
1486	c.urlParams_.Set("prettyPrint", "false")
1487	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}")
1488	urls += "?" + c.urlParams_.Encode()
1489	req, err := http.NewRequest("GET", urls, body)
1490	if err != nil {
1491		return nil, err
1492	}
1493	req.Header = reqHeaders
1494	googleapi.Expand(req.URL, map[string]string{
1495		"blogId": c.blogId,
1496	})
1497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1498}
1499
1500// Do executes the "blogger.blogs.get" call.
1501// Exactly one of *Blog or error will be non-nil. Any non-2xx status
1502// code is an error. Response headers are in either
1503// *Blog.ServerResponse.Header or (if a response was returned at all) in
1504// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
1505// whether the returned error was because http.StatusNotModified was
1506// returned.
1507func (c *BlogsGetCall) Do(opts ...googleapi.CallOption) (*Blog, error) {
1508	gensupport.SetOptions(c.urlParams_, opts...)
1509	res, err := c.doRequest("json")
1510	if res != nil && res.StatusCode == http.StatusNotModified {
1511		if res.Body != nil {
1512			res.Body.Close()
1513		}
1514		return nil, &googleapi.Error{
1515			Code:   res.StatusCode,
1516			Header: res.Header,
1517		}
1518	}
1519	if err != nil {
1520		return nil, err
1521	}
1522	defer googleapi.CloseBody(res)
1523	if err := googleapi.CheckResponse(res); err != nil {
1524		return nil, err
1525	}
1526	ret := &Blog{
1527		ServerResponse: googleapi.ServerResponse{
1528			Header:         res.Header,
1529			HTTPStatusCode: res.StatusCode,
1530		},
1531	}
1532	target := &ret
1533	if err := gensupport.DecodeResponse(target, res); err != nil {
1534		return nil, err
1535	}
1536	return ret, nil
1537	// {
1538	//   "description": "Gets a blog by id.",
1539	//   "flatPath": "v2/blogs/{blogId}",
1540	//   "httpMethod": "GET",
1541	//   "id": "blogger.blogs.get",
1542	//   "parameterOrder": [
1543	//     "blogId"
1544	//   ],
1545	//   "parameters": {
1546	//     "blogId": {
1547	//       "location": "path",
1548	//       "required": true,
1549	//       "type": "string"
1550	//     }
1551	//   },
1552	//   "path": "v2/blogs/{blogId}",
1553	//   "response": {
1554	//     "$ref": "Blog"
1555	//   },
1556	//   "scopes": [
1557	//     "https://www.googleapis.com/auth/blogger"
1558	//   ]
1559	// }
1560
1561}
1562
1563// method id "blogger.blogs.list":
1564
1565type BlogsListCall struct {
1566	s            *Service
1567	userId       string
1568	urlParams_   gensupport.URLParams
1569	ifNoneMatch_ string
1570	ctx_         context.Context
1571	header_      http.Header
1572}
1573
1574// List: Lists blogs by user id, possibly filtered.
1575//
1576// - userId: .
1577func (r *BlogsService) List(userId string) *BlogsListCall {
1578	c := &BlogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1579	c.userId = userId
1580	return c
1581}
1582
1583// Fields allows partial responses to be retrieved. See
1584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1585// for more information.
1586func (c *BlogsListCall) Fields(s ...googleapi.Field) *BlogsListCall {
1587	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1588	return c
1589}
1590
1591// IfNoneMatch sets the optional parameter which makes the operation
1592// fail if the object's ETag matches the given value. This is useful for
1593// getting updates only after the object has changed since the last
1594// request. Use googleapi.IsNotModified to check whether the response
1595// error from Do is the result of In-None-Match.
1596func (c *BlogsListCall) IfNoneMatch(entityTag string) *BlogsListCall {
1597	c.ifNoneMatch_ = entityTag
1598	return c
1599}
1600
1601// Context sets the context to be used in this call's Do method. Any
1602// pending HTTP request will be aborted if the provided context is
1603// canceled.
1604func (c *BlogsListCall) Context(ctx context.Context) *BlogsListCall {
1605	c.ctx_ = ctx
1606	return c
1607}
1608
1609// Header returns an http.Header that can be modified by the caller to
1610// add HTTP headers to the request.
1611func (c *BlogsListCall) Header() http.Header {
1612	if c.header_ == nil {
1613		c.header_ = make(http.Header)
1614	}
1615	return c.header_
1616}
1617
1618func (c *BlogsListCall) doRequest(alt string) (*http.Response, error) {
1619	reqHeaders := make(http.Header)
1620	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1621	for k, v := range c.header_ {
1622		reqHeaders[k] = v
1623	}
1624	reqHeaders.Set("User-Agent", c.s.userAgent())
1625	if c.ifNoneMatch_ != "" {
1626		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1627	}
1628	var body io.Reader = nil
1629	c.urlParams_.Set("alt", alt)
1630	c.urlParams_.Set("prettyPrint", "false")
1631	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{userId}/blogs")
1632	urls += "?" + c.urlParams_.Encode()
1633	req, err := http.NewRequest("GET", urls, body)
1634	if err != nil {
1635		return nil, err
1636	}
1637	req.Header = reqHeaders
1638	googleapi.Expand(req.URL, map[string]string{
1639		"userId": c.userId,
1640	})
1641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1642}
1643
1644// Do executes the "blogger.blogs.list" call.
1645// Exactly one of *BlogList or error will be non-nil. Any non-2xx status
1646// code is an error. Response headers are in either
1647// *BlogList.ServerResponse.Header or (if a response was returned at
1648// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1649// to check whether the returned error was because
1650// http.StatusNotModified was returned.
1651func (c *BlogsListCall) Do(opts ...googleapi.CallOption) (*BlogList, error) {
1652	gensupport.SetOptions(c.urlParams_, opts...)
1653	res, err := c.doRequest("json")
1654	if res != nil && res.StatusCode == http.StatusNotModified {
1655		if res.Body != nil {
1656			res.Body.Close()
1657		}
1658		return nil, &googleapi.Error{
1659			Code:   res.StatusCode,
1660			Header: res.Header,
1661		}
1662	}
1663	if err != nil {
1664		return nil, err
1665	}
1666	defer googleapi.CloseBody(res)
1667	if err := googleapi.CheckResponse(res); err != nil {
1668		return nil, err
1669	}
1670	ret := &BlogList{
1671		ServerResponse: googleapi.ServerResponse{
1672			Header:         res.Header,
1673			HTTPStatusCode: res.StatusCode,
1674		},
1675	}
1676	target := &ret
1677	if err := gensupport.DecodeResponse(target, res); err != nil {
1678		return nil, err
1679	}
1680	return ret, nil
1681	// {
1682	//   "description": "Lists blogs by user id, possibly filtered.",
1683	//   "flatPath": "v2/users/{userId}/blogs",
1684	//   "httpMethod": "GET",
1685	//   "id": "blogger.blogs.list",
1686	//   "parameterOrder": [
1687	//     "userId"
1688	//   ],
1689	//   "parameters": {
1690	//     "userId": {
1691	//       "location": "path",
1692	//       "required": true,
1693	//       "type": "string"
1694	//     }
1695	//   },
1696	//   "path": "v2/users/{userId}/blogs",
1697	//   "response": {
1698	//     "$ref": "BlogList"
1699	//   },
1700	//   "scopes": [
1701	//     "https://www.googleapis.com/auth/blogger"
1702	//   ]
1703	// }
1704
1705}
1706
1707// method id "blogger.comments.get":
1708
1709type CommentsGetCall struct {
1710	s            *Service
1711	blogId       string
1712	postId       string
1713	commentId    string
1714	urlParams_   gensupport.URLParams
1715	ifNoneMatch_ string
1716	ctx_         context.Context
1717	header_      http.Header
1718}
1719
1720// Get: Gets a comment by blog id, post id and comment id.
1721//
1722// - blogId: .
1723// - commentId: .
1724// - postId: .
1725func (r *CommentsService) Get(blogId string, postId string, commentId string) *CommentsGetCall {
1726	c := &CommentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1727	c.blogId = blogId
1728	c.postId = postId
1729	c.commentId = commentId
1730	return c
1731}
1732
1733// Fields allows partial responses to be retrieved. See
1734// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1735// for more information.
1736func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall {
1737	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1738	return c
1739}
1740
1741// IfNoneMatch sets the optional parameter which makes the operation
1742// fail if the object's ETag matches the given value. This is useful for
1743// getting updates only after the object has changed since the last
1744// request. Use googleapi.IsNotModified to check whether the response
1745// error from Do is the result of In-None-Match.
1746func (c *CommentsGetCall) IfNoneMatch(entityTag string) *CommentsGetCall {
1747	c.ifNoneMatch_ = entityTag
1748	return c
1749}
1750
1751// Context sets the context to be used in this call's Do method. Any
1752// pending HTTP request will be aborted if the provided context is
1753// canceled.
1754func (c *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
1755	c.ctx_ = ctx
1756	return c
1757}
1758
1759// Header returns an http.Header that can be modified by the caller to
1760// add HTTP headers to the request.
1761func (c *CommentsGetCall) Header() http.Header {
1762	if c.header_ == nil {
1763		c.header_ = make(http.Header)
1764	}
1765	return c.header_
1766}
1767
1768func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
1769	reqHeaders := make(http.Header)
1770	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1771	for k, v := range c.header_ {
1772		reqHeaders[k] = v
1773	}
1774	reqHeaders.Set("User-Agent", c.s.userAgent())
1775	if c.ifNoneMatch_ != "" {
1776		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1777	}
1778	var body io.Reader = nil
1779	c.urlParams_.Set("alt", alt)
1780	c.urlParams_.Set("prettyPrint", "false")
1781	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/posts/{postId}/comments/{commentId}")
1782	urls += "?" + c.urlParams_.Encode()
1783	req, err := http.NewRequest("GET", urls, body)
1784	if err != nil {
1785		return nil, err
1786	}
1787	req.Header = reqHeaders
1788	googleapi.Expand(req.URL, map[string]string{
1789		"blogId":    c.blogId,
1790		"postId":    c.postId,
1791		"commentId": c.commentId,
1792	})
1793	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1794}
1795
1796// Do executes the "blogger.comments.get" call.
1797// Exactly one of *Comment or error will be non-nil. Any non-2xx status
1798// code is an error. Response headers are in either
1799// *Comment.ServerResponse.Header or (if a response was returned at all)
1800// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1801// check whether the returned error was because http.StatusNotModified
1802// was returned.
1803func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
1804	gensupport.SetOptions(c.urlParams_, opts...)
1805	res, err := c.doRequest("json")
1806	if res != nil && res.StatusCode == http.StatusNotModified {
1807		if res.Body != nil {
1808			res.Body.Close()
1809		}
1810		return nil, &googleapi.Error{
1811			Code:   res.StatusCode,
1812			Header: res.Header,
1813		}
1814	}
1815	if err != nil {
1816		return nil, err
1817	}
1818	defer googleapi.CloseBody(res)
1819	if err := googleapi.CheckResponse(res); err != nil {
1820		return nil, err
1821	}
1822	ret := &Comment{
1823		ServerResponse: googleapi.ServerResponse{
1824			Header:         res.Header,
1825			HTTPStatusCode: res.StatusCode,
1826		},
1827	}
1828	target := &ret
1829	if err := gensupport.DecodeResponse(target, res); err != nil {
1830		return nil, err
1831	}
1832	return ret, nil
1833	// {
1834	//   "description": "Gets a comment by blog id, post id and comment id.",
1835	//   "flatPath": "v2/blogs/{blogId}/posts/{postId}/comments/{commentId}",
1836	//   "httpMethod": "GET",
1837	//   "id": "blogger.comments.get",
1838	//   "parameterOrder": [
1839	//     "blogId",
1840	//     "postId",
1841	//     "commentId"
1842	//   ],
1843	//   "parameters": {
1844	//     "blogId": {
1845	//       "location": "path",
1846	//       "required": true,
1847	//       "type": "string"
1848	//     },
1849	//     "commentId": {
1850	//       "location": "path",
1851	//       "required": true,
1852	//       "type": "string"
1853	//     },
1854	//     "postId": {
1855	//       "location": "path",
1856	//       "required": true,
1857	//       "type": "string"
1858	//     }
1859	//   },
1860	//   "path": "v2/blogs/{blogId}/posts/{postId}/comments/{commentId}",
1861	//   "response": {
1862	//     "$ref": "Comment"
1863	//   },
1864	//   "scopes": [
1865	//     "https://www.googleapis.com/auth/blogger"
1866	//   ]
1867	// }
1868
1869}
1870
1871// method id "blogger.comments.list":
1872
1873type CommentsListCall struct {
1874	s            *Service
1875	blogId       string
1876	postId       string
1877	urlParams_   gensupport.URLParams
1878	ifNoneMatch_ string
1879	ctx_         context.Context
1880	header_      http.Header
1881}
1882
1883// List: Lists comments.
1884//
1885// - blogId: .
1886// - postId: .
1887func (r *CommentsService) List(blogId string, postId string) *CommentsListCall {
1888	c := &CommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1889	c.blogId = blogId
1890	c.postId = postId
1891	return c
1892}
1893
1894// FetchBodies sets the optional parameter "fetchBodies":
1895func (c *CommentsListCall) FetchBodies(fetchBodies bool) *CommentsListCall {
1896	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
1897	return c
1898}
1899
1900// MaxResults sets the optional parameter "maxResults":
1901func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
1902	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
1903	return c
1904}
1905
1906// PageToken sets the optional parameter "pageToken":
1907func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
1908	c.urlParams_.Set("pageToken", pageToken)
1909	return c
1910}
1911
1912// StartDate sets the optional parameter "startDate":
1913func (c *CommentsListCall) StartDate(startDate string) *CommentsListCall {
1914	c.urlParams_.Set("startDate", startDate)
1915	return c
1916}
1917
1918// Fields allows partial responses to be retrieved. See
1919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1920// for more information.
1921func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
1922	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1923	return c
1924}
1925
1926// IfNoneMatch sets the optional parameter which makes the operation
1927// fail if the object's ETag matches the given value. This is useful for
1928// getting updates only after the object has changed since the last
1929// request. Use googleapi.IsNotModified to check whether the response
1930// error from Do is the result of In-None-Match.
1931func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall {
1932	c.ifNoneMatch_ = entityTag
1933	return c
1934}
1935
1936// Context sets the context to be used in this call's Do method. Any
1937// pending HTTP request will be aborted if the provided context is
1938// canceled.
1939func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
1940	c.ctx_ = ctx
1941	return c
1942}
1943
1944// Header returns an http.Header that can be modified by the caller to
1945// add HTTP headers to the request.
1946func (c *CommentsListCall) Header() http.Header {
1947	if c.header_ == nil {
1948		c.header_ = make(http.Header)
1949	}
1950	return c.header_
1951}
1952
1953func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
1954	reqHeaders := make(http.Header)
1955	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
1956	for k, v := range c.header_ {
1957		reqHeaders[k] = v
1958	}
1959	reqHeaders.Set("User-Agent", c.s.userAgent())
1960	if c.ifNoneMatch_ != "" {
1961		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1962	}
1963	var body io.Reader = nil
1964	c.urlParams_.Set("alt", alt)
1965	c.urlParams_.Set("prettyPrint", "false")
1966	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/posts/{postId}/comments")
1967	urls += "?" + c.urlParams_.Encode()
1968	req, err := http.NewRequest("GET", urls, body)
1969	if err != nil {
1970		return nil, err
1971	}
1972	req.Header = reqHeaders
1973	googleapi.Expand(req.URL, map[string]string{
1974		"blogId": c.blogId,
1975		"postId": c.postId,
1976	})
1977	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1978}
1979
1980// Do executes the "blogger.comments.list" call.
1981// Exactly one of *CommentList or error will be non-nil. Any non-2xx
1982// status code is an error. Response headers are in either
1983// *CommentList.ServerResponse.Header or (if a response was returned at
1984// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1985// to check whether the returned error was because
1986// http.StatusNotModified was returned.
1987func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentList, error) {
1988	gensupport.SetOptions(c.urlParams_, opts...)
1989	res, err := c.doRequest("json")
1990	if res != nil && res.StatusCode == http.StatusNotModified {
1991		if res.Body != nil {
1992			res.Body.Close()
1993		}
1994		return nil, &googleapi.Error{
1995			Code:   res.StatusCode,
1996			Header: res.Header,
1997		}
1998	}
1999	if err != nil {
2000		return nil, err
2001	}
2002	defer googleapi.CloseBody(res)
2003	if err := googleapi.CheckResponse(res); err != nil {
2004		return nil, err
2005	}
2006	ret := &CommentList{
2007		ServerResponse: googleapi.ServerResponse{
2008			Header:         res.Header,
2009			HTTPStatusCode: res.StatusCode,
2010		},
2011	}
2012	target := &ret
2013	if err := gensupport.DecodeResponse(target, res); err != nil {
2014		return nil, err
2015	}
2016	return ret, nil
2017	// {
2018	//   "description": "Lists comments.",
2019	//   "flatPath": "v2/blogs/{blogId}/posts/{postId}/comments",
2020	//   "httpMethod": "GET",
2021	//   "id": "blogger.comments.list",
2022	//   "parameterOrder": [
2023	//     "blogId",
2024	//     "postId"
2025	//   ],
2026	//   "parameters": {
2027	//     "blogId": {
2028	//       "location": "path",
2029	//       "required": true,
2030	//       "type": "string"
2031	//     },
2032	//     "fetchBodies": {
2033	//       "location": "query",
2034	//       "type": "boolean"
2035	//     },
2036	//     "maxResults": {
2037	//       "format": "uint32",
2038	//       "location": "query",
2039	//       "type": "integer"
2040	//     },
2041	//     "pageToken": {
2042	//       "location": "query",
2043	//       "type": "string"
2044	//     },
2045	//     "postId": {
2046	//       "location": "path",
2047	//       "required": true,
2048	//       "type": "string"
2049	//     },
2050	//     "startDate": {
2051	//       "location": "query",
2052	//       "type": "string"
2053	//     }
2054	//   },
2055	//   "path": "v2/blogs/{blogId}/posts/{postId}/comments",
2056	//   "response": {
2057	//     "$ref": "CommentList"
2058	//   },
2059	//   "scopes": [
2060	//     "https://www.googleapis.com/auth/blogger"
2061	//   ]
2062	// }
2063
2064}
2065
2066// Pages invokes f for each page of results.
2067// A non-nil error returned from f will halt the iteration.
2068// The provided context supersedes any context provided to the Context method.
2069func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentList) error) error {
2070	c.ctx_ = ctx
2071	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2072	for {
2073		x, err := c.Do()
2074		if err != nil {
2075			return err
2076		}
2077		if err := f(x); err != nil {
2078			return err
2079		}
2080		if x.NextPageToken == "" {
2081			return nil
2082		}
2083		c.PageToken(x.NextPageToken)
2084	}
2085}
2086
2087// method id "blogger.pages.get":
2088
2089type PagesGetCall struct {
2090	s            *Service
2091	blogId       string
2092	pageId       string
2093	urlParams_   gensupport.URLParams
2094	ifNoneMatch_ string
2095	ctx_         context.Context
2096	header_      http.Header
2097}
2098
2099// Get: Gets a page by blog id and page id.
2100//
2101// - blogId: .
2102// - pageId: .
2103func (r *PagesService) Get(blogId string, pageId string) *PagesGetCall {
2104	c := &PagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2105	c.blogId = blogId
2106	c.pageId = pageId
2107	return c
2108}
2109
2110// Fields allows partial responses to be retrieved. See
2111// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2112// for more information.
2113func (c *PagesGetCall) Fields(s ...googleapi.Field) *PagesGetCall {
2114	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2115	return c
2116}
2117
2118// IfNoneMatch sets the optional parameter which makes the operation
2119// fail if the object's ETag matches the given value. This is useful for
2120// getting updates only after the object has changed since the last
2121// request. Use googleapi.IsNotModified to check whether the response
2122// error from Do is the result of In-None-Match.
2123func (c *PagesGetCall) IfNoneMatch(entityTag string) *PagesGetCall {
2124	c.ifNoneMatch_ = entityTag
2125	return c
2126}
2127
2128// Context sets the context to be used in this call's Do method. Any
2129// pending HTTP request will be aborted if the provided context is
2130// canceled.
2131func (c *PagesGetCall) Context(ctx context.Context) *PagesGetCall {
2132	c.ctx_ = ctx
2133	return c
2134}
2135
2136// Header returns an http.Header that can be modified by the caller to
2137// add HTTP headers to the request.
2138func (c *PagesGetCall) Header() http.Header {
2139	if c.header_ == nil {
2140		c.header_ = make(http.Header)
2141	}
2142	return c.header_
2143}
2144
2145func (c *PagesGetCall) doRequest(alt string) (*http.Response, error) {
2146	reqHeaders := make(http.Header)
2147	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2148	for k, v := range c.header_ {
2149		reqHeaders[k] = v
2150	}
2151	reqHeaders.Set("User-Agent", c.s.userAgent())
2152	if c.ifNoneMatch_ != "" {
2153		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2154	}
2155	var body io.Reader = nil
2156	c.urlParams_.Set("alt", alt)
2157	c.urlParams_.Set("prettyPrint", "false")
2158	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/pages/{pageId}")
2159	urls += "?" + c.urlParams_.Encode()
2160	req, err := http.NewRequest("GET", urls, body)
2161	if err != nil {
2162		return nil, err
2163	}
2164	req.Header = reqHeaders
2165	googleapi.Expand(req.URL, map[string]string{
2166		"blogId": c.blogId,
2167		"pageId": c.pageId,
2168	})
2169	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2170}
2171
2172// Do executes the "blogger.pages.get" call.
2173// Exactly one of *Page or error will be non-nil. Any non-2xx status
2174// code is an error. Response headers are in either
2175// *Page.ServerResponse.Header or (if a response was returned at all) in
2176// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2177// whether the returned error was because http.StatusNotModified was
2178// returned.
2179func (c *PagesGetCall) Do(opts ...googleapi.CallOption) (*Page, error) {
2180	gensupport.SetOptions(c.urlParams_, opts...)
2181	res, err := c.doRequest("json")
2182	if res != nil && res.StatusCode == http.StatusNotModified {
2183		if res.Body != nil {
2184			res.Body.Close()
2185		}
2186		return nil, &googleapi.Error{
2187			Code:   res.StatusCode,
2188			Header: res.Header,
2189		}
2190	}
2191	if err != nil {
2192		return nil, err
2193	}
2194	defer googleapi.CloseBody(res)
2195	if err := googleapi.CheckResponse(res); err != nil {
2196		return nil, err
2197	}
2198	ret := &Page{
2199		ServerResponse: googleapi.ServerResponse{
2200			Header:         res.Header,
2201			HTTPStatusCode: res.StatusCode,
2202		},
2203	}
2204	target := &ret
2205	if err := gensupport.DecodeResponse(target, res); err != nil {
2206		return nil, err
2207	}
2208	return ret, nil
2209	// {
2210	//   "description": "Gets a page by blog id and page id.",
2211	//   "flatPath": "v2/blogs/{blogId}/pages/{pageId}",
2212	//   "httpMethod": "GET",
2213	//   "id": "blogger.pages.get",
2214	//   "parameterOrder": [
2215	//     "blogId",
2216	//     "pageId"
2217	//   ],
2218	//   "parameters": {
2219	//     "blogId": {
2220	//       "location": "path",
2221	//       "required": true,
2222	//       "type": "string"
2223	//     },
2224	//     "pageId": {
2225	//       "location": "path",
2226	//       "required": true,
2227	//       "type": "string"
2228	//     }
2229	//   },
2230	//   "path": "v2/blogs/{blogId}/pages/{pageId}",
2231	//   "response": {
2232	//     "$ref": "Page"
2233	//   },
2234	//   "scopes": [
2235	//     "https://www.googleapis.com/auth/blogger"
2236	//   ]
2237	// }
2238
2239}
2240
2241// method id "blogger.pages.list":
2242
2243type PagesListCall struct {
2244	s            *Service
2245	blogId       string
2246	urlParams_   gensupport.URLParams
2247	ifNoneMatch_ string
2248	ctx_         context.Context
2249	header_      http.Header
2250}
2251
2252// List: Lists pages.
2253//
2254// - blogId: .
2255func (r *PagesService) List(blogId string) *PagesListCall {
2256	c := &PagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2257	c.blogId = blogId
2258	return c
2259}
2260
2261// FetchBodies sets the optional parameter "fetchBodies":
2262func (c *PagesListCall) FetchBodies(fetchBodies bool) *PagesListCall {
2263	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
2264	return c
2265}
2266
2267// Fields allows partial responses to be retrieved. See
2268// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2269// for more information.
2270func (c *PagesListCall) Fields(s ...googleapi.Field) *PagesListCall {
2271	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2272	return c
2273}
2274
2275// IfNoneMatch sets the optional parameter which makes the operation
2276// fail if the object's ETag matches the given value. This is useful for
2277// getting updates only after the object has changed since the last
2278// request. Use googleapi.IsNotModified to check whether the response
2279// error from Do is the result of In-None-Match.
2280func (c *PagesListCall) IfNoneMatch(entityTag string) *PagesListCall {
2281	c.ifNoneMatch_ = entityTag
2282	return c
2283}
2284
2285// Context sets the context to be used in this call's Do method. Any
2286// pending HTTP request will be aborted if the provided context is
2287// canceled.
2288func (c *PagesListCall) Context(ctx context.Context) *PagesListCall {
2289	c.ctx_ = ctx
2290	return c
2291}
2292
2293// Header returns an http.Header that can be modified by the caller to
2294// add HTTP headers to the request.
2295func (c *PagesListCall) Header() http.Header {
2296	if c.header_ == nil {
2297		c.header_ = make(http.Header)
2298	}
2299	return c.header_
2300}
2301
2302func (c *PagesListCall) doRequest(alt string) (*http.Response, error) {
2303	reqHeaders := make(http.Header)
2304	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2305	for k, v := range c.header_ {
2306		reqHeaders[k] = v
2307	}
2308	reqHeaders.Set("User-Agent", c.s.userAgent())
2309	if c.ifNoneMatch_ != "" {
2310		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2311	}
2312	var body io.Reader = nil
2313	c.urlParams_.Set("alt", alt)
2314	c.urlParams_.Set("prettyPrint", "false")
2315	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/pages")
2316	urls += "?" + c.urlParams_.Encode()
2317	req, err := http.NewRequest("GET", urls, body)
2318	if err != nil {
2319		return nil, err
2320	}
2321	req.Header = reqHeaders
2322	googleapi.Expand(req.URL, map[string]string{
2323		"blogId": c.blogId,
2324	})
2325	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2326}
2327
2328// Do executes the "blogger.pages.list" call.
2329// Exactly one of *PageList or error will be non-nil. Any non-2xx status
2330// code is an error. Response headers are in either
2331// *PageList.ServerResponse.Header or (if a response was returned at
2332// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2333// to check whether the returned error was because
2334// http.StatusNotModified was returned.
2335func (c *PagesListCall) Do(opts ...googleapi.CallOption) (*PageList, 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 := &PageList{
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 pages.",
2367	//   "flatPath": "v2/blogs/{blogId}/pages",
2368	//   "httpMethod": "GET",
2369	//   "id": "blogger.pages.list",
2370	//   "parameterOrder": [
2371	//     "blogId"
2372	//   ],
2373	//   "parameters": {
2374	//     "blogId": {
2375	//       "location": "path",
2376	//       "required": true,
2377	//       "type": "string"
2378	//     },
2379	//     "fetchBodies": {
2380	//       "location": "query",
2381	//       "type": "boolean"
2382	//     }
2383	//   },
2384	//   "path": "v2/blogs/{blogId}/pages",
2385	//   "response": {
2386	//     "$ref": "PageList"
2387	//   },
2388	//   "scopes": [
2389	//     "https://www.googleapis.com/auth/blogger"
2390	//   ]
2391	// }
2392
2393}
2394
2395// method id "blogger.posts.get":
2396
2397type PostsGetCall struct {
2398	s            *Service
2399	blogId       string
2400	postId       string
2401	urlParams_   gensupport.URLParams
2402	ifNoneMatch_ string
2403	ctx_         context.Context
2404	header_      http.Header
2405}
2406
2407// Get: Gets a post by blog id and post id
2408//
2409// - blogId: .
2410// - postId: .
2411func (r *PostsService) Get(blogId string, postId string) *PostsGetCall {
2412	c := &PostsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2413	c.blogId = blogId
2414	c.postId = postId
2415	return c
2416}
2417
2418// Fields allows partial responses to be retrieved. See
2419// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2420// for more information.
2421func (c *PostsGetCall) Fields(s ...googleapi.Field) *PostsGetCall {
2422	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2423	return c
2424}
2425
2426// IfNoneMatch sets the optional parameter which makes the operation
2427// fail if the object's ETag matches the given value. This is useful for
2428// getting updates only after the object has changed since the last
2429// request. Use googleapi.IsNotModified to check whether the response
2430// error from Do is the result of In-None-Match.
2431func (c *PostsGetCall) IfNoneMatch(entityTag string) *PostsGetCall {
2432	c.ifNoneMatch_ = entityTag
2433	return c
2434}
2435
2436// Context sets the context to be used in this call's Do method. Any
2437// pending HTTP request will be aborted if the provided context is
2438// canceled.
2439func (c *PostsGetCall) Context(ctx context.Context) *PostsGetCall {
2440	c.ctx_ = ctx
2441	return c
2442}
2443
2444// Header returns an http.Header that can be modified by the caller to
2445// add HTTP headers to the request.
2446func (c *PostsGetCall) Header() http.Header {
2447	if c.header_ == nil {
2448		c.header_ = make(http.Header)
2449	}
2450	return c.header_
2451}
2452
2453func (c *PostsGetCall) doRequest(alt string) (*http.Response, error) {
2454	reqHeaders := make(http.Header)
2455	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2456	for k, v := range c.header_ {
2457		reqHeaders[k] = v
2458	}
2459	reqHeaders.Set("User-Agent", c.s.userAgent())
2460	if c.ifNoneMatch_ != "" {
2461		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2462	}
2463	var body io.Reader = nil
2464	c.urlParams_.Set("alt", alt)
2465	c.urlParams_.Set("prettyPrint", "false")
2466	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/posts/{postId}")
2467	urls += "?" + c.urlParams_.Encode()
2468	req, err := http.NewRequest("GET", urls, body)
2469	if err != nil {
2470		return nil, err
2471	}
2472	req.Header = reqHeaders
2473	googleapi.Expand(req.URL, map[string]string{
2474		"blogId": c.blogId,
2475		"postId": c.postId,
2476	})
2477	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2478}
2479
2480// Do executes the "blogger.posts.get" call.
2481// Exactly one of *Post or error will be non-nil. Any non-2xx status
2482// code is an error. Response headers are in either
2483// *Post.ServerResponse.Header or (if a response was returned at all) in
2484// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2485// whether the returned error was because http.StatusNotModified was
2486// returned.
2487func (c *PostsGetCall) Do(opts ...googleapi.CallOption) (*Post, error) {
2488	gensupport.SetOptions(c.urlParams_, opts...)
2489	res, err := c.doRequest("json")
2490	if res != nil && res.StatusCode == http.StatusNotModified {
2491		if res.Body != nil {
2492			res.Body.Close()
2493		}
2494		return nil, &googleapi.Error{
2495			Code:   res.StatusCode,
2496			Header: res.Header,
2497		}
2498	}
2499	if err != nil {
2500		return nil, err
2501	}
2502	defer googleapi.CloseBody(res)
2503	if err := googleapi.CheckResponse(res); err != nil {
2504		return nil, err
2505	}
2506	ret := &Post{
2507		ServerResponse: googleapi.ServerResponse{
2508			Header:         res.Header,
2509			HTTPStatusCode: res.StatusCode,
2510		},
2511	}
2512	target := &ret
2513	if err := gensupport.DecodeResponse(target, res); err != nil {
2514		return nil, err
2515	}
2516	return ret, nil
2517	// {
2518	//   "description": "Gets a post by blog id and post id",
2519	//   "flatPath": "v2/blogs/{blogId}/posts/{postId}",
2520	//   "httpMethod": "GET",
2521	//   "id": "blogger.posts.get",
2522	//   "parameterOrder": [
2523	//     "blogId",
2524	//     "postId"
2525	//   ],
2526	//   "parameters": {
2527	//     "blogId": {
2528	//       "location": "path",
2529	//       "required": true,
2530	//       "type": "string"
2531	//     },
2532	//     "postId": {
2533	//       "location": "path",
2534	//       "required": true,
2535	//       "type": "string"
2536	//     }
2537	//   },
2538	//   "path": "v2/blogs/{blogId}/posts/{postId}",
2539	//   "response": {
2540	//     "$ref": "Post"
2541	//   },
2542	//   "scopes": [
2543	//     "https://www.googleapis.com/auth/blogger"
2544	//   ]
2545	// }
2546
2547}
2548
2549// method id "blogger.posts.list":
2550
2551type PostsListCall struct {
2552	s            *Service
2553	blogId       string
2554	urlParams_   gensupport.URLParams
2555	ifNoneMatch_ string
2556	ctx_         context.Context
2557	header_      http.Header
2558}
2559
2560// List: Lists posts.
2561//
2562// - blogId: .
2563func (r *PostsService) List(blogId string) *PostsListCall {
2564	c := &PostsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2565	c.blogId = blogId
2566	return c
2567}
2568
2569// FetchBodies sets the optional parameter "fetchBodies":
2570func (c *PostsListCall) FetchBodies(fetchBodies bool) *PostsListCall {
2571	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
2572	return c
2573}
2574
2575// MaxResults sets the optional parameter "maxResults":
2576func (c *PostsListCall) MaxResults(maxResults int64) *PostsListCall {
2577	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
2578	return c
2579}
2580
2581// PageToken sets the optional parameter "pageToken":
2582func (c *PostsListCall) PageToken(pageToken string) *PostsListCall {
2583	c.urlParams_.Set("pageToken", pageToken)
2584	return c
2585}
2586
2587// StartDate sets the optional parameter "startDate":
2588func (c *PostsListCall) StartDate(startDate string) *PostsListCall {
2589	c.urlParams_.Set("startDate", startDate)
2590	return c
2591}
2592
2593// Fields allows partial responses to be retrieved. See
2594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2595// for more information.
2596func (c *PostsListCall) Fields(s ...googleapi.Field) *PostsListCall {
2597	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2598	return c
2599}
2600
2601// IfNoneMatch sets the optional parameter which makes the operation
2602// fail if the object's ETag matches the given value. This is useful for
2603// getting updates only after the object has changed since the last
2604// request. Use googleapi.IsNotModified to check whether the response
2605// error from Do is the result of In-None-Match.
2606func (c *PostsListCall) IfNoneMatch(entityTag string) *PostsListCall {
2607	c.ifNoneMatch_ = entityTag
2608	return c
2609}
2610
2611// Context sets the context to be used in this call's Do method. Any
2612// pending HTTP request will be aborted if the provided context is
2613// canceled.
2614func (c *PostsListCall) Context(ctx context.Context) *PostsListCall {
2615	c.ctx_ = ctx
2616	return c
2617}
2618
2619// Header returns an http.Header that can be modified by the caller to
2620// add HTTP headers to the request.
2621func (c *PostsListCall) Header() http.Header {
2622	if c.header_ == nil {
2623		c.header_ = make(http.Header)
2624	}
2625	return c.header_
2626}
2627
2628func (c *PostsListCall) doRequest(alt string) (*http.Response, error) {
2629	reqHeaders := make(http.Header)
2630	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2631	for k, v := range c.header_ {
2632		reqHeaders[k] = v
2633	}
2634	reqHeaders.Set("User-Agent", c.s.userAgent())
2635	if c.ifNoneMatch_ != "" {
2636		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2637	}
2638	var body io.Reader = nil
2639	c.urlParams_.Set("alt", alt)
2640	c.urlParams_.Set("prettyPrint", "false")
2641	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/posts")
2642	urls += "?" + c.urlParams_.Encode()
2643	req, err := http.NewRequest("GET", urls, body)
2644	if err != nil {
2645		return nil, err
2646	}
2647	req.Header = reqHeaders
2648	googleapi.Expand(req.URL, map[string]string{
2649		"blogId": c.blogId,
2650	})
2651	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2652}
2653
2654// Do executes the "blogger.posts.list" call.
2655// Exactly one of *PostList or error will be non-nil. Any non-2xx status
2656// code is an error. Response headers are in either
2657// *PostList.ServerResponse.Header or (if a response was returned at
2658// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2659// to check whether the returned error was because
2660// http.StatusNotModified was returned.
2661func (c *PostsListCall) Do(opts ...googleapi.CallOption) (*PostList, error) {
2662	gensupport.SetOptions(c.urlParams_, opts...)
2663	res, err := c.doRequest("json")
2664	if res != nil && res.StatusCode == http.StatusNotModified {
2665		if res.Body != nil {
2666			res.Body.Close()
2667		}
2668		return nil, &googleapi.Error{
2669			Code:   res.StatusCode,
2670			Header: res.Header,
2671		}
2672	}
2673	if err != nil {
2674		return nil, err
2675	}
2676	defer googleapi.CloseBody(res)
2677	if err := googleapi.CheckResponse(res); err != nil {
2678		return nil, err
2679	}
2680	ret := &PostList{
2681		ServerResponse: googleapi.ServerResponse{
2682			Header:         res.Header,
2683			HTTPStatusCode: res.StatusCode,
2684		},
2685	}
2686	target := &ret
2687	if err := gensupport.DecodeResponse(target, res); err != nil {
2688		return nil, err
2689	}
2690	return ret, nil
2691	// {
2692	//   "description": "Lists posts.",
2693	//   "flatPath": "v2/blogs/{blogId}/posts",
2694	//   "httpMethod": "GET",
2695	//   "id": "blogger.posts.list",
2696	//   "parameterOrder": [
2697	//     "blogId"
2698	//   ],
2699	//   "parameters": {
2700	//     "blogId": {
2701	//       "location": "path",
2702	//       "required": true,
2703	//       "type": "string"
2704	//     },
2705	//     "fetchBodies": {
2706	//       "location": "query",
2707	//       "type": "boolean"
2708	//     },
2709	//     "maxResults": {
2710	//       "format": "uint32",
2711	//       "location": "query",
2712	//       "type": "integer"
2713	//     },
2714	//     "pageToken": {
2715	//       "location": "query",
2716	//       "type": "string"
2717	//     },
2718	//     "startDate": {
2719	//       "location": "query",
2720	//       "type": "string"
2721	//     }
2722	//   },
2723	//   "path": "v2/blogs/{blogId}/posts",
2724	//   "response": {
2725	//     "$ref": "PostList"
2726	//   },
2727	//   "scopes": [
2728	//     "https://www.googleapis.com/auth/blogger"
2729	//   ]
2730	// }
2731
2732}
2733
2734// Pages invokes f for each page of results.
2735// A non-nil error returned from f will halt the iteration.
2736// The provided context supersedes any context provided to the Context method.
2737func (c *PostsListCall) Pages(ctx context.Context, f func(*PostList) error) error {
2738	c.ctx_ = ctx
2739	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2740	for {
2741		x, err := c.Do()
2742		if err != nil {
2743			return err
2744		}
2745		if err := f(x); err != nil {
2746			return err
2747		}
2748		if x.NextPageToken == "" {
2749			return nil
2750		}
2751		c.PageToken(x.NextPageToken)
2752	}
2753}
2754
2755// method id "blogger.users.get":
2756
2757type UsersGetCall struct {
2758	s            *Service
2759	userId       string
2760	urlParams_   gensupport.URLParams
2761	ifNoneMatch_ string
2762	ctx_         context.Context
2763	header_      http.Header
2764}
2765
2766// Get: Gets a user by user id.
2767//
2768// - userId: .
2769func (r *UsersService) Get(userId string) *UsersGetCall {
2770	c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2771	c.userId = userId
2772	return c
2773}
2774
2775// Fields allows partial responses to be retrieved. See
2776// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2777// for more information.
2778func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
2779	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2780	return c
2781}
2782
2783// IfNoneMatch sets the optional parameter which makes the operation
2784// fail if the object's ETag matches the given value. This is useful for
2785// getting updates only after the object has changed since the last
2786// request. Use googleapi.IsNotModified to check whether the response
2787// error from Do is the result of In-None-Match.
2788func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
2789	c.ifNoneMatch_ = entityTag
2790	return c
2791}
2792
2793// Context sets the context to be used in this call's Do method. Any
2794// pending HTTP request will be aborted if the provided context is
2795// canceled.
2796func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
2797	c.ctx_ = ctx
2798	return c
2799}
2800
2801// Header returns an http.Header that can be modified by the caller to
2802// add HTTP headers to the request.
2803func (c *UsersGetCall) Header() http.Header {
2804	if c.header_ == nil {
2805		c.header_ = make(http.Header)
2806	}
2807	return c.header_
2808}
2809
2810func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
2811	reqHeaders := make(http.Header)
2812	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2813	for k, v := range c.header_ {
2814		reqHeaders[k] = v
2815	}
2816	reqHeaders.Set("User-Agent", c.s.userAgent())
2817	if c.ifNoneMatch_ != "" {
2818		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2819	}
2820	var body io.Reader = nil
2821	c.urlParams_.Set("alt", alt)
2822	c.urlParams_.Set("prettyPrint", "false")
2823	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{userId}")
2824	urls += "?" + c.urlParams_.Encode()
2825	req, err := http.NewRequest("GET", urls, body)
2826	if err != nil {
2827		return nil, err
2828	}
2829	req.Header = reqHeaders
2830	googleapi.Expand(req.URL, map[string]string{
2831		"userId": c.userId,
2832	})
2833	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2834}
2835
2836// Do executes the "blogger.users.get" call.
2837// Exactly one of *User or error will be non-nil. Any non-2xx status
2838// code is an error. Response headers are in either
2839// *User.ServerResponse.Header or (if a response was returned at all) in
2840// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2841// whether the returned error was because http.StatusNotModified was
2842// returned.
2843func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
2844	gensupport.SetOptions(c.urlParams_, opts...)
2845	res, err := c.doRequest("json")
2846	if res != nil && res.StatusCode == http.StatusNotModified {
2847		if res.Body != nil {
2848			res.Body.Close()
2849		}
2850		return nil, &googleapi.Error{
2851			Code:   res.StatusCode,
2852			Header: res.Header,
2853		}
2854	}
2855	if err != nil {
2856		return nil, err
2857	}
2858	defer googleapi.CloseBody(res)
2859	if err := googleapi.CheckResponse(res); err != nil {
2860		return nil, err
2861	}
2862	ret := &User{
2863		ServerResponse: googleapi.ServerResponse{
2864			Header:         res.Header,
2865			HTTPStatusCode: res.StatusCode,
2866		},
2867	}
2868	target := &ret
2869	if err := gensupport.DecodeResponse(target, res); err != nil {
2870		return nil, err
2871	}
2872	return ret, nil
2873	// {
2874	//   "description": "Gets a user by user id.",
2875	//   "flatPath": "v2/users/{userId}",
2876	//   "httpMethod": "GET",
2877	//   "id": "blogger.users.get",
2878	//   "parameterOrder": [
2879	//     "userId"
2880	//   ],
2881	//   "parameters": {
2882	//     "userId": {
2883	//       "location": "path",
2884	//       "required": true,
2885	//       "type": "string"
2886	//     }
2887	//   },
2888	//   "path": "v2/users/{userId}",
2889	//   "response": {
2890	//     "$ref": "User"
2891	//   },
2892	//   "scopes": [
2893	//     "https://www.googleapis.com/auth/blogger"
2894	//   ]
2895	// }
2896
2897}
2898