...

Source file src/google.golang.org/api/blogger/v3/blogger-gen.go

Documentation: google.golang.org/api/blogger/v3

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package blogger provides access to the Blogger API.
     8  //
     9  // For product documentation, see: https://developers.google.com/blogger/docs/3.0/getting_started
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/blogger/v3"
    27  //	...
    28  //	ctx := context.Background()
    29  //	bloggerService, err := blogger.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	bloggerService, err := blogger.NewService(ctx, option.WithScopes(blogger.BloggerReadonlyScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	bloggerService, err := blogger.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	bloggerService, err := blogger.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package blogger // import "google.golang.org/api/blogger/v3"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "blogger:v3"
    95  const apiName = "blogger"
    96  const apiVersion = "v3"
    97  const basePath = "https://blogger.googleapis.com/"
    98  const basePathTemplate = "https://blogger.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://blogger.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// Manage your Blogger account
   104  	BloggerScope = "https://www.googleapis.com/auth/blogger"
   105  
   106  	// View your Blogger account
   107  	BloggerReadonlyScope = "https://www.googleapis.com/auth/blogger.readonly"
   108  )
   109  
   110  // NewService creates a new Service.
   111  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   112  	scopesOption := internaloption.WithDefaultScopes(
   113  		"https://www.googleapis.com/auth/blogger",
   114  		"https://www.googleapis.com/auth/blogger.readonly",
   115  	)
   116  	// NOTE: prepend, so we don't override user-specified scopes.
   117  	opts = append([]option.ClientOption{scopesOption}, opts...)
   118  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   119  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   120  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   121  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   122  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   123  	if err != nil {
   124  		return nil, err
   125  	}
   126  	s, err := New(client)
   127  	if err != nil {
   128  		return nil, err
   129  	}
   130  	if endpoint != "" {
   131  		s.BasePath = endpoint
   132  	}
   133  	return s, nil
   134  }
   135  
   136  // New creates a new Service. It uses the provided http.Client for requests.
   137  //
   138  // Deprecated: please use NewService instead.
   139  // To provide a custom HTTP client, use option.WithHTTPClient.
   140  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   141  func New(client *http.Client) (*Service, error) {
   142  	if client == nil {
   143  		return nil, errors.New("client is nil")
   144  	}
   145  	s := &Service{client: client, BasePath: basePath}
   146  	s.BlogUserInfos = NewBlogUserInfosService(s)
   147  	s.Blogs = NewBlogsService(s)
   148  	s.Comments = NewCommentsService(s)
   149  	s.PageViews = NewPageViewsService(s)
   150  	s.Pages = NewPagesService(s)
   151  	s.PostUserInfos = NewPostUserInfosService(s)
   152  	s.Posts = NewPostsService(s)
   153  	s.Users = NewUsersService(s)
   154  	return s, nil
   155  }
   156  
   157  type Service struct {
   158  	client    *http.Client
   159  	BasePath  string // API endpoint base URL
   160  	UserAgent string // optional additional User-Agent fragment
   161  
   162  	BlogUserInfos *BlogUserInfosService
   163  
   164  	Blogs *BlogsService
   165  
   166  	Comments *CommentsService
   167  
   168  	PageViews *PageViewsService
   169  
   170  	Pages *PagesService
   171  
   172  	PostUserInfos *PostUserInfosService
   173  
   174  	Posts *PostsService
   175  
   176  	Users *UsersService
   177  }
   178  
   179  func (s *Service) userAgent() string {
   180  	if s.UserAgent == "" {
   181  		return googleapi.UserAgent
   182  	}
   183  	return googleapi.UserAgent + " " + s.UserAgent
   184  }
   185  
   186  func NewBlogUserInfosService(s *Service) *BlogUserInfosService {
   187  	rs := &BlogUserInfosService{s: s}
   188  	return rs
   189  }
   190  
   191  type BlogUserInfosService struct {
   192  	s *Service
   193  }
   194  
   195  func NewBlogsService(s *Service) *BlogsService {
   196  	rs := &BlogsService{s: s}
   197  	return rs
   198  }
   199  
   200  type BlogsService struct {
   201  	s *Service
   202  }
   203  
   204  func NewCommentsService(s *Service) *CommentsService {
   205  	rs := &CommentsService{s: s}
   206  	return rs
   207  }
   208  
   209  type CommentsService struct {
   210  	s *Service
   211  }
   212  
   213  func NewPageViewsService(s *Service) *PageViewsService {
   214  	rs := &PageViewsService{s: s}
   215  	return rs
   216  }
   217  
   218  type PageViewsService struct {
   219  	s *Service
   220  }
   221  
   222  func NewPagesService(s *Service) *PagesService {
   223  	rs := &PagesService{s: s}
   224  	return rs
   225  }
   226  
   227  type PagesService struct {
   228  	s *Service
   229  }
   230  
   231  func NewPostUserInfosService(s *Service) *PostUserInfosService {
   232  	rs := &PostUserInfosService{s: s}
   233  	return rs
   234  }
   235  
   236  type PostUserInfosService struct {
   237  	s *Service
   238  }
   239  
   240  func NewPostsService(s *Service) *PostsService {
   241  	rs := &PostsService{s: s}
   242  	return rs
   243  }
   244  
   245  type PostsService struct {
   246  	s *Service
   247  }
   248  
   249  func NewUsersService(s *Service) *UsersService {
   250  	rs := &UsersService{s: s}
   251  	return rs
   252  }
   253  
   254  type UsersService struct {
   255  	s *Service
   256  }
   257  
   258  type Blog struct {
   259  	// CustomMetaData: The JSON custom meta-data for the Blog.
   260  	CustomMetaData string `json:"customMetaData,omitempty"`
   261  	// Description: The description of this blog. This is displayed underneath the
   262  	// title.
   263  	Description string `json:"description,omitempty"`
   264  	// Id: The identifier for this resource.
   265  	Id string `json:"id,omitempty"`
   266  	// Kind: The kind of this entry. Always blogger#blog.
   267  	Kind string `json:"kind,omitempty"`
   268  	// Locale: The locale this Blog is set to.
   269  	Locale *BlogLocale `json:"locale,omitempty"`
   270  	// Name: The name of this blog. This is displayed as the title.
   271  	Name string `json:"name,omitempty"`
   272  	// Pages: The container of pages in this blog.
   273  	Pages *BlogPages `json:"pages,omitempty"`
   274  	// Posts: The container of posts in this blog.
   275  	Posts *BlogPosts `json:"posts,omitempty"`
   276  	// Published: RFC 3339 date-time when this blog was published.
   277  	Published string `json:"published,omitempty"`
   278  	// SelfLink: The API REST URL to fetch this resource from.
   279  	SelfLink string `json:"selfLink,omitempty"`
   280  	// Status: The status of the blog.
   281  	//
   282  	// Possible values:
   283  	//   "LIVE"
   284  	//   "DELETED"
   285  	Status string `json:"status,omitempty"`
   286  	// Updated: RFC 3339 date-time when this blog was last updated.
   287  	Updated string `json:"updated,omitempty"`
   288  	// Url: The URL where this blog is published.
   289  	Url string `json:"url,omitempty"`
   290  
   291  	// ServerResponse contains the HTTP response code and headers from the server.
   292  	googleapi.ServerResponse `json:"-"`
   293  	// ForceSendFields is a list of field names (e.g. "CustomMetaData") to
   294  	// unconditionally include in API requests. By default, fields with empty or
   295  	// default values are omitted from API requests. See
   296  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   297  	// details.
   298  	ForceSendFields []string `json:"-"`
   299  	// NullFields is a list of field names (e.g. "CustomMetaData") to include in
   300  	// API requests with the JSON null value. By default, fields with empty values
   301  	// are omitted from API requests. See
   302  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   303  	NullFields []string `json:"-"`
   304  }
   305  
   306  func (s *Blog) MarshalJSON() ([]byte, error) {
   307  	type NoMethod Blog
   308  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   309  }
   310  
   311  // BlogLocale: The locale this Blog is set to.
   312  type BlogLocale struct {
   313  	// Country: The country this blog's locale is set to.
   314  	Country string `json:"country,omitempty"`
   315  	// Language: The language this blog is authored in.
   316  	Language string `json:"language,omitempty"`
   317  	// Variant: The language variant this blog is authored in.
   318  	Variant string `json:"variant,omitempty"`
   319  	// ForceSendFields is a list of field names (e.g. "Country") to unconditionally
   320  	// include in API requests. By default, fields with empty or default values are
   321  	// omitted from API requests. See
   322  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   323  	// details.
   324  	ForceSendFields []string `json:"-"`
   325  	// NullFields is a list of field names (e.g. "Country") to include in API
   326  	// requests with the JSON null value. By default, fields with empty values are
   327  	// omitted from API requests. See
   328  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   329  	NullFields []string `json:"-"`
   330  }
   331  
   332  func (s *BlogLocale) MarshalJSON() ([]byte, error) {
   333  	type NoMethod BlogLocale
   334  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   335  }
   336  
   337  // BlogPages: The container of pages in this blog.
   338  type BlogPages struct {
   339  	// SelfLink: The URL of the container for pages in this blog.
   340  	SelfLink string `json:"selfLink,omitempty"`
   341  	// TotalItems: The count of pages in this blog.
   342  	TotalItems int64 `json:"totalItems,omitempty"`
   343  	// ForceSendFields is a list of field names (e.g. "SelfLink") to
   344  	// unconditionally include in API requests. By default, fields with empty or
   345  	// default values are omitted from API requests. See
   346  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   347  	// details.
   348  	ForceSendFields []string `json:"-"`
   349  	// NullFields is a list of field names (e.g. "SelfLink") to include in API
   350  	// requests with the JSON null value. By default, fields with empty values are
   351  	// omitted from API requests. See
   352  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   353  	NullFields []string `json:"-"`
   354  }
   355  
   356  func (s *BlogPages) MarshalJSON() ([]byte, error) {
   357  	type NoMethod BlogPages
   358  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   359  }
   360  
   361  // BlogPosts: The container of posts in this blog.
   362  type BlogPosts struct {
   363  	// Items: The List of Posts for this Blog.
   364  	Items []*Post `json:"items,omitempty"`
   365  	// SelfLink: The URL of the container for posts in this blog.
   366  	SelfLink string `json:"selfLink,omitempty"`
   367  	// TotalItems: The count of posts in this blog.
   368  	TotalItems int64 `json:"totalItems,omitempty"`
   369  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
   370  	// include in API requests. By default, fields with empty or default values are
   371  	// omitted from API requests. See
   372  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   373  	// details.
   374  	ForceSendFields []string `json:"-"`
   375  	// NullFields is a list of field names (e.g. "Items") to include in API
   376  	// requests with the JSON null value. By default, fields with empty values are
   377  	// omitted from API requests. See
   378  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   379  	NullFields []string `json:"-"`
   380  }
   381  
   382  func (s *BlogPosts) MarshalJSON() ([]byte, error) {
   383  	type NoMethod BlogPosts
   384  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   385  }
   386  
   387  type BlogList struct {
   388  	// BlogUserInfos: Admin level list of blog per-user information.
   389  	BlogUserInfos []*BlogUserInfo `json:"blogUserInfos,omitempty"`
   390  	// Items: The list of Blogs this user has Authorship or Admin rights over.
   391  	Items []*Blog `json:"items,omitempty"`
   392  	// Kind: The kind of this entity. Always blogger#blogList.
   393  	Kind string `json:"kind,omitempty"`
   394  
   395  	// ServerResponse contains the HTTP response code and headers from the server.
   396  	googleapi.ServerResponse `json:"-"`
   397  	// ForceSendFields is a list of field names (e.g. "BlogUserInfos") to
   398  	// unconditionally include in API requests. By default, fields with empty or
   399  	// default values are omitted from API requests. See
   400  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   401  	// details.
   402  	ForceSendFields []string `json:"-"`
   403  	// NullFields is a list of field names (e.g. "BlogUserInfos") to include in API
   404  	// requests with the JSON null value. By default, fields with empty values are
   405  	// omitted from API requests. See
   406  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   407  	NullFields []string `json:"-"`
   408  }
   409  
   410  func (s *BlogList) MarshalJSON() ([]byte, error) {
   411  	type NoMethod BlogList
   412  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   413  }
   414  
   415  type BlogPerUserInfo struct {
   416  	// BlogId: ID of the Blog resource.
   417  	BlogId string `json:"blogId,omitempty"`
   418  	// HasAdminAccess: True if the user has Admin level access to the blog.
   419  	HasAdminAccess bool `json:"hasAdminAccess,omitempty"`
   420  	// Kind: The kind of this entity. Always blogger#blogPerUserInfo.
   421  	Kind string `json:"kind,omitempty"`
   422  	// PhotosAlbumKey: The Photo Album Key for the user when adding photos to the
   423  	// blog.
   424  	PhotosAlbumKey string `json:"photosAlbumKey,omitempty"`
   425  	// Role: Access permissions that the user has for the blog (ADMIN, AUTHOR, or
   426  	// READER).
   427  	//
   428  	// Possible values:
   429  	//   "VIEW_TYPE_UNSPECIFIED"
   430  	//   "READER"
   431  	//   "AUTHOR"
   432  	//   "ADMIN"
   433  	Role string `json:"role,omitempty"`
   434  	// UserId: ID of the User.
   435  	UserId string `json:"userId,omitempty"`
   436  	// ForceSendFields is a list of field names (e.g. "BlogId") to unconditionally
   437  	// include in API requests. By default, fields with empty or default values are
   438  	// omitted from API requests. See
   439  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   440  	// details.
   441  	ForceSendFields []string `json:"-"`
   442  	// NullFields is a list of field names (e.g. "BlogId") to include in API
   443  	// requests with the JSON null value. By default, fields with empty values are
   444  	// omitted from API requests. See
   445  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   446  	NullFields []string `json:"-"`
   447  }
   448  
   449  func (s *BlogPerUserInfo) MarshalJSON() ([]byte, error) {
   450  	type NoMethod BlogPerUserInfo
   451  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   452  }
   453  
   454  type BlogUserInfo struct {
   455  	// Blog: The Blog resource.
   456  	Blog *Blog `json:"blog,omitempty"`
   457  	// BlogUserInfo: Information about a User for the Blog.
   458  	BlogUserInfo *BlogPerUserInfo `json:"blog_user_info,omitempty"`
   459  	// Kind: The kind of this entity. Always blogger#blogUserInfo.
   460  	Kind string `json:"kind,omitempty"`
   461  
   462  	// ServerResponse contains the HTTP response code and headers from the server.
   463  	googleapi.ServerResponse `json:"-"`
   464  	// ForceSendFields is a list of field names (e.g. "Blog") to unconditionally
   465  	// include in API requests. By default, fields with empty or default values are
   466  	// omitted from API requests. See
   467  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   468  	// details.
   469  	ForceSendFields []string `json:"-"`
   470  	// NullFields is a list of field names (e.g. "Blog") to include in API requests
   471  	// with the JSON null value. By default, fields with empty values are omitted
   472  	// from API requests. See
   473  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   474  	NullFields []string `json:"-"`
   475  }
   476  
   477  func (s *BlogUserInfo) MarshalJSON() ([]byte, error) {
   478  	type NoMethod BlogUserInfo
   479  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   480  }
   481  
   482  type Comment struct {
   483  	// Author: The author of this Comment.
   484  	Author *CommentAuthor `json:"author,omitempty"`
   485  	// Blog: Data about the blog containing this comment.
   486  	Blog *CommentBlog `json:"blog,omitempty"`
   487  	// Content: The actual content of the comment. May include HTML markup.
   488  	Content string `json:"content,omitempty"`
   489  	// Id: The identifier for this resource.
   490  	Id string `json:"id,omitempty"`
   491  	// InReplyTo: Data about the comment this is in reply to.
   492  	InReplyTo *CommentInReplyTo `json:"inReplyTo,omitempty"`
   493  	// Kind: The kind of this entry. Always blogger#comment.
   494  	Kind string `json:"kind,omitempty"`
   495  	// Post: Data about the post containing this comment.
   496  	Post *CommentPost `json:"post,omitempty"`
   497  	// Published: RFC 3339 date-time when this comment was published.
   498  	Published string `json:"published,omitempty"`
   499  	// SelfLink: The API REST URL to fetch this resource from.
   500  	SelfLink string `json:"selfLink,omitempty"`
   501  	// Status: The status of the comment (only populated for admin users).
   502  	//
   503  	// Possible values:
   504  	//   "LIVE"
   505  	//   "EMPTIED"
   506  	//   "PENDING"
   507  	//   "SPAM"
   508  	Status string `json:"status,omitempty"`
   509  	// Updated: RFC 3339 date-time when this comment was last updated.
   510  	Updated string `json:"updated,omitempty"`
   511  
   512  	// ServerResponse contains the HTTP response code and headers from the server.
   513  	googleapi.ServerResponse `json:"-"`
   514  	// ForceSendFields is a list of field names (e.g. "Author") to unconditionally
   515  	// include in API requests. By default, fields with empty or default values are
   516  	// omitted from API requests. See
   517  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   518  	// details.
   519  	ForceSendFields []string `json:"-"`
   520  	// NullFields is a list of field names (e.g. "Author") to include in API
   521  	// requests with the JSON null value. By default, fields with empty values are
   522  	// omitted from API requests. See
   523  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   524  	NullFields []string `json:"-"`
   525  }
   526  
   527  func (s *Comment) MarshalJSON() ([]byte, error) {
   528  	type NoMethod Comment
   529  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   530  }
   531  
   532  // CommentAuthor: The author of this Comment.
   533  type CommentAuthor struct {
   534  	// DisplayName: The display name.
   535  	DisplayName string `json:"displayName,omitempty"`
   536  	// Id: The identifier of the creator.
   537  	Id string `json:"id,omitempty"`
   538  	// Image: The creator's avatar.
   539  	Image *CommentAuthorImage `json:"image,omitempty"`
   540  	// Url: The URL of the creator's Profile page.
   541  	Url string `json:"url,omitempty"`
   542  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   543  	// unconditionally include in API requests. By default, fields with empty or
   544  	// default values are omitted from API requests. See
   545  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   546  	// details.
   547  	ForceSendFields []string `json:"-"`
   548  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   549  	// requests with the JSON null value. By default, fields with empty values are
   550  	// omitted from API requests. See
   551  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   552  	NullFields []string `json:"-"`
   553  }
   554  
   555  func (s *CommentAuthor) MarshalJSON() ([]byte, error) {
   556  	type NoMethod CommentAuthor
   557  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   558  }
   559  
   560  // CommentAuthorImage: The creator's avatar.
   561  type CommentAuthorImage struct {
   562  	// Url: The creator's avatar URL.
   563  	Url string `json:"url,omitempty"`
   564  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
   565  	// include in API requests. By default, fields with empty or default values are
   566  	// omitted from API requests. See
   567  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   568  	// details.
   569  	ForceSendFields []string `json:"-"`
   570  	// NullFields is a list of field names (e.g. "Url") to include in API requests
   571  	// with the JSON null value. By default, fields with empty values are omitted
   572  	// from API requests. See
   573  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   574  	NullFields []string `json:"-"`
   575  }
   576  
   577  func (s *CommentAuthorImage) MarshalJSON() ([]byte, error) {
   578  	type NoMethod CommentAuthorImage
   579  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   580  }
   581  
   582  // CommentBlog: Data about the blog containing this comment.
   583  type CommentBlog struct {
   584  	// Id: The identifier of the blog containing this comment.
   585  	Id string `json:"id,omitempty"`
   586  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   587  	// include in API requests. By default, fields with empty or default values are
   588  	// omitted from API requests. See
   589  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   590  	// details.
   591  	ForceSendFields []string `json:"-"`
   592  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   593  	// with the JSON null value. By default, fields with empty values are omitted
   594  	// from API requests. See
   595  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   596  	NullFields []string `json:"-"`
   597  }
   598  
   599  func (s *CommentBlog) MarshalJSON() ([]byte, error) {
   600  	type NoMethod CommentBlog
   601  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   602  }
   603  
   604  // CommentInReplyTo: Data about the comment this is in reply to.
   605  type CommentInReplyTo struct {
   606  	// Id: The identified of the parent of this comment.
   607  	Id string `json:"id,omitempty"`
   608  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   609  	// include in API requests. By default, fields with empty or default values are
   610  	// omitted from API requests. See
   611  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   612  	// details.
   613  	ForceSendFields []string `json:"-"`
   614  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   615  	// with the JSON null value. By default, fields with empty values are omitted
   616  	// from API requests. See
   617  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   618  	NullFields []string `json:"-"`
   619  }
   620  
   621  func (s *CommentInReplyTo) MarshalJSON() ([]byte, error) {
   622  	type NoMethod CommentInReplyTo
   623  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   624  }
   625  
   626  // CommentPost: Data about the post containing this comment.
   627  type CommentPost struct {
   628  	// Id: The identifier of the post containing this comment.
   629  	Id string `json:"id,omitempty"`
   630  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   631  	// include in API requests. By default, fields with empty or default values are
   632  	// omitted from API requests. See
   633  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   634  	// details.
   635  	ForceSendFields []string `json:"-"`
   636  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   637  	// with the JSON null value. By default, fields with empty values are omitted
   638  	// from API requests. See
   639  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   640  	NullFields []string `json:"-"`
   641  }
   642  
   643  func (s *CommentPost) MarshalJSON() ([]byte, error) {
   644  	type NoMethod CommentPost
   645  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   646  }
   647  
   648  type CommentList struct {
   649  	// Etag: Etag of the response.
   650  	Etag string `json:"etag,omitempty"`
   651  	// Items: The List of Comments for a Post.
   652  	Items []*Comment `json:"items,omitempty"`
   653  	// Kind: The kind of this entry. Always blogger#commentList.
   654  	Kind string `json:"kind,omitempty"`
   655  	// NextPageToken: Pagination token to fetch the next page, if one exists.
   656  	NextPageToken string `json:"nextPageToken,omitempty"`
   657  	// PrevPageToken: Pagination token to fetch the previous page, if one exists.
   658  	PrevPageToken string `json:"prevPageToken,omitempty"`
   659  
   660  	// ServerResponse contains the HTTP response code and headers from the server.
   661  	googleapi.ServerResponse `json:"-"`
   662  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
   663  	// include in API requests. By default, fields with empty or default values are
   664  	// omitted from API requests. See
   665  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   666  	// details.
   667  	ForceSendFields []string `json:"-"`
   668  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
   669  	// with the JSON null value. By default, fields with empty values are omitted
   670  	// from API requests. See
   671  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   672  	NullFields []string `json:"-"`
   673  }
   674  
   675  func (s *CommentList) MarshalJSON() ([]byte, error) {
   676  	type NoMethod CommentList
   677  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   678  }
   679  
   680  type Page struct {
   681  	// Author: The author of this Page.
   682  	Author *PageAuthor `json:"author,omitempty"`
   683  	// Blog: Data about the blog containing this Page.
   684  	Blog *PageBlog `json:"blog,omitempty"`
   685  	// Content: The body content of this Page, in HTML.
   686  	Content string `json:"content,omitempty"`
   687  	// Etag: Etag of the resource.
   688  	Etag string `json:"etag,omitempty"`
   689  	// Id: The identifier for this resource.
   690  	Id string `json:"id,omitempty"`
   691  	// Kind: The kind of this entity. Always blogger#page.
   692  	Kind string `json:"kind,omitempty"`
   693  	// Published: RFC 3339 date-time when this Page was published.
   694  	Published string `json:"published,omitempty"`
   695  	// SelfLink: The API REST URL to fetch this resource from.
   696  	SelfLink string `json:"selfLink,omitempty"`
   697  	// Status: The status of the page for admin resources (either LIVE or DRAFT).
   698  	//
   699  	// Possible values:
   700  	//   "LIVE"
   701  	//   "DRAFT"
   702  	//   "SOFT_TRASHED"
   703  	Status string `json:"status,omitempty"`
   704  	// Title: The title of this entity. This is the name displayed in the Admin
   705  	// user interface.
   706  	Title string `json:"title,omitempty"`
   707  	// Trashed: RFC 3339 date-time when this Page was trashed.
   708  	Trashed string `json:"trashed,omitempty"`
   709  	// Updated: RFC 3339 date-time when this Page was last updated.
   710  	Updated string `json:"updated,omitempty"`
   711  	// Url: The URL that this Page is displayed at.
   712  	Url string `json:"url,omitempty"`
   713  
   714  	// ServerResponse contains the HTTP response code and headers from the server.
   715  	googleapi.ServerResponse `json:"-"`
   716  	// ForceSendFields is a list of field names (e.g. "Author") to unconditionally
   717  	// include in API requests. By default, fields with empty or default values are
   718  	// omitted from API requests. See
   719  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   720  	// details.
   721  	ForceSendFields []string `json:"-"`
   722  	// NullFields is a list of field names (e.g. "Author") to include in API
   723  	// requests with the JSON null value. By default, fields with empty values are
   724  	// omitted from API requests. See
   725  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   726  	NullFields []string `json:"-"`
   727  }
   728  
   729  func (s *Page) MarshalJSON() ([]byte, error) {
   730  	type NoMethod Page
   731  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   732  }
   733  
   734  // PageAuthor: The author of this Page.
   735  type PageAuthor struct {
   736  	// DisplayName: The display name.
   737  	DisplayName string `json:"displayName,omitempty"`
   738  	// Id: The identifier of the creator.
   739  	Id string `json:"id,omitempty"`
   740  	// Image: The creator's avatar.
   741  	Image *PageAuthorImage `json:"image,omitempty"`
   742  	// Url: The URL of the creator's Profile page.
   743  	Url string `json:"url,omitempty"`
   744  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   745  	// unconditionally include in API requests. By default, fields with empty or
   746  	// default values are omitted from API requests. See
   747  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   748  	// details.
   749  	ForceSendFields []string `json:"-"`
   750  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   751  	// requests with the JSON null value. By default, fields with empty values are
   752  	// omitted from API requests. See
   753  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   754  	NullFields []string `json:"-"`
   755  }
   756  
   757  func (s *PageAuthor) MarshalJSON() ([]byte, error) {
   758  	type NoMethod PageAuthor
   759  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   760  }
   761  
   762  // PageAuthorImage: The creator's avatar.
   763  type PageAuthorImage struct {
   764  	// Url: The creator's avatar URL.
   765  	Url string `json:"url,omitempty"`
   766  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
   767  	// include in API requests. By default, fields with empty or default values are
   768  	// omitted from API requests. See
   769  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   770  	// details.
   771  	ForceSendFields []string `json:"-"`
   772  	// NullFields is a list of field names (e.g. "Url") to include in API requests
   773  	// with the JSON null value. By default, fields with empty values are omitted
   774  	// from API requests. See
   775  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   776  	NullFields []string `json:"-"`
   777  }
   778  
   779  func (s *PageAuthorImage) MarshalJSON() ([]byte, error) {
   780  	type NoMethod PageAuthorImage
   781  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   782  }
   783  
   784  // PageBlog: Data about the blog containing this Page.
   785  type PageBlog struct {
   786  	// Id: The identifier of the blog containing this page.
   787  	Id string `json:"id,omitempty"`
   788  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   789  	// include in API requests. By default, fields with empty or default values are
   790  	// omitted from API requests. See
   791  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   792  	// details.
   793  	ForceSendFields []string `json:"-"`
   794  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   795  	// with the JSON null value. By default, fields with empty values are omitted
   796  	// from API requests. See
   797  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   798  	NullFields []string `json:"-"`
   799  }
   800  
   801  func (s *PageBlog) MarshalJSON() ([]byte, error) {
   802  	type NoMethod PageBlog
   803  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   804  }
   805  
   806  type PageList struct {
   807  	// Etag: Etag of the response.
   808  	Etag string `json:"etag,omitempty"`
   809  	// Items: The list of Pages for a Blog.
   810  	Items []*Page `json:"items,omitempty"`
   811  	// Kind: The kind of this entity. Always blogger#pageList.
   812  	Kind string `json:"kind,omitempty"`
   813  	// NextPageToken: Pagination token to fetch the next page, if one exists.
   814  	NextPageToken string `json:"nextPageToken,omitempty"`
   815  
   816  	// ServerResponse contains the HTTP response code and headers from the server.
   817  	googleapi.ServerResponse `json:"-"`
   818  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
   819  	// include in API requests. By default, fields with empty or default values are
   820  	// omitted from API requests. See
   821  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   822  	// details.
   823  	ForceSendFields []string `json:"-"`
   824  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
   825  	// with the JSON null value. By default, fields with empty values are omitted
   826  	// from API requests. See
   827  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   828  	NullFields []string `json:"-"`
   829  }
   830  
   831  func (s *PageList) MarshalJSON() ([]byte, error) {
   832  	type NoMethod PageList
   833  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   834  }
   835  
   836  type Pageviews struct {
   837  	// BlogId: Blog Id.
   838  	BlogId string `json:"blogId,omitempty"`
   839  	// Counts: The container of posts in this blog.
   840  	Counts []*PageviewsCounts `json:"counts,omitempty"`
   841  	// Kind: The kind of this entry. Always blogger#page_views.
   842  	Kind string `json:"kind,omitempty"`
   843  
   844  	// ServerResponse contains the HTTP response code and headers from the server.
   845  	googleapi.ServerResponse `json:"-"`
   846  	// ForceSendFields is a list of field names (e.g. "BlogId") to unconditionally
   847  	// include in API requests. By default, fields with empty or default values are
   848  	// omitted from API requests. See
   849  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   850  	// details.
   851  	ForceSendFields []string `json:"-"`
   852  	// NullFields is a list of field names (e.g. "BlogId") to include in API
   853  	// requests with the JSON null value. By default, fields with empty values are
   854  	// omitted from API requests. See
   855  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   856  	NullFields []string `json:"-"`
   857  }
   858  
   859  func (s *Pageviews) MarshalJSON() ([]byte, error) {
   860  	type NoMethod Pageviews
   861  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   862  }
   863  
   864  type PageviewsCounts struct {
   865  	// Count: Count of page views for the given time range.
   866  	Count int64 `json:"count,omitempty,string"`
   867  	// TimeRange: Time range the given count applies to.
   868  	//
   869  	// Possible values:
   870  	//   "ALL_TIME"
   871  	//   "THIRTY_DAYS"
   872  	//   "SEVEN_DAYS"
   873  	TimeRange string `json:"timeRange,omitempty"`
   874  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
   875  	// include in API requests. By default, fields with empty or default values are
   876  	// omitted from API requests. See
   877  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   878  	// details.
   879  	ForceSendFields []string `json:"-"`
   880  	// NullFields is a list of field names (e.g. "Count") to include in API
   881  	// requests with the JSON null value. By default, fields with empty values are
   882  	// omitted from API requests. See
   883  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   884  	NullFields []string `json:"-"`
   885  }
   886  
   887  func (s *PageviewsCounts) MarshalJSON() ([]byte, error) {
   888  	type NoMethod PageviewsCounts
   889  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   890  }
   891  
   892  type Post struct {
   893  	// Author: The author of this Post.
   894  	Author *PostAuthor `json:"author,omitempty"`
   895  	// Blog: Data about the blog containing this Post.
   896  	Blog *PostBlog `json:"blog,omitempty"`
   897  	// Content: The content of the Post. May contain HTML markup.
   898  	Content string `json:"content,omitempty"`
   899  	// CustomMetaData: The JSON meta-data for the Post.
   900  	CustomMetaData string `json:"customMetaData,omitempty"`
   901  	// Etag: Etag of the resource.
   902  	Etag string `json:"etag,omitempty"`
   903  	// Id: The identifier of this Post.
   904  	Id string `json:"id,omitempty"`
   905  	// Images: Display image for the Post.
   906  	Images []*PostImages `json:"images,omitempty"`
   907  	// Kind: The kind of this entity. Always blogger#post.
   908  	Kind string `json:"kind,omitempty"`
   909  	// Labels: The list of labels this Post was tagged with.
   910  	Labels []string `json:"labels,omitempty"`
   911  	// Location: The location for geotagged posts.
   912  	Location *PostLocation `json:"location,omitempty"`
   913  	// Published: RFC 3339 date-time when this Post was published.
   914  	Published string `json:"published,omitempty"`
   915  	// ReaderComments: Comment control and display setting for readers of this
   916  	// post.
   917  	//
   918  	// Possible values:
   919  	//   "ALLOW"
   920  	//   "DONT_ALLOW_SHOW_EXISTING"
   921  	//   "DONT_ALLOW_HIDE_EXISTING"
   922  	ReaderComments string `json:"readerComments,omitempty"`
   923  	// Replies: The container of comments on this Post.
   924  	Replies *PostReplies `json:"replies,omitempty"`
   925  	// SelfLink: The API REST URL to fetch this resource from.
   926  	SelfLink string `json:"selfLink,omitempty"`
   927  	// Status: Status of the post. Only set for admin-level requests.
   928  	//
   929  	// Possible values:
   930  	//   "LIVE"
   931  	//   "DRAFT"
   932  	//   "SCHEDULED"
   933  	//   "SOFT_TRASHED"
   934  	Status string `json:"status,omitempty"`
   935  	// Title: The title of the Post.
   936  	Title string `json:"title,omitempty"`
   937  	// TitleLink: The title link URL, similar to atom's related link.
   938  	TitleLink string `json:"titleLink,omitempty"`
   939  	// Trashed: RFC 3339 date-time when this Post was last trashed.
   940  	Trashed string `json:"trashed,omitempty"`
   941  	// Updated: RFC 3339 date-time when this Post was last updated.
   942  	Updated string `json:"updated,omitempty"`
   943  	// Url: The URL where this Post is displayed.
   944  	Url string `json:"url,omitempty"`
   945  
   946  	// ServerResponse contains the HTTP response code and headers from the server.
   947  	googleapi.ServerResponse `json:"-"`
   948  	// ForceSendFields is a list of field names (e.g. "Author") to unconditionally
   949  	// include in API requests. By default, fields with empty or default values are
   950  	// omitted from API requests. See
   951  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   952  	// details.
   953  	ForceSendFields []string `json:"-"`
   954  	// NullFields is a list of field names (e.g. "Author") to include in API
   955  	// requests with the JSON null value. By default, fields with empty values are
   956  	// omitted from API requests. See
   957  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   958  	NullFields []string `json:"-"`
   959  }
   960  
   961  func (s *Post) MarshalJSON() ([]byte, error) {
   962  	type NoMethod Post
   963  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   964  }
   965  
   966  // PostAuthor: The author of this Post.
   967  type PostAuthor struct {
   968  	// DisplayName: The display name.
   969  	DisplayName string `json:"displayName,omitempty"`
   970  	// Id: The identifier of the creator.
   971  	Id string `json:"id,omitempty"`
   972  	// Image: The creator's avatar.
   973  	Image *PostAuthorImage `json:"image,omitempty"`
   974  	// Url: The URL of the creator's Profile page.
   975  	Url string `json:"url,omitempty"`
   976  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   977  	// unconditionally include in API requests. By default, fields with empty or
   978  	// default values are omitted from API requests. See
   979  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   980  	// details.
   981  	ForceSendFields []string `json:"-"`
   982  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   983  	// requests with the JSON null value. By default, fields with empty values are
   984  	// omitted from API requests. See
   985  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   986  	NullFields []string `json:"-"`
   987  }
   988  
   989  func (s *PostAuthor) MarshalJSON() ([]byte, error) {
   990  	type NoMethod PostAuthor
   991  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   992  }
   993  
   994  // PostAuthorImage: The creator's avatar.
   995  type PostAuthorImage struct {
   996  	// Url: The creator's avatar URL.
   997  	Url string `json:"url,omitempty"`
   998  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
   999  	// include in API requests. By default, fields with empty or default values are
  1000  	// omitted from API requests. See
  1001  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1002  	// details.
  1003  	ForceSendFields []string `json:"-"`
  1004  	// NullFields is a list of field names (e.g. "Url") to include in API requests
  1005  	// with the JSON null value. By default, fields with empty values are omitted
  1006  	// from API requests. See
  1007  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1008  	NullFields []string `json:"-"`
  1009  }
  1010  
  1011  func (s *PostAuthorImage) MarshalJSON() ([]byte, error) {
  1012  	type NoMethod PostAuthorImage
  1013  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1014  }
  1015  
  1016  // PostBlog: Data about the blog containing this Post.
  1017  type PostBlog struct {
  1018  	// Id: The identifier of the Blog that contains this Post.
  1019  	Id string `json:"id,omitempty"`
  1020  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  1021  	// include in API requests. By default, fields with empty or default values are
  1022  	// omitted from API requests. See
  1023  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1024  	// details.
  1025  	ForceSendFields []string `json:"-"`
  1026  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  1027  	// with the JSON null value. By default, fields with empty values are omitted
  1028  	// from API requests. See
  1029  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1030  	NullFields []string `json:"-"`
  1031  }
  1032  
  1033  func (s *PostBlog) MarshalJSON() ([]byte, error) {
  1034  	type NoMethod PostBlog
  1035  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1036  }
  1037  
  1038  type PostImages struct {
  1039  	Url string `json:"url,omitempty"`
  1040  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
  1041  	// include in API requests. By default, fields with empty or default values are
  1042  	// omitted from API requests. See
  1043  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1044  	// details.
  1045  	ForceSendFields []string `json:"-"`
  1046  	// NullFields is a list of field names (e.g. "Url") to include in API requests
  1047  	// with the JSON null value. By default, fields with empty values are omitted
  1048  	// from API requests. See
  1049  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1050  	NullFields []string `json:"-"`
  1051  }
  1052  
  1053  func (s *PostImages) MarshalJSON() ([]byte, error) {
  1054  	type NoMethod PostImages
  1055  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1056  }
  1057  
  1058  // PostLocation: The location for geotagged posts.
  1059  type PostLocation struct {
  1060  	// Lat: Location's latitude.
  1061  	Lat float64 `json:"lat,omitempty"`
  1062  	// Lng: Location's longitude.
  1063  	Lng float64 `json:"lng,omitempty"`
  1064  	// Name: Location name.
  1065  	Name string `json:"name,omitempty"`
  1066  	// Span: Location's viewport span. Can be used when rendering a map preview.
  1067  	Span string `json:"span,omitempty"`
  1068  	// ForceSendFields is a list of field names (e.g. "Lat") to unconditionally
  1069  	// include in API requests. By default, fields with empty or default values are
  1070  	// omitted from API requests. See
  1071  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1072  	// details.
  1073  	ForceSendFields []string `json:"-"`
  1074  	// NullFields is a list of field names (e.g. "Lat") to include in API requests
  1075  	// with the JSON null value. By default, fields with empty values are omitted
  1076  	// from API requests. See
  1077  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1078  	NullFields []string `json:"-"`
  1079  }
  1080  
  1081  func (s *PostLocation) MarshalJSON() ([]byte, error) {
  1082  	type NoMethod PostLocation
  1083  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1084  }
  1085  
  1086  func (s *PostLocation) UnmarshalJSON(data []byte) error {
  1087  	type NoMethod PostLocation
  1088  	var s1 struct {
  1089  		Lat gensupport.JSONFloat64 `json:"lat"`
  1090  		Lng gensupport.JSONFloat64 `json:"lng"`
  1091  		*NoMethod
  1092  	}
  1093  	s1.NoMethod = (*NoMethod)(s)
  1094  	if err := json.Unmarshal(data, &s1); err != nil {
  1095  		return err
  1096  	}
  1097  	s.Lat = float64(s1.Lat)
  1098  	s.Lng = float64(s1.Lng)
  1099  	return nil
  1100  }
  1101  
  1102  // PostReplies: The container of comments on this Post.
  1103  type PostReplies struct {
  1104  	// Items: The List of Comments for this Post.
  1105  	Items []*Comment `json:"items,omitempty"`
  1106  	// SelfLink: The URL of the comments on this post.
  1107  	SelfLink string `json:"selfLink,omitempty"`
  1108  	// TotalItems: The count of comments on this post.
  1109  	TotalItems int64 `json:"totalItems,omitempty,string"`
  1110  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1111  	// include in API requests. By default, fields with empty or default values are
  1112  	// omitted from API requests. See
  1113  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1114  	// details.
  1115  	ForceSendFields []string `json:"-"`
  1116  	// NullFields is a list of field names (e.g. "Items") to include in API
  1117  	// requests with the JSON null value. By default, fields with empty values are
  1118  	// omitted from API requests. See
  1119  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1120  	NullFields []string `json:"-"`
  1121  }
  1122  
  1123  func (s *PostReplies) MarshalJSON() ([]byte, error) {
  1124  	type NoMethod PostReplies
  1125  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1126  }
  1127  
  1128  type PostList struct {
  1129  	// Etag: Etag of the response.
  1130  	Etag string `json:"etag,omitempty"`
  1131  	// Items: The list of Posts for this Blog.
  1132  	Items []*Post `json:"items,omitempty"`
  1133  	// Kind: The kind of this entity. Always blogger#postList.
  1134  	Kind string `json:"kind,omitempty"`
  1135  	// NextPageToken: Pagination token to fetch the next page, if one exists.
  1136  	NextPageToken string `json:"nextPageToken,omitempty"`
  1137  	// PrevPageToken: Pagination token to fetch the previous page, if one exists.
  1138  	PrevPageToken string `json:"prevPageToken,omitempty"`
  1139  
  1140  	// ServerResponse contains the HTTP response code and headers from the server.
  1141  	googleapi.ServerResponse `json:"-"`
  1142  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  1143  	// include in API requests. By default, fields with empty or default values are
  1144  	// omitted from API requests. See
  1145  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1146  	// details.
  1147  	ForceSendFields []string `json:"-"`
  1148  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  1149  	// with the JSON null value. By default, fields with empty values are omitted
  1150  	// from API requests. See
  1151  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1152  	NullFields []string `json:"-"`
  1153  }
  1154  
  1155  func (s *PostList) MarshalJSON() ([]byte, error) {
  1156  	type NoMethod PostList
  1157  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1158  }
  1159  
  1160  type PostPerUserInfo struct {
  1161  	// BlogId: ID of the Blog that the post resource belongs to.
  1162  	BlogId string `json:"blogId,omitempty"`
  1163  	// HasEditAccess: True if the user has Author level access to the post.
  1164  	HasEditAccess bool `json:"hasEditAccess,omitempty"`
  1165  	// Kind: The kind of this entity. Always blogger#postPerUserInfo.
  1166  	Kind string `json:"kind,omitempty"`
  1167  	// PostId: ID of the Post resource.
  1168  	PostId string `json:"postId,omitempty"`
  1169  	// UserId: ID of the User.
  1170  	UserId string `json:"userId,omitempty"`
  1171  	// ForceSendFields is a list of field names (e.g. "BlogId") to unconditionally
  1172  	// include in API requests. By default, fields with empty or default values are
  1173  	// omitted from API requests. See
  1174  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1175  	// details.
  1176  	ForceSendFields []string `json:"-"`
  1177  	// NullFields is a list of field names (e.g. "BlogId") to include in API
  1178  	// requests with the JSON null value. By default, fields with empty values are
  1179  	// omitted from API requests. See
  1180  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1181  	NullFields []string `json:"-"`
  1182  }
  1183  
  1184  func (s *PostPerUserInfo) MarshalJSON() ([]byte, error) {
  1185  	type NoMethod PostPerUserInfo
  1186  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1187  }
  1188  
  1189  type PostUserInfo struct {
  1190  	// Kind: The kind of this entity. Always blogger#postUserInfo.
  1191  	Kind string `json:"kind,omitempty"`
  1192  	// Post: The Post resource.
  1193  	Post *Post `json:"post,omitempty"`
  1194  	// PostUserInfo: Information about a User for the Post.
  1195  	PostUserInfo *PostPerUserInfo `json:"post_user_info,omitempty"`
  1196  
  1197  	// ServerResponse contains the HTTP response code and headers from the server.
  1198  	googleapi.ServerResponse `json:"-"`
  1199  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  1200  	// include in API requests. By default, fields with empty or default values are
  1201  	// omitted from API requests. See
  1202  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1203  	// details.
  1204  	ForceSendFields []string `json:"-"`
  1205  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  1206  	// with the JSON null value. By default, fields with empty values are omitted
  1207  	// from API requests. See
  1208  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1209  	NullFields []string `json:"-"`
  1210  }
  1211  
  1212  func (s *PostUserInfo) MarshalJSON() ([]byte, error) {
  1213  	type NoMethod PostUserInfo
  1214  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1215  }
  1216  
  1217  type PostUserInfosList struct {
  1218  	// Items: The list of Posts with User information for the post, for this Blog.
  1219  	Items []*PostUserInfo `json:"items,omitempty"`
  1220  	// Kind: The kind of this entity. Always blogger#postList.
  1221  	Kind string `json:"kind,omitempty"`
  1222  	// NextPageToken: Pagination token to fetch the next page, if one exists.
  1223  	NextPageToken string `json:"nextPageToken,omitempty"`
  1224  
  1225  	// ServerResponse contains the HTTP response code and headers from the server.
  1226  	googleapi.ServerResponse `json:"-"`
  1227  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1228  	// include in API requests. By default, fields with empty or default values are
  1229  	// omitted from API requests. See
  1230  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1231  	// details.
  1232  	ForceSendFields []string `json:"-"`
  1233  	// NullFields is a list of field names (e.g. "Items") to include in API
  1234  	// requests with the JSON null value. By default, fields with empty values are
  1235  	// omitted from API requests. See
  1236  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1237  	NullFields []string `json:"-"`
  1238  }
  1239  
  1240  func (s *PostUserInfosList) MarshalJSON() ([]byte, error) {
  1241  	type NoMethod PostUserInfosList
  1242  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1243  }
  1244  
  1245  type User struct {
  1246  	// About: Profile summary information.
  1247  	About string `json:"about,omitempty"`
  1248  	// Blogs: The container of blogs for this user.
  1249  	Blogs *UserBlogs `json:"blogs,omitempty"`
  1250  	// Created: The timestamp of when this profile was created, in seconds since
  1251  	// epoch.
  1252  	Created string `json:"created,omitempty"`
  1253  	// DisplayName: The display name.
  1254  	DisplayName string `json:"displayName,omitempty"`
  1255  	// Id: The identifier for this User.
  1256  	Id string `json:"id,omitempty"`
  1257  	// Kind: The kind of this entity. Always blogger#user.
  1258  	Kind string `json:"kind,omitempty"`
  1259  	// Locale: This user's locale
  1260  	Locale *UserLocale `json:"locale,omitempty"`
  1261  	// SelfLink: The API REST URL to fetch this resource from.
  1262  	SelfLink string `json:"selfLink,omitempty"`
  1263  	// Url: The user's profile page.
  1264  	Url string `json:"url,omitempty"`
  1265  
  1266  	// ServerResponse contains the HTTP response code and headers from the server.
  1267  	googleapi.ServerResponse `json:"-"`
  1268  	// ForceSendFields is a list of field names (e.g. "About") to unconditionally
  1269  	// include in API requests. By default, fields with empty or default values are
  1270  	// omitted from API requests. See
  1271  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1272  	// details.
  1273  	ForceSendFields []string `json:"-"`
  1274  	// NullFields is a list of field names (e.g. "About") to include in API
  1275  	// requests with the JSON null value. By default, fields with empty values are
  1276  	// omitted from API requests. See
  1277  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1278  	NullFields []string `json:"-"`
  1279  }
  1280  
  1281  func (s *User) MarshalJSON() ([]byte, error) {
  1282  	type NoMethod User
  1283  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1284  }
  1285  
  1286  // UserBlogs: The container of blogs for this user.
  1287  type UserBlogs struct {
  1288  	// SelfLink: The URL of the Blogs for this user.
  1289  	SelfLink string `json:"selfLink,omitempty"`
  1290  	// ForceSendFields is a list of field names (e.g. "SelfLink") to
  1291  	// unconditionally include in API requests. By default, fields with empty or
  1292  	// default values are omitted from API requests. See
  1293  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1294  	// details.
  1295  	ForceSendFields []string `json:"-"`
  1296  	// NullFields is a list of field names (e.g. "SelfLink") to include in API
  1297  	// requests with the JSON null value. By default, fields with empty values are
  1298  	// omitted from API requests. See
  1299  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1300  	NullFields []string `json:"-"`
  1301  }
  1302  
  1303  func (s *UserBlogs) MarshalJSON() ([]byte, error) {
  1304  	type NoMethod UserBlogs
  1305  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1306  }
  1307  
  1308  // UserLocale: This user's locale
  1309  type UserLocale struct {
  1310  	// Country: The country this blog's locale is set to.
  1311  	Country string `json:"country,omitempty"`
  1312  	// Language: The language this blog is authored in.
  1313  	Language string `json:"language,omitempty"`
  1314  	// Variant: The language variant this blog is authored in.
  1315  	Variant string `json:"variant,omitempty"`
  1316  	// ForceSendFields is a list of field names (e.g. "Country") to unconditionally
  1317  	// include in API requests. By default, fields with empty or default values are
  1318  	// omitted from API requests. See
  1319  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1320  	// details.
  1321  	ForceSendFields []string `json:"-"`
  1322  	// NullFields is a list of field names (e.g. "Country") to include in API
  1323  	// requests with the JSON null value. By default, fields with empty values are
  1324  	// omitted from API requests. See
  1325  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1326  	NullFields []string `json:"-"`
  1327  }
  1328  
  1329  func (s *UserLocale) MarshalJSON() ([]byte, error) {
  1330  	type NoMethod UserLocale
  1331  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1332  }
  1333  
  1334  type BlogUserInfosGetCall struct {
  1335  	s            *Service
  1336  	userId       string
  1337  	blogId       string
  1338  	urlParams_   gensupport.URLParams
  1339  	ifNoneMatch_ string
  1340  	ctx_         context.Context
  1341  	header_      http.Header
  1342  }
  1343  
  1344  // Get: Gets one blog and user info pair by blog id and user id.
  1345  //
  1346  // - blogId: .
  1347  // - userId: .
  1348  func (r *BlogUserInfosService) Get(userId string, blogId string) *BlogUserInfosGetCall {
  1349  	c := &BlogUserInfosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1350  	c.userId = userId
  1351  	c.blogId = blogId
  1352  	return c
  1353  }
  1354  
  1355  // MaxPosts sets the optional parameter "maxPosts":
  1356  func (c *BlogUserInfosGetCall) MaxPosts(maxPosts int64) *BlogUserInfosGetCall {
  1357  	c.urlParams_.Set("maxPosts", fmt.Sprint(maxPosts))
  1358  	return c
  1359  }
  1360  
  1361  // Fields allows partial responses to be retrieved. See
  1362  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1363  // details.
  1364  func (c *BlogUserInfosGetCall) Fields(s ...googleapi.Field) *BlogUserInfosGetCall {
  1365  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1366  	return c
  1367  }
  1368  
  1369  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1370  // object's ETag matches the given value. This is useful for getting updates
  1371  // only after the object has changed since the last request.
  1372  func (c *BlogUserInfosGetCall) IfNoneMatch(entityTag string) *BlogUserInfosGetCall {
  1373  	c.ifNoneMatch_ = entityTag
  1374  	return c
  1375  }
  1376  
  1377  // Context sets the context to be used in this call's Do method.
  1378  func (c *BlogUserInfosGetCall) Context(ctx context.Context) *BlogUserInfosGetCall {
  1379  	c.ctx_ = ctx
  1380  	return c
  1381  }
  1382  
  1383  // Header returns a http.Header that can be modified by the caller to add
  1384  // headers to the request.
  1385  func (c *BlogUserInfosGetCall) Header() http.Header {
  1386  	if c.header_ == nil {
  1387  		c.header_ = make(http.Header)
  1388  	}
  1389  	return c.header_
  1390  }
  1391  
  1392  func (c *BlogUserInfosGetCall) doRequest(alt string) (*http.Response, error) {
  1393  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1394  	if c.ifNoneMatch_ != "" {
  1395  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1396  	}
  1397  	var body io.Reader = nil
  1398  	c.urlParams_.Set("alt", alt)
  1399  	c.urlParams_.Set("prettyPrint", "false")
  1400  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users/{userId}/blogs/{blogId}")
  1401  	urls += "?" + c.urlParams_.Encode()
  1402  	req, err := http.NewRequest("GET", urls, body)
  1403  	if err != nil {
  1404  		return nil, err
  1405  	}
  1406  	req.Header = reqHeaders
  1407  	googleapi.Expand(req.URL, map[string]string{
  1408  		"userId": c.userId,
  1409  		"blogId": c.blogId,
  1410  	})
  1411  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1412  }
  1413  
  1414  // Do executes the "blogger.blogUserInfos.get" call.
  1415  // Any non-2xx status code is an error. Response headers are in either
  1416  // *BlogUserInfo.ServerResponse.Header or (if a response was returned at all)
  1417  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1418  // whether the returned error was because http.StatusNotModified was returned.
  1419  func (c *BlogUserInfosGetCall) Do(opts ...googleapi.CallOption) (*BlogUserInfo, error) {
  1420  	gensupport.SetOptions(c.urlParams_, opts...)
  1421  	res, err := c.doRequest("json")
  1422  	if res != nil && res.StatusCode == http.StatusNotModified {
  1423  		if res.Body != nil {
  1424  			res.Body.Close()
  1425  		}
  1426  		return nil, gensupport.WrapError(&googleapi.Error{
  1427  			Code:   res.StatusCode,
  1428  			Header: res.Header,
  1429  		})
  1430  	}
  1431  	if err != nil {
  1432  		return nil, err
  1433  	}
  1434  	defer googleapi.CloseBody(res)
  1435  	if err := googleapi.CheckResponse(res); err != nil {
  1436  		return nil, gensupport.WrapError(err)
  1437  	}
  1438  	ret := &BlogUserInfo{
  1439  		ServerResponse: googleapi.ServerResponse{
  1440  			Header:         res.Header,
  1441  			HTTPStatusCode: res.StatusCode,
  1442  		},
  1443  	}
  1444  	target := &ret
  1445  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1446  		return nil, err
  1447  	}
  1448  	return ret, nil
  1449  }
  1450  
  1451  type BlogsGetCall struct {
  1452  	s            *Service
  1453  	blogId       string
  1454  	urlParams_   gensupport.URLParams
  1455  	ifNoneMatch_ string
  1456  	ctx_         context.Context
  1457  	header_      http.Header
  1458  }
  1459  
  1460  // Get: Gets a blog by id.
  1461  //
  1462  // - blogId: .
  1463  func (r *BlogsService) Get(blogId string) *BlogsGetCall {
  1464  	c := &BlogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1465  	c.blogId = blogId
  1466  	return c
  1467  }
  1468  
  1469  // MaxPosts sets the optional parameter "maxPosts":
  1470  func (c *BlogsGetCall) MaxPosts(maxPosts int64) *BlogsGetCall {
  1471  	c.urlParams_.Set("maxPosts", fmt.Sprint(maxPosts))
  1472  	return c
  1473  }
  1474  
  1475  // View sets the optional parameter "view":
  1476  //
  1477  // Possible values:
  1478  //
  1479  //	"VIEW_TYPE_UNSPECIFIED"
  1480  //	"READER"
  1481  //	"AUTHOR"
  1482  //	"ADMIN"
  1483  func (c *BlogsGetCall) View(view string) *BlogsGetCall {
  1484  	c.urlParams_.Set("view", view)
  1485  	return c
  1486  }
  1487  
  1488  // Fields allows partial responses to be retrieved. See
  1489  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1490  // details.
  1491  func (c *BlogsGetCall) Fields(s ...googleapi.Field) *BlogsGetCall {
  1492  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1493  	return c
  1494  }
  1495  
  1496  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1497  // object's ETag matches the given value. This is useful for getting updates
  1498  // only after the object has changed since the last request.
  1499  func (c *BlogsGetCall) IfNoneMatch(entityTag string) *BlogsGetCall {
  1500  	c.ifNoneMatch_ = entityTag
  1501  	return c
  1502  }
  1503  
  1504  // Context sets the context to be used in this call's Do method.
  1505  func (c *BlogsGetCall) Context(ctx context.Context) *BlogsGetCall {
  1506  	c.ctx_ = ctx
  1507  	return c
  1508  }
  1509  
  1510  // Header returns a http.Header that can be modified by the caller to add
  1511  // headers to the request.
  1512  func (c *BlogsGetCall) Header() http.Header {
  1513  	if c.header_ == nil {
  1514  		c.header_ = make(http.Header)
  1515  	}
  1516  	return c.header_
  1517  }
  1518  
  1519  func (c *BlogsGetCall) doRequest(alt string) (*http.Response, error) {
  1520  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1521  	if c.ifNoneMatch_ != "" {
  1522  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1523  	}
  1524  	var body io.Reader = nil
  1525  	c.urlParams_.Set("alt", alt)
  1526  	c.urlParams_.Set("prettyPrint", "false")
  1527  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}")
  1528  	urls += "?" + c.urlParams_.Encode()
  1529  	req, err := http.NewRequest("GET", urls, body)
  1530  	if err != nil {
  1531  		return nil, err
  1532  	}
  1533  	req.Header = reqHeaders
  1534  	googleapi.Expand(req.URL, map[string]string{
  1535  		"blogId": c.blogId,
  1536  	})
  1537  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1538  }
  1539  
  1540  // Do executes the "blogger.blogs.get" call.
  1541  // Any non-2xx status code is an error. Response headers are in either
  1542  // *Blog.ServerResponse.Header or (if a response was returned at all) in
  1543  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1544  // whether the returned error was because http.StatusNotModified was returned.
  1545  func (c *BlogsGetCall) Do(opts ...googleapi.CallOption) (*Blog, error) {
  1546  	gensupport.SetOptions(c.urlParams_, opts...)
  1547  	res, err := c.doRequest("json")
  1548  	if res != nil && res.StatusCode == http.StatusNotModified {
  1549  		if res.Body != nil {
  1550  			res.Body.Close()
  1551  		}
  1552  		return nil, gensupport.WrapError(&googleapi.Error{
  1553  			Code:   res.StatusCode,
  1554  			Header: res.Header,
  1555  		})
  1556  	}
  1557  	if err != nil {
  1558  		return nil, err
  1559  	}
  1560  	defer googleapi.CloseBody(res)
  1561  	if err := googleapi.CheckResponse(res); err != nil {
  1562  		return nil, gensupport.WrapError(err)
  1563  	}
  1564  	ret := &Blog{
  1565  		ServerResponse: googleapi.ServerResponse{
  1566  			Header:         res.Header,
  1567  			HTTPStatusCode: res.StatusCode,
  1568  		},
  1569  	}
  1570  	target := &ret
  1571  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1572  		return nil, err
  1573  	}
  1574  	return ret, nil
  1575  }
  1576  
  1577  type BlogsGetByUrlCall struct {
  1578  	s            *Service
  1579  	urlParams_   gensupport.URLParams
  1580  	ifNoneMatch_ string
  1581  	ctx_         context.Context
  1582  	header_      http.Header
  1583  }
  1584  
  1585  // GetByUrl: Gets a blog by url.
  1586  //
  1587  // - url: .
  1588  func (r *BlogsService) GetByUrl(url string) *BlogsGetByUrlCall {
  1589  	c := &BlogsGetByUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1590  	c.urlParams_.Set("url", url)
  1591  	return c
  1592  }
  1593  
  1594  // View sets the optional parameter "view":
  1595  //
  1596  // Possible values:
  1597  //
  1598  //	"VIEW_TYPE_UNSPECIFIED"
  1599  //	"READER"
  1600  //	"AUTHOR"
  1601  //	"ADMIN"
  1602  func (c *BlogsGetByUrlCall) View(view string) *BlogsGetByUrlCall {
  1603  	c.urlParams_.Set("view", view)
  1604  	return c
  1605  }
  1606  
  1607  // Fields allows partial responses to be retrieved. See
  1608  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1609  // details.
  1610  func (c *BlogsGetByUrlCall) Fields(s ...googleapi.Field) *BlogsGetByUrlCall {
  1611  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1612  	return c
  1613  }
  1614  
  1615  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1616  // object's ETag matches the given value. This is useful for getting updates
  1617  // only after the object has changed since the last request.
  1618  func (c *BlogsGetByUrlCall) IfNoneMatch(entityTag string) *BlogsGetByUrlCall {
  1619  	c.ifNoneMatch_ = entityTag
  1620  	return c
  1621  }
  1622  
  1623  // Context sets the context to be used in this call's Do method.
  1624  func (c *BlogsGetByUrlCall) Context(ctx context.Context) *BlogsGetByUrlCall {
  1625  	c.ctx_ = ctx
  1626  	return c
  1627  }
  1628  
  1629  // Header returns a http.Header that can be modified by the caller to add
  1630  // headers to the request.
  1631  func (c *BlogsGetByUrlCall) Header() http.Header {
  1632  	if c.header_ == nil {
  1633  		c.header_ = make(http.Header)
  1634  	}
  1635  	return c.header_
  1636  }
  1637  
  1638  func (c *BlogsGetByUrlCall) doRequest(alt string) (*http.Response, error) {
  1639  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1640  	if c.ifNoneMatch_ != "" {
  1641  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1642  	}
  1643  	var body io.Reader = nil
  1644  	c.urlParams_.Set("alt", alt)
  1645  	c.urlParams_.Set("prettyPrint", "false")
  1646  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/byurl")
  1647  	urls += "?" + c.urlParams_.Encode()
  1648  	req, err := http.NewRequest("GET", urls, body)
  1649  	if err != nil {
  1650  		return nil, err
  1651  	}
  1652  	req.Header = reqHeaders
  1653  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1654  }
  1655  
  1656  // Do executes the "blogger.blogs.getByUrl" call.
  1657  // Any non-2xx status code is an error. Response headers are in either
  1658  // *Blog.ServerResponse.Header or (if a response was returned at all) in
  1659  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1660  // whether the returned error was because http.StatusNotModified was returned.
  1661  func (c *BlogsGetByUrlCall) Do(opts ...googleapi.CallOption) (*Blog, error) {
  1662  	gensupport.SetOptions(c.urlParams_, opts...)
  1663  	res, err := c.doRequest("json")
  1664  	if res != nil && res.StatusCode == http.StatusNotModified {
  1665  		if res.Body != nil {
  1666  			res.Body.Close()
  1667  		}
  1668  		return nil, gensupport.WrapError(&googleapi.Error{
  1669  			Code:   res.StatusCode,
  1670  			Header: res.Header,
  1671  		})
  1672  	}
  1673  	if err != nil {
  1674  		return nil, err
  1675  	}
  1676  	defer googleapi.CloseBody(res)
  1677  	if err := googleapi.CheckResponse(res); err != nil {
  1678  		return nil, gensupport.WrapError(err)
  1679  	}
  1680  	ret := &Blog{
  1681  		ServerResponse: googleapi.ServerResponse{
  1682  			Header:         res.Header,
  1683  			HTTPStatusCode: res.StatusCode,
  1684  		},
  1685  	}
  1686  	target := &ret
  1687  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1688  		return nil, err
  1689  	}
  1690  	return ret, nil
  1691  }
  1692  
  1693  type BlogsListByUserCall struct {
  1694  	s            *Service
  1695  	userId       string
  1696  	urlParams_   gensupport.URLParams
  1697  	ifNoneMatch_ string
  1698  	ctx_         context.Context
  1699  	header_      http.Header
  1700  }
  1701  
  1702  // ListByUser: Lists blogs by user.
  1703  //
  1704  // - userId: .
  1705  func (r *BlogsService) ListByUser(userId string) *BlogsListByUserCall {
  1706  	c := &BlogsListByUserCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1707  	c.userId = userId
  1708  	return c
  1709  }
  1710  
  1711  // FetchUserInfo sets the optional parameter "fetchUserInfo":
  1712  func (c *BlogsListByUserCall) FetchUserInfo(fetchUserInfo bool) *BlogsListByUserCall {
  1713  	c.urlParams_.Set("fetchUserInfo", fmt.Sprint(fetchUserInfo))
  1714  	return c
  1715  }
  1716  
  1717  // Role sets the optional parameter "role":
  1718  //
  1719  // Possible values:
  1720  //
  1721  //	"VIEW_TYPE_UNSPECIFIED"
  1722  //	"READER"
  1723  //	"AUTHOR"
  1724  //	"ADMIN"
  1725  func (c *BlogsListByUserCall) Role(role ...string) *BlogsListByUserCall {
  1726  	c.urlParams_.SetMulti("role", append([]string{}, role...))
  1727  	return c
  1728  }
  1729  
  1730  // Status sets the optional parameter "status": Default value of status is
  1731  // LIVE.
  1732  //
  1733  // Possible values:
  1734  //
  1735  //	"LIVE" (default)
  1736  //	"DELETED"
  1737  func (c *BlogsListByUserCall) Status(status ...string) *BlogsListByUserCall {
  1738  	c.urlParams_.SetMulti("status", append([]string{}, status...))
  1739  	return c
  1740  }
  1741  
  1742  // View sets the optional parameter "view":
  1743  //
  1744  // Possible values:
  1745  //
  1746  //	"VIEW_TYPE_UNSPECIFIED"
  1747  //	"READER"
  1748  //	"AUTHOR"
  1749  //	"ADMIN"
  1750  func (c *BlogsListByUserCall) View(view string) *BlogsListByUserCall {
  1751  	c.urlParams_.Set("view", view)
  1752  	return c
  1753  }
  1754  
  1755  // Fields allows partial responses to be retrieved. See
  1756  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1757  // details.
  1758  func (c *BlogsListByUserCall) Fields(s ...googleapi.Field) *BlogsListByUserCall {
  1759  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1760  	return c
  1761  }
  1762  
  1763  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1764  // object's ETag matches the given value. This is useful for getting updates
  1765  // only after the object has changed since the last request.
  1766  func (c *BlogsListByUserCall) IfNoneMatch(entityTag string) *BlogsListByUserCall {
  1767  	c.ifNoneMatch_ = entityTag
  1768  	return c
  1769  }
  1770  
  1771  // Context sets the context to be used in this call's Do method.
  1772  func (c *BlogsListByUserCall) Context(ctx context.Context) *BlogsListByUserCall {
  1773  	c.ctx_ = ctx
  1774  	return c
  1775  }
  1776  
  1777  // Header returns a http.Header that can be modified by the caller to add
  1778  // headers to the request.
  1779  func (c *BlogsListByUserCall) Header() http.Header {
  1780  	if c.header_ == nil {
  1781  		c.header_ = make(http.Header)
  1782  	}
  1783  	return c.header_
  1784  }
  1785  
  1786  func (c *BlogsListByUserCall) doRequest(alt string) (*http.Response, error) {
  1787  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1788  	if c.ifNoneMatch_ != "" {
  1789  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1790  	}
  1791  	var body io.Reader = nil
  1792  	c.urlParams_.Set("alt", alt)
  1793  	c.urlParams_.Set("prettyPrint", "false")
  1794  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users/{userId}/blogs")
  1795  	urls += "?" + c.urlParams_.Encode()
  1796  	req, err := http.NewRequest("GET", urls, body)
  1797  	if err != nil {
  1798  		return nil, err
  1799  	}
  1800  	req.Header = reqHeaders
  1801  	googleapi.Expand(req.URL, map[string]string{
  1802  		"userId": c.userId,
  1803  	})
  1804  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1805  }
  1806  
  1807  // Do executes the "blogger.blogs.listByUser" call.
  1808  // Any non-2xx status code is an error. Response headers are in either
  1809  // *BlogList.ServerResponse.Header or (if a response was returned at all) in
  1810  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1811  // whether the returned error was because http.StatusNotModified was returned.
  1812  func (c *BlogsListByUserCall) Do(opts ...googleapi.CallOption) (*BlogList, error) {
  1813  	gensupport.SetOptions(c.urlParams_, opts...)
  1814  	res, err := c.doRequest("json")
  1815  	if res != nil && res.StatusCode == http.StatusNotModified {
  1816  		if res.Body != nil {
  1817  			res.Body.Close()
  1818  		}
  1819  		return nil, gensupport.WrapError(&googleapi.Error{
  1820  			Code:   res.StatusCode,
  1821  			Header: res.Header,
  1822  		})
  1823  	}
  1824  	if err != nil {
  1825  		return nil, err
  1826  	}
  1827  	defer googleapi.CloseBody(res)
  1828  	if err := googleapi.CheckResponse(res); err != nil {
  1829  		return nil, gensupport.WrapError(err)
  1830  	}
  1831  	ret := &BlogList{
  1832  		ServerResponse: googleapi.ServerResponse{
  1833  			Header:         res.Header,
  1834  			HTTPStatusCode: res.StatusCode,
  1835  		},
  1836  	}
  1837  	target := &ret
  1838  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1839  		return nil, err
  1840  	}
  1841  	return ret, nil
  1842  }
  1843  
  1844  type CommentsApproveCall struct {
  1845  	s          *Service
  1846  	blogId     string
  1847  	postId     string
  1848  	commentId  string
  1849  	urlParams_ gensupport.URLParams
  1850  	ctx_       context.Context
  1851  	header_    http.Header
  1852  }
  1853  
  1854  // Approve: Marks a comment as not spam by blog id, post id and comment id.
  1855  //
  1856  // - blogId: .
  1857  // - commentId: .
  1858  // - postId: .
  1859  func (r *CommentsService) Approve(blogId string, postId string, commentId string) *CommentsApproveCall {
  1860  	c := &CommentsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1861  	c.blogId = blogId
  1862  	c.postId = postId
  1863  	c.commentId = commentId
  1864  	return c
  1865  }
  1866  
  1867  // Fields allows partial responses to be retrieved. See
  1868  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1869  // details.
  1870  func (c *CommentsApproveCall) Fields(s ...googleapi.Field) *CommentsApproveCall {
  1871  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1872  	return c
  1873  }
  1874  
  1875  // Context sets the context to be used in this call's Do method.
  1876  func (c *CommentsApproveCall) Context(ctx context.Context) *CommentsApproveCall {
  1877  	c.ctx_ = ctx
  1878  	return c
  1879  }
  1880  
  1881  // Header returns a http.Header that can be modified by the caller to add
  1882  // headers to the request.
  1883  func (c *CommentsApproveCall) Header() http.Header {
  1884  	if c.header_ == nil {
  1885  		c.header_ = make(http.Header)
  1886  	}
  1887  	return c.header_
  1888  }
  1889  
  1890  func (c *CommentsApproveCall) doRequest(alt string) (*http.Response, error) {
  1891  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1892  	var body io.Reader = nil
  1893  	c.urlParams_.Set("alt", alt)
  1894  	c.urlParams_.Set("prettyPrint", "false")
  1895  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/approve")
  1896  	urls += "?" + c.urlParams_.Encode()
  1897  	req, err := http.NewRequest("POST", urls, body)
  1898  	if err != nil {
  1899  		return nil, err
  1900  	}
  1901  	req.Header = reqHeaders
  1902  	googleapi.Expand(req.URL, map[string]string{
  1903  		"blogId":    c.blogId,
  1904  		"postId":    c.postId,
  1905  		"commentId": c.commentId,
  1906  	})
  1907  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1908  }
  1909  
  1910  // Do executes the "blogger.comments.approve" call.
  1911  // Any non-2xx status code is an error. Response headers are in either
  1912  // *Comment.ServerResponse.Header or (if a response was returned at all) in
  1913  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1914  // whether the returned error was because http.StatusNotModified was returned.
  1915  func (c *CommentsApproveCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  1916  	gensupport.SetOptions(c.urlParams_, opts...)
  1917  	res, err := c.doRequest("json")
  1918  	if res != nil && res.StatusCode == http.StatusNotModified {
  1919  		if res.Body != nil {
  1920  			res.Body.Close()
  1921  		}
  1922  		return nil, gensupport.WrapError(&googleapi.Error{
  1923  			Code:   res.StatusCode,
  1924  			Header: res.Header,
  1925  		})
  1926  	}
  1927  	if err != nil {
  1928  		return nil, err
  1929  	}
  1930  	defer googleapi.CloseBody(res)
  1931  	if err := googleapi.CheckResponse(res); err != nil {
  1932  		return nil, gensupport.WrapError(err)
  1933  	}
  1934  	ret := &Comment{
  1935  		ServerResponse: googleapi.ServerResponse{
  1936  			Header:         res.Header,
  1937  			HTTPStatusCode: res.StatusCode,
  1938  		},
  1939  	}
  1940  	target := &ret
  1941  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1942  		return nil, err
  1943  	}
  1944  	return ret, nil
  1945  }
  1946  
  1947  type CommentsDeleteCall struct {
  1948  	s          *Service
  1949  	blogId     string
  1950  	postId     string
  1951  	commentId  string
  1952  	urlParams_ gensupport.URLParams
  1953  	ctx_       context.Context
  1954  	header_    http.Header
  1955  }
  1956  
  1957  // Delete: Deletes a comment by blog id, post id and comment id.
  1958  //
  1959  // - blogId: .
  1960  // - commentId: .
  1961  // - postId: .
  1962  func (r *CommentsService) Delete(blogId string, postId string, commentId string) *CommentsDeleteCall {
  1963  	c := &CommentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1964  	c.blogId = blogId
  1965  	c.postId = postId
  1966  	c.commentId = commentId
  1967  	return c
  1968  }
  1969  
  1970  // Fields allows partial responses to be retrieved. See
  1971  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1972  // details.
  1973  func (c *CommentsDeleteCall) Fields(s ...googleapi.Field) *CommentsDeleteCall {
  1974  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1975  	return c
  1976  }
  1977  
  1978  // Context sets the context to be used in this call's Do method.
  1979  func (c *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
  1980  	c.ctx_ = ctx
  1981  	return c
  1982  }
  1983  
  1984  // Header returns a http.Header that can be modified by the caller to add
  1985  // headers to the request.
  1986  func (c *CommentsDeleteCall) Header() http.Header {
  1987  	if c.header_ == nil {
  1988  		c.header_ = make(http.Header)
  1989  	}
  1990  	return c.header_
  1991  }
  1992  
  1993  func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  1994  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1995  	var body io.Reader = nil
  1996  	c.urlParams_.Set("alt", alt)
  1997  	c.urlParams_.Set("prettyPrint", "false")
  1998  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}/comments/{commentId}")
  1999  	urls += "?" + c.urlParams_.Encode()
  2000  	req, err := http.NewRequest("DELETE", urls, body)
  2001  	if err != nil {
  2002  		return nil, err
  2003  	}
  2004  	req.Header = reqHeaders
  2005  	googleapi.Expand(req.URL, map[string]string{
  2006  		"blogId":    c.blogId,
  2007  		"postId":    c.postId,
  2008  		"commentId": c.commentId,
  2009  	})
  2010  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2011  }
  2012  
  2013  // Do executes the "blogger.comments.delete" call.
  2014  func (c *CommentsDeleteCall) Do(opts ...googleapi.CallOption) error {
  2015  	gensupport.SetOptions(c.urlParams_, opts...)
  2016  	res, err := c.doRequest("json")
  2017  	if err != nil {
  2018  		return err
  2019  	}
  2020  	defer googleapi.CloseBody(res)
  2021  	if err := googleapi.CheckResponse(res); err != nil {
  2022  		return gensupport.WrapError(err)
  2023  	}
  2024  	return nil
  2025  }
  2026  
  2027  type CommentsGetCall struct {
  2028  	s            *Service
  2029  	blogId       string
  2030  	postId       string
  2031  	commentId    string
  2032  	urlParams_   gensupport.URLParams
  2033  	ifNoneMatch_ string
  2034  	ctx_         context.Context
  2035  	header_      http.Header
  2036  }
  2037  
  2038  // Get: Gets a comment by id.
  2039  //
  2040  // - blogId: .
  2041  // - commentId: .
  2042  // - postId: .
  2043  func (r *CommentsService) Get(blogId string, postId string, commentId string) *CommentsGetCall {
  2044  	c := &CommentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2045  	c.blogId = blogId
  2046  	c.postId = postId
  2047  	c.commentId = commentId
  2048  	return c
  2049  }
  2050  
  2051  // View sets the optional parameter "view":
  2052  //
  2053  // Possible values:
  2054  //
  2055  //	"VIEW_TYPE_UNSPECIFIED"
  2056  //	"READER"
  2057  //	"AUTHOR"
  2058  //	"ADMIN"
  2059  func (c *CommentsGetCall) View(view string) *CommentsGetCall {
  2060  	c.urlParams_.Set("view", view)
  2061  	return c
  2062  }
  2063  
  2064  // Fields allows partial responses to be retrieved. See
  2065  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2066  // details.
  2067  func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall {
  2068  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2069  	return c
  2070  }
  2071  
  2072  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2073  // object's ETag matches the given value. This is useful for getting updates
  2074  // only after the object has changed since the last request.
  2075  func (c *CommentsGetCall) IfNoneMatch(entityTag string) *CommentsGetCall {
  2076  	c.ifNoneMatch_ = entityTag
  2077  	return c
  2078  }
  2079  
  2080  // Context sets the context to be used in this call's Do method.
  2081  func (c *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
  2082  	c.ctx_ = ctx
  2083  	return c
  2084  }
  2085  
  2086  // Header returns a http.Header that can be modified by the caller to add
  2087  // headers to the request.
  2088  func (c *CommentsGetCall) Header() http.Header {
  2089  	if c.header_ == nil {
  2090  		c.header_ = make(http.Header)
  2091  	}
  2092  	return c.header_
  2093  }
  2094  
  2095  func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
  2096  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2097  	if c.ifNoneMatch_ != "" {
  2098  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2099  	}
  2100  	var body io.Reader = nil
  2101  	c.urlParams_.Set("alt", alt)
  2102  	c.urlParams_.Set("prettyPrint", "false")
  2103  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}/comments/{commentId}")
  2104  	urls += "?" + c.urlParams_.Encode()
  2105  	req, err := http.NewRequest("GET", urls, body)
  2106  	if err != nil {
  2107  		return nil, err
  2108  	}
  2109  	req.Header = reqHeaders
  2110  	googleapi.Expand(req.URL, map[string]string{
  2111  		"blogId":    c.blogId,
  2112  		"postId":    c.postId,
  2113  		"commentId": c.commentId,
  2114  	})
  2115  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2116  }
  2117  
  2118  // Do executes the "blogger.comments.get" call.
  2119  // Any non-2xx status code is an error. Response headers are in either
  2120  // *Comment.ServerResponse.Header or (if a response was returned at all) in
  2121  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2122  // whether the returned error was because http.StatusNotModified was returned.
  2123  func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  2124  	gensupport.SetOptions(c.urlParams_, opts...)
  2125  	res, err := c.doRequest("json")
  2126  	if res != nil && res.StatusCode == http.StatusNotModified {
  2127  		if res.Body != nil {
  2128  			res.Body.Close()
  2129  		}
  2130  		return nil, gensupport.WrapError(&googleapi.Error{
  2131  			Code:   res.StatusCode,
  2132  			Header: res.Header,
  2133  		})
  2134  	}
  2135  	if err != nil {
  2136  		return nil, err
  2137  	}
  2138  	defer googleapi.CloseBody(res)
  2139  	if err := googleapi.CheckResponse(res); err != nil {
  2140  		return nil, gensupport.WrapError(err)
  2141  	}
  2142  	ret := &Comment{
  2143  		ServerResponse: googleapi.ServerResponse{
  2144  			Header:         res.Header,
  2145  			HTTPStatusCode: res.StatusCode,
  2146  		},
  2147  	}
  2148  	target := &ret
  2149  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2150  		return nil, err
  2151  	}
  2152  	return ret, nil
  2153  }
  2154  
  2155  type CommentsListCall struct {
  2156  	s            *Service
  2157  	blogId       string
  2158  	postId       string
  2159  	urlParams_   gensupport.URLParams
  2160  	ifNoneMatch_ string
  2161  	ctx_         context.Context
  2162  	header_      http.Header
  2163  }
  2164  
  2165  // List: Lists comments.
  2166  //
  2167  // - blogId: .
  2168  // - postId: .
  2169  func (r *CommentsService) List(blogId string, postId string) *CommentsListCall {
  2170  	c := &CommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2171  	c.blogId = blogId
  2172  	c.postId = postId
  2173  	return c
  2174  }
  2175  
  2176  // EndDate sets the optional parameter "endDate":
  2177  func (c *CommentsListCall) EndDate(endDate string) *CommentsListCall {
  2178  	c.urlParams_.Set("endDate", endDate)
  2179  	return c
  2180  }
  2181  
  2182  // FetchBodies sets the optional parameter "fetchBodies":
  2183  func (c *CommentsListCall) FetchBodies(fetchBodies bool) *CommentsListCall {
  2184  	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
  2185  	return c
  2186  }
  2187  
  2188  // MaxResults sets the optional parameter "maxResults":
  2189  func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
  2190  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2191  	return c
  2192  }
  2193  
  2194  // PageToken sets the optional parameter "pageToken":
  2195  func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
  2196  	c.urlParams_.Set("pageToken", pageToken)
  2197  	return c
  2198  }
  2199  
  2200  // StartDate sets the optional parameter "startDate":
  2201  func (c *CommentsListCall) StartDate(startDate string) *CommentsListCall {
  2202  	c.urlParams_.Set("startDate", startDate)
  2203  	return c
  2204  }
  2205  
  2206  // Status sets the optional parameter "status":
  2207  //
  2208  // Possible values:
  2209  //
  2210  //	"LIVE"
  2211  //	"EMPTIED"
  2212  //	"PENDING"
  2213  //	"SPAM"
  2214  func (c *CommentsListCall) Status(status string) *CommentsListCall {
  2215  	c.urlParams_.Set("status", status)
  2216  	return c
  2217  }
  2218  
  2219  // View sets the optional parameter "view":
  2220  //
  2221  // Possible values:
  2222  //
  2223  //	"VIEW_TYPE_UNSPECIFIED"
  2224  //	"READER"
  2225  //	"AUTHOR"
  2226  //	"ADMIN"
  2227  func (c *CommentsListCall) View(view string) *CommentsListCall {
  2228  	c.urlParams_.Set("view", view)
  2229  	return c
  2230  }
  2231  
  2232  // Fields allows partial responses to be retrieved. See
  2233  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2234  // details.
  2235  func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
  2236  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2237  	return c
  2238  }
  2239  
  2240  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2241  // object's ETag matches the given value. This is useful for getting updates
  2242  // only after the object has changed since the last request.
  2243  func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall {
  2244  	c.ifNoneMatch_ = entityTag
  2245  	return c
  2246  }
  2247  
  2248  // Context sets the context to be used in this call's Do method.
  2249  func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
  2250  	c.ctx_ = ctx
  2251  	return c
  2252  }
  2253  
  2254  // Header returns a http.Header that can be modified by the caller to add
  2255  // headers to the request.
  2256  func (c *CommentsListCall) Header() http.Header {
  2257  	if c.header_ == nil {
  2258  		c.header_ = make(http.Header)
  2259  	}
  2260  	return c.header_
  2261  }
  2262  
  2263  func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
  2264  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2265  	if c.ifNoneMatch_ != "" {
  2266  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2267  	}
  2268  	var body io.Reader = nil
  2269  	c.urlParams_.Set("alt", alt)
  2270  	c.urlParams_.Set("prettyPrint", "false")
  2271  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}/comments")
  2272  	urls += "?" + c.urlParams_.Encode()
  2273  	req, err := http.NewRequest("GET", urls, body)
  2274  	if err != nil {
  2275  		return nil, err
  2276  	}
  2277  	req.Header = reqHeaders
  2278  	googleapi.Expand(req.URL, map[string]string{
  2279  		"blogId": c.blogId,
  2280  		"postId": c.postId,
  2281  	})
  2282  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2283  }
  2284  
  2285  // Do executes the "blogger.comments.list" call.
  2286  // Any non-2xx status code is an error. Response headers are in either
  2287  // *CommentList.ServerResponse.Header or (if a response was returned at all) in
  2288  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2289  // whether the returned error was because http.StatusNotModified was returned.
  2290  func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentList, error) {
  2291  	gensupport.SetOptions(c.urlParams_, opts...)
  2292  	res, err := c.doRequest("json")
  2293  	if res != nil && res.StatusCode == http.StatusNotModified {
  2294  		if res.Body != nil {
  2295  			res.Body.Close()
  2296  		}
  2297  		return nil, gensupport.WrapError(&googleapi.Error{
  2298  			Code:   res.StatusCode,
  2299  			Header: res.Header,
  2300  		})
  2301  	}
  2302  	if err != nil {
  2303  		return nil, err
  2304  	}
  2305  	defer googleapi.CloseBody(res)
  2306  	if err := googleapi.CheckResponse(res); err != nil {
  2307  		return nil, gensupport.WrapError(err)
  2308  	}
  2309  	ret := &CommentList{
  2310  		ServerResponse: googleapi.ServerResponse{
  2311  			Header:         res.Header,
  2312  			HTTPStatusCode: res.StatusCode,
  2313  		},
  2314  	}
  2315  	target := &ret
  2316  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2317  		return nil, err
  2318  	}
  2319  	return ret, nil
  2320  }
  2321  
  2322  // Pages invokes f for each page of results.
  2323  // A non-nil error returned from f will halt the iteration.
  2324  // The provided context supersedes any context provided to the Context method.
  2325  func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentList) error) error {
  2326  	c.ctx_ = ctx
  2327  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2328  	for {
  2329  		x, err := c.Do()
  2330  		if err != nil {
  2331  			return err
  2332  		}
  2333  		if err := f(x); err != nil {
  2334  			return err
  2335  		}
  2336  		if x.NextPageToken == "" {
  2337  			return nil
  2338  		}
  2339  		c.PageToken(x.NextPageToken)
  2340  	}
  2341  }
  2342  
  2343  type CommentsListByBlogCall struct {
  2344  	s            *Service
  2345  	blogId       string
  2346  	urlParams_   gensupport.URLParams
  2347  	ifNoneMatch_ string
  2348  	ctx_         context.Context
  2349  	header_      http.Header
  2350  }
  2351  
  2352  // ListByBlog: Lists comments by blog.
  2353  //
  2354  // - blogId: .
  2355  func (r *CommentsService) ListByBlog(blogId string) *CommentsListByBlogCall {
  2356  	c := &CommentsListByBlogCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2357  	c.blogId = blogId
  2358  	return c
  2359  }
  2360  
  2361  // EndDate sets the optional parameter "endDate":
  2362  func (c *CommentsListByBlogCall) EndDate(endDate string) *CommentsListByBlogCall {
  2363  	c.urlParams_.Set("endDate", endDate)
  2364  	return c
  2365  }
  2366  
  2367  // FetchBodies sets the optional parameter "fetchBodies":
  2368  func (c *CommentsListByBlogCall) FetchBodies(fetchBodies bool) *CommentsListByBlogCall {
  2369  	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
  2370  	return c
  2371  }
  2372  
  2373  // MaxResults sets the optional parameter "maxResults":
  2374  func (c *CommentsListByBlogCall) MaxResults(maxResults int64) *CommentsListByBlogCall {
  2375  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2376  	return c
  2377  }
  2378  
  2379  // PageToken sets the optional parameter "pageToken":
  2380  func (c *CommentsListByBlogCall) PageToken(pageToken string) *CommentsListByBlogCall {
  2381  	c.urlParams_.Set("pageToken", pageToken)
  2382  	return c
  2383  }
  2384  
  2385  // StartDate sets the optional parameter "startDate":
  2386  func (c *CommentsListByBlogCall) StartDate(startDate string) *CommentsListByBlogCall {
  2387  	c.urlParams_.Set("startDate", startDate)
  2388  	return c
  2389  }
  2390  
  2391  // Status sets the optional parameter "status":
  2392  //
  2393  // Possible values:
  2394  //
  2395  //	"LIVE"
  2396  //	"EMPTIED"
  2397  //	"PENDING"
  2398  //	"SPAM"
  2399  func (c *CommentsListByBlogCall) Status(status ...string) *CommentsListByBlogCall {
  2400  	c.urlParams_.SetMulti("status", append([]string{}, status...))
  2401  	return c
  2402  }
  2403  
  2404  // Fields allows partial responses to be retrieved. See
  2405  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2406  // details.
  2407  func (c *CommentsListByBlogCall) Fields(s ...googleapi.Field) *CommentsListByBlogCall {
  2408  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2409  	return c
  2410  }
  2411  
  2412  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2413  // object's ETag matches the given value. This is useful for getting updates
  2414  // only after the object has changed since the last request.
  2415  func (c *CommentsListByBlogCall) IfNoneMatch(entityTag string) *CommentsListByBlogCall {
  2416  	c.ifNoneMatch_ = entityTag
  2417  	return c
  2418  }
  2419  
  2420  // Context sets the context to be used in this call's Do method.
  2421  func (c *CommentsListByBlogCall) Context(ctx context.Context) *CommentsListByBlogCall {
  2422  	c.ctx_ = ctx
  2423  	return c
  2424  }
  2425  
  2426  // Header returns a http.Header that can be modified by the caller to add
  2427  // headers to the request.
  2428  func (c *CommentsListByBlogCall) Header() http.Header {
  2429  	if c.header_ == nil {
  2430  		c.header_ = make(http.Header)
  2431  	}
  2432  	return c.header_
  2433  }
  2434  
  2435  func (c *CommentsListByBlogCall) doRequest(alt string) (*http.Response, error) {
  2436  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2437  	if c.ifNoneMatch_ != "" {
  2438  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2439  	}
  2440  	var body io.Reader = nil
  2441  	c.urlParams_.Set("alt", alt)
  2442  	c.urlParams_.Set("prettyPrint", "false")
  2443  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/comments")
  2444  	urls += "?" + c.urlParams_.Encode()
  2445  	req, err := http.NewRequest("GET", urls, body)
  2446  	if err != nil {
  2447  		return nil, err
  2448  	}
  2449  	req.Header = reqHeaders
  2450  	googleapi.Expand(req.URL, map[string]string{
  2451  		"blogId": c.blogId,
  2452  	})
  2453  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2454  }
  2455  
  2456  // Do executes the "blogger.comments.listByBlog" call.
  2457  // Any non-2xx status code is an error. Response headers are in either
  2458  // *CommentList.ServerResponse.Header or (if a response was returned at all) in
  2459  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2460  // whether the returned error was because http.StatusNotModified was returned.
  2461  func (c *CommentsListByBlogCall) Do(opts ...googleapi.CallOption) (*CommentList, error) {
  2462  	gensupport.SetOptions(c.urlParams_, opts...)
  2463  	res, err := c.doRequest("json")
  2464  	if res != nil && res.StatusCode == http.StatusNotModified {
  2465  		if res.Body != nil {
  2466  			res.Body.Close()
  2467  		}
  2468  		return nil, gensupport.WrapError(&googleapi.Error{
  2469  			Code:   res.StatusCode,
  2470  			Header: res.Header,
  2471  		})
  2472  	}
  2473  	if err != nil {
  2474  		return nil, err
  2475  	}
  2476  	defer googleapi.CloseBody(res)
  2477  	if err := googleapi.CheckResponse(res); err != nil {
  2478  		return nil, gensupport.WrapError(err)
  2479  	}
  2480  	ret := &CommentList{
  2481  		ServerResponse: googleapi.ServerResponse{
  2482  			Header:         res.Header,
  2483  			HTTPStatusCode: res.StatusCode,
  2484  		},
  2485  	}
  2486  	target := &ret
  2487  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2488  		return nil, err
  2489  	}
  2490  	return ret, nil
  2491  }
  2492  
  2493  // Pages invokes f for each page of results.
  2494  // A non-nil error returned from f will halt the iteration.
  2495  // The provided context supersedes any context provided to the Context method.
  2496  func (c *CommentsListByBlogCall) Pages(ctx context.Context, f func(*CommentList) error) error {
  2497  	c.ctx_ = ctx
  2498  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2499  	for {
  2500  		x, err := c.Do()
  2501  		if err != nil {
  2502  			return err
  2503  		}
  2504  		if err := f(x); err != nil {
  2505  			return err
  2506  		}
  2507  		if x.NextPageToken == "" {
  2508  			return nil
  2509  		}
  2510  		c.PageToken(x.NextPageToken)
  2511  	}
  2512  }
  2513  
  2514  type CommentsMarkAsSpamCall struct {
  2515  	s          *Service
  2516  	blogId     string
  2517  	postId     string
  2518  	commentId  string
  2519  	urlParams_ gensupport.URLParams
  2520  	ctx_       context.Context
  2521  	header_    http.Header
  2522  }
  2523  
  2524  // MarkAsSpam: Marks a comment as spam by blog id, post id and comment id.
  2525  //
  2526  // - blogId: .
  2527  // - commentId: .
  2528  // - postId: .
  2529  func (r *CommentsService) MarkAsSpam(blogId string, postId string, commentId string) *CommentsMarkAsSpamCall {
  2530  	c := &CommentsMarkAsSpamCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2531  	c.blogId = blogId
  2532  	c.postId = postId
  2533  	c.commentId = commentId
  2534  	return c
  2535  }
  2536  
  2537  // Fields allows partial responses to be retrieved. See
  2538  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2539  // details.
  2540  func (c *CommentsMarkAsSpamCall) Fields(s ...googleapi.Field) *CommentsMarkAsSpamCall {
  2541  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2542  	return c
  2543  }
  2544  
  2545  // Context sets the context to be used in this call's Do method.
  2546  func (c *CommentsMarkAsSpamCall) Context(ctx context.Context) *CommentsMarkAsSpamCall {
  2547  	c.ctx_ = ctx
  2548  	return c
  2549  }
  2550  
  2551  // Header returns a http.Header that can be modified by the caller to add
  2552  // headers to the request.
  2553  func (c *CommentsMarkAsSpamCall) Header() http.Header {
  2554  	if c.header_ == nil {
  2555  		c.header_ = make(http.Header)
  2556  	}
  2557  	return c.header_
  2558  }
  2559  
  2560  func (c *CommentsMarkAsSpamCall) doRequest(alt string) (*http.Response, error) {
  2561  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2562  	var body io.Reader = nil
  2563  	c.urlParams_.Set("alt", alt)
  2564  	c.urlParams_.Set("prettyPrint", "false")
  2565  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/spam")
  2566  	urls += "?" + c.urlParams_.Encode()
  2567  	req, err := http.NewRequest("POST", urls, body)
  2568  	if err != nil {
  2569  		return nil, err
  2570  	}
  2571  	req.Header = reqHeaders
  2572  	googleapi.Expand(req.URL, map[string]string{
  2573  		"blogId":    c.blogId,
  2574  		"postId":    c.postId,
  2575  		"commentId": c.commentId,
  2576  	})
  2577  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2578  }
  2579  
  2580  // Do executes the "blogger.comments.markAsSpam" call.
  2581  // Any non-2xx status code is an error. Response headers are in either
  2582  // *Comment.ServerResponse.Header or (if a response was returned at all) in
  2583  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2584  // whether the returned error was because http.StatusNotModified was returned.
  2585  func (c *CommentsMarkAsSpamCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  2586  	gensupport.SetOptions(c.urlParams_, opts...)
  2587  	res, err := c.doRequest("json")
  2588  	if res != nil && res.StatusCode == http.StatusNotModified {
  2589  		if res.Body != nil {
  2590  			res.Body.Close()
  2591  		}
  2592  		return nil, gensupport.WrapError(&googleapi.Error{
  2593  			Code:   res.StatusCode,
  2594  			Header: res.Header,
  2595  		})
  2596  	}
  2597  	if err != nil {
  2598  		return nil, err
  2599  	}
  2600  	defer googleapi.CloseBody(res)
  2601  	if err := googleapi.CheckResponse(res); err != nil {
  2602  		return nil, gensupport.WrapError(err)
  2603  	}
  2604  	ret := &Comment{
  2605  		ServerResponse: googleapi.ServerResponse{
  2606  			Header:         res.Header,
  2607  			HTTPStatusCode: res.StatusCode,
  2608  		},
  2609  	}
  2610  	target := &ret
  2611  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2612  		return nil, err
  2613  	}
  2614  	return ret, nil
  2615  }
  2616  
  2617  type CommentsRemoveContentCall struct {
  2618  	s          *Service
  2619  	blogId     string
  2620  	postId     string
  2621  	commentId  string
  2622  	urlParams_ gensupport.URLParams
  2623  	ctx_       context.Context
  2624  	header_    http.Header
  2625  }
  2626  
  2627  // RemoveContent: Removes the content of a comment by blog id, post id and
  2628  // comment id.
  2629  //
  2630  // - blogId: .
  2631  // - commentId: .
  2632  // - postId: .
  2633  func (r *CommentsService) RemoveContent(blogId string, postId string, commentId string) *CommentsRemoveContentCall {
  2634  	c := &CommentsRemoveContentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2635  	c.blogId = blogId
  2636  	c.postId = postId
  2637  	c.commentId = commentId
  2638  	return c
  2639  }
  2640  
  2641  // Fields allows partial responses to be retrieved. See
  2642  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2643  // details.
  2644  func (c *CommentsRemoveContentCall) Fields(s ...googleapi.Field) *CommentsRemoveContentCall {
  2645  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2646  	return c
  2647  }
  2648  
  2649  // Context sets the context to be used in this call's Do method.
  2650  func (c *CommentsRemoveContentCall) Context(ctx context.Context) *CommentsRemoveContentCall {
  2651  	c.ctx_ = ctx
  2652  	return c
  2653  }
  2654  
  2655  // Header returns a http.Header that can be modified by the caller to add
  2656  // headers to the request.
  2657  func (c *CommentsRemoveContentCall) Header() http.Header {
  2658  	if c.header_ == nil {
  2659  		c.header_ = make(http.Header)
  2660  	}
  2661  	return c.header_
  2662  }
  2663  
  2664  func (c *CommentsRemoveContentCall) doRequest(alt string) (*http.Response, error) {
  2665  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2666  	var body io.Reader = nil
  2667  	c.urlParams_.Set("alt", alt)
  2668  	c.urlParams_.Set("prettyPrint", "false")
  2669  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/removecontent")
  2670  	urls += "?" + c.urlParams_.Encode()
  2671  	req, err := http.NewRequest("POST", urls, body)
  2672  	if err != nil {
  2673  		return nil, err
  2674  	}
  2675  	req.Header = reqHeaders
  2676  	googleapi.Expand(req.URL, map[string]string{
  2677  		"blogId":    c.blogId,
  2678  		"postId":    c.postId,
  2679  		"commentId": c.commentId,
  2680  	})
  2681  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2682  }
  2683  
  2684  // Do executes the "blogger.comments.removeContent" call.
  2685  // Any non-2xx status code is an error. Response headers are in either
  2686  // *Comment.ServerResponse.Header or (if a response was returned at all) in
  2687  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2688  // whether the returned error was because http.StatusNotModified was returned.
  2689  func (c *CommentsRemoveContentCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  2690  	gensupport.SetOptions(c.urlParams_, opts...)
  2691  	res, err := c.doRequest("json")
  2692  	if res != nil && res.StatusCode == http.StatusNotModified {
  2693  		if res.Body != nil {
  2694  			res.Body.Close()
  2695  		}
  2696  		return nil, gensupport.WrapError(&googleapi.Error{
  2697  			Code:   res.StatusCode,
  2698  			Header: res.Header,
  2699  		})
  2700  	}
  2701  	if err != nil {
  2702  		return nil, err
  2703  	}
  2704  	defer googleapi.CloseBody(res)
  2705  	if err := googleapi.CheckResponse(res); err != nil {
  2706  		return nil, gensupport.WrapError(err)
  2707  	}
  2708  	ret := &Comment{
  2709  		ServerResponse: googleapi.ServerResponse{
  2710  			Header:         res.Header,
  2711  			HTTPStatusCode: res.StatusCode,
  2712  		},
  2713  	}
  2714  	target := &ret
  2715  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2716  		return nil, err
  2717  	}
  2718  	return ret, nil
  2719  }
  2720  
  2721  type PageViewsGetCall struct {
  2722  	s            *Service
  2723  	blogId       string
  2724  	urlParams_   gensupport.URLParams
  2725  	ifNoneMatch_ string
  2726  	ctx_         context.Context
  2727  	header_      http.Header
  2728  }
  2729  
  2730  // Get: Gets page views by blog id.
  2731  //
  2732  // - blogId: .
  2733  func (r *PageViewsService) Get(blogId string) *PageViewsGetCall {
  2734  	c := &PageViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2735  	c.blogId = blogId
  2736  	return c
  2737  }
  2738  
  2739  // Range sets the optional parameter "range":
  2740  //
  2741  // Possible values:
  2742  //
  2743  //	"all"
  2744  //	"30DAYS"
  2745  //	"7DAYS"
  2746  func (c *PageViewsGetCall) Range(range_ ...string) *PageViewsGetCall {
  2747  	c.urlParams_.SetMulti("range", append([]string{}, range_...))
  2748  	return c
  2749  }
  2750  
  2751  // Fields allows partial responses to be retrieved. See
  2752  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2753  // details.
  2754  func (c *PageViewsGetCall) Fields(s ...googleapi.Field) *PageViewsGetCall {
  2755  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2756  	return c
  2757  }
  2758  
  2759  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2760  // object's ETag matches the given value. This is useful for getting updates
  2761  // only after the object has changed since the last request.
  2762  func (c *PageViewsGetCall) IfNoneMatch(entityTag string) *PageViewsGetCall {
  2763  	c.ifNoneMatch_ = entityTag
  2764  	return c
  2765  }
  2766  
  2767  // Context sets the context to be used in this call's Do method.
  2768  func (c *PageViewsGetCall) Context(ctx context.Context) *PageViewsGetCall {
  2769  	c.ctx_ = ctx
  2770  	return c
  2771  }
  2772  
  2773  // Header returns a http.Header that can be modified by the caller to add
  2774  // headers to the request.
  2775  func (c *PageViewsGetCall) Header() http.Header {
  2776  	if c.header_ == nil {
  2777  		c.header_ = make(http.Header)
  2778  	}
  2779  	return c.header_
  2780  }
  2781  
  2782  func (c *PageViewsGetCall) doRequest(alt string) (*http.Response, error) {
  2783  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2784  	if c.ifNoneMatch_ != "" {
  2785  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2786  	}
  2787  	var body io.Reader = nil
  2788  	c.urlParams_.Set("alt", alt)
  2789  	c.urlParams_.Set("prettyPrint", "false")
  2790  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/pageviews")
  2791  	urls += "?" + c.urlParams_.Encode()
  2792  	req, err := http.NewRequest("GET", urls, body)
  2793  	if err != nil {
  2794  		return nil, err
  2795  	}
  2796  	req.Header = reqHeaders
  2797  	googleapi.Expand(req.URL, map[string]string{
  2798  		"blogId": c.blogId,
  2799  	})
  2800  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2801  }
  2802  
  2803  // Do executes the "blogger.pageViews.get" call.
  2804  // Any non-2xx status code is an error. Response headers are in either
  2805  // *Pageviews.ServerResponse.Header or (if a response was returned at all) in
  2806  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2807  // whether the returned error was because http.StatusNotModified was returned.
  2808  func (c *PageViewsGetCall) Do(opts ...googleapi.CallOption) (*Pageviews, error) {
  2809  	gensupport.SetOptions(c.urlParams_, opts...)
  2810  	res, err := c.doRequest("json")
  2811  	if res != nil && res.StatusCode == http.StatusNotModified {
  2812  		if res.Body != nil {
  2813  			res.Body.Close()
  2814  		}
  2815  		return nil, gensupport.WrapError(&googleapi.Error{
  2816  			Code:   res.StatusCode,
  2817  			Header: res.Header,
  2818  		})
  2819  	}
  2820  	if err != nil {
  2821  		return nil, err
  2822  	}
  2823  	defer googleapi.CloseBody(res)
  2824  	if err := googleapi.CheckResponse(res); err != nil {
  2825  		return nil, gensupport.WrapError(err)
  2826  	}
  2827  	ret := &Pageviews{
  2828  		ServerResponse: googleapi.ServerResponse{
  2829  			Header:         res.Header,
  2830  			HTTPStatusCode: res.StatusCode,
  2831  		},
  2832  	}
  2833  	target := &ret
  2834  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2835  		return nil, err
  2836  	}
  2837  	return ret, nil
  2838  }
  2839  
  2840  type PagesDeleteCall struct {
  2841  	s          *Service
  2842  	blogId     string
  2843  	pageId     string
  2844  	urlParams_ gensupport.URLParams
  2845  	ctx_       context.Context
  2846  	header_    http.Header
  2847  }
  2848  
  2849  // Delete: Deletes a page by blog id and page id.
  2850  //
  2851  // - blogId: .
  2852  // - pageId: .
  2853  func (r *PagesService) Delete(blogId string, pageId string) *PagesDeleteCall {
  2854  	c := &PagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2855  	c.blogId = blogId
  2856  	c.pageId = pageId
  2857  	return c
  2858  }
  2859  
  2860  // UseTrash sets the optional parameter "useTrash": Move to Trash if possible
  2861  func (c *PagesDeleteCall) UseTrash(useTrash bool) *PagesDeleteCall {
  2862  	c.urlParams_.Set("useTrash", fmt.Sprint(useTrash))
  2863  	return c
  2864  }
  2865  
  2866  // Fields allows partial responses to be retrieved. See
  2867  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2868  // details.
  2869  func (c *PagesDeleteCall) Fields(s ...googleapi.Field) *PagesDeleteCall {
  2870  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2871  	return c
  2872  }
  2873  
  2874  // Context sets the context to be used in this call's Do method.
  2875  func (c *PagesDeleteCall) Context(ctx context.Context) *PagesDeleteCall {
  2876  	c.ctx_ = ctx
  2877  	return c
  2878  }
  2879  
  2880  // Header returns a http.Header that can be modified by the caller to add
  2881  // headers to the request.
  2882  func (c *PagesDeleteCall) Header() http.Header {
  2883  	if c.header_ == nil {
  2884  		c.header_ = make(http.Header)
  2885  	}
  2886  	return c.header_
  2887  }
  2888  
  2889  func (c *PagesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2890  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2891  	var body io.Reader = nil
  2892  	c.urlParams_.Set("alt", alt)
  2893  	c.urlParams_.Set("prettyPrint", "false")
  2894  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/pages/{pageId}")
  2895  	urls += "?" + c.urlParams_.Encode()
  2896  	req, err := http.NewRequest("DELETE", urls, body)
  2897  	if err != nil {
  2898  		return nil, err
  2899  	}
  2900  	req.Header = reqHeaders
  2901  	googleapi.Expand(req.URL, map[string]string{
  2902  		"blogId": c.blogId,
  2903  		"pageId": c.pageId,
  2904  	})
  2905  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2906  }
  2907  
  2908  // Do executes the "blogger.pages.delete" call.
  2909  func (c *PagesDeleteCall) Do(opts ...googleapi.CallOption) error {
  2910  	gensupport.SetOptions(c.urlParams_, opts...)
  2911  	res, err := c.doRequest("json")
  2912  	if err != nil {
  2913  		return err
  2914  	}
  2915  	defer googleapi.CloseBody(res)
  2916  	if err := googleapi.CheckResponse(res); err != nil {
  2917  		return gensupport.WrapError(err)
  2918  	}
  2919  	return nil
  2920  }
  2921  
  2922  type PagesGetCall struct {
  2923  	s            *Service
  2924  	blogId       string
  2925  	pageId       string
  2926  	urlParams_   gensupport.URLParams
  2927  	ifNoneMatch_ string
  2928  	ctx_         context.Context
  2929  	header_      http.Header
  2930  }
  2931  
  2932  // Get: Gets a page by blog id and page id.
  2933  //
  2934  // - blogId: .
  2935  // - pageId: .
  2936  func (r *PagesService) Get(blogId string, pageId string) *PagesGetCall {
  2937  	c := &PagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2938  	c.blogId = blogId
  2939  	c.pageId = pageId
  2940  	return c
  2941  }
  2942  
  2943  // View sets the optional parameter "view":
  2944  //
  2945  // Possible values:
  2946  //
  2947  //	"VIEW_TYPE_UNSPECIFIED"
  2948  //	"READER"
  2949  //	"AUTHOR"
  2950  //	"ADMIN"
  2951  func (c *PagesGetCall) View(view string) *PagesGetCall {
  2952  	c.urlParams_.Set("view", view)
  2953  	return c
  2954  }
  2955  
  2956  // Fields allows partial responses to be retrieved. See
  2957  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2958  // details.
  2959  func (c *PagesGetCall) Fields(s ...googleapi.Field) *PagesGetCall {
  2960  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2961  	return c
  2962  }
  2963  
  2964  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2965  // object's ETag matches the given value. This is useful for getting updates
  2966  // only after the object has changed since the last request.
  2967  func (c *PagesGetCall) IfNoneMatch(entityTag string) *PagesGetCall {
  2968  	c.ifNoneMatch_ = entityTag
  2969  	return c
  2970  }
  2971  
  2972  // Context sets the context to be used in this call's Do method.
  2973  func (c *PagesGetCall) Context(ctx context.Context) *PagesGetCall {
  2974  	c.ctx_ = ctx
  2975  	return c
  2976  }
  2977  
  2978  // Header returns a http.Header that can be modified by the caller to add
  2979  // headers to the request.
  2980  func (c *PagesGetCall) Header() http.Header {
  2981  	if c.header_ == nil {
  2982  		c.header_ = make(http.Header)
  2983  	}
  2984  	return c.header_
  2985  }
  2986  
  2987  func (c *PagesGetCall) doRequest(alt string) (*http.Response, error) {
  2988  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2989  	if c.ifNoneMatch_ != "" {
  2990  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2991  	}
  2992  	var body io.Reader = nil
  2993  	c.urlParams_.Set("alt", alt)
  2994  	c.urlParams_.Set("prettyPrint", "false")
  2995  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/pages/{pageId}")
  2996  	urls += "?" + c.urlParams_.Encode()
  2997  	req, err := http.NewRequest("GET", urls, body)
  2998  	if err != nil {
  2999  		return nil, err
  3000  	}
  3001  	req.Header = reqHeaders
  3002  	googleapi.Expand(req.URL, map[string]string{
  3003  		"blogId": c.blogId,
  3004  		"pageId": c.pageId,
  3005  	})
  3006  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3007  }
  3008  
  3009  // Do executes the "blogger.pages.get" call.
  3010  // Any non-2xx status code is an error. Response headers are in either
  3011  // *Page.ServerResponse.Header or (if a response was returned at all) in
  3012  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3013  // whether the returned error was because http.StatusNotModified was returned.
  3014  func (c *PagesGetCall) Do(opts ...googleapi.CallOption) (*Page, error) {
  3015  	gensupport.SetOptions(c.urlParams_, opts...)
  3016  	res, err := c.doRequest("json")
  3017  	if res != nil && res.StatusCode == http.StatusNotModified {
  3018  		if res.Body != nil {
  3019  			res.Body.Close()
  3020  		}
  3021  		return nil, gensupport.WrapError(&googleapi.Error{
  3022  			Code:   res.StatusCode,
  3023  			Header: res.Header,
  3024  		})
  3025  	}
  3026  	if err != nil {
  3027  		return nil, err
  3028  	}
  3029  	defer googleapi.CloseBody(res)
  3030  	if err := googleapi.CheckResponse(res); err != nil {
  3031  		return nil, gensupport.WrapError(err)
  3032  	}
  3033  	ret := &Page{
  3034  		ServerResponse: googleapi.ServerResponse{
  3035  			Header:         res.Header,
  3036  			HTTPStatusCode: res.StatusCode,
  3037  		},
  3038  	}
  3039  	target := &ret
  3040  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3041  		return nil, err
  3042  	}
  3043  	return ret, nil
  3044  }
  3045  
  3046  type PagesInsertCall struct {
  3047  	s          *Service
  3048  	blogId     string
  3049  	page       *Page
  3050  	urlParams_ gensupport.URLParams
  3051  	ctx_       context.Context
  3052  	header_    http.Header
  3053  }
  3054  
  3055  // Insert: Inserts a page.
  3056  //
  3057  // - blogId: .
  3058  func (r *PagesService) Insert(blogId string, page *Page) *PagesInsertCall {
  3059  	c := &PagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3060  	c.blogId = blogId
  3061  	c.page = page
  3062  	return c
  3063  }
  3064  
  3065  // IsDraft sets the optional parameter "isDraft":
  3066  func (c *PagesInsertCall) IsDraft(isDraft bool) *PagesInsertCall {
  3067  	c.urlParams_.Set("isDraft", fmt.Sprint(isDraft))
  3068  	return c
  3069  }
  3070  
  3071  // Fields allows partial responses to be retrieved. See
  3072  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3073  // details.
  3074  func (c *PagesInsertCall) Fields(s ...googleapi.Field) *PagesInsertCall {
  3075  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3076  	return c
  3077  }
  3078  
  3079  // Context sets the context to be used in this call's Do method.
  3080  func (c *PagesInsertCall) Context(ctx context.Context) *PagesInsertCall {
  3081  	c.ctx_ = ctx
  3082  	return c
  3083  }
  3084  
  3085  // Header returns a http.Header that can be modified by the caller to add
  3086  // headers to the request.
  3087  func (c *PagesInsertCall) Header() http.Header {
  3088  	if c.header_ == nil {
  3089  		c.header_ = make(http.Header)
  3090  	}
  3091  	return c.header_
  3092  }
  3093  
  3094  func (c *PagesInsertCall) doRequest(alt string) (*http.Response, error) {
  3095  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3096  	var body io.Reader = nil
  3097  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
  3098  	if err != nil {
  3099  		return nil, err
  3100  	}
  3101  	c.urlParams_.Set("alt", alt)
  3102  	c.urlParams_.Set("prettyPrint", "false")
  3103  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/pages")
  3104  	urls += "?" + c.urlParams_.Encode()
  3105  	req, err := http.NewRequest("POST", urls, body)
  3106  	if err != nil {
  3107  		return nil, err
  3108  	}
  3109  	req.Header = reqHeaders
  3110  	googleapi.Expand(req.URL, map[string]string{
  3111  		"blogId": c.blogId,
  3112  	})
  3113  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3114  }
  3115  
  3116  // Do executes the "blogger.pages.insert" call.
  3117  // Any non-2xx status code is an error. Response headers are in either
  3118  // *Page.ServerResponse.Header or (if a response was returned at all) in
  3119  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3120  // whether the returned error was because http.StatusNotModified was returned.
  3121  func (c *PagesInsertCall) Do(opts ...googleapi.CallOption) (*Page, error) {
  3122  	gensupport.SetOptions(c.urlParams_, opts...)
  3123  	res, err := c.doRequest("json")
  3124  	if res != nil && res.StatusCode == http.StatusNotModified {
  3125  		if res.Body != nil {
  3126  			res.Body.Close()
  3127  		}
  3128  		return nil, gensupport.WrapError(&googleapi.Error{
  3129  			Code:   res.StatusCode,
  3130  			Header: res.Header,
  3131  		})
  3132  	}
  3133  	if err != nil {
  3134  		return nil, err
  3135  	}
  3136  	defer googleapi.CloseBody(res)
  3137  	if err := googleapi.CheckResponse(res); err != nil {
  3138  		return nil, gensupport.WrapError(err)
  3139  	}
  3140  	ret := &Page{
  3141  		ServerResponse: googleapi.ServerResponse{
  3142  			Header:         res.Header,
  3143  			HTTPStatusCode: res.StatusCode,
  3144  		},
  3145  	}
  3146  	target := &ret
  3147  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3148  		return nil, err
  3149  	}
  3150  	return ret, nil
  3151  }
  3152  
  3153  type PagesListCall struct {
  3154  	s            *Service
  3155  	blogId       string
  3156  	urlParams_   gensupport.URLParams
  3157  	ifNoneMatch_ string
  3158  	ctx_         context.Context
  3159  	header_      http.Header
  3160  }
  3161  
  3162  // List: Lists pages.
  3163  //
  3164  // - blogId: .
  3165  func (r *PagesService) List(blogId string) *PagesListCall {
  3166  	c := &PagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3167  	c.blogId = blogId
  3168  	return c
  3169  }
  3170  
  3171  // FetchBodies sets the optional parameter "fetchBodies":
  3172  func (c *PagesListCall) FetchBodies(fetchBodies bool) *PagesListCall {
  3173  	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
  3174  	return c
  3175  }
  3176  
  3177  // MaxResults sets the optional parameter "maxResults":
  3178  func (c *PagesListCall) MaxResults(maxResults int64) *PagesListCall {
  3179  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3180  	return c
  3181  }
  3182  
  3183  // PageToken sets the optional parameter "pageToken":
  3184  func (c *PagesListCall) PageToken(pageToken string) *PagesListCall {
  3185  	c.urlParams_.Set("pageToken", pageToken)
  3186  	return c
  3187  }
  3188  
  3189  // Status sets the optional parameter "status":
  3190  //
  3191  // Possible values:
  3192  //
  3193  //	"LIVE"
  3194  //	"DRAFT"
  3195  //	"SOFT_TRASHED"
  3196  func (c *PagesListCall) Status(status ...string) *PagesListCall {
  3197  	c.urlParams_.SetMulti("status", append([]string{}, status...))
  3198  	return c
  3199  }
  3200  
  3201  // View sets the optional parameter "view":
  3202  //
  3203  // Possible values:
  3204  //
  3205  //	"VIEW_TYPE_UNSPECIFIED"
  3206  //	"READER"
  3207  //	"AUTHOR"
  3208  //	"ADMIN"
  3209  func (c *PagesListCall) View(view string) *PagesListCall {
  3210  	c.urlParams_.Set("view", view)
  3211  	return c
  3212  }
  3213  
  3214  // Fields allows partial responses to be retrieved. See
  3215  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3216  // details.
  3217  func (c *PagesListCall) Fields(s ...googleapi.Field) *PagesListCall {
  3218  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3219  	return c
  3220  }
  3221  
  3222  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3223  // object's ETag matches the given value. This is useful for getting updates
  3224  // only after the object has changed since the last request.
  3225  func (c *PagesListCall) IfNoneMatch(entityTag string) *PagesListCall {
  3226  	c.ifNoneMatch_ = entityTag
  3227  	return c
  3228  }
  3229  
  3230  // Context sets the context to be used in this call's Do method.
  3231  func (c *PagesListCall) Context(ctx context.Context) *PagesListCall {
  3232  	c.ctx_ = ctx
  3233  	return c
  3234  }
  3235  
  3236  // Header returns a http.Header that can be modified by the caller to add
  3237  // headers to the request.
  3238  func (c *PagesListCall) Header() http.Header {
  3239  	if c.header_ == nil {
  3240  		c.header_ = make(http.Header)
  3241  	}
  3242  	return c.header_
  3243  }
  3244  
  3245  func (c *PagesListCall) doRequest(alt string) (*http.Response, error) {
  3246  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3247  	if c.ifNoneMatch_ != "" {
  3248  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3249  	}
  3250  	var body io.Reader = nil
  3251  	c.urlParams_.Set("alt", alt)
  3252  	c.urlParams_.Set("prettyPrint", "false")
  3253  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/pages")
  3254  	urls += "?" + c.urlParams_.Encode()
  3255  	req, err := http.NewRequest("GET", urls, body)
  3256  	if err != nil {
  3257  		return nil, err
  3258  	}
  3259  	req.Header = reqHeaders
  3260  	googleapi.Expand(req.URL, map[string]string{
  3261  		"blogId": c.blogId,
  3262  	})
  3263  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3264  }
  3265  
  3266  // Do executes the "blogger.pages.list" call.
  3267  // Any non-2xx status code is an error. Response headers are in either
  3268  // *PageList.ServerResponse.Header or (if a response was returned at all) in
  3269  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3270  // whether the returned error was because http.StatusNotModified was returned.
  3271  func (c *PagesListCall) Do(opts ...googleapi.CallOption) (*PageList, error) {
  3272  	gensupport.SetOptions(c.urlParams_, opts...)
  3273  	res, err := c.doRequest("json")
  3274  	if res != nil && res.StatusCode == http.StatusNotModified {
  3275  		if res.Body != nil {
  3276  			res.Body.Close()
  3277  		}
  3278  		return nil, gensupport.WrapError(&googleapi.Error{
  3279  			Code:   res.StatusCode,
  3280  			Header: res.Header,
  3281  		})
  3282  	}
  3283  	if err != nil {
  3284  		return nil, err
  3285  	}
  3286  	defer googleapi.CloseBody(res)
  3287  	if err := googleapi.CheckResponse(res); err != nil {
  3288  		return nil, gensupport.WrapError(err)
  3289  	}
  3290  	ret := &PageList{
  3291  		ServerResponse: googleapi.ServerResponse{
  3292  			Header:         res.Header,
  3293  			HTTPStatusCode: res.StatusCode,
  3294  		},
  3295  	}
  3296  	target := &ret
  3297  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3298  		return nil, err
  3299  	}
  3300  	return ret, nil
  3301  }
  3302  
  3303  // Pages invokes f for each page of results.
  3304  // A non-nil error returned from f will halt the iteration.
  3305  // The provided context supersedes any context provided to the Context method.
  3306  func (c *PagesListCall) Pages(ctx context.Context, f func(*PageList) error) error {
  3307  	c.ctx_ = ctx
  3308  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3309  	for {
  3310  		x, err := c.Do()
  3311  		if err != nil {
  3312  			return err
  3313  		}
  3314  		if err := f(x); err != nil {
  3315  			return err
  3316  		}
  3317  		if x.NextPageToken == "" {
  3318  			return nil
  3319  		}
  3320  		c.PageToken(x.NextPageToken)
  3321  	}
  3322  }
  3323  
  3324  type PagesPatchCall struct {
  3325  	s          *Service
  3326  	blogId     string
  3327  	pageId     string
  3328  	page       *Page
  3329  	urlParams_ gensupport.URLParams
  3330  	ctx_       context.Context
  3331  	header_    http.Header
  3332  }
  3333  
  3334  // Patch: Patches a page.
  3335  //
  3336  // - blogId: .
  3337  // - pageId: .
  3338  func (r *PagesService) Patch(blogId string, pageId string, page *Page) *PagesPatchCall {
  3339  	c := &PagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3340  	c.blogId = blogId
  3341  	c.pageId = pageId
  3342  	c.page = page
  3343  	return c
  3344  }
  3345  
  3346  // Publish sets the optional parameter "publish":
  3347  func (c *PagesPatchCall) Publish(publish bool) *PagesPatchCall {
  3348  	c.urlParams_.Set("publish", fmt.Sprint(publish))
  3349  	return c
  3350  }
  3351  
  3352  // Revert sets the optional parameter "revert":
  3353  func (c *PagesPatchCall) Revert(revert bool) *PagesPatchCall {
  3354  	c.urlParams_.Set("revert", fmt.Sprint(revert))
  3355  	return c
  3356  }
  3357  
  3358  // Fields allows partial responses to be retrieved. See
  3359  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3360  // details.
  3361  func (c *PagesPatchCall) Fields(s ...googleapi.Field) *PagesPatchCall {
  3362  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3363  	return c
  3364  }
  3365  
  3366  // Context sets the context to be used in this call's Do method.
  3367  func (c *PagesPatchCall) Context(ctx context.Context) *PagesPatchCall {
  3368  	c.ctx_ = ctx
  3369  	return c
  3370  }
  3371  
  3372  // Header returns a http.Header that can be modified by the caller to add
  3373  // headers to the request.
  3374  func (c *PagesPatchCall) Header() http.Header {
  3375  	if c.header_ == nil {
  3376  		c.header_ = make(http.Header)
  3377  	}
  3378  	return c.header_
  3379  }
  3380  
  3381  func (c *PagesPatchCall) doRequest(alt string) (*http.Response, error) {
  3382  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3383  	var body io.Reader = nil
  3384  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
  3385  	if err != nil {
  3386  		return nil, err
  3387  	}
  3388  	c.urlParams_.Set("alt", alt)
  3389  	c.urlParams_.Set("prettyPrint", "false")
  3390  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/pages/{pageId}")
  3391  	urls += "?" + c.urlParams_.Encode()
  3392  	req, err := http.NewRequest("PATCH", urls, body)
  3393  	if err != nil {
  3394  		return nil, err
  3395  	}
  3396  	req.Header = reqHeaders
  3397  	googleapi.Expand(req.URL, map[string]string{
  3398  		"blogId": c.blogId,
  3399  		"pageId": c.pageId,
  3400  	})
  3401  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3402  }
  3403  
  3404  // Do executes the "blogger.pages.patch" call.
  3405  // Any non-2xx status code is an error. Response headers are in either
  3406  // *Page.ServerResponse.Header or (if a response was returned at all) in
  3407  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3408  // whether the returned error was because http.StatusNotModified was returned.
  3409  func (c *PagesPatchCall) Do(opts ...googleapi.CallOption) (*Page, error) {
  3410  	gensupport.SetOptions(c.urlParams_, opts...)
  3411  	res, err := c.doRequest("json")
  3412  	if res != nil && res.StatusCode == http.StatusNotModified {
  3413  		if res.Body != nil {
  3414  			res.Body.Close()
  3415  		}
  3416  		return nil, gensupport.WrapError(&googleapi.Error{
  3417  			Code:   res.StatusCode,
  3418  			Header: res.Header,
  3419  		})
  3420  	}
  3421  	if err != nil {
  3422  		return nil, err
  3423  	}
  3424  	defer googleapi.CloseBody(res)
  3425  	if err := googleapi.CheckResponse(res); err != nil {
  3426  		return nil, gensupport.WrapError(err)
  3427  	}
  3428  	ret := &Page{
  3429  		ServerResponse: googleapi.ServerResponse{
  3430  			Header:         res.Header,
  3431  			HTTPStatusCode: res.StatusCode,
  3432  		},
  3433  	}
  3434  	target := &ret
  3435  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3436  		return nil, err
  3437  	}
  3438  	return ret, nil
  3439  }
  3440  
  3441  type PagesPublishCall struct {
  3442  	s          *Service
  3443  	blogId     string
  3444  	pageId     string
  3445  	urlParams_ gensupport.URLParams
  3446  	ctx_       context.Context
  3447  	header_    http.Header
  3448  }
  3449  
  3450  // Publish: Publishes a page.
  3451  //
  3452  // - blogId: .
  3453  // - pageId: .
  3454  func (r *PagesService) Publish(blogId string, pageId string) *PagesPublishCall {
  3455  	c := &PagesPublishCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3456  	c.blogId = blogId
  3457  	c.pageId = pageId
  3458  	return c
  3459  }
  3460  
  3461  // Fields allows partial responses to be retrieved. See
  3462  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3463  // details.
  3464  func (c *PagesPublishCall) Fields(s ...googleapi.Field) *PagesPublishCall {
  3465  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3466  	return c
  3467  }
  3468  
  3469  // Context sets the context to be used in this call's Do method.
  3470  func (c *PagesPublishCall) Context(ctx context.Context) *PagesPublishCall {
  3471  	c.ctx_ = ctx
  3472  	return c
  3473  }
  3474  
  3475  // Header returns a http.Header that can be modified by the caller to add
  3476  // headers to the request.
  3477  func (c *PagesPublishCall) Header() http.Header {
  3478  	if c.header_ == nil {
  3479  		c.header_ = make(http.Header)
  3480  	}
  3481  	return c.header_
  3482  }
  3483  
  3484  func (c *PagesPublishCall) doRequest(alt string) (*http.Response, error) {
  3485  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3486  	var body io.Reader = nil
  3487  	c.urlParams_.Set("alt", alt)
  3488  	c.urlParams_.Set("prettyPrint", "false")
  3489  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/pages/{pageId}/publish")
  3490  	urls += "?" + c.urlParams_.Encode()
  3491  	req, err := http.NewRequest("POST", urls, body)
  3492  	if err != nil {
  3493  		return nil, err
  3494  	}
  3495  	req.Header = reqHeaders
  3496  	googleapi.Expand(req.URL, map[string]string{
  3497  		"blogId": c.blogId,
  3498  		"pageId": c.pageId,
  3499  	})
  3500  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3501  }
  3502  
  3503  // Do executes the "blogger.pages.publish" call.
  3504  // Any non-2xx status code is an error. Response headers are in either
  3505  // *Page.ServerResponse.Header or (if a response was returned at all) in
  3506  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3507  // whether the returned error was because http.StatusNotModified was returned.
  3508  func (c *PagesPublishCall) Do(opts ...googleapi.CallOption) (*Page, error) {
  3509  	gensupport.SetOptions(c.urlParams_, opts...)
  3510  	res, err := c.doRequest("json")
  3511  	if res != nil && res.StatusCode == http.StatusNotModified {
  3512  		if res.Body != nil {
  3513  			res.Body.Close()
  3514  		}
  3515  		return nil, gensupport.WrapError(&googleapi.Error{
  3516  			Code:   res.StatusCode,
  3517  			Header: res.Header,
  3518  		})
  3519  	}
  3520  	if err != nil {
  3521  		return nil, err
  3522  	}
  3523  	defer googleapi.CloseBody(res)
  3524  	if err := googleapi.CheckResponse(res); err != nil {
  3525  		return nil, gensupport.WrapError(err)
  3526  	}
  3527  	ret := &Page{
  3528  		ServerResponse: googleapi.ServerResponse{
  3529  			Header:         res.Header,
  3530  			HTTPStatusCode: res.StatusCode,
  3531  		},
  3532  	}
  3533  	target := &ret
  3534  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3535  		return nil, err
  3536  	}
  3537  	return ret, nil
  3538  }
  3539  
  3540  type PagesRevertCall struct {
  3541  	s          *Service
  3542  	blogId     string
  3543  	pageId     string
  3544  	urlParams_ gensupport.URLParams
  3545  	ctx_       context.Context
  3546  	header_    http.Header
  3547  }
  3548  
  3549  // Revert: Reverts a published or scheduled page to draft state.
  3550  //
  3551  // - blogId: .
  3552  // - pageId: .
  3553  func (r *PagesService) Revert(blogId string, pageId string) *PagesRevertCall {
  3554  	c := &PagesRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3555  	c.blogId = blogId
  3556  	c.pageId = pageId
  3557  	return c
  3558  }
  3559  
  3560  // Fields allows partial responses to be retrieved. See
  3561  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3562  // details.
  3563  func (c *PagesRevertCall) Fields(s ...googleapi.Field) *PagesRevertCall {
  3564  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3565  	return c
  3566  }
  3567  
  3568  // Context sets the context to be used in this call's Do method.
  3569  func (c *PagesRevertCall) Context(ctx context.Context) *PagesRevertCall {
  3570  	c.ctx_ = ctx
  3571  	return c
  3572  }
  3573  
  3574  // Header returns a http.Header that can be modified by the caller to add
  3575  // headers to the request.
  3576  func (c *PagesRevertCall) Header() http.Header {
  3577  	if c.header_ == nil {
  3578  		c.header_ = make(http.Header)
  3579  	}
  3580  	return c.header_
  3581  }
  3582  
  3583  func (c *PagesRevertCall) doRequest(alt string) (*http.Response, error) {
  3584  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3585  	var body io.Reader = nil
  3586  	c.urlParams_.Set("alt", alt)
  3587  	c.urlParams_.Set("prettyPrint", "false")
  3588  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/pages/{pageId}/revert")
  3589  	urls += "?" + c.urlParams_.Encode()
  3590  	req, err := http.NewRequest("POST", urls, body)
  3591  	if err != nil {
  3592  		return nil, err
  3593  	}
  3594  	req.Header = reqHeaders
  3595  	googleapi.Expand(req.URL, map[string]string{
  3596  		"blogId": c.blogId,
  3597  		"pageId": c.pageId,
  3598  	})
  3599  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3600  }
  3601  
  3602  // Do executes the "blogger.pages.revert" call.
  3603  // Any non-2xx status code is an error. Response headers are in either
  3604  // *Page.ServerResponse.Header or (if a response was returned at all) in
  3605  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3606  // whether the returned error was because http.StatusNotModified was returned.
  3607  func (c *PagesRevertCall) Do(opts ...googleapi.CallOption) (*Page, error) {
  3608  	gensupport.SetOptions(c.urlParams_, opts...)
  3609  	res, err := c.doRequest("json")
  3610  	if res != nil && res.StatusCode == http.StatusNotModified {
  3611  		if res.Body != nil {
  3612  			res.Body.Close()
  3613  		}
  3614  		return nil, gensupport.WrapError(&googleapi.Error{
  3615  			Code:   res.StatusCode,
  3616  			Header: res.Header,
  3617  		})
  3618  	}
  3619  	if err != nil {
  3620  		return nil, err
  3621  	}
  3622  	defer googleapi.CloseBody(res)
  3623  	if err := googleapi.CheckResponse(res); err != nil {
  3624  		return nil, gensupport.WrapError(err)
  3625  	}
  3626  	ret := &Page{
  3627  		ServerResponse: googleapi.ServerResponse{
  3628  			Header:         res.Header,
  3629  			HTTPStatusCode: res.StatusCode,
  3630  		},
  3631  	}
  3632  	target := &ret
  3633  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3634  		return nil, err
  3635  	}
  3636  	return ret, nil
  3637  }
  3638  
  3639  type PagesUpdateCall struct {
  3640  	s          *Service
  3641  	blogId     string
  3642  	pageId     string
  3643  	page       *Page
  3644  	urlParams_ gensupport.URLParams
  3645  	ctx_       context.Context
  3646  	header_    http.Header
  3647  }
  3648  
  3649  // Update: Updates a page by blog id and page id.
  3650  //
  3651  // - blogId: .
  3652  // - pageId: .
  3653  func (r *PagesService) Update(blogId string, pageId string, page *Page) *PagesUpdateCall {
  3654  	c := &PagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3655  	c.blogId = blogId
  3656  	c.pageId = pageId
  3657  	c.page = page
  3658  	return c
  3659  }
  3660  
  3661  // Publish sets the optional parameter "publish":
  3662  func (c *PagesUpdateCall) Publish(publish bool) *PagesUpdateCall {
  3663  	c.urlParams_.Set("publish", fmt.Sprint(publish))
  3664  	return c
  3665  }
  3666  
  3667  // Revert sets the optional parameter "revert":
  3668  func (c *PagesUpdateCall) Revert(revert bool) *PagesUpdateCall {
  3669  	c.urlParams_.Set("revert", fmt.Sprint(revert))
  3670  	return c
  3671  }
  3672  
  3673  // Fields allows partial responses to be retrieved. See
  3674  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3675  // details.
  3676  func (c *PagesUpdateCall) Fields(s ...googleapi.Field) *PagesUpdateCall {
  3677  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3678  	return c
  3679  }
  3680  
  3681  // Context sets the context to be used in this call's Do method.
  3682  func (c *PagesUpdateCall) Context(ctx context.Context) *PagesUpdateCall {
  3683  	c.ctx_ = ctx
  3684  	return c
  3685  }
  3686  
  3687  // Header returns a http.Header that can be modified by the caller to add
  3688  // headers to the request.
  3689  func (c *PagesUpdateCall) Header() http.Header {
  3690  	if c.header_ == nil {
  3691  		c.header_ = make(http.Header)
  3692  	}
  3693  	return c.header_
  3694  }
  3695  
  3696  func (c *PagesUpdateCall) doRequest(alt string) (*http.Response, error) {
  3697  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3698  	var body io.Reader = nil
  3699  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
  3700  	if err != nil {
  3701  		return nil, err
  3702  	}
  3703  	c.urlParams_.Set("alt", alt)
  3704  	c.urlParams_.Set("prettyPrint", "false")
  3705  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/pages/{pageId}")
  3706  	urls += "?" + c.urlParams_.Encode()
  3707  	req, err := http.NewRequest("PUT", urls, body)
  3708  	if err != nil {
  3709  		return nil, err
  3710  	}
  3711  	req.Header = reqHeaders
  3712  	googleapi.Expand(req.URL, map[string]string{
  3713  		"blogId": c.blogId,
  3714  		"pageId": c.pageId,
  3715  	})
  3716  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3717  }
  3718  
  3719  // Do executes the "blogger.pages.update" call.
  3720  // Any non-2xx status code is an error. Response headers are in either
  3721  // *Page.ServerResponse.Header or (if a response was returned at all) in
  3722  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3723  // whether the returned error was because http.StatusNotModified was returned.
  3724  func (c *PagesUpdateCall) Do(opts ...googleapi.CallOption) (*Page, error) {
  3725  	gensupport.SetOptions(c.urlParams_, opts...)
  3726  	res, err := c.doRequest("json")
  3727  	if res != nil && res.StatusCode == http.StatusNotModified {
  3728  		if res.Body != nil {
  3729  			res.Body.Close()
  3730  		}
  3731  		return nil, gensupport.WrapError(&googleapi.Error{
  3732  			Code:   res.StatusCode,
  3733  			Header: res.Header,
  3734  		})
  3735  	}
  3736  	if err != nil {
  3737  		return nil, err
  3738  	}
  3739  	defer googleapi.CloseBody(res)
  3740  	if err := googleapi.CheckResponse(res); err != nil {
  3741  		return nil, gensupport.WrapError(err)
  3742  	}
  3743  	ret := &Page{
  3744  		ServerResponse: googleapi.ServerResponse{
  3745  			Header:         res.Header,
  3746  			HTTPStatusCode: res.StatusCode,
  3747  		},
  3748  	}
  3749  	target := &ret
  3750  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3751  		return nil, err
  3752  	}
  3753  	return ret, nil
  3754  }
  3755  
  3756  type PostUserInfosGetCall struct {
  3757  	s            *Service
  3758  	userId       string
  3759  	blogId       string
  3760  	postId       string
  3761  	urlParams_   gensupport.URLParams
  3762  	ifNoneMatch_ string
  3763  	ctx_         context.Context
  3764  	header_      http.Header
  3765  }
  3766  
  3767  // Get: Gets one post and user info pair, by post_id and user_id.
  3768  //
  3769  // - blogId: .
  3770  // - postId: .
  3771  // - userId: .
  3772  func (r *PostUserInfosService) Get(userId string, blogId string, postId string) *PostUserInfosGetCall {
  3773  	c := &PostUserInfosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3774  	c.userId = userId
  3775  	c.blogId = blogId
  3776  	c.postId = postId
  3777  	return c
  3778  }
  3779  
  3780  // MaxComments sets the optional parameter "maxComments":
  3781  func (c *PostUserInfosGetCall) MaxComments(maxComments int64) *PostUserInfosGetCall {
  3782  	c.urlParams_.Set("maxComments", fmt.Sprint(maxComments))
  3783  	return c
  3784  }
  3785  
  3786  // Fields allows partial responses to be retrieved. See
  3787  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3788  // details.
  3789  func (c *PostUserInfosGetCall) Fields(s ...googleapi.Field) *PostUserInfosGetCall {
  3790  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3791  	return c
  3792  }
  3793  
  3794  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3795  // object's ETag matches the given value. This is useful for getting updates
  3796  // only after the object has changed since the last request.
  3797  func (c *PostUserInfosGetCall) IfNoneMatch(entityTag string) *PostUserInfosGetCall {
  3798  	c.ifNoneMatch_ = entityTag
  3799  	return c
  3800  }
  3801  
  3802  // Context sets the context to be used in this call's Do method.
  3803  func (c *PostUserInfosGetCall) Context(ctx context.Context) *PostUserInfosGetCall {
  3804  	c.ctx_ = ctx
  3805  	return c
  3806  }
  3807  
  3808  // Header returns a http.Header that can be modified by the caller to add
  3809  // headers to the request.
  3810  func (c *PostUserInfosGetCall) Header() http.Header {
  3811  	if c.header_ == nil {
  3812  		c.header_ = make(http.Header)
  3813  	}
  3814  	return c.header_
  3815  }
  3816  
  3817  func (c *PostUserInfosGetCall) doRequest(alt string) (*http.Response, error) {
  3818  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3819  	if c.ifNoneMatch_ != "" {
  3820  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3821  	}
  3822  	var body io.Reader = nil
  3823  	c.urlParams_.Set("alt", alt)
  3824  	c.urlParams_.Set("prettyPrint", "false")
  3825  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users/{userId}/blogs/{blogId}/posts/{postId}")
  3826  	urls += "?" + c.urlParams_.Encode()
  3827  	req, err := http.NewRequest("GET", urls, body)
  3828  	if err != nil {
  3829  		return nil, err
  3830  	}
  3831  	req.Header = reqHeaders
  3832  	googleapi.Expand(req.URL, map[string]string{
  3833  		"userId": c.userId,
  3834  		"blogId": c.blogId,
  3835  		"postId": c.postId,
  3836  	})
  3837  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3838  }
  3839  
  3840  // Do executes the "blogger.postUserInfos.get" call.
  3841  // Any non-2xx status code is an error. Response headers are in either
  3842  // *PostUserInfo.ServerResponse.Header or (if a response was returned at all)
  3843  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3844  // whether the returned error was because http.StatusNotModified was returned.
  3845  func (c *PostUserInfosGetCall) Do(opts ...googleapi.CallOption) (*PostUserInfo, error) {
  3846  	gensupport.SetOptions(c.urlParams_, opts...)
  3847  	res, err := c.doRequest("json")
  3848  	if res != nil && res.StatusCode == http.StatusNotModified {
  3849  		if res.Body != nil {
  3850  			res.Body.Close()
  3851  		}
  3852  		return nil, gensupport.WrapError(&googleapi.Error{
  3853  			Code:   res.StatusCode,
  3854  			Header: res.Header,
  3855  		})
  3856  	}
  3857  	if err != nil {
  3858  		return nil, err
  3859  	}
  3860  	defer googleapi.CloseBody(res)
  3861  	if err := googleapi.CheckResponse(res); err != nil {
  3862  		return nil, gensupport.WrapError(err)
  3863  	}
  3864  	ret := &PostUserInfo{
  3865  		ServerResponse: googleapi.ServerResponse{
  3866  			Header:         res.Header,
  3867  			HTTPStatusCode: res.StatusCode,
  3868  		},
  3869  	}
  3870  	target := &ret
  3871  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3872  		return nil, err
  3873  	}
  3874  	return ret, nil
  3875  }
  3876  
  3877  type PostUserInfosListCall struct {
  3878  	s            *Service
  3879  	userId       string
  3880  	blogId       string
  3881  	urlParams_   gensupport.URLParams
  3882  	ifNoneMatch_ string
  3883  	ctx_         context.Context
  3884  	header_      http.Header
  3885  }
  3886  
  3887  // List: Lists post and user info pairs.
  3888  //
  3889  // - blogId: .
  3890  // - userId: .
  3891  func (r *PostUserInfosService) List(userId string, blogId string) *PostUserInfosListCall {
  3892  	c := &PostUserInfosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3893  	c.userId = userId
  3894  	c.blogId = blogId
  3895  	return c
  3896  }
  3897  
  3898  // EndDate sets the optional parameter "endDate":
  3899  func (c *PostUserInfosListCall) EndDate(endDate string) *PostUserInfosListCall {
  3900  	c.urlParams_.Set("endDate", endDate)
  3901  	return c
  3902  }
  3903  
  3904  // FetchBodies sets the optional parameter "fetchBodies":
  3905  func (c *PostUserInfosListCall) FetchBodies(fetchBodies bool) *PostUserInfosListCall {
  3906  	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
  3907  	return c
  3908  }
  3909  
  3910  // Labels sets the optional parameter "labels":
  3911  func (c *PostUserInfosListCall) Labels(labels string) *PostUserInfosListCall {
  3912  	c.urlParams_.Set("labels", labels)
  3913  	return c
  3914  }
  3915  
  3916  // MaxResults sets the optional parameter "maxResults":
  3917  func (c *PostUserInfosListCall) MaxResults(maxResults int64) *PostUserInfosListCall {
  3918  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  3919  	return c
  3920  }
  3921  
  3922  // OrderBy sets the optional parameter "orderBy":
  3923  //
  3924  // Possible values:
  3925  //
  3926  //	"ORDER_BY_UNSPECIFIED"
  3927  //	"PUBLISHED" (default)
  3928  //	"UPDATED"
  3929  func (c *PostUserInfosListCall) OrderBy(orderBy string) *PostUserInfosListCall {
  3930  	c.urlParams_.Set("orderBy", orderBy)
  3931  	return c
  3932  }
  3933  
  3934  // PageToken sets the optional parameter "pageToken":
  3935  func (c *PostUserInfosListCall) PageToken(pageToken string) *PostUserInfosListCall {
  3936  	c.urlParams_.Set("pageToken", pageToken)
  3937  	return c
  3938  }
  3939  
  3940  // StartDate sets the optional parameter "startDate":
  3941  func (c *PostUserInfosListCall) StartDate(startDate string) *PostUserInfosListCall {
  3942  	c.urlParams_.Set("startDate", startDate)
  3943  	return c
  3944  }
  3945  
  3946  // Status sets the optional parameter "status":
  3947  //
  3948  // Possible values:
  3949  //
  3950  //	"LIVE"
  3951  //	"DRAFT"
  3952  //	"SCHEDULED"
  3953  //	"SOFT_TRASHED"
  3954  func (c *PostUserInfosListCall) Status(status ...string) *PostUserInfosListCall {
  3955  	c.urlParams_.SetMulti("status", append([]string{}, status...))
  3956  	return c
  3957  }
  3958  
  3959  // View sets the optional parameter "view":
  3960  //
  3961  // Possible values:
  3962  //
  3963  //	"VIEW_TYPE_UNSPECIFIED"
  3964  //	"READER"
  3965  //	"AUTHOR"
  3966  //	"ADMIN"
  3967  func (c *PostUserInfosListCall) View(view string) *PostUserInfosListCall {
  3968  	c.urlParams_.Set("view", view)
  3969  	return c
  3970  }
  3971  
  3972  // Fields allows partial responses to be retrieved. See
  3973  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3974  // details.
  3975  func (c *PostUserInfosListCall) Fields(s ...googleapi.Field) *PostUserInfosListCall {
  3976  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3977  	return c
  3978  }
  3979  
  3980  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3981  // object's ETag matches the given value. This is useful for getting updates
  3982  // only after the object has changed since the last request.
  3983  func (c *PostUserInfosListCall) IfNoneMatch(entityTag string) *PostUserInfosListCall {
  3984  	c.ifNoneMatch_ = entityTag
  3985  	return c
  3986  }
  3987  
  3988  // Context sets the context to be used in this call's Do method.
  3989  func (c *PostUserInfosListCall) Context(ctx context.Context) *PostUserInfosListCall {
  3990  	c.ctx_ = ctx
  3991  	return c
  3992  }
  3993  
  3994  // Header returns a http.Header that can be modified by the caller to add
  3995  // headers to the request.
  3996  func (c *PostUserInfosListCall) Header() http.Header {
  3997  	if c.header_ == nil {
  3998  		c.header_ = make(http.Header)
  3999  	}
  4000  	return c.header_
  4001  }
  4002  
  4003  func (c *PostUserInfosListCall) doRequest(alt string) (*http.Response, error) {
  4004  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4005  	if c.ifNoneMatch_ != "" {
  4006  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4007  	}
  4008  	var body io.Reader = nil
  4009  	c.urlParams_.Set("alt", alt)
  4010  	c.urlParams_.Set("prettyPrint", "false")
  4011  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users/{userId}/blogs/{blogId}/posts")
  4012  	urls += "?" + c.urlParams_.Encode()
  4013  	req, err := http.NewRequest("GET", urls, body)
  4014  	if err != nil {
  4015  		return nil, err
  4016  	}
  4017  	req.Header = reqHeaders
  4018  	googleapi.Expand(req.URL, map[string]string{
  4019  		"userId": c.userId,
  4020  		"blogId": c.blogId,
  4021  	})
  4022  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4023  }
  4024  
  4025  // Do executes the "blogger.postUserInfos.list" call.
  4026  // Any non-2xx status code is an error. Response headers are in either
  4027  // *PostUserInfosList.ServerResponse.Header or (if a response was returned at
  4028  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4029  // check whether the returned error was because http.StatusNotModified was
  4030  // returned.
  4031  func (c *PostUserInfosListCall) Do(opts ...googleapi.CallOption) (*PostUserInfosList, error) {
  4032  	gensupport.SetOptions(c.urlParams_, opts...)
  4033  	res, err := c.doRequest("json")
  4034  	if res != nil && res.StatusCode == http.StatusNotModified {
  4035  		if res.Body != nil {
  4036  			res.Body.Close()
  4037  		}
  4038  		return nil, gensupport.WrapError(&googleapi.Error{
  4039  			Code:   res.StatusCode,
  4040  			Header: res.Header,
  4041  		})
  4042  	}
  4043  	if err != nil {
  4044  		return nil, err
  4045  	}
  4046  	defer googleapi.CloseBody(res)
  4047  	if err := googleapi.CheckResponse(res); err != nil {
  4048  		return nil, gensupport.WrapError(err)
  4049  	}
  4050  	ret := &PostUserInfosList{
  4051  		ServerResponse: googleapi.ServerResponse{
  4052  			Header:         res.Header,
  4053  			HTTPStatusCode: res.StatusCode,
  4054  		},
  4055  	}
  4056  	target := &ret
  4057  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4058  		return nil, err
  4059  	}
  4060  	return ret, nil
  4061  }
  4062  
  4063  // Pages invokes f for each page of results.
  4064  // A non-nil error returned from f will halt the iteration.
  4065  // The provided context supersedes any context provided to the Context method.
  4066  func (c *PostUserInfosListCall) Pages(ctx context.Context, f func(*PostUserInfosList) error) error {
  4067  	c.ctx_ = ctx
  4068  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4069  	for {
  4070  		x, err := c.Do()
  4071  		if err != nil {
  4072  			return err
  4073  		}
  4074  		if err := f(x); err != nil {
  4075  			return err
  4076  		}
  4077  		if x.NextPageToken == "" {
  4078  			return nil
  4079  		}
  4080  		c.PageToken(x.NextPageToken)
  4081  	}
  4082  }
  4083  
  4084  type PostsDeleteCall struct {
  4085  	s          *Service
  4086  	blogId     string
  4087  	postId     string
  4088  	urlParams_ gensupport.URLParams
  4089  	ctx_       context.Context
  4090  	header_    http.Header
  4091  }
  4092  
  4093  // Delete: Deletes a post by blog id and post id.
  4094  //
  4095  // - blogId: .
  4096  // - postId: .
  4097  func (r *PostsService) Delete(blogId string, postId string) *PostsDeleteCall {
  4098  	c := &PostsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4099  	c.blogId = blogId
  4100  	c.postId = postId
  4101  	return c
  4102  }
  4103  
  4104  // UseTrash sets the optional parameter "useTrash": Move to Trash if possible
  4105  func (c *PostsDeleteCall) UseTrash(useTrash bool) *PostsDeleteCall {
  4106  	c.urlParams_.Set("useTrash", fmt.Sprint(useTrash))
  4107  	return c
  4108  }
  4109  
  4110  // Fields allows partial responses to be retrieved. See
  4111  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4112  // details.
  4113  func (c *PostsDeleteCall) Fields(s ...googleapi.Field) *PostsDeleteCall {
  4114  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4115  	return c
  4116  }
  4117  
  4118  // Context sets the context to be used in this call's Do method.
  4119  func (c *PostsDeleteCall) Context(ctx context.Context) *PostsDeleteCall {
  4120  	c.ctx_ = ctx
  4121  	return c
  4122  }
  4123  
  4124  // Header returns a http.Header that can be modified by the caller to add
  4125  // headers to the request.
  4126  func (c *PostsDeleteCall) Header() http.Header {
  4127  	if c.header_ == nil {
  4128  		c.header_ = make(http.Header)
  4129  	}
  4130  	return c.header_
  4131  }
  4132  
  4133  func (c *PostsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4134  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4135  	var body io.Reader = nil
  4136  	c.urlParams_.Set("alt", alt)
  4137  	c.urlParams_.Set("prettyPrint", "false")
  4138  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}")
  4139  	urls += "?" + c.urlParams_.Encode()
  4140  	req, err := http.NewRequest("DELETE", urls, body)
  4141  	if err != nil {
  4142  		return nil, err
  4143  	}
  4144  	req.Header = reqHeaders
  4145  	googleapi.Expand(req.URL, map[string]string{
  4146  		"blogId": c.blogId,
  4147  		"postId": c.postId,
  4148  	})
  4149  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4150  }
  4151  
  4152  // Do executes the "blogger.posts.delete" call.
  4153  func (c *PostsDeleteCall) Do(opts ...googleapi.CallOption) error {
  4154  	gensupport.SetOptions(c.urlParams_, opts...)
  4155  	res, err := c.doRequest("json")
  4156  	if err != nil {
  4157  		return err
  4158  	}
  4159  	defer googleapi.CloseBody(res)
  4160  	if err := googleapi.CheckResponse(res); err != nil {
  4161  		return gensupport.WrapError(err)
  4162  	}
  4163  	return nil
  4164  }
  4165  
  4166  type PostsGetCall struct {
  4167  	s            *Service
  4168  	blogId       string
  4169  	postId       string
  4170  	urlParams_   gensupport.URLParams
  4171  	ifNoneMatch_ string
  4172  	ctx_         context.Context
  4173  	header_      http.Header
  4174  }
  4175  
  4176  // Get: Gets a post by blog id and post id
  4177  //
  4178  // - blogId: .
  4179  // - postId: .
  4180  func (r *PostsService) Get(blogId string, postId string) *PostsGetCall {
  4181  	c := &PostsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4182  	c.blogId = blogId
  4183  	c.postId = postId
  4184  	return c
  4185  }
  4186  
  4187  // FetchBody sets the optional parameter "fetchBody":
  4188  func (c *PostsGetCall) FetchBody(fetchBody bool) *PostsGetCall {
  4189  	c.urlParams_.Set("fetchBody", fmt.Sprint(fetchBody))
  4190  	return c
  4191  }
  4192  
  4193  // FetchImages sets the optional parameter "fetchImages":
  4194  func (c *PostsGetCall) FetchImages(fetchImages bool) *PostsGetCall {
  4195  	c.urlParams_.Set("fetchImages", fmt.Sprint(fetchImages))
  4196  	return c
  4197  }
  4198  
  4199  // MaxComments sets the optional parameter "maxComments":
  4200  func (c *PostsGetCall) MaxComments(maxComments int64) *PostsGetCall {
  4201  	c.urlParams_.Set("maxComments", fmt.Sprint(maxComments))
  4202  	return c
  4203  }
  4204  
  4205  // View sets the optional parameter "view":
  4206  //
  4207  // Possible values:
  4208  //
  4209  //	"VIEW_TYPE_UNSPECIFIED"
  4210  //	"READER"
  4211  //	"AUTHOR"
  4212  //	"ADMIN"
  4213  func (c *PostsGetCall) View(view string) *PostsGetCall {
  4214  	c.urlParams_.Set("view", view)
  4215  	return c
  4216  }
  4217  
  4218  // Fields allows partial responses to be retrieved. See
  4219  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4220  // details.
  4221  func (c *PostsGetCall) Fields(s ...googleapi.Field) *PostsGetCall {
  4222  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4223  	return c
  4224  }
  4225  
  4226  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4227  // object's ETag matches the given value. This is useful for getting updates
  4228  // only after the object has changed since the last request.
  4229  func (c *PostsGetCall) IfNoneMatch(entityTag string) *PostsGetCall {
  4230  	c.ifNoneMatch_ = entityTag
  4231  	return c
  4232  }
  4233  
  4234  // Context sets the context to be used in this call's Do method.
  4235  func (c *PostsGetCall) Context(ctx context.Context) *PostsGetCall {
  4236  	c.ctx_ = ctx
  4237  	return c
  4238  }
  4239  
  4240  // Header returns a http.Header that can be modified by the caller to add
  4241  // headers to the request.
  4242  func (c *PostsGetCall) Header() http.Header {
  4243  	if c.header_ == nil {
  4244  		c.header_ = make(http.Header)
  4245  	}
  4246  	return c.header_
  4247  }
  4248  
  4249  func (c *PostsGetCall) doRequest(alt string) (*http.Response, error) {
  4250  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4251  	if c.ifNoneMatch_ != "" {
  4252  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4253  	}
  4254  	var body io.Reader = nil
  4255  	c.urlParams_.Set("alt", alt)
  4256  	c.urlParams_.Set("prettyPrint", "false")
  4257  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}")
  4258  	urls += "?" + c.urlParams_.Encode()
  4259  	req, err := http.NewRequest("GET", urls, body)
  4260  	if err != nil {
  4261  		return nil, err
  4262  	}
  4263  	req.Header = reqHeaders
  4264  	googleapi.Expand(req.URL, map[string]string{
  4265  		"blogId": c.blogId,
  4266  		"postId": c.postId,
  4267  	})
  4268  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4269  }
  4270  
  4271  // Do executes the "blogger.posts.get" call.
  4272  // Any non-2xx status code is an error. Response headers are in either
  4273  // *Post.ServerResponse.Header or (if a response was returned at all) in
  4274  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4275  // whether the returned error was because http.StatusNotModified was returned.
  4276  func (c *PostsGetCall) Do(opts ...googleapi.CallOption) (*Post, error) {
  4277  	gensupport.SetOptions(c.urlParams_, opts...)
  4278  	res, err := c.doRequest("json")
  4279  	if res != nil && res.StatusCode == http.StatusNotModified {
  4280  		if res.Body != nil {
  4281  			res.Body.Close()
  4282  		}
  4283  		return nil, gensupport.WrapError(&googleapi.Error{
  4284  			Code:   res.StatusCode,
  4285  			Header: res.Header,
  4286  		})
  4287  	}
  4288  	if err != nil {
  4289  		return nil, err
  4290  	}
  4291  	defer googleapi.CloseBody(res)
  4292  	if err := googleapi.CheckResponse(res); err != nil {
  4293  		return nil, gensupport.WrapError(err)
  4294  	}
  4295  	ret := &Post{
  4296  		ServerResponse: googleapi.ServerResponse{
  4297  			Header:         res.Header,
  4298  			HTTPStatusCode: res.StatusCode,
  4299  		},
  4300  	}
  4301  	target := &ret
  4302  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4303  		return nil, err
  4304  	}
  4305  	return ret, nil
  4306  }
  4307  
  4308  type PostsGetByPathCall struct {
  4309  	s            *Service
  4310  	blogId       string
  4311  	urlParams_   gensupport.URLParams
  4312  	ifNoneMatch_ string
  4313  	ctx_         context.Context
  4314  	header_      http.Header
  4315  }
  4316  
  4317  // GetByPath: Gets a post by path.
  4318  //
  4319  // - blogId: .
  4320  // - path: .
  4321  func (r *PostsService) GetByPath(blogId string, path string) *PostsGetByPathCall {
  4322  	c := &PostsGetByPathCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4323  	c.blogId = blogId
  4324  	c.urlParams_.Set("path", path)
  4325  	return c
  4326  }
  4327  
  4328  // MaxComments sets the optional parameter "maxComments":
  4329  func (c *PostsGetByPathCall) MaxComments(maxComments int64) *PostsGetByPathCall {
  4330  	c.urlParams_.Set("maxComments", fmt.Sprint(maxComments))
  4331  	return c
  4332  }
  4333  
  4334  // View sets the optional parameter "view":
  4335  //
  4336  // Possible values:
  4337  //
  4338  //	"VIEW_TYPE_UNSPECIFIED"
  4339  //	"READER"
  4340  //	"AUTHOR"
  4341  //	"ADMIN"
  4342  func (c *PostsGetByPathCall) View(view string) *PostsGetByPathCall {
  4343  	c.urlParams_.Set("view", view)
  4344  	return c
  4345  }
  4346  
  4347  // Fields allows partial responses to be retrieved. See
  4348  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4349  // details.
  4350  func (c *PostsGetByPathCall) Fields(s ...googleapi.Field) *PostsGetByPathCall {
  4351  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4352  	return c
  4353  }
  4354  
  4355  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4356  // object's ETag matches the given value. This is useful for getting updates
  4357  // only after the object has changed since the last request.
  4358  func (c *PostsGetByPathCall) IfNoneMatch(entityTag string) *PostsGetByPathCall {
  4359  	c.ifNoneMatch_ = entityTag
  4360  	return c
  4361  }
  4362  
  4363  // Context sets the context to be used in this call's Do method.
  4364  func (c *PostsGetByPathCall) Context(ctx context.Context) *PostsGetByPathCall {
  4365  	c.ctx_ = ctx
  4366  	return c
  4367  }
  4368  
  4369  // Header returns a http.Header that can be modified by the caller to add
  4370  // headers to the request.
  4371  func (c *PostsGetByPathCall) Header() http.Header {
  4372  	if c.header_ == nil {
  4373  		c.header_ = make(http.Header)
  4374  	}
  4375  	return c.header_
  4376  }
  4377  
  4378  func (c *PostsGetByPathCall) doRequest(alt string) (*http.Response, error) {
  4379  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4380  	if c.ifNoneMatch_ != "" {
  4381  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4382  	}
  4383  	var body io.Reader = nil
  4384  	c.urlParams_.Set("alt", alt)
  4385  	c.urlParams_.Set("prettyPrint", "false")
  4386  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/bypath")
  4387  	urls += "?" + c.urlParams_.Encode()
  4388  	req, err := http.NewRequest("GET", urls, body)
  4389  	if err != nil {
  4390  		return nil, err
  4391  	}
  4392  	req.Header = reqHeaders
  4393  	googleapi.Expand(req.URL, map[string]string{
  4394  		"blogId": c.blogId,
  4395  	})
  4396  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4397  }
  4398  
  4399  // Do executes the "blogger.posts.getByPath" call.
  4400  // Any non-2xx status code is an error. Response headers are in either
  4401  // *Post.ServerResponse.Header or (if a response was returned at all) in
  4402  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4403  // whether the returned error was because http.StatusNotModified was returned.
  4404  func (c *PostsGetByPathCall) Do(opts ...googleapi.CallOption) (*Post, error) {
  4405  	gensupport.SetOptions(c.urlParams_, opts...)
  4406  	res, err := c.doRequest("json")
  4407  	if res != nil && res.StatusCode == http.StatusNotModified {
  4408  		if res.Body != nil {
  4409  			res.Body.Close()
  4410  		}
  4411  		return nil, gensupport.WrapError(&googleapi.Error{
  4412  			Code:   res.StatusCode,
  4413  			Header: res.Header,
  4414  		})
  4415  	}
  4416  	if err != nil {
  4417  		return nil, err
  4418  	}
  4419  	defer googleapi.CloseBody(res)
  4420  	if err := googleapi.CheckResponse(res); err != nil {
  4421  		return nil, gensupport.WrapError(err)
  4422  	}
  4423  	ret := &Post{
  4424  		ServerResponse: googleapi.ServerResponse{
  4425  			Header:         res.Header,
  4426  			HTTPStatusCode: res.StatusCode,
  4427  		},
  4428  	}
  4429  	target := &ret
  4430  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4431  		return nil, err
  4432  	}
  4433  	return ret, nil
  4434  }
  4435  
  4436  type PostsInsertCall struct {
  4437  	s          *Service
  4438  	blogId     string
  4439  	post       *Post
  4440  	urlParams_ gensupport.URLParams
  4441  	ctx_       context.Context
  4442  	header_    http.Header
  4443  }
  4444  
  4445  // Insert: Inserts a post.
  4446  //
  4447  // - blogId: .
  4448  func (r *PostsService) Insert(blogId string, post *Post) *PostsInsertCall {
  4449  	c := &PostsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4450  	c.blogId = blogId
  4451  	c.post = post
  4452  	return c
  4453  }
  4454  
  4455  // FetchBody sets the optional parameter "fetchBody":
  4456  func (c *PostsInsertCall) FetchBody(fetchBody bool) *PostsInsertCall {
  4457  	c.urlParams_.Set("fetchBody", fmt.Sprint(fetchBody))
  4458  	return c
  4459  }
  4460  
  4461  // FetchImages sets the optional parameter "fetchImages":
  4462  func (c *PostsInsertCall) FetchImages(fetchImages bool) *PostsInsertCall {
  4463  	c.urlParams_.Set("fetchImages", fmt.Sprint(fetchImages))
  4464  	return c
  4465  }
  4466  
  4467  // IsDraft sets the optional parameter "isDraft":
  4468  func (c *PostsInsertCall) IsDraft(isDraft bool) *PostsInsertCall {
  4469  	c.urlParams_.Set("isDraft", fmt.Sprint(isDraft))
  4470  	return c
  4471  }
  4472  
  4473  // Fields allows partial responses to be retrieved. See
  4474  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4475  // details.
  4476  func (c *PostsInsertCall) Fields(s ...googleapi.Field) *PostsInsertCall {
  4477  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4478  	return c
  4479  }
  4480  
  4481  // Context sets the context to be used in this call's Do method.
  4482  func (c *PostsInsertCall) Context(ctx context.Context) *PostsInsertCall {
  4483  	c.ctx_ = ctx
  4484  	return c
  4485  }
  4486  
  4487  // Header returns a http.Header that can be modified by the caller to add
  4488  // headers to the request.
  4489  func (c *PostsInsertCall) Header() http.Header {
  4490  	if c.header_ == nil {
  4491  		c.header_ = make(http.Header)
  4492  	}
  4493  	return c.header_
  4494  }
  4495  
  4496  func (c *PostsInsertCall) doRequest(alt string) (*http.Response, error) {
  4497  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4498  	var body io.Reader = nil
  4499  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
  4500  	if err != nil {
  4501  		return nil, err
  4502  	}
  4503  	c.urlParams_.Set("alt", alt)
  4504  	c.urlParams_.Set("prettyPrint", "false")
  4505  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts")
  4506  	urls += "?" + c.urlParams_.Encode()
  4507  	req, err := http.NewRequest("POST", urls, body)
  4508  	if err != nil {
  4509  		return nil, err
  4510  	}
  4511  	req.Header = reqHeaders
  4512  	googleapi.Expand(req.URL, map[string]string{
  4513  		"blogId": c.blogId,
  4514  	})
  4515  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4516  }
  4517  
  4518  // Do executes the "blogger.posts.insert" call.
  4519  // Any non-2xx status code is an error. Response headers are in either
  4520  // *Post.ServerResponse.Header or (if a response was returned at all) in
  4521  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4522  // whether the returned error was because http.StatusNotModified was returned.
  4523  func (c *PostsInsertCall) Do(opts ...googleapi.CallOption) (*Post, error) {
  4524  	gensupport.SetOptions(c.urlParams_, opts...)
  4525  	res, err := c.doRequest("json")
  4526  	if res != nil && res.StatusCode == http.StatusNotModified {
  4527  		if res.Body != nil {
  4528  			res.Body.Close()
  4529  		}
  4530  		return nil, gensupport.WrapError(&googleapi.Error{
  4531  			Code:   res.StatusCode,
  4532  			Header: res.Header,
  4533  		})
  4534  	}
  4535  	if err != nil {
  4536  		return nil, err
  4537  	}
  4538  	defer googleapi.CloseBody(res)
  4539  	if err := googleapi.CheckResponse(res); err != nil {
  4540  		return nil, gensupport.WrapError(err)
  4541  	}
  4542  	ret := &Post{
  4543  		ServerResponse: googleapi.ServerResponse{
  4544  			Header:         res.Header,
  4545  			HTTPStatusCode: res.StatusCode,
  4546  		},
  4547  	}
  4548  	target := &ret
  4549  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4550  		return nil, err
  4551  	}
  4552  	return ret, nil
  4553  }
  4554  
  4555  type PostsListCall struct {
  4556  	s            *Service
  4557  	blogId       string
  4558  	urlParams_   gensupport.URLParams
  4559  	ifNoneMatch_ string
  4560  	ctx_         context.Context
  4561  	header_      http.Header
  4562  }
  4563  
  4564  // List: Lists posts.
  4565  //
  4566  // - blogId: .
  4567  func (r *PostsService) List(blogId string) *PostsListCall {
  4568  	c := &PostsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4569  	c.blogId = blogId
  4570  	return c
  4571  }
  4572  
  4573  // EndDate sets the optional parameter "endDate":
  4574  func (c *PostsListCall) EndDate(endDate string) *PostsListCall {
  4575  	c.urlParams_.Set("endDate", endDate)
  4576  	return c
  4577  }
  4578  
  4579  // FetchBodies sets the optional parameter "fetchBodies":
  4580  func (c *PostsListCall) FetchBodies(fetchBodies bool) *PostsListCall {
  4581  	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
  4582  	return c
  4583  }
  4584  
  4585  // FetchImages sets the optional parameter "fetchImages":
  4586  func (c *PostsListCall) FetchImages(fetchImages bool) *PostsListCall {
  4587  	c.urlParams_.Set("fetchImages", fmt.Sprint(fetchImages))
  4588  	return c
  4589  }
  4590  
  4591  // Labels sets the optional parameter "labels":
  4592  func (c *PostsListCall) Labels(labels string) *PostsListCall {
  4593  	c.urlParams_.Set("labels", labels)
  4594  	return c
  4595  }
  4596  
  4597  // MaxResults sets the optional parameter "maxResults":
  4598  func (c *PostsListCall) MaxResults(maxResults int64) *PostsListCall {
  4599  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4600  	return c
  4601  }
  4602  
  4603  // OrderBy sets the optional parameter "orderBy":
  4604  //
  4605  // Possible values:
  4606  //
  4607  //	"ORDER_BY_UNSPECIFIED"
  4608  //	"PUBLISHED" (default)
  4609  //	"UPDATED"
  4610  func (c *PostsListCall) OrderBy(orderBy string) *PostsListCall {
  4611  	c.urlParams_.Set("orderBy", orderBy)
  4612  	return c
  4613  }
  4614  
  4615  // PageToken sets the optional parameter "pageToken":
  4616  func (c *PostsListCall) PageToken(pageToken string) *PostsListCall {
  4617  	c.urlParams_.Set("pageToken", pageToken)
  4618  	return c
  4619  }
  4620  
  4621  // SortOption sets the optional parameter "sortOption": Sort direction applied
  4622  // to post list.
  4623  //
  4624  // Possible values:
  4625  //
  4626  //	"SORT_OPTION_UNSPECIFIED" - The unspecified sort option.
  4627  //	"DESCENDING" (default) - The option to sort posts in descending order in
  4628  //
  4629  // time.
  4630  //
  4631  //	"ASCENDING" - The option to sort posts in ascending order in time.
  4632  func (c *PostsListCall) SortOption(sortOption string) *PostsListCall {
  4633  	c.urlParams_.Set("sortOption", sortOption)
  4634  	return c
  4635  }
  4636  
  4637  // StartDate sets the optional parameter "startDate":
  4638  func (c *PostsListCall) StartDate(startDate string) *PostsListCall {
  4639  	c.urlParams_.Set("startDate", startDate)
  4640  	return c
  4641  }
  4642  
  4643  // Status sets the optional parameter "status":
  4644  //
  4645  // Possible values:
  4646  //
  4647  //	"LIVE"
  4648  //	"DRAFT"
  4649  //	"SCHEDULED"
  4650  //	"SOFT_TRASHED"
  4651  func (c *PostsListCall) Status(status ...string) *PostsListCall {
  4652  	c.urlParams_.SetMulti("status", append([]string{}, status...))
  4653  	return c
  4654  }
  4655  
  4656  // View sets the optional parameter "view":
  4657  //
  4658  // Possible values:
  4659  //
  4660  //	"VIEW_TYPE_UNSPECIFIED"
  4661  //	"READER"
  4662  //	"AUTHOR"
  4663  //	"ADMIN"
  4664  func (c *PostsListCall) View(view string) *PostsListCall {
  4665  	c.urlParams_.Set("view", view)
  4666  	return c
  4667  }
  4668  
  4669  // Fields allows partial responses to be retrieved. See
  4670  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4671  // details.
  4672  func (c *PostsListCall) Fields(s ...googleapi.Field) *PostsListCall {
  4673  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4674  	return c
  4675  }
  4676  
  4677  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4678  // object's ETag matches the given value. This is useful for getting updates
  4679  // only after the object has changed since the last request.
  4680  func (c *PostsListCall) IfNoneMatch(entityTag string) *PostsListCall {
  4681  	c.ifNoneMatch_ = entityTag
  4682  	return c
  4683  }
  4684  
  4685  // Context sets the context to be used in this call's Do method.
  4686  func (c *PostsListCall) Context(ctx context.Context) *PostsListCall {
  4687  	c.ctx_ = ctx
  4688  	return c
  4689  }
  4690  
  4691  // Header returns a http.Header that can be modified by the caller to add
  4692  // headers to the request.
  4693  func (c *PostsListCall) Header() http.Header {
  4694  	if c.header_ == nil {
  4695  		c.header_ = make(http.Header)
  4696  	}
  4697  	return c.header_
  4698  }
  4699  
  4700  func (c *PostsListCall) doRequest(alt string) (*http.Response, error) {
  4701  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4702  	if c.ifNoneMatch_ != "" {
  4703  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4704  	}
  4705  	var body io.Reader = nil
  4706  	c.urlParams_.Set("alt", alt)
  4707  	c.urlParams_.Set("prettyPrint", "false")
  4708  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts")
  4709  	urls += "?" + c.urlParams_.Encode()
  4710  	req, err := http.NewRequest("GET", urls, body)
  4711  	if err != nil {
  4712  		return nil, err
  4713  	}
  4714  	req.Header = reqHeaders
  4715  	googleapi.Expand(req.URL, map[string]string{
  4716  		"blogId": c.blogId,
  4717  	})
  4718  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4719  }
  4720  
  4721  // Do executes the "blogger.posts.list" call.
  4722  // Any non-2xx status code is an error. Response headers are in either
  4723  // *PostList.ServerResponse.Header or (if a response was returned at all) in
  4724  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4725  // whether the returned error was because http.StatusNotModified was returned.
  4726  func (c *PostsListCall) Do(opts ...googleapi.CallOption) (*PostList, error) {
  4727  	gensupport.SetOptions(c.urlParams_, opts...)
  4728  	res, err := c.doRequest("json")
  4729  	if res != nil && res.StatusCode == http.StatusNotModified {
  4730  		if res.Body != nil {
  4731  			res.Body.Close()
  4732  		}
  4733  		return nil, gensupport.WrapError(&googleapi.Error{
  4734  			Code:   res.StatusCode,
  4735  			Header: res.Header,
  4736  		})
  4737  	}
  4738  	if err != nil {
  4739  		return nil, err
  4740  	}
  4741  	defer googleapi.CloseBody(res)
  4742  	if err := googleapi.CheckResponse(res); err != nil {
  4743  		return nil, gensupport.WrapError(err)
  4744  	}
  4745  	ret := &PostList{
  4746  		ServerResponse: googleapi.ServerResponse{
  4747  			Header:         res.Header,
  4748  			HTTPStatusCode: res.StatusCode,
  4749  		},
  4750  	}
  4751  	target := &ret
  4752  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4753  		return nil, err
  4754  	}
  4755  	return ret, nil
  4756  }
  4757  
  4758  // Pages invokes f for each page of results.
  4759  // A non-nil error returned from f will halt the iteration.
  4760  // The provided context supersedes any context provided to the Context method.
  4761  func (c *PostsListCall) Pages(ctx context.Context, f func(*PostList) error) error {
  4762  	c.ctx_ = ctx
  4763  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4764  	for {
  4765  		x, err := c.Do()
  4766  		if err != nil {
  4767  			return err
  4768  		}
  4769  		if err := f(x); err != nil {
  4770  			return err
  4771  		}
  4772  		if x.NextPageToken == "" {
  4773  			return nil
  4774  		}
  4775  		c.PageToken(x.NextPageToken)
  4776  	}
  4777  }
  4778  
  4779  type PostsPatchCall struct {
  4780  	s          *Service
  4781  	blogId     string
  4782  	postId     string
  4783  	post       *Post
  4784  	urlParams_ gensupport.URLParams
  4785  	ctx_       context.Context
  4786  	header_    http.Header
  4787  }
  4788  
  4789  // Patch: Patches a post.
  4790  //
  4791  // - blogId: .
  4792  // - postId: .
  4793  func (r *PostsService) Patch(blogId string, postId string, post *Post) *PostsPatchCall {
  4794  	c := &PostsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4795  	c.blogId = blogId
  4796  	c.postId = postId
  4797  	c.post = post
  4798  	return c
  4799  }
  4800  
  4801  // FetchBody sets the optional parameter "fetchBody":
  4802  func (c *PostsPatchCall) FetchBody(fetchBody bool) *PostsPatchCall {
  4803  	c.urlParams_.Set("fetchBody", fmt.Sprint(fetchBody))
  4804  	return c
  4805  }
  4806  
  4807  // FetchImages sets the optional parameter "fetchImages":
  4808  func (c *PostsPatchCall) FetchImages(fetchImages bool) *PostsPatchCall {
  4809  	c.urlParams_.Set("fetchImages", fmt.Sprint(fetchImages))
  4810  	return c
  4811  }
  4812  
  4813  // MaxComments sets the optional parameter "maxComments":
  4814  func (c *PostsPatchCall) MaxComments(maxComments int64) *PostsPatchCall {
  4815  	c.urlParams_.Set("maxComments", fmt.Sprint(maxComments))
  4816  	return c
  4817  }
  4818  
  4819  // Publish sets the optional parameter "publish":
  4820  func (c *PostsPatchCall) Publish(publish bool) *PostsPatchCall {
  4821  	c.urlParams_.Set("publish", fmt.Sprint(publish))
  4822  	return c
  4823  }
  4824  
  4825  // Revert sets the optional parameter "revert":
  4826  func (c *PostsPatchCall) Revert(revert bool) *PostsPatchCall {
  4827  	c.urlParams_.Set("revert", fmt.Sprint(revert))
  4828  	return c
  4829  }
  4830  
  4831  // Fields allows partial responses to be retrieved. See
  4832  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4833  // details.
  4834  func (c *PostsPatchCall) Fields(s ...googleapi.Field) *PostsPatchCall {
  4835  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4836  	return c
  4837  }
  4838  
  4839  // Context sets the context to be used in this call's Do method.
  4840  func (c *PostsPatchCall) Context(ctx context.Context) *PostsPatchCall {
  4841  	c.ctx_ = ctx
  4842  	return c
  4843  }
  4844  
  4845  // Header returns a http.Header that can be modified by the caller to add
  4846  // headers to the request.
  4847  func (c *PostsPatchCall) Header() http.Header {
  4848  	if c.header_ == nil {
  4849  		c.header_ = make(http.Header)
  4850  	}
  4851  	return c.header_
  4852  }
  4853  
  4854  func (c *PostsPatchCall) doRequest(alt string) (*http.Response, error) {
  4855  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4856  	var body io.Reader = nil
  4857  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
  4858  	if err != nil {
  4859  		return nil, err
  4860  	}
  4861  	c.urlParams_.Set("alt", alt)
  4862  	c.urlParams_.Set("prettyPrint", "false")
  4863  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}")
  4864  	urls += "?" + c.urlParams_.Encode()
  4865  	req, err := http.NewRequest("PATCH", urls, body)
  4866  	if err != nil {
  4867  		return nil, err
  4868  	}
  4869  	req.Header = reqHeaders
  4870  	googleapi.Expand(req.URL, map[string]string{
  4871  		"blogId": c.blogId,
  4872  		"postId": c.postId,
  4873  	})
  4874  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4875  }
  4876  
  4877  // Do executes the "blogger.posts.patch" call.
  4878  // Any non-2xx status code is an error. Response headers are in either
  4879  // *Post.ServerResponse.Header or (if a response was returned at all) in
  4880  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4881  // whether the returned error was because http.StatusNotModified was returned.
  4882  func (c *PostsPatchCall) Do(opts ...googleapi.CallOption) (*Post, error) {
  4883  	gensupport.SetOptions(c.urlParams_, opts...)
  4884  	res, err := c.doRequest("json")
  4885  	if res != nil && res.StatusCode == http.StatusNotModified {
  4886  		if res.Body != nil {
  4887  			res.Body.Close()
  4888  		}
  4889  		return nil, gensupport.WrapError(&googleapi.Error{
  4890  			Code:   res.StatusCode,
  4891  			Header: res.Header,
  4892  		})
  4893  	}
  4894  	if err != nil {
  4895  		return nil, err
  4896  	}
  4897  	defer googleapi.CloseBody(res)
  4898  	if err := googleapi.CheckResponse(res); err != nil {
  4899  		return nil, gensupport.WrapError(err)
  4900  	}
  4901  	ret := &Post{
  4902  		ServerResponse: googleapi.ServerResponse{
  4903  			Header:         res.Header,
  4904  			HTTPStatusCode: res.StatusCode,
  4905  		},
  4906  	}
  4907  	target := &ret
  4908  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4909  		return nil, err
  4910  	}
  4911  	return ret, nil
  4912  }
  4913  
  4914  type PostsPublishCall struct {
  4915  	s          *Service
  4916  	blogId     string
  4917  	postId     string
  4918  	urlParams_ gensupport.URLParams
  4919  	ctx_       context.Context
  4920  	header_    http.Header
  4921  }
  4922  
  4923  // Publish: Publishes a post.
  4924  //
  4925  // - blogId: .
  4926  // - postId: .
  4927  func (r *PostsService) Publish(blogId string, postId string) *PostsPublishCall {
  4928  	c := &PostsPublishCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4929  	c.blogId = blogId
  4930  	c.postId = postId
  4931  	return c
  4932  }
  4933  
  4934  // PublishDate sets the optional parameter "publishDate":
  4935  func (c *PostsPublishCall) PublishDate(publishDate string) *PostsPublishCall {
  4936  	c.urlParams_.Set("publishDate", publishDate)
  4937  	return c
  4938  }
  4939  
  4940  // Fields allows partial responses to be retrieved. See
  4941  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4942  // details.
  4943  func (c *PostsPublishCall) Fields(s ...googleapi.Field) *PostsPublishCall {
  4944  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4945  	return c
  4946  }
  4947  
  4948  // Context sets the context to be used in this call's Do method.
  4949  func (c *PostsPublishCall) Context(ctx context.Context) *PostsPublishCall {
  4950  	c.ctx_ = ctx
  4951  	return c
  4952  }
  4953  
  4954  // Header returns a http.Header that can be modified by the caller to add
  4955  // headers to the request.
  4956  func (c *PostsPublishCall) Header() http.Header {
  4957  	if c.header_ == nil {
  4958  		c.header_ = make(http.Header)
  4959  	}
  4960  	return c.header_
  4961  }
  4962  
  4963  func (c *PostsPublishCall) doRequest(alt string) (*http.Response, error) {
  4964  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4965  	var body io.Reader = nil
  4966  	c.urlParams_.Set("alt", alt)
  4967  	c.urlParams_.Set("prettyPrint", "false")
  4968  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}/publish")
  4969  	urls += "?" + c.urlParams_.Encode()
  4970  	req, err := http.NewRequest("POST", urls, body)
  4971  	if err != nil {
  4972  		return nil, err
  4973  	}
  4974  	req.Header = reqHeaders
  4975  	googleapi.Expand(req.URL, map[string]string{
  4976  		"blogId": c.blogId,
  4977  		"postId": c.postId,
  4978  	})
  4979  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4980  }
  4981  
  4982  // Do executes the "blogger.posts.publish" call.
  4983  // Any non-2xx status code is an error. Response headers are in either
  4984  // *Post.ServerResponse.Header or (if a response was returned at all) in
  4985  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4986  // whether the returned error was because http.StatusNotModified was returned.
  4987  func (c *PostsPublishCall) Do(opts ...googleapi.CallOption) (*Post, error) {
  4988  	gensupport.SetOptions(c.urlParams_, opts...)
  4989  	res, err := c.doRequest("json")
  4990  	if res != nil && res.StatusCode == http.StatusNotModified {
  4991  		if res.Body != nil {
  4992  			res.Body.Close()
  4993  		}
  4994  		return nil, gensupport.WrapError(&googleapi.Error{
  4995  			Code:   res.StatusCode,
  4996  			Header: res.Header,
  4997  		})
  4998  	}
  4999  	if err != nil {
  5000  		return nil, err
  5001  	}
  5002  	defer googleapi.CloseBody(res)
  5003  	if err := googleapi.CheckResponse(res); err != nil {
  5004  		return nil, gensupport.WrapError(err)
  5005  	}
  5006  	ret := &Post{
  5007  		ServerResponse: googleapi.ServerResponse{
  5008  			Header:         res.Header,
  5009  			HTTPStatusCode: res.StatusCode,
  5010  		},
  5011  	}
  5012  	target := &ret
  5013  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5014  		return nil, err
  5015  	}
  5016  	return ret, nil
  5017  }
  5018  
  5019  type PostsRevertCall struct {
  5020  	s          *Service
  5021  	blogId     string
  5022  	postId     string
  5023  	urlParams_ gensupport.URLParams
  5024  	ctx_       context.Context
  5025  	header_    http.Header
  5026  }
  5027  
  5028  // Revert: Reverts a published or scheduled post to draft state.
  5029  //
  5030  // - blogId: .
  5031  // - postId: .
  5032  func (r *PostsService) Revert(blogId string, postId string) *PostsRevertCall {
  5033  	c := &PostsRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5034  	c.blogId = blogId
  5035  	c.postId = postId
  5036  	return c
  5037  }
  5038  
  5039  // Fields allows partial responses to be retrieved. See
  5040  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5041  // details.
  5042  func (c *PostsRevertCall) Fields(s ...googleapi.Field) *PostsRevertCall {
  5043  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5044  	return c
  5045  }
  5046  
  5047  // Context sets the context to be used in this call's Do method.
  5048  func (c *PostsRevertCall) Context(ctx context.Context) *PostsRevertCall {
  5049  	c.ctx_ = ctx
  5050  	return c
  5051  }
  5052  
  5053  // Header returns a http.Header that can be modified by the caller to add
  5054  // headers to the request.
  5055  func (c *PostsRevertCall) Header() http.Header {
  5056  	if c.header_ == nil {
  5057  		c.header_ = make(http.Header)
  5058  	}
  5059  	return c.header_
  5060  }
  5061  
  5062  func (c *PostsRevertCall) doRequest(alt string) (*http.Response, error) {
  5063  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5064  	var body io.Reader = nil
  5065  	c.urlParams_.Set("alt", alt)
  5066  	c.urlParams_.Set("prettyPrint", "false")
  5067  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}/revert")
  5068  	urls += "?" + c.urlParams_.Encode()
  5069  	req, err := http.NewRequest("POST", urls, body)
  5070  	if err != nil {
  5071  		return nil, err
  5072  	}
  5073  	req.Header = reqHeaders
  5074  	googleapi.Expand(req.URL, map[string]string{
  5075  		"blogId": c.blogId,
  5076  		"postId": c.postId,
  5077  	})
  5078  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5079  }
  5080  
  5081  // Do executes the "blogger.posts.revert" call.
  5082  // Any non-2xx status code is an error. Response headers are in either
  5083  // *Post.ServerResponse.Header or (if a response was returned at all) in
  5084  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5085  // whether the returned error was because http.StatusNotModified was returned.
  5086  func (c *PostsRevertCall) Do(opts ...googleapi.CallOption) (*Post, error) {
  5087  	gensupport.SetOptions(c.urlParams_, opts...)
  5088  	res, err := c.doRequest("json")
  5089  	if res != nil && res.StatusCode == http.StatusNotModified {
  5090  		if res.Body != nil {
  5091  			res.Body.Close()
  5092  		}
  5093  		return nil, gensupport.WrapError(&googleapi.Error{
  5094  			Code:   res.StatusCode,
  5095  			Header: res.Header,
  5096  		})
  5097  	}
  5098  	if err != nil {
  5099  		return nil, err
  5100  	}
  5101  	defer googleapi.CloseBody(res)
  5102  	if err := googleapi.CheckResponse(res); err != nil {
  5103  		return nil, gensupport.WrapError(err)
  5104  	}
  5105  	ret := &Post{
  5106  		ServerResponse: googleapi.ServerResponse{
  5107  			Header:         res.Header,
  5108  			HTTPStatusCode: res.StatusCode,
  5109  		},
  5110  	}
  5111  	target := &ret
  5112  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5113  		return nil, err
  5114  	}
  5115  	return ret, nil
  5116  }
  5117  
  5118  type PostsSearchCall struct {
  5119  	s            *Service
  5120  	blogId       string
  5121  	urlParams_   gensupport.URLParams
  5122  	ifNoneMatch_ string
  5123  	ctx_         context.Context
  5124  	header_      http.Header
  5125  }
  5126  
  5127  // Search: Searches for posts matching given query terms in the specified blog.
  5128  //
  5129  // - blogId: .
  5130  // - q: .
  5131  func (r *PostsService) Search(blogId string, q string) *PostsSearchCall {
  5132  	c := &PostsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5133  	c.blogId = blogId
  5134  	c.urlParams_.Set("q", q)
  5135  	return c
  5136  }
  5137  
  5138  // FetchBodies sets the optional parameter "fetchBodies":
  5139  func (c *PostsSearchCall) FetchBodies(fetchBodies bool) *PostsSearchCall {
  5140  	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
  5141  	return c
  5142  }
  5143  
  5144  // OrderBy sets the optional parameter "orderBy":
  5145  //
  5146  // Possible values:
  5147  //
  5148  //	"ORDER_BY_UNSPECIFIED"
  5149  //	"PUBLISHED" (default)
  5150  //	"UPDATED"
  5151  func (c *PostsSearchCall) OrderBy(orderBy string) *PostsSearchCall {
  5152  	c.urlParams_.Set("orderBy", orderBy)
  5153  	return c
  5154  }
  5155  
  5156  // Fields allows partial responses to be retrieved. See
  5157  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5158  // details.
  5159  func (c *PostsSearchCall) Fields(s ...googleapi.Field) *PostsSearchCall {
  5160  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5161  	return c
  5162  }
  5163  
  5164  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5165  // object's ETag matches the given value. This is useful for getting updates
  5166  // only after the object has changed since the last request.
  5167  func (c *PostsSearchCall) IfNoneMatch(entityTag string) *PostsSearchCall {
  5168  	c.ifNoneMatch_ = entityTag
  5169  	return c
  5170  }
  5171  
  5172  // Context sets the context to be used in this call's Do method.
  5173  func (c *PostsSearchCall) Context(ctx context.Context) *PostsSearchCall {
  5174  	c.ctx_ = ctx
  5175  	return c
  5176  }
  5177  
  5178  // Header returns a http.Header that can be modified by the caller to add
  5179  // headers to the request.
  5180  func (c *PostsSearchCall) Header() http.Header {
  5181  	if c.header_ == nil {
  5182  		c.header_ = make(http.Header)
  5183  	}
  5184  	return c.header_
  5185  }
  5186  
  5187  func (c *PostsSearchCall) doRequest(alt string) (*http.Response, error) {
  5188  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5189  	if c.ifNoneMatch_ != "" {
  5190  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5191  	}
  5192  	var body io.Reader = nil
  5193  	c.urlParams_.Set("alt", alt)
  5194  	c.urlParams_.Set("prettyPrint", "false")
  5195  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/search")
  5196  	urls += "?" + c.urlParams_.Encode()
  5197  	req, err := http.NewRequest("GET", urls, body)
  5198  	if err != nil {
  5199  		return nil, err
  5200  	}
  5201  	req.Header = reqHeaders
  5202  	googleapi.Expand(req.URL, map[string]string{
  5203  		"blogId": c.blogId,
  5204  	})
  5205  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5206  }
  5207  
  5208  // Do executes the "blogger.posts.search" call.
  5209  // Any non-2xx status code is an error. Response headers are in either
  5210  // *PostList.ServerResponse.Header or (if a response was returned at all) in
  5211  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5212  // whether the returned error was because http.StatusNotModified was returned.
  5213  func (c *PostsSearchCall) Do(opts ...googleapi.CallOption) (*PostList, error) {
  5214  	gensupport.SetOptions(c.urlParams_, opts...)
  5215  	res, err := c.doRequest("json")
  5216  	if res != nil && res.StatusCode == http.StatusNotModified {
  5217  		if res.Body != nil {
  5218  			res.Body.Close()
  5219  		}
  5220  		return nil, gensupport.WrapError(&googleapi.Error{
  5221  			Code:   res.StatusCode,
  5222  			Header: res.Header,
  5223  		})
  5224  	}
  5225  	if err != nil {
  5226  		return nil, err
  5227  	}
  5228  	defer googleapi.CloseBody(res)
  5229  	if err := googleapi.CheckResponse(res); err != nil {
  5230  		return nil, gensupport.WrapError(err)
  5231  	}
  5232  	ret := &PostList{
  5233  		ServerResponse: googleapi.ServerResponse{
  5234  			Header:         res.Header,
  5235  			HTTPStatusCode: res.StatusCode,
  5236  		},
  5237  	}
  5238  	target := &ret
  5239  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5240  		return nil, err
  5241  	}
  5242  	return ret, nil
  5243  }
  5244  
  5245  type PostsUpdateCall struct {
  5246  	s          *Service
  5247  	blogId     string
  5248  	postId     string
  5249  	post       *Post
  5250  	urlParams_ gensupport.URLParams
  5251  	ctx_       context.Context
  5252  	header_    http.Header
  5253  }
  5254  
  5255  // Update: Updates a post by blog id and post id.
  5256  //
  5257  // - blogId: .
  5258  // - postId: .
  5259  func (r *PostsService) Update(blogId string, postId string, post *Post) *PostsUpdateCall {
  5260  	c := &PostsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5261  	c.blogId = blogId
  5262  	c.postId = postId
  5263  	c.post = post
  5264  	return c
  5265  }
  5266  
  5267  // FetchBody sets the optional parameter "fetchBody":
  5268  func (c *PostsUpdateCall) FetchBody(fetchBody bool) *PostsUpdateCall {
  5269  	c.urlParams_.Set("fetchBody", fmt.Sprint(fetchBody))
  5270  	return c
  5271  }
  5272  
  5273  // FetchImages sets the optional parameter "fetchImages":
  5274  func (c *PostsUpdateCall) FetchImages(fetchImages bool) *PostsUpdateCall {
  5275  	c.urlParams_.Set("fetchImages", fmt.Sprint(fetchImages))
  5276  	return c
  5277  }
  5278  
  5279  // MaxComments sets the optional parameter "maxComments":
  5280  func (c *PostsUpdateCall) MaxComments(maxComments int64) *PostsUpdateCall {
  5281  	c.urlParams_.Set("maxComments", fmt.Sprint(maxComments))
  5282  	return c
  5283  }
  5284  
  5285  // Publish sets the optional parameter "publish":
  5286  func (c *PostsUpdateCall) Publish(publish bool) *PostsUpdateCall {
  5287  	c.urlParams_.Set("publish", fmt.Sprint(publish))
  5288  	return c
  5289  }
  5290  
  5291  // Revert sets the optional parameter "revert":
  5292  func (c *PostsUpdateCall) Revert(revert bool) *PostsUpdateCall {
  5293  	c.urlParams_.Set("revert", fmt.Sprint(revert))
  5294  	return c
  5295  }
  5296  
  5297  // Fields allows partial responses to be retrieved. See
  5298  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5299  // details.
  5300  func (c *PostsUpdateCall) Fields(s ...googleapi.Field) *PostsUpdateCall {
  5301  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5302  	return c
  5303  }
  5304  
  5305  // Context sets the context to be used in this call's Do method.
  5306  func (c *PostsUpdateCall) Context(ctx context.Context) *PostsUpdateCall {
  5307  	c.ctx_ = ctx
  5308  	return c
  5309  }
  5310  
  5311  // Header returns a http.Header that can be modified by the caller to add
  5312  // headers to the request.
  5313  func (c *PostsUpdateCall) Header() http.Header {
  5314  	if c.header_ == nil {
  5315  		c.header_ = make(http.Header)
  5316  	}
  5317  	return c.header_
  5318  }
  5319  
  5320  func (c *PostsUpdateCall) doRequest(alt string) (*http.Response, error) {
  5321  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5322  	var body io.Reader = nil
  5323  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
  5324  	if err != nil {
  5325  		return nil, err
  5326  	}
  5327  	c.urlParams_.Set("alt", alt)
  5328  	c.urlParams_.Set("prettyPrint", "false")
  5329  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/blogs/{blogId}/posts/{postId}")
  5330  	urls += "?" + c.urlParams_.Encode()
  5331  	req, err := http.NewRequest("PUT", urls, body)
  5332  	if err != nil {
  5333  		return nil, err
  5334  	}
  5335  	req.Header = reqHeaders
  5336  	googleapi.Expand(req.URL, map[string]string{
  5337  		"blogId": c.blogId,
  5338  		"postId": c.postId,
  5339  	})
  5340  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5341  }
  5342  
  5343  // Do executes the "blogger.posts.update" call.
  5344  // Any non-2xx status code is an error. Response headers are in either
  5345  // *Post.ServerResponse.Header or (if a response was returned at all) in
  5346  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5347  // whether the returned error was because http.StatusNotModified was returned.
  5348  func (c *PostsUpdateCall) Do(opts ...googleapi.CallOption) (*Post, error) {
  5349  	gensupport.SetOptions(c.urlParams_, opts...)
  5350  	res, err := c.doRequest("json")
  5351  	if res != nil && res.StatusCode == http.StatusNotModified {
  5352  		if res.Body != nil {
  5353  			res.Body.Close()
  5354  		}
  5355  		return nil, gensupport.WrapError(&googleapi.Error{
  5356  			Code:   res.StatusCode,
  5357  			Header: res.Header,
  5358  		})
  5359  	}
  5360  	if err != nil {
  5361  		return nil, err
  5362  	}
  5363  	defer googleapi.CloseBody(res)
  5364  	if err := googleapi.CheckResponse(res); err != nil {
  5365  		return nil, gensupport.WrapError(err)
  5366  	}
  5367  	ret := &Post{
  5368  		ServerResponse: googleapi.ServerResponse{
  5369  			Header:         res.Header,
  5370  			HTTPStatusCode: res.StatusCode,
  5371  		},
  5372  	}
  5373  	target := &ret
  5374  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5375  		return nil, err
  5376  	}
  5377  	return ret, nil
  5378  }
  5379  
  5380  type UsersGetCall struct {
  5381  	s            *Service
  5382  	userId       string
  5383  	urlParams_   gensupport.URLParams
  5384  	ifNoneMatch_ string
  5385  	ctx_         context.Context
  5386  	header_      http.Header
  5387  }
  5388  
  5389  // Get: Gets one user by user_id.
  5390  //
  5391  // - userId: .
  5392  func (r *UsersService) Get(userId string) *UsersGetCall {
  5393  	c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5394  	c.userId = userId
  5395  	return c
  5396  }
  5397  
  5398  // Fields allows partial responses to be retrieved. See
  5399  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5400  // details.
  5401  func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
  5402  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5403  	return c
  5404  }
  5405  
  5406  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5407  // object's ETag matches the given value. This is useful for getting updates
  5408  // only after the object has changed since the last request.
  5409  func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
  5410  	c.ifNoneMatch_ = entityTag
  5411  	return c
  5412  }
  5413  
  5414  // Context sets the context to be used in this call's Do method.
  5415  func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
  5416  	c.ctx_ = ctx
  5417  	return c
  5418  }
  5419  
  5420  // Header returns a http.Header that can be modified by the caller to add
  5421  // headers to the request.
  5422  func (c *UsersGetCall) Header() http.Header {
  5423  	if c.header_ == nil {
  5424  		c.header_ = make(http.Header)
  5425  	}
  5426  	return c.header_
  5427  }
  5428  
  5429  func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
  5430  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5431  	if c.ifNoneMatch_ != "" {
  5432  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5433  	}
  5434  	var body io.Reader = nil
  5435  	c.urlParams_.Set("alt", alt)
  5436  	c.urlParams_.Set("prettyPrint", "false")
  5437  	urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users/{userId}")
  5438  	urls += "?" + c.urlParams_.Encode()
  5439  	req, err := http.NewRequest("GET", urls, body)
  5440  	if err != nil {
  5441  		return nil, err
  5442  	}
  5443  	req.Header = reqHeaders
  5444  	googleapi.Expand(req.URL, map[string]string{
  5445  		"userId": c.userId,
  5446  	})
  5447  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5448  }
  5449  
  5450  // Do executes the "blogger.users.get" call.
  5451  // Any non-2xx status code is an error. Response headers are in either
  5452  // *User.ServerResponse.Header or (if a response was returned at all) in
  5453  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5454  // whether the returned error was because http.StatusNotModified was returned.
  5455  func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
  5456  	gensupport.SetOptions(c.urlParams_, opts...)
  5457  	res, err := c.doRequest("json")
  5458  	if res != nil && res.StatusCode == http.StatusNotModified {
  5459  		if res.Body != nil {
  5460  			res.Body.Close()
  5461  		}
  5462  		return nil, gensupport.WrapError(&googleapi.Error{
  5463  			Code:   res.StatusCode,
  5464  			Header: res.Header,
  5465  		})
  5466  	}
  5467  	if err != nil {
  5468  		return nil, err
  5469  	}
  5470  	defer googleapi.CloseBody(res)
  5471  	if err := googleapi.CheckResponse(res); err != nil {
  5472  		return nil, gensupport.WrapError(err)
  5473  	}
  5474  	ret := &User{
  5475  		ServerResponse: googleapi.ServerResponse{
  5476  			Header:         res.Header,
  5477  			HTTPStatusCode: res.StatusCode,
  5478  		},
  5479  	}
  5480  	target := &ret
  5481  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5482  		return nil, err
  5483  	}
  5484  	return ret, nil
  5485  }
  5486  

View as plain text