...

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

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

     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/v2"
    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  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	bloggerService, err := blogger.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	bloggerService, err := blogger.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package blogger // import "google.golang.org/api/blogger/v2"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "blogger:v2"
    90  const apiName = "blogger"
    91  const apiVersion = "v2"
    92  const basePath = "https://blogger.googleapis.com/"
    93  const basePathTemplate = "https://blogger.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://blogger.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// Manage your Blogger account
    99  	BloggerScope = "https://www.googleapis.com/auth/blogger"
   100  )
   101  
   102  // NewService creates a new Service.
   103  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   104  	scopesOption := internaloption.WithDefaultScopes(
   105  		"https://www.googleapis.com/auth/blogger",
   106  	)
   107  	// NOTE: prepend, so we don't override user-specified scopes.
   108  	opts = append([]option.ClientOption{scopesOption}, opts...)
   109  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   110  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   111  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   112  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   113  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   114  	if err != nil {
   115  		return nil, err
   116  	}
   117  	s, err := New(client)
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	if endpoint != "" {
   122  		s.BasePath = endpoint
   123  	}
   124  	return s, nil
   125  }
   126  
   127  // New creates a new Service. It uses the provided http.Client for requests.
   128  //
   129  // Deprecated: please use NewService instead.
   130  // To provide a custom HTTP client, use option.WithHTTPClient.
   131  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   132  func New(client *http.Client) (*Service, error) {
   133  	if client == nil {
   134  		return nil, errors.New("client is nil")
   135  	}
   136  	s := &Service{client: client, BasePath: basePath}
   137  	s.Blogs = NewBlogsService(s)
   138  	s.Comments = NewCommentsService(s)
   139  	s.Pages = NewPagesService(s)
   140  	s.Posts = NewPostsService(s)
   141  	s.Users = NewUsersService(s)
   142  	return s, nil
   143  }
   144  
   145  type Service struct {
   146  	client    *http.Client
   147  	BasePath  string // API endpoint base URL
   148  	UserAgent string // optional additional User-Agent fragment
   149  
   150  	Blogs *BlogsService
   151  
   152  	Comments *CommentsService
   153  
   154  	Pages *PagesService
   155  
   156  	Posts *PostsService
   157  
   158  	Users *UsersService
   159  }
   160  
   161  func (s *Service) userAgent() string {
   162  	if s.UserAgent == "" {
   163  		return googleapi.UserAgent
   164  	}
   165  	return googleapi.UserAgent + " " + s.UserAgent
   166  }
   167  
   168  func NewBlogsService(s *Service) *BlogsService {
   169  	rs := &BlogsService{s: s}
   170  	return rs
   171  }
   172  
   173  type BlogsService struct {
   174  	s *Service
   175  }
   176  
   177  func NewCommentsService(s *Service) *CommentsService {
   178  	rs := &CommentsService{s: s}
   179  	return rs
   180  }
   181  
   182  type CommentsService struct {
   183  	s *Service
   184  }
   185  
   186  func NewPagesService(s *Service) *PagesService {
   187  	rs := &PagesService{s: s}
   188  	return rs
   189  }
   190  
   191  type PagesService struct {
   192  	s *Service
   193  }
   194  
   195  func NewPostsService(s *Service) *PostsService {
   196  	rs := &PostsService{s: s}
   197  	return rs
   198  }
   199  
   200  type PostsService struct {
   201  	s *Service
   202  }
   203  
   204  func NewUsersService(s *Service) *UsersService {
   205  	rs := &UsersService{s: s}
   206  	return rs
   207  }
   208  
   209  type UsersService struct {
   210  	s *Service
   211  }
   212  
   213  type Blog struct {
   214  	// CustomMetaData: The JSON custom meta-data for the Blog.
   215  	CustomMetaData string `json:"customMetaData,omitempty"`
   216  	// Description: The description of this blog. This is displayed underneath the
   217  	// title.
   218  	Description string `json:"description,omitempty"`
   219  	// Id: The identifier for this resource.
   220  	Id string `json:"id,omitempty"`
   221  	// Kind: The kind of this entry. Always blogger#blog.
   222  	Kind string `json:"kind,omitempty"`
   223  	// Locale: The locale this Blog is set to.
   224  	Locale *BlogLocale `json:"locale,omitempty"`
   225  	// Name: The name of this blog. This is displayed as the title.
   226  	Name string `json:"name,omitempty"`
   227  	// Pages: The container of pages in this blog.
   228  	Pages *BlogPages `json:"pages,omitempty"`
   229  	// Posts: The container of posts in this blog.
   230  	Posts *BlogPosts `json:"posts,omitempty"`
   231  	// Published: RFC 3339 date-time when this blog was published.
   232  	Published string `json:"published,omitempty"`
   233  	// SelfLink: The API REST URL to fetch this resource from.
   234  	SelfLink string `json:"selfLink,omitempty"`
   235  	// Status: The status of the blog.
   236  	//
   237  	// Possible values:
   238  	//   "LIVE"
   239  	//   "DELETED"
   240  	Status string `json:"status,omitempty"`
   241  	// Updated: RFC 3339 date-time when this blog was last updated.
   242  	Updated string `json:"updated,omitempty"`
   243  	// Url: The URL where this blog is published.
   244  	Url string `json:"url,omitempty"`
   245  
   246  	// ServerResponse contains the HTTP response code and headers from the server.
   247  	googleapi.ServerResponse `json:"-"`
   248  	// ForceSendFields is a list of field names (e.g. "CustomMetaData") to
   249  	// unconditionally include in API requests. By default, fields with empty or
   250  	// default values are omitted from API requests. See
   251  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   252  	// details.
   253  	ForceSendFields []string `json:"-"`
   254  	// NullFields is a list of field names (e.g. "CustomMetaData") to include in
   255  	// API requests with the JSON null value. By default, fields with empty values
   256  	// are omitted from API requests. See
   257  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   258  	NullFields []string `json:"-"`
   259  }
   260  
   261  func (s *Blog) MarshalJSON() ([]byte, error) {
   262  	type NoMethod Blog
   263  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   264  }
   265  
   266  // BlogLocale: The locale this Blog is set to.
   267  type BlogLocale struct {
   268  	// Country: The country this blog's locale is set to.
   269  	Country string `json:"country,omitempty"`
   270  	// Language: The language this blog is authored in.
   271  	Language string `json:"language,omitempty"`
   272  	// Variant: The language variant this blog is authored in.
   273  	Variant string `json:"variant,omitempty"`
   274  	// ForceSendFields is a list of field names (e.g. "Country") to unconditionally
   275  	// include in API requests. By default, fields with empty or default values are
   276  	// omitted from API requests. See
   277  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   278  	// details.
   279  	ForceSendFields []string `json:"-"`
   280  	// NullFields is a list of field names (e.g. "Country") to include in API
   281  	// requests with the JSON null value. By default, fields with empty values are
   282  	// omitted from API requests. See
   283  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   284  	NullFields []string `json:"-"`
   285  }
   286  
   287  func (s *BlogLocale) MarshalJSON() ([]byte, error) {
   288  	type NoMethod BlogLocale
   289  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   290  }
   291  
   292  // BlogPages: The container of pages in this blog.
   293  type BlogPages struct {
   294  	// SelfLink: The URL of the container for pages in this blog.
   295  	SelfLink string `json:"selfLink,omitempty"`
   296  	// TotalItems: The count of pages in this blog.
   297  	TotalItems int64 `json:"totalItems,omitempty"`
   298  	// ForceSendFields is a list of field names (e.g. "SelfLink") to
   299  	// unconditionally include in API requests. By default, fields with empty or
   300  	// default values are omitted from API requests. See
   301  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   302  	// details.
   303  	ForceSendFields []string `json:"-"`
   304  	// NullFields is a list of field names (e.g. "SelfLink") to include in API
   305  	// requests with the JSON null value. By default, fields with empty values are
   306  	// omitted from API requests. See
   307  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   308  	NullFields []string `json:"-"`
   309  }
   310  
   311  func (s *BlogPages) MarshalJSON() ([]byte, error) {
   312  	type NoMethod BlogPages
   313  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   314  }
   315  
   316  // BlogPosts: The container of posts in this blog.
   317  type BlogPosts struct {
   318  	// Items: The List of Posts for this Blog.
   319  	Items []*Post `json:"items,omitempty"`
   320  	// SelfLink: The URL of the container for posts in this blog.
   321  	SelfLink string `json:"selfLink,omitempty"`
   322  	// TotalItems: The count of posts in this blog.
   323  	TotalItems int64 `json:"totalItems,omitempty"`
   324  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
   325  	// include in API requests. By default, fields with empty or default values are
   326  	// omitted from API requests. See
   327  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   328  	// details.
   329  	ForceSendFields []string `json:"-"`
   330  	// NullFields is a list of field names (e.g. "Items") to include in API
   331  	// requests with the JSON null value. By default, fields with empty values are
   332  	// omitted from API requests. See
   333  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   334  	NullFields []string `json:"-"`
   335  }
   336  
   337  func (s *BlogPosts) MarshalJSON() ([]byte, error) {
   338  	type NoMethod BlogPosts
   339  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   340  }
   341  
   342  type BlogList struct {
   343  	// BlogUserInfos: Admin level list of blog per-user information.
   344  	BlogUserInfos []*BlogUserInfo `json:"blogUserInfos,omitempty"`
   345  	// Items: The list of Blogs this user has Authorship or Admin rights over.
   346  	Items []*Blog `json:"items,omitempty"`
   347  	// Kind: The kind of this entity. Always blogger#blogList.
   348  	Kind string `json:"kind,omitempty"`
   349  
   350  	// ServerResponse contains the HTTP response code and headers from the server.
   351  	googleapi.ServerResponse `json:"-"`
   352  	// ForceSendFields is a list of field names (e.g. "BlogUserInfos") to
   353  	// unconditionally include in API requests. By default, fields with empty or
   354  	// default values are omitted from API requests. See
   355  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   356  	// details.
   357  	ForceSendFields []string `json:"-"`
   358  	// NullFields is a list of field names (e.g. "BlogUserInfos") to include in API
   359  	// requests with the JSON null value. By default, fields with empty values are
   360  	// omitted from API requests. See
   361  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   362  	NullFields []string `json:"-"`
   363  }
   364  
   365  func (s *BlogList) MarshalJSON() ([]byte, error) {
   366  	type NoMethod BlogList
   367  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   368  }
   369  
   370  type BlogPerUserInfo struct {
   371  	// BlogId: ID of the Blog resource.
   372  	BlogId string `json:"blogId,omitempty"`
   373  	// HasAdminAccess: True if the user has Admin level access to the blog.
   374  	HasAdminAccess bool `json:"hasAdminAccess,omitempty"`
   375  	// Kind: The kind of this entity. Always blogger#blogPerUserInfo.
   376  	Kind string `json:"kind,omitempty"`
   377  	// PhotosAlbumKey: The Photo Album Key for the user when adding photos to the
   378  	// blog.
   379  	PhotosAlbumKey string `json:"photosAlbumKey,omitempty"`
   380  	// Role: Access permissions that the user has for the blog (ADMIN, AUTHOR, or
   381  	// READER).
   382  	//
   383  	// Possible values:
   384  	//   "VIEW_TYPE_UNSPECIFIED"
   385  	//   "READER"
   386  	//   "AUTHOR"
   387  	//   "ADMIN"
   388  	Role string `json:"role,omitempty"`
   389  	// UserId: ID of the User.
   390  	UserId string `json:"userId,omitempty"`
   391  	// ForceSendFields is a list of field names (e.g. "BlogId") to unconditionally
   392  	// include in API requests. By default, fields with empty or default values are
   393  	// omitted from API requests. See
   394  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   395  	// details.
   396  	ForceSendFields []string `json:"-"`
   397  	// NullFields is a list of field names (e.g. "BlogId") to include in API
   398  	// requests with the JSON null value. By default, fields with empty values are
   399  	// omitted from API requests. See
   400  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   401  	NullFields []string `json:"-"`
   402  }
   403  
   404  func (s *BlogPerUserInfo) MarshalJSON() ([]byte, error) {
   405  	type NoMethod BlogPerUserInfo
   406  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   407  }
   408  
   409  type BlogUserInfo struct {
   410  	// Blog: The Blog resource.
   411  	Blog *Blog `json:"blog,omitempty"`
   412  	// BlogUserInfo: Information about a User for the Blog.
   413  	BlogUserInfo *BlogPerUserInfo `json:"blog_user_info,omitempty"`
   414  	// Kind: The kind of this entity. Always blogger#blogUserInfo.
   415  	Kind string `json:"kind,omitempty"`
   416  	// ForceSendFields is a list of field names (e.g. "Blog") to unconditionally
   417  	// include in API requests. By default, fields with empty or default values are
   418  	// omitted from API requests. See
   419  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   420  	// details.
   421  	ForceSendFields []string `json:"-"`
   422  	// NullFields is a list of field names (e.g. "Blog") to include in API requests
   423  	// with the JSON null value. By default, fields with empty values are omitted
   424  	// from API requests. See
   425  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   426  	NullFields []string `json:"-"`
   427  }
   428  
   429  func (s *BlogUserInfo) MarshalJSON() ([]byte, error) {
   430  	type NoMethod BlogUserInfo
   431  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   432  }
   433  
   434  type Comment struct {
   435  	// Author: The author of this Comment.
   436  	Author *CommentAuthor `json:"author,omitempty"`
   437  	// Blog: Data about the blog containing this comment.
   438  	Blog *CommentBlog `json:"blog,omitempty"`
   439  	// Content: The actual content of the comment. May include HTML markup.
   440  	Content string `json:"content,omitempty"`
   441  	// Id: The identifier for this resource.
   442  	Id string `json:"id,omitempty"`
   443  	// InReplyTo: Data about the comment this is in reply to.
   444  	InReplyTo *CommentInReplyTo `json:"inReplyTo,omitempty"`
   445  	// Kind: The kind of this entry. Always blogger#comment.
   446  	Kind string `json:"kind,omitempty"`
   447  	// Post: Data about the post containing this comment.
   448  	Post *CommentPost `json:"post,omitempty"`
   449  	// Published: RFC 3339 date-time when this comment was published.
   450  	Published string `json:"published,omitempty"`
   451  	// SelfLink: The API REST URL to fetch this resource from.
   452  	SelfLink string `json:"selfLink,omitempty"`
   453  	// Status: The status of the comment (only populated for admin users).
   454  	//
   455  	// Possible values:
   456  	//   "LIVE"
   457  	//   "EMPTIED"
   458  	//   "PENDING"
   459  	//   "SPAM"
   460  	Status string `json:"status,omitempty"`
   461  	// Updated: RFC 3339 date-time when this comment was last updated.
   462  	Updated string `json:"updated,omitempty"`
   463  
   464  	// ServerResponse contains the HTTP response code and headers from the server.
   465  	googleapi.ServerResponse `json:"-"`
   466  	// ForceSendFields is a list of field names (e.g. "Author") to unconditionally
   467  	// include in API requests. By default, fields with empty or default values are
   468  	// omitted from API requests. See
   469  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   470  	// details.
   471  	ForceSendFields []string `json:"-"`
   472  	// NullFields is a list of field names (e.g. "Author") to include in API
   473  	// requests with the JSON null value. By default, fields with empty values are
   474  	// omitted from API requests. See
   475  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   476  	NullFields []string `json:"-"`
   477  }
   478  
   479  func (s *Comment) MarshalJSON() ([]byte, error) {
   480  	type NoMethod Comment
   481  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   482  }
   483  
   484  // CommentAuthor: The author of this Comment.
   485  type CommentAuthor struct {
   486  	// DisplayName: The display name.
   487  	DisplayName string `json:"displayName,omitempty"`
   488  	// Id: The identifier of the creator.
   489  	Id string `json:"id,omitempty"`
   490  	// Image: The creator's avatar.
   491  	Image *CommentAuthorImage `json:"image,omitempty"`
   492  	// Url: The URL of the creator's Profile page.
   493  	Url string `json:"url,omitempty"`
   494  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   495  	// unconditionally include in API requests. By default, fields with empty or
   496  	// default values are omitted from API requests. See
   497  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   498  	// details.
   499  	ForceSendFields []string `json:"-"`
   500  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   501  	// requests with the JSON null value. By default, fields with empty values are
   502  	// omitted from API requests. See
   503  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   504  	NullFields []string `json:"-"`
   505  }
   506  
   507  func (s *CommentAuthor) MarshalJSON() ([]byte, error) {
   508  	type NoMethod CommentAuthor
   509  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   510  }
   511  
   512  // CommentAuthorImage: The creator's avatar.
   513  type CommentAuthorImage struct {
   514  	// Url: The creator's avatar URL.
   515  	Url string `json:"url,omitempty"`
   516  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
   517  	// include in API requests. By default, fields with empty or default values are
   518  	// omitted from API requests. See
   519  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   520  	// details.
   521  	ForceSendFields []string `json:"-"`
   522  	// NullFields is a list of field names (e.g. "Url") to include in API requests
   523  	// with the JSON null value. By default, fields with empty values are omitted
   524  	// from API requests. See
   525  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   526  	NullFields []string `json:"-"`
   527  }
   528  
   529  func (s *CommentAuthorImage) MarshalJSON() ([]byte, error) {
   530  	type NoMethod CommentAuthorImage
   531  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   532  }
   533  
   534  // CommentBlog: Data about the blog containing this comment.
   535  type CommentBlog struct {
   536  	// Id: The identifier of the blog containing this comment.
   537  	Id string `json:"id,omitempty"`
   538  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   539  	// include in API requests. By default, fields with empty or default values are
   540  	// omitted from API requests. See
   541  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   542  	// details.
   543  	ForceSendFields []string `json:"-"`
   544  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   545  	// with the JSON null value. By default, fields with empty values are omitted
   546  	// from API requests. See
   547  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   548  	NullFields []string `json:"-"`
   549  }
   550  
   551  func (s *CommentBlog) MarshalJSON() ([]byte, error) {
   552  	type NoMethod CommentBlog
   553  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   554  }
   555  
   556  // CommentInReplyTo: Data about the comment this is in reply to.
   557  type CommentInReplyTo struct {
   558  	// Id: The identified of the parent of this comment.
   559  	Id string `json:"id,omitempty"`
   560  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   561  	// include in API requests. By default, fields with empty or default values are
   562  	// omitted from API requests. See
   563  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   564  	// details.
   565  	ForceSendFields []string `json:"-"`
   566  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   567  	// with the JSON null value. By default, fields with empty values are omitted
   568  	// from API requests. See
   569  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   570  	NullFields []string `json:"-"`
   571  }
   572  
   573  func (s *CommentInReplyTo) MarshalJSON() ([]byte, error) {
   574  	type NoMethod CommentInReplyTo
   575  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   576  }
   577  
   578  // CommentPost: Data about the post containing this comment.
   579  type CommentPost struct {
   580  	// Id: The identifier of the post containing this comment.
   581  	Id string `json:"id,omitempty"`
   582  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   583  	// include in API requests. By default, fields with empty or default values are
   584  	// omitted from API requests. See
   585  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   586  	// details.
   587  	ForceSendFields []string `json:"-"`
   588  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   589  	// with the JSON null value. By default, fields with empty values are omitted
   590  	// from API requests. See
   591  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   592  	NullFields []string `json:"-"`
   593  }
   594  
   595  func (s *CommentPost) MarshalJSON() ([]byte, error) {
   596  	type NoMethod CommentPost
   597  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   598  }
   599  
   600  type CommentList struct {
   601  	// Etag: Etag of the response.
   602  	Etag string `json:"etag,omitempty"`
   603  	// Items: The List of Comments for a Post.
   604  	Items []*Comment `json:"items,omitempty"`
   605  	// Kind: The kind of this entry. Always blogger#commentList.
   606  	Kind string `json:"kind,omitempty"`
   607  	// NextPageToken: Pagination token to fetch the next page, if one exists.
   608  	NextPageToken string `json:"nextPageToken,omitempty"`
   609  	// PrevPageToken: Pagination token to fetch the previous page, if one exists.
   610  	PrevPageToken string `json:"prevPageToken,omitempty"`
   611  
   612  	// ServerResponse contains the HTTP response code and headers from the server.
   613  	googleapi.ServerResponse `json:"-"`
   614  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
   615  	// include in API requests. By default, fields with empty or default values are
   616  	// omitted from API requests. See
   617  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   618  	// details.
   619  	ForceSendFields []string `json:"-"`
   620  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
   621  	// with the JSON null value. By default, fields with empty values are omitted
   622  	// from API requests. See
   623  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   624  	NullFields []string `json:"-"`
   625  }
   626  
   627  func (s *CommentList) MarshalJSON() ([]byte, error) {
   628  	type NoMethod CommentList
   629  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   630  }
   631  
   632  type Page struct {
   633  	// Author: The author of this Page.
   634  	Author *PageAuthor `json:"author,omitempty"`
   635  	// Blog: Data about the blog containing this Page.
   636  	Blog *PageBlog `json:"blog,omitempty"`
   637  	// Content: The body content of this Page, in HTML.
   638  	Content string `json:"content,omitempty"`
   639  	// Etag: Etag of the resource.
   640  	Etag string `json:"etag,omitempty"`
   641  	// Id: The identifier for this resource.
   642  	Id string `json:"id,omitempty"`
   643  	// Kind: The kind of this entity. Always blogger#page.
   644  	Kind string `json:"kind,omitempty"`
   645  	// Published: RFC 3339 date-time when this Page was published.
   646  	Published string `json:"published,omitempty"`
   647  	// SelfLink: The API REST URL to fetch this resource from.
   648  	SelfLink string `json:"selfLink,omitempty"`
   649  	// Status: The status of the page for admin resources (either LIVE or DRAFT).
   650  	//
   651  	// Possible values:
   652  	//   "LIVE"
   653  	//   "DRAFT"
   654  	//   "SOFT_TRASHED"
   655  	Status string `json:"status,omitempty"`
   656  	// Title: The title of this entity. This is the name displayed in the Admin
   657  	// user interface.
   658  	Title string `json:"title,omitempty"`
   659  	// Trashed: RFC 3339 date-time when this Page was trashed.
   660  	Trashed string `json:"trashed,omitempty"`
   661  	// Updated: RFC 3339 date-time when this Page was last updated.
   662  	Updated string `json:"updated,omitempty"`
   663  	// Url: The URL that this Page is displayed at.
   664  	Url string `json:"url,omitempty"`
   665  
   666  	// ServerResponse contains the HTTP response code and headers from the server.
   667  	googleapi.ServerResponse `json:"-"`
   668  	// ForceSendFields is a list of field names (e.g. "Author") to unconditionally
   669  	// include in API requests. By default, fields with empty or default values are
   670  	// omitted from API requests. See
   671  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   672  	// details.
   673  	ForceSendFields []string `json:"-"`
   674  	// NullFields is a list of field names (e.g. "Author") to include in API
   675  	// requests with the JSON null value. By default, fields with empty values are
   676  	// omitted from API requests. See
   677  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   678  	NullFields []string `json:"-"`
   679  }
   680  
   681  func (s *Page) MarshalJSON() ([]byte, error) {
   682  	type NoMethod Page
   683  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   684  }
   685  
   686  // PageAuthor: The author of this Page.
   687  type PageAuthor struct {
   688  	// DisplayName: The display name.
   689  	DisplayName string `json:"displayName,omitempty"`
   690  	// Id: The identifier of the creator.
   691  	Id string `json:"id,omitempty"`
   692  	// Image: The creator's avatar.
   693  	Image *PageAuthorImage `json:"image,omitempty"`
   694  	// Url: The URL of the creator's Profile page.
   695  	Url string `json:"url,omitempty"`
   696  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   697  	// unconditionally include in API requests. By default, fields with empty or
   698  	// default values are omitted from API requests. See
   699  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   700  	// details.
   701  	ForceSendFields []string `json:"-"`
   702  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   703  	// requests with the JSON null value. By default, fields with empty values are
   704  	// omitted from API requests. See
   705  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   706  	NullFields []string `json:"-"`
   707  }
   708  
   709  func (s *PageAuthor) MarshalJSON() ([]byte, error) {
   710  	type NoMethod PageAuthor
   711  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   712  }
   713  
   714  // PageAuthorImage: The creator's avatar.
   715  type PageAuthorImage struct {
   716  	// Url: The creator's avatar URL.
   717  	Url string `json:"url,omitempty"`
   718  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
   719  	// include in API requests. By default, fields with empty or default values are
   720  	// omitted from API requests. See
   721  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   722  	// details.
   723  	ForceSendFields []string `json:"-"`
   724  	// NullFields is a list of field names (e.g. "Url") to include in API requests
   725  	// with the JSON null value. By default, fields with empty values are omitted
   726  	// from API requests. See
   727  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   728  	NullFields []string `json:"-"`
   729  }
   730  
   731  func (s *PageAuthorImage) MarshalJSON() ([]byte, error) {
   732  	type NoMethod PageAuthorImage
   733  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   734  }
   735  
   736  // PageBlog: Data about the blog containing this Page.
   737  type PageBlog struct {
   738  	// Id: The identifier of the blog containing this page.
   739  	Id string `json:"id,omitempty"`
   740  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   741  	// include in API requests. By default, fields with empty or default values are
   742  	// omitted from API requests. See
   743  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   744  	// details.
   745  	ForceSendFields []string `json:"-"`
   746  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   747  	// with the JSON null value. By default, fields with empty values are omitted
   748  	// from API requests. See
   749  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   750  	NullFields []string `json:"-"`
   751  }
   752  
   753  func (s *PageBlog) MarshalJSON() ([]byte, error) {
   754  	type NoMethod PageBlog
   755  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   756  }
   757  
   758  type PageList struct {
   759  	// Etag: Etag of the response.
   760  	Etag string `json:"etag,omitempty"`
   761  	// Items: The list of Pages for a Blog.
   762  	Items []*Page `json:"items,omitempty"`
   763  	// Kind: The kind of this entity. Always blogger#pageList.
   764  	Kind string `json:"kind,omitempty"`
   765  	// NextPageToken: Pagination token to fetch the next page, if one exists.
   766  	NextPageToken string `json:"nextPageToken,omitempty"`
   767  
   768  	// ServerResponse contains the HTTP response code and headers from the server.
   769  	googleapi.ServerResponse `json:"-"`
   770  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
   771  	// include in API requests. By default, fields with empty or default values are
   772  	// omitted from API requests. See
   773  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   774  	// details.
   775  	ForceSendFields []string `json:"-"`
   776  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
   777  	// with the JSON null value. By default, fields with empty values are omitted
   778  	// from API requests. See
   779  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   780  	NullFields []string `json:"-"`
   781  }
   782  
   783  func (s *PageList) MarshalJSON() ([]byte, error) {
   784  	type NoMethod PageList
   785  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   786  }
   787  
   788  type Post struct {
   789  	// Author: The author of this Post.
   790  	Author *PostAuthor `json:"author,omitempty"`
   791  	// Blog: Data about the blog containing this Post.
   792  	Blog *PostBlog `json:"blog,omitempty"`
   793  	// Content: The content of the Post. May contain HTML markup.
   794  	Content string `json:"content,omitempty"`
   795  	// CustomMetaData: The JSON meta-data for the Post.
   796  	CustomMetaData string `json:"customMetaData,omitempty"`
   797  	// Etag: Etag of the resource.
   798  	Etag string `json:"etag,omitempty"`
   799  	// Id: The identifier of this Post.
   800  	Id string `json:"id,omitempty"`
   801  	// Images: Display image for the Post.
   802  	Images []*PostImages `json:"images,omitempty"`
   803  	// Kind: The kind of this entity. Always blogger#post.
   804  	Kind string `json:"kind,omitempty"`
   805  	// Labels: The list of labels this Post was tagged with.
   806  	Labels []string `json:"labels,omitempty"`
   807  	// Location: The location for geotagged posts.
   808  	Location *PostLocation `json:"location,omitempty"`
   809  	// Published: RFC 3339 date-time when this Post was published.
   810  	Published string `json:"published,omitempty"`
   811  	// ReaderComments: Comment control and display setting for readers of this
   812  	// post.
   813  	//
   814  	// Possible values:
   815  	//   "ALLOW"
   816  	//   "DONT_ALLOW_SHOW_EXISTING"
   817  	//   "DONT_ALLOW_HIDE_EXISTING"
   818  	ReaderComments string `json:"readerComments,omitempty"`
   819  	// Replies: The container of comments on this Post.
   820  	Replies *PostReplies `json:"replies,omitempty"`
   821  	// SelfLink: The API REST URL to fetch this resource from.
   822  	SelfLink string `json:"selfLink,omitempty"`
   823  	// Status: Status of the post. Only set for admin-level requests.
   824  	//
   825  	// Possible values:
   826  	//   "LIVE"
   827  	//   "DRAFT"
   828  	//   "SCHEDULED"
   829  	//   "SOFT_TRASHED"
   830  	Status string `json:"status,omitempty"`
   831  	// Title: The title of the Post.
   832  	Title string `json:"title,omitempty"`
   833  	// TitleLink: The title link URL, similar to atom's related link.
   834  	TitleLink string `json:"titleLink,omitempty"`
   835  	// Trashed: RFC 3339 date-time when this Post was last trashed.
   836  	Trashed string `json:"trashed,omitempty"`
   837  	// Updated: RFC 3339 date-time when this Post was last updated.
   838  	Updated string `json:"updated,omitempty"`
   839  	// Url: The URL where this Post is displayed.
   840  	Url string `json:"url,omitempty"`
   841  
   842  	// ServerResponse contains the HTTP response code and headers from the server.
   843  	googleapi.ServerResponse `json:"-"`
   844  	// ForceSendFields is a list of field names (e.g. "Author") to unconditionally
   845  	// include in API requests. By default, fields with empty or default values are
   846  	// omitted from API requests. See
   847  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   848  	// details.
   849  	ForceSendFields []string `json:"-"`
   850  	// NullFields is a list of field names (e.g. "Author") to include in API
   851  	// requests with the JSON null value. By default, fields with empty values are
   852  	// omitted from API requests. See
   853  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   854  	NullFields []string `json:"-"`
   855  }
   856  
   857  func (s *Post) MarshalJSON() ([]byte, error) {
   858  	type NoMethod Post
   859  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   860  }
   861  
   862  // PostAuthor: The author of this Post.
   863  type PostAuthor struct {
   864  	// DisplayName: The display name.
   865  	DisplayName string `json:"displayName,omitempty"`
   866  	// Id: The identifier of the creator.
   867  	Id string `json:"id,omitempty"`
   868  	// Image: The creator's avatar.
   869  	Image *PostAuthorImage `json:"image,omitempty"`
   870  	// Url: The URL of the creator's Profile page.
   871  	Url string `json:"url,omitempty"`
   872  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   873  	// unconditionally include in API requests. By default, fields with empty or
   874  	// default values are omitted from API requests. See
   875  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   876  	// details.
   877  	ForceSendFields []string `json:"-"`
   878  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   879  	// requests with the JSON null value. By default, fields with empty values are
   880  	// omitted from API requests. See
   881  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   882  	NullFields []string `json:"-"`
   883  }
   884  
   885  func (s *PostAuthor) MarshalJSON() ([]byte, error) {
   886  	type NoMethod PostAuthor
   887  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   888  }
   889  
   890  // PostAuthorImage: The creator's avatar.
   891  type PostAuthorImage struct {
   892  	// Url: The creator's avatar URL.
   893  	Url string `json:"url,omitempty"`
   894  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
   895  	// include in API requests. By default, fields with empty or default values are
   896  	// omitted from API requests. See
   897  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   898  	// details.
   899  	ForceSendFields []string `json:"-"`
   900  	// NullFields is a list of field names (e.g. "Url") to include in API requests
   901  	// with the JSON null value. By default, fields with empty values are omitted
   902  	// from API requests. See
   903  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   904  	NullFields []string `json:"-"`
   905  }
   906  
   907  func (s *PostAuthorImage) MarshalJSON() ([]byte, error) {
   908  	type NoMethod PostAuthorImage
   909  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   910  }
   911  
   912  // PostBlog: Data about the blog containing this Post.
   913  type PostBlog struct {
   914  	// Id: The identifier of the Blog that contains this Post.
   915  	Id string `json:"id,omitempty"`
   916  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   917  	// include in API requests. By default, fields with empty or default values are
   918  	// omitted from API requests. See
   919  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   920  	// details.
   921  	ForceSendFields []string `json:"-"`
   922  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   923  	// with the JSON null value. By default, fields with empty values are omitted
   924  	// from API requests. See
   925  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   926  	NullFields []string `json:"-"`
   927  }
   928  
   929  func (s *PostBlog) MarshalJSON() ([]byte, error) {
   930  	type NoMethod PostBlog
   931  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   932  }
   933  
   934  type PostImages struct {
   935  	Url string `json:"url,omitempty"`
   936  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
   937  	// include in API requests. By default, fields with empty or default values are
   938  	// omitted from API requests. See
   939  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   940  	// details.
   941  	ForceSendFields []string `json:"-"`
   942  	// NullFields is a list of field names (e.g. "Url") to include in API requests
   943  	// with the JSON null value. By default, fields with empty values are omitted
   944  	// from API requests. See
   945  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   946  	NullFields []string `json:"-"`
   947  }
   948  
   949  func (s *PostImages) MarshalJSON() ([]byte, error) {
   950  	type NoMethod PostImages
   951  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   952  }
   953  
   954  // PostLocation: The location for geotagged posts.
   955  type PostLocation struct {
   956  	// Lat: Location's latitude.
   957  	Lat float64 `json:"lat,omitempty"`
   958  	// Lng: Location's longitude.
   959  	Lng float64 `json:"lng,omitempty"`
   960  	// Name: Location name.
   961  	Name string `json:"name,omitempty"`
   962  	// Span: Location's viewport span. Can be used when rendering a map preview.
   963  	Span string `json:"span,omitempty"`
   964  	// ForceSendFields is a list of field names (e.g. "Lat") to unconditionally
   965  	// include in API requests. By default, fields with empty or default values are
   966  	// omitted from API requests. See
   967  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   968  	// details.
   969  	ForceSendFields []string `json:"-"`
   970  	// NullFields is a list of field names (e.g. "Lat") to include in API requests
   971  	// with the JSON null value. By default, fields with empty values are omitted
   972  	// from API requests. See
   973  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   974  	NullFields []string `json:"-"`
   975  }
   976  
   977  func (s *PostLocation) MarshalJSON() ([]byte, error) {
   978  	type NoMethod PostLocation
   979  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   980  }
   981  
   982  func (s *PostLocation) UnmarshalJSON(data []byte) error {
   983  	type NoMethod PostLocation
   984  	var s1 struct {
   985  		Lat gensupport.JSONFloat64 `json:"lat"`
   986  		Lng gensupport.JSONFloat64 `json:"lng"`
   987  		*NoMethod
   988  	}
   989  	s1.NoMethod = (*NoMethod)(s)
   990  	if err := json.Unmarshal(data, &s1); err != nil {
   991  		return err
   992  	}
   993  	s.Lat = float64(s1.Lat)
   994  	s.Lng = float64(s1.Lng)
   995  	return nil
   996  }
   997  
   998  // PostReplies: The container of comments on this Post.
   999  type PostReplies struct {
  1000  	// Items: The List of Comments for this Post.
  1001  	Items []*Comment `json:"items,omitempty"`
  1002  	// SelfLink: The URL of the comments on this post.
  1003  	SelfLink string `json:"selfLink,omitempty"`
  1004  	// TotalItems: The count of comments on this post.
  1005  	TotalItems int64 `json:"totalItems,omitempty,string"`
  1006  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1007  	// include in API requests. By default, fields with empty or default values are
  1008  	// omitted from API requests. See
  1009  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1010  	// details.
  1011  	ForceSendFields []string `json:"-"`
  1012  	// NullFields is a list of field names (e.g. "Items") to include in API
  1013  	// requests with the JSON null value. By default, fields with empty values are
  1014  	// omitted from API requests. See
  1015  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1016  	NullFields []string `json:"-"`
  1017  }
  1018  
  1019  func (s *PostReplies) MarshalJSON() ([]byte, error) {
  1020  	type NoMethod PostReplies
  1021  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1022  }
  1023  
  1024  type PostList struct {
  1025  	// Etag: Etag of the response.
  1026  	Etag string `json:"etag,omitempty"`
  1027  	// Items: The list of Posts for this Blog.
  1028  	Items []*Post `json:"items,omitempty"`
  1029  	// Kind: The kind of this entity. Always blogger#postList.
  1030  	Kind string `json:"kind,omitempty"`
  1031  	// NextPageToken: Pagination token to fetch the next page, if one exists.
  1032  	NextPageToken string `json:"nextPageToken,omitempty"`
  1033  	// PrevPageToken: Pagination token to fetch the previous page, if one exists.
  1034  	PrevPageToken string `json:"prevPageToken,omitempty"`
  1035  
  1036  	// ServerResponse contains the HTTP response code and headers from the server.
  1037  	googleapi.ServerResponse `json:"-"`
  1038  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  1039  	// include in API requests. By default, fields with empty or default values are
  1040  	// omitted from API requests. See
  1041  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1042  	// details.
  1043  	ForceSendFields []string `json:"-"`
  1044  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  1045  	// with the JSON null value. By default, fields with empty values are omitted
  1046  	// from API requests. See
  1047  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1048  	NullFields []string `json:"-"`
  1049  }
  1050  
  1051  func (s *PostList) MarshalJSON() ([]byte, error) {
  1052  	type NoMethod PostList
  1053  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1054  }
  1055  
  1056  type User struct {
  1057  	// About: Profile summary information.
  1058  	About string `json:"about,omitempty"`
  1059  	// Blogs: The container of blogs for this user.
  1060  	Blogs *UserBlogs `json:"blogs,omitempty"`
  1061  	// Created: The timestamp of when this profile was created, in seconds since
  1062  	// epoch.
  1063  	Created string `json:"created,omitempty"`
  1064  	// DisplayName: The display name.
  1065  	DisplayName string `json:"displayName,omitempty"`
  1066  	// Id: The identifier for this User.
  1067  	Id string `json:"id,omitempty"`
  1068  	// Kind: The kind of this entity. Always blogger#user.
  1069  	Kind string `json:"kind,omitempty"`
  1070  	// Locale: This user's locale
  1071  	Locale *UserLocale `json:"locale,omitempty"`
  1072  	// SelfLink: The API REST URL to fetch this resource from.
  1073  	SelfLink string `json:"selfLink,omitempty"`
  1074  	// Url: The user's profile page.
  1075  	Url string `json:"url,omitempty"`
  1076  
  1077  	// ServerResponse contains the HTTP response code and headers from the server.
  1078  	googleapi.ServerResponse `json:"-"`
  1079  	// ForceSendFields is a list of field names (e.g. "About") to unconditionally
  1080  	// include in API requests. By default, fields with empty or default values are
  1081  	// omitted from API requests. See
  1082  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1083  	// details.
  1084  	ForceSendFields []string `json:"-"`
  1085  	// NullFields is a list of field names (e.g. "About") to include in API
  1086  	// requests with the JSON null value. By default, fields with empty values are
  1087  	// omitted from API requests. See
  1088  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1089  	NullFields []string `json:"-"`
  1090  }
  1091  
  1092  func (s *User) MarshalJSON() ([]byte, error) {
  1093  	type NoMethod User
  1094  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1095  }
  1096  
  1097  // UserBlogs: The container of blogs for this user.
  1098  type UserBlogs struct {
  1099  	// SelfLink: The URL of the Blogs for this user.
  1100  	SelfLink string `json:"selfLink,omitempty"`
  1101  	// ForceSendFields is a list of field names (e.g. "SelfLink") to
  1102  	// unconditionally include in API requests. By default, fields with empty or
  1103  	// default values are omitted from API requests. See
  1104  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1105  	// details.
  1106  	ForceSendFields []string `json:"-"`
  1107  	// NullFields is a list of field names (e.g. "SelfLink") to include in API
  1108  	// requests with the JSON null value. By default, fields with empty values are
  1109  	// omitted from API requests. See
  1110  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1111  	NullFields []string `json:"-"`
  1112  }
  1113  
  1114  func (s *UserBlogs) MarshalJSON() ([]byte, error) {
  1115  	type NoMethod UserBlogs
  1116  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1117  }
  1118  
  1119  // UserLocale: This user's locale
  1120  type UserLocale struct {
  1121  	// Country: The country this blog's locale is set to.
  1122  	Country string `json:"country,omitempty"`
  1123  	// Language: The language this blog is authored in.
  1124  	Language string `json:"language,omitempty"`
  1125  	// Variant: The language variant this blog is authored in.
  1126  	Variant string `json:"variant,omitempty"`
  1127  	// ForceSendFields is a list of field names (e.g. "Country") to unconditionally
  1128  	// include in API requests. By default, fields with empty or default values are
  1129  	// omitted from API requests. See
  1130  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1131  	// details.
  1132  	ForceSendFields []string `json:"-"`
  1133  	// NullFields is a list of field names (e.g. "Country") to include in API
  1134  	// requests with the JSON null value. By default, fields with empty values are
  1135  	// omitted from API requests. See
  1136  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1137  	NullFields []string `json:"-"`
  1138  }
  1139  
  1140  func (s *UserLocale) MarshalJSON() ([]byte, error) {
  1141  	type NoMethod UserLocale
  1142  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1143  }
  1144  
  1145  type BlogsGetCall struct {
  1146  	s            *Service
  1147  	blogId       string
  1148  	urlParams_   gensupport.URLParams
  1149  	ifNoneMatch_ string
  1150  	ctx_         context.Context
  1151  	header_      http.Header
  1152  }
  1153  
  1154  // Get: Gets a blog by id.
  1155  //
  1156  // - blogId: .
  1157  func (r *BlogsService) Get(blogId string) *BlogsGetCall {
  1158  	c := &BlogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1159  	c.blogId = blogId
  1160  	return c
  1161  }
  1162  
  1163  // Fields allows partial responses to be retrieved. See
  1164  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1165  // details.
  1166  func (c *BlogsGetCall) Fields(s ...googleapi.Field) *BlogsGetCall {
  1167  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1168  	return c
  1169  }
  1170  
  1171  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1172  // object's ETag matches the given value. This is useful for getting updates
  1173  // only after the object has changed since the last request.
  1174  func (c *BlogsGetCall) IfNoneMatch(entityTag string) *BlogsGetCall {
  1175  	c.ifNoneMatch_ = entityTag
  1176  	return c
  1177  }
  1178  
  1179  // Context sets the context to be used in this call's Do method.
  1180  func (c *BlogsGetCall) Context(ctx context.Context) *BlogsGetCall {
  1181  	c.ctx_ = ctx
  1182  	return c
  1183  }
  1184  
  1185  // Header returns a http.Header that can be modified by the caller to add
  1186  // headers to the request.
  1187  func (c *BlogsGetCall) Header() http.Header {
  1188  	if c.header_ == nil {
  1189  		c.header_ = make(http.Header)
  1190  	}
  1191  	return c.header_
  1192  }
  1193  
  1194  func (c *BlogsGetCall) doRequest(alt string) (*http.Response, error) {
  1195  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1196  	if c.ifNoneMatch_ != "" {
  1197  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1198  	}
  1199  	var body io.Reader = nil
  1200  	c.urlParams_.Set("alt", alt)
  1201  	c.urlParams_.Set("prettyPrint", "false")
  1202  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}")
  1203  	urls += "?" + c.urlParams_.Encode()
  1204  	req, err := http.NewRequest("GET", urls, body)
  1205  	if err != nil {
  1206  		return nil, err
  1207  	}
  1208  	req.Header = reqHeaders
  1209  	googleapi.Expand(req.URL, map[string]string{
  1210  		"blogId": c.blogId,
  1211  	})
  1212  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1213  }
  1214  
  1215  // Do executes the "blogger.blogs.get" call.
  1216  // Any non-2xx status code is an error. Response headers are in either
  1217  // *Blog.ServerResponse.Header or (if a response was returned at all) in
  1218  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1219  // whether the returned error was because http.StatusNotModified was returned.
  1220  func (c *BlogsGetCall) Do(opts ...googleapi.CallOption) (*Blog, error) {
  1221  	gensupport.SetOptions(c.urlParams_, opts...)
  1222  	res, err := c.doRequest("json")
  1223  	if res != nil && res.StatusCode == http.StatusNotModified {
  1224  		if res.Body != nil {
  1225  			res.Body.Close()
  1226  		}
  1227  		return nil, gensupport.WrapError(&googleapi.Error{
  1228  			Code:   res.StatusCode,
  1229  			Header: res.Header,
  1230  		})
  1231  	}
  1232  	if err != nil {
  1233  		return nil, err
  1234  	}
  1235  	defer googleapi.CloseBody(res)
  1236  	if err := googleapi.CheckResponse(res); err != nil {
  1237  		return nil, gensupport.WrapError(err)
  1238  	}
  1239  	ret := &Blog{
  1240  		ServerResponse: googleapi.ServerResponse{
  1241  			Header:         res.Header,
  1242  			HTTPStatusCode: res.StatusCode,
  1243  		},
  1244  	}
  1245  	target := &ret
  1246  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1247  		return nil, err
  1248  	}
  1249  	return ret, nil
  1250  }
  1251  
  1252  type BlogsListCall struct {
  1253  	s            *Service
  1254  	userId       string
  1255  	urlParams_   gensupport.URLParams
  1256  	ifNoneMatch_ string
  1257  	ctx_         context.Context
  1258  	header_      http.Header
  1259  }
  1260  
  1261  // List: Lists blogs by user id, possibly filtered.
  1262  //
  1263  // - userId: .
  1264  func (r *BlogsService) List(userId string) *BlogsListCall {
  1265  	c := &BlogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1266  	c.userId = userId
  1267  	return c
  1268  }
  1269  
  1270  // Fields allows partial responses to be retrieved. See
  1271  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1272  // details.
  1273  func (c *BlogsListCall) Fields(s ...googleapi.Field) *BlogsListCall {
  1274  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1275  	return c
  1276  }
  1277  
  1278  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1279  // object's ETag matches the given value. This is useful for getting updates
  1280  // only after the object has changed since the last request.
  1281  func (c *BlogsListCall) IfNoneMatch(entityTag string) *BlogsListCall {
  1282  	c.ifNoneMatch_ = entityTag
  1283  	return c
  1284  }
  1285  
  1286  // Context sets the context to be used in this call's Do method.
  1287  func (c *BlogsListCall) Context(ctx context.Context) *BlogsListCall {
  1288  	c.ctx_ = ctx
  1289  	return c
  1290  }
  1291  
  1292  // Header returns a http.Header that can be modified by the caller to add
  1293  // headers to the request.
  1294  func (c *BlogsListCall) Header() http.Header {
  1295  	if c.header_ == nil {
  1296  		c.header_ = make(http.Header)
  1297  	}
  1298  	return c.header_
  1299  }
  1300  
  1301  func (c *BlogsListCall) doRequest(alt string) (*http.Response, error) {
  1302  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1303  	if c.ifNoneMatch_ != "" {
  1304  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1305  	}
  1306  	var body io.Reader = nil
  1307  	c.urlParams_.Set("alt", alt)
  1308  	c.urlParams_.Set("prettyPrint", "false")
  1309  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{userId}/blogs")
  1310  	urls += "?" + c.urlParams_.Encode()
  1311  	req, err := http.NewRequest("GET", urls, body)
  1312  	if err != nil {
  1313  		return nil, err
  1314  	}
  1315  	req.Header = reqHeaders
  1316  	googleapi.Expand(req.URL, map[string]string{
  1317  		"userId": c.userId,
  1318  	})
  1319  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1320  }
  1321  
  1322  // Do executes the "blogger.blogs.list" call.
  1323  // Any non-2xx status code is an error. Response headers are in either
  1324  // *BlogList.ServerResponse.Header or (if a response was returned at all) in
  1325  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1326  // whether the returned error was because http.StatusNotModified was returned.
  1327  func (c *BlogsListCall) Do(opts ...googleapi.CallOption) (*BlogList, error) {
  1328  	gensupport.SetOptions(c.urlParams_, opts...)
  1329  	res, err := c.doRequest("json")
  1330  	if res != nil && res.StatusCode == http.StatusNotModified {
  1331  		if res.Body != nil {
  1332  			res.Body.Close()
  1333  		}
  1334  		return nil, gensupport.WrapError(&googleapi.Error{
  1335  			Code:   res.StatusCode,
  1336  			Header: res.Header,
  1337  		})
  1338  	}
  1339  	if err != nil {
  1340  		return nil, err
  1341  	}
  1342  	defer googleapi.CloseBody(res)
  1343  	if err := googleapi.CheckResponse(res); err != nil {
  1344  		return nil, gensupport.WrapError(err)
  1345  	}
  1346  	ret := &BlogList{
  1347  		ServerResponse: googleapi.ServerResponse{
  1348  			Header:         res.Header,
  1349  			HTTPStatusCode: res.StatusCode,
  1350  		},
  1351  	}
  1352  	target := &ret
  1353  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1354  		return nil, err
  1355  	}
  1356  	return ret, nil
  1357  }
  1358  
  1359  type CommentsGetCall struct {
  1360  	s            *Service
  1361  	blogId       string
  1362  	postId       string
  1363  	commentId    string
  1364  	urlParams_   gensupport.URLParams
  1365  	ifNoneMatch_ string
  1366  	ctx_         context.Context
  1367  	header_      http.Header
  1368  }
  1369  
  1370  // Get: Gets a comment by blog id, post id and comment id.
  1371  //
  1372  // - blogId: .
  1373  // - commentId: .
  1374  // - postId: .
  1375  func (r *CommentsService) Get(blogId string, postId string, commentId string) *CommentsGetCall {
  1376  	c := &CommentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1377  	c.blogId = blogId
  1378  	c.postId = postId
  1379  	c.commentId = commentId
  1380  	return c
  1381  }
  1382  
  1383  // Fields allows partial responses to be retrieved. See
  1384  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1385  // details.
  1386  func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall {
  1387  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1388  	return c
  1389  }
  1390  
  1391  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1392  // object's ETag matches the given value. This is useful for getting updates
  1393  // only after the object has changed since the last request.
  1394  func (c *CommentsGetCall) IfNoneMatch(entityTag string) *CommentsGetCall {
  1395  	c.ifNoneMatch_ = entityTag
  1396  	return c
  1397  }
  1398  
  1399  // Context sets the context to be used in this call's Do method.
  1400  func (c *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
  1401  	c.ctx_ = ctx
  1402  	return c
  1403  }
  1404  
  1405  // Header returns a http.Header that can be modified by the caller to add
  1406  // headers to the request.
  1407  func (c *CommentsGetCall) Header() http.Header {
  1408  	if c.header_ == nil {
  1409  		c.header_ = make(http.Header)
  1410  	}
  1411  	return c.header_
  1412  }
  1413  
  1414  func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
  1415  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1416  	if c.ifNoneMatch_ != "" {
  1417  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1418  	}
  1419  	var body io.Reader = nil
  1420  	c.urlParams_.Set("alt", alt)
  1421  	c.urlParams_.Set("prettyPrint", "false")
  1422  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/posts/{postId}/comments/{commentId}")
  1423  	urls += "?" + c.urlParams_.Encode()
  1424  	req, err := http.NewRequest("GET", urls, body)
  1425  	if err != nil {
  1426  		return nil, err
  1427  	}
  1428  	req.Header = reqHeaders
  1429  	googleapi.Expand(req.URL, map[string]string{
  1430  		"blogId":    c.blogId,
  1431  		"postId":    c.postId,
  1432  		"commentId": c.commentId,
  1433  	})
  1434  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1435  }
  1436  
  1437  // Do executes the "blogger.comments.get" call.
  1438  // Any non-2xx status code is an error. Response headers are in either
  1439  // *Comment.ServerResponse.Header or (if a response was returned at all) in
  1440  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1441  // whether the returned error was because http.StatusNotModified was returned.
  1442  func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  1443  	gensupport.SetOptions(c.urlParams_, opts...)
  1444  	res, err := c.doRequest("json")
  1445  	if res != nil && res.StatusCode == http.StatusNotModified {
  1446  		if res.Body != nil {
  1447  			res.Body.Close()
  1448  		}
  1449  		return nil, gensupport.WrapError(&googleapi.Error{
  1450  			Code:   res.StatusCode,
  1451  			Header: res.Header,
  1452  		})
  1453  	}
  1454  	if err != nil {
  1455  		return nil, err
  1456  	}
  1457  	defer googleapi.CloseBody(res)
  1458  	if err := googleapi.CheckResponse(res); err != nil {
  1459  		return nil, gensupport.WrapError(err)
  1460  	}
  1461  	ret := &Comment{
  1462  		ServerResponse: googleapi.ServerResponse{
  1463  			Header:         res.Header,
  1464  			HTTPStatusCode: res.StatusCode,
  1465  		},
  1466  	}
  1467  	target := &ret
  1468  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1469  		return nil, err
  1470  	}
  1471  	return ret, nil
  1472  }
  1473  
  1474  type CommentsListCall struct {
  1475  	s            *Service
  1476  	blogId       string
  1477  	postId       string
  1478  	urlParams_   gensupport.URLParams
  1479  	ifNoneMatch_ string
  1480  	ctx_         context.Context
  1481  	header_      http.Header
  1482  }
  1483  
  1484  // List: Lists comments.
  1485  //
  1486  // - blogId: .
  1487  // - postId: .
  1488  func (r *CommentsService) List(blogId string, postId string) *CommentsListCall {
  1489  	c := &CommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1490  	c.blogId = blogId
  1491  	c.postId = postId
  1492  	return c
  1493  }
  1494  
  1495  // FetchBodies sets the optional parameter "fetchBodies":
  1496  func (c *CommentsListCall) FetchBodies(fetchBodies bool) *CommentsListCall {
  1497  	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
  1498  	return c
  1499  }
  1500  
  1501  // MaxResults sets the optional parameter "maxResults":
  1502  func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
  1503  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  1504  	return c
  1505  }
  1506  
  1507  // PageToken sets the optional parameter "pageToken":
  1508  func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
  1509  	c.urlParams_.Set("pageToken", pageToken)
  1510  	return c
  1511  }
  1512  
  1513  // StartDate sets the optional parameter "startDate":
  1514  func (c *CommentsListCall) StartDate(startDate string) *CommentsListCall {
  1515  	c.urlParams_.Set("startDate", startDate)
  1516  	return c
  1517  }
  1518  
  1519  // Fields allows partial responses to be retrieved. See
  1520  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1521  // details.
  1522  func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
  1523  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1524  	return c
  1525  }
  1526  
  1527  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1528  // object's ETag matches the given value. This is useful for getting updates
  1529  // only after the object has changed since the last request.
  1530  func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall {
  1531  	c.ifNoneMatch_ = entityTag
  1532  	return c
  1533  }
  1534  
  1535  // Context sets the context to be used in this call's Do method.
  1536  func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
  1537  	c.ctx_ = ctx
  1538  	return c
  1539  }
  1540  
  1541  // Header returns a http.Header that can be modified by the caller to add
  1542  // headers to the request.
  1543  func (c *CommentsListCall) Header() http.Header {
  1544  	if c.header_ == nil {
  1545  		c.header_ = make(http.Header)
  1546  	}
  1547  	return c.header_
  1548  }
  1549  
  1550  func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
  1551  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1552  	if c.ifNoneMatch_ != "" {
  1553  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1554  	}
  1555  	var body io.Reader = nil
  1556  	c.urlParams_.Set("alt", alt)
  1557  	c.urlParams_.Set("prettyPrint", "false")
  1558  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/posts/{postId}/comments")
  1559  	urls += "?" + c.urlParams_.Encode()
  1560  	req, err := http.NewRequest("GET", urls, body)
  1561  	if err != nil {
  1562  		return nil, err
  1563  	}
  1564  	req.Header = reqHeaders
  1565  	googleapi.Expand(req.URL, map[string]string{
  1566  		"blogId": c.blogId,
  1567  		"postId": c.postId,
  1568  	})
  1569  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1570  }
  1571  
  1572  // Do executes the "blogger.comments.list" call.
  1573  // Any non-2xx status code is an error. Response headers are in either
  1574  // *CommentList.ServerResponse.Header or (if a response was returned at all) in
  1575  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1576  // whether the returned error was because http.StatusNotModified was returned.
  1577  func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentList, error) {
  1578  	gensupport.SetOptions(c.urlParams_, opts...)
  1579  	res, err := c.doRequest("json")
  1580  	if res != nil && res.StatusCode == http.StatusNotModified {
  1581  		if res.Body != nil {
  1582  			res.Body.Close()
  1583  		}
  1584  		return nil, gensupport.WrapError(&googleapi.Error{
  1585  			Code:   res.StatusCode,
  1586  			Header: res.Header,
  1587  		})
  1588  	}
  1589  	if err != nil {
  1590  		return nil, err
  1591  	}
  1592  	defer googleapi.CloseBody(res)
  1593  	if err := googleapi.CheckResponse(res); err != nil {
  1594  		return nil, gensupport.WrapError(err)
  1595  	}
  1596  	ret := &CommentList{
  1597  		ServerResponse: googleapi.ServerResponse{
  1598  			Header:         res.Header,
  1599  			HTTPStatusCode: res.StatusCode,
  1600  		},
  1601  	}
  1602  	target := &ret
  1603  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1604  		return nil, err
  1605  	}
  1606  	return ret, nil
  1607  }
  1608  
  1609  // Pages invokes f for each page of results.
  1610  // A non-nil error returned from f will halt the iteration.
  1611  // The provided context supersedes any context provided to the Context method.
  1612  func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentList) error) error {
  1613  	c.ctx_ = ctx
  1614  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1615  	for {
  1616  		x, err := c.Do()
  1617  		if err != nil {
  1618  			return err
  1619  		}
  1620  		if err := f(x); err != nil {
  1621  			return err
  1622  		}
  1623  		if x.NextPageToken == "" {
  1624  			return nil
  1625  		}
  1626  		c.PageToken(x.NextPageToken)
  1627  	}
  1628  }
  1629  
  1630  type PagesGetCall struct {
  1631  	s            *Service
  1632  	blogId       string
  1633  	pageId       string
  1634  	urlParams_   gensupport.URLParams
  1635  	ifNoneMatch_ string
  1636  	ctx_         context.Context
  1637  	header_      http.Header
  1638  }
  1639  
  1640  // Get: Gets a page by blog id and page id.
  1641  //
  1642  // - blogId: .
  1643  // - pageId: .
  1644  func (r *PagesService) Get(blogId string, pageId string) *PagesGetCall {
  1645  	c := &PagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1646  	c.blogId = blogId
  1647  	c.pageId = pageId
  1648  	return c
  1649  }
  1650  
  1651  // Fields allows partial responses to be retrieved. See
  1652  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1653  // details.
  1654  func (c *PagesGetCall) Fields(s ...googleapi.Field) *PagesGetCall {
  1655  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1656  	return c
  1657  }
  1658  
  1659  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1660  // object's ETag matches the given value. This is useful for getting updates
  1661  // only after the object has changed since the last request.
  1662  func (c *PagesGetCall) IfNoneMatch(entityTag string) *PagesGetCall {
  1663  	c.ifNoneMatch_ = entityTag
  1664  	return c
  1665  }
  1666  
  1667  // Context sets the context to be used in this call's Do method.
  1668  func (c *PagesGetCall) Context(ctx context.Context) *PagesGetCall {
  1669  	c.ctx_ = ctx
  1670  	return c
  1671  }
  1672  
  1673  // Header returns a http.Header that can be modified by the caller to add
  1674  // headers to the request.
  1675  func (c *PagesGetCall) Header() http.Header {
  1676  	if c.header_ == nil {
  1677  		c.header_ = make(http.Header)
  1678  	}
  1679  	return c.header_
  1680  }
  1681  
  1682  func (c *PagesGetCall) doRequest(alt string) (*http.Response, error) {
  1683  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1684  	if c.ifNoneMatch_ != "" {
  1685  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1686  	}
  1687  	var body io.Reader = nil
  1688  	c.urlParams_.Set("alt", alt)
  1689  	c.urlParams_.Set("prettyPrint", "false")
  1690  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/pages/{pageId}")
  1691  	urls += "?" + c.urlParams_.Encode()
  1692  	req, err := http.NewRequest("GET", urls, body)
  1693  	if err != nil {
  1694  		return nil, err
  1695  	}
  1696  	req.Header = reqHeaders
  1697  	googleapi.Expand(req.URL, map[string]string{
  1698  		"blogId": c.blogId,
  1699  		"pageId": c.pageId,
  1700  	})
  1701  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1702  }
  1703  
  1704  // Do executes the "blogger.pages.get" call.
  1705  // Any non-2xx status code is an error. Response headers are in either
  1706  // *Page.ServerResponse.Header or (if a response was returned at all) in
  1707  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1708  // whether the returned error was because http.StatusNotModified was returned.
  1709  func (c *PagesGetCall) Do(opts ...googleapi.CallOption) (*Page, error) {
  1710  	gensupport.SetOptions(c.urlParams_, opts...)
  1711  	res, err := c.doRequest("json")
  1712  	if res != nil && res.StatusCode == http.StatusNotModified {
  1713  		if res.Body != nil {
  1714  			res.Body.Close()
  1715  		}
  1716  		return nil, gensupport.WrapError(&googleapi.Error{
  1717  			Code:   res.StatusCode,
  1718  			Header: res.Header,
  1719  		})
  1720  	}
  1721  	if err != nil {
  1722  		return nil, err
  1723  	}
  1724  	defer googleapi.CloseBody(res)
  1725  	if err := googleapi.CheckResponse(res); err != nil {
  1726  		return nil, gensupport.WrapError(err)
  1727  	}
  1728  	ret := &Page{
  1729  		ServerResponse: googleapi.ServerResponse{
  1730  			Header:         res.Header,
  1731  			HTTPStatusCode: res.StatusCode,
  1732  		},
  1733  	}
  1734  	target := &ret
  1735  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1736  		return nil, err
  1737  	}
  1738  	return ret, nil
  1739  }
  1740  
  1741  type PagesListCall struct {
  1742  	s            *Service
  1743  	blogId       string
  1744  	urlParams_   gensupport.URLParams
  1745  	ifNoneMatch_ string
  1746  	ctx_         context.Context
  1747  	header_      http.Header
  1748  }
  1749  
  1750  // List: Lists pages.
  1751  //
  1752  // - blogId: .
  1753  func (r *PagesService) List(blogId string) *PagesListCall {
  1754  	c := &PagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1755  	c.blogId = blogId
  1756  	return c
  1757  }
  1758  
  1759  // FetchBodies sets the optional parameter "fetchBodies":
  1760  func (c *PagesListCall) FetchBodies(fetchBodies bool) *PagesListCall {
  1761  	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
  1762  	return c
  1763  }
  1764  
  1765  // Fields allows partial responses to be retrieved. See
  1766  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1767  // details.
  1768  func (c *PagesListCall) Fields(s ...googleapi.Field) *PagesListCall {
  1769  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1770  	return c
  1771  }
  1772  
  1773  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1774  // object's ETag matches the given value. This is useful for getting updates
  1775  // only after the object has changed since the last request.
  1776  func (c *PagesListCall) IfNoneMatch(entityTag string) *PagesListCall {
  1777  	c.ifNoneMatch_ = entityTag
  1778  	return c
  1779  }
  1780  
  1781  // Context sets the context to be used in this call's Do method.
  1782  func (c *PagesListCall) Context(ctx context.Context) *PagesListCall {
  1783  	c.ctx_ = ctx
  1784  	return c
  1785  }
  1786  
  1787  // Header returns a http.Header that can be modified by the caller to add
  1788  // headers to the request.
  1789  func (c *PagesListCall) Header() http.Header {
  1790  	if c.header_ == nil {
  1791  		c.header_ = make(http.Header)
  1792  	}
  1793  	return c.header_
  1794  }
  1795  
  1796  func (c *PagesListCall) doRequest(alt string) (*http.Response, error) {
  1797  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1798  	if c.ifNoneMatch_ != "" {
  1799  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1800  	}
  1801  	var body io.Reader = nil
  1802  	c.urlParams_.Set("alt", alt)
  1803  	c.urlParams_.Set("prettyPrint", "false")
  1804  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/pages")
  1805  	urls += "?" + c.urlParams_.Encode()
  1806  	req, err := http.NewRequest("GET", urls, body)
  1807  	if err != nil {
  1808  		return nil, err
  1809  	}
  1810  	req.Header = reqHeaders
  1811  	googleapi.Expand(req.URL, map[string]string{
  1812  		"blogId": c.blogId,
  1813  	})
  1814  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1815  }
  1816  
  1817  // Do executes the "blogger.pages.list" call.
  1818  // Any non-2xx status code is an error. Response headers are in either
  1819  // *PageList.ServerResponse.Header or (if a response was returned at all) in
  1820  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1821  // whether the returned error was because http.StatusNotModified was returned.
  1822  func (c *PagesListCall) Do(opts ...googleapi.CallOption) (*PageList, error) {
  1823  	gensupport.SetOptions(c.urlParams_, opts...)
  1824  	res, err := c.doRequest("json")
  1825  	if res != nil && res.StatusCode == http.StatusNotModified {
  1826  		if res.Body != nil {
  1827  			res.Body.Close()
  1828  		}
  1829  		return nil, gensupport.WrapError(&googleapi.Error{
  1830  			Code:   res.StatusCode,
  1831  			Header: res.Header,
  1832  		})
  1833  	}
  1834  	if err != nil {
  1835  		return nil, err
  1836  	}
  1837  	defer googleapi.CloseBody(res)
  1838  	if err := googleapi.CheckResponse(res); err != nil {
  1839  		return nil, gensupport.WrapError(err)
  1840  	}
  1841  	ret := &PageList{
  1842  		ServerResponse: googleapi.ServerResponse{
  1843  			Header:         res.Header,
  1844  			HTTPStatusCode: res.StatusCode,
  1845  		},
  1846  	}
  1847  	target := &ret
  1848  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1849  		return nil, err
  1850  	}
  1851  	return ret, nil
  1852  }
  1853  
  1854  type PostsGetCall struct {
  1855  	s            *Service
  1856  	blogId       string
  1857  	postId       string
  1858  	urlParams_   gensupport.URLParams
  1859  	ifNoneMatch_ string
  1860  	ctx_         context.Context
  1861  	header_      http.Header
  1862  }
  1863  
  1864  // Get: Gets a post by blog id and post id
  1865  //
  1866  // - blogId: .
  1867  // - postId: .
  1868  func (r *PostsService) Get(blogId string, postId string) *PostsGetCall {
  1869  	c := &PostsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1870  	c.blogId = blogId
  1871  	c.postId = postId
  1872  	return c
  1873  }
  1874  
  1875  // Fields allows partial responses to be retrieved. See
  1876  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1877  // details.
  1878  func (c *PostsGetCall) Fields(s ...googleapi.Field) *PostsGetCall {
  1879  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1880  	return c
  1881  }
  1882  
  1883  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1884  // object's ETag matches the given value. This is useful for getting updates
  1885  // only after the object has changed since the last request.
  1886  func (c *PostsGetCall) IfNoneMatch(entityTag string) *PostsGetCall {
  1887  	c.ifNoneMatch_ = entityTag
  1888  	return c
  1889  }
  1890  
  1891  // Context sets the context to be used in this call's Do method.
  1892  func (c *PostsGetCall) Context(ctx context.Context) *PostsGetCall {
  1893  	c.ctx_ = ctx
  1894  	return c
  1895  }
  1896  
  1897  // Header returns a http.Header that can be modified by the caller to add
  1898  // headers to the request.
  1899  func (c *PostsGetCall) Header() http.Header {
  1900  	if c.header_ == nil {
  1901  		c.header_ = make(http.Header)
  1902  	}
  1903  	return c.header_
  1904  }
  1905  
  1906  func (c *PostsGetCall) doRequest(alt string) (*http.Response, error) {
  1907  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1908  	if c.ifNoneMatch_ != "" {
  1909  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1910  	}
  1911  	var body io.Reader = nil
  1912  	c.urlParams_.Set("alt", alt)
  1913  	c.urlParams_.Set("prettyPrint", "false")
  1914  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/posts/{postId}")
  1915  	urls += "?" + c.urlParams_.Encode()
  1916  	req, err := http.NewRequest("GET", urls, body)
  1917  	if err != nil {
  1918  		return nil, err
  1919  	}
  1920  	req.Header = reqHeaders
  1921  	googleapi.Expand(req.URL, map[string]string{
  1922  		"blogId": c.blogId,
  1923  		"postId": c.postId,
  1924  	})
  1925  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1926  }
  1927  
  1928  // Do executes the "blogger.posts.get" call.
  1929  // Any non-2xx status code is an error. Response headers are in either
  1930  // *Post.ServerResponse.Header or (if a response was returned at all) in
  1931  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1932  // whether the returned error was because http.StatusNotModified was returned.
  1933  func (c *PostsGetCall) Do(opts ...googleapi.CallOption) (*Post, error) {
  1934  	gensupport.SetOptions(c.urlParams_, opts...)
  1935  	res, err := c.doRequest("json")
  1936  	if res != nil && res.StatusCode == http.StatusNotModified {
  1937  		if res.Body != nil {
  1938  			res.Body.Close()
  1939  		}
  1940  		return nil, gensupport.WrapError(&googleapi.Error{
  1941  			Code:   res.StatusCode,
  1942  			Header: res.Header,
  1943  		})
  1944  	}
  1945  	if err != nil {
  1946  		return nil, err
  1947  	}
  1948  	defer googleapi.CloseBody(res)
  1949  	if err := googleapi.CheckResponse(res); err != nil {
  1950  		return nil, gensupport.WrapError(err)
  1951  	}
  1952  	ret := &Post{
  1953  		ServerResponse: googleapi.ServerResponse{
  1954  			Header:         res.Header,
  1955  			HTTPStatusCode: res.StatusCode,
  1956  		},
  1957  	}
  1958  	target := &ret
  1959  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1960  		return nil, err
  1961  	}
  1962  	return ret, nil
  1963  }
  1964  
  1965  type PostsListCall struct {
  1966  	s            *Service
  1967  	blogId       string
  1968  	urlParams_   gensupport.URLParams
  1969  	ifNoneMatch_ string
  1970  	ctx_         context.Context
  1971  	header_      http.Header
  1972  }
  1973  
  1974  // List: Lists posts.
  1975  //
  1976  // - blogId: .
  1977  func (r *PostsService) List(blogId string) *PostsListCall {
  1978  	c := &PostsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1979  	c.blogId = blogId
  1980  	return c
  1981  }
  1982  
  1983  // FetchBodies sets the optional parameter "fetchBodies":
  1984  func (c *PostsListCall) FetchBodies(fetchBodies bool) *PostsListCall {
  1985  	c.urlParams_.Set("fetchBodies", fmt.Sprint(fetchBodies))
  1986  	return c
  1987  }
  1988  
  1989  // MaxResults sets the optional parameter "maxResults":
  1990  func (c *PostsListCall) MaxResults(maxResults int64) *PostsListCall {
  1991  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  1992  	return c
  1993  }
  1994  
  1995  // PageToken sets the optional parameter "pageToken":
  1996  func (c *PostsListCall) PageToken(pageToken string) *PostsListCall {
  1997  	c.urlParams_.Set("pageToken", pageToken)
  1998  	return c
  1999  }
  2000  
  2001  // StartDate sets the optional parameter "startDate":
  2002  func (c *PostsListCall) StartDate(startDate string) *PostsListCall {
  2003  	c.urlParams_.Set("startDate", startDate)
  2004  	return c
  2005  }
  2006  
  2007  // Fields allows partial responses to be retrieved. See
  2008  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2009  // details.
  2010  func (c *PostsListCall) Fields(s ...googleapi.Field) *PostsListCall {
  2011  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2012  	return c
  2013  }
  2014  
  2015  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2016  // object's ETag matches the given value. This is useful for getting updates
  2017  // only after the object has changed since the last request.
  2018  func (c *PostsListCall) IfNoneMatch(entityTag string) *PostsListCall {
  2019  	c.ifNoneMatch_ = entityTag
  2020  	return c
  2021  }
  2022  
  2023  // Context sets the context to be used in this call's Do method.
  2024  func (c *PostsListCall) Context(ctx context.Context) *PostsListCall {
  2025  	c.ctx_ = ctx
  2026  	return c
  2027  }
  2028  
  2029  // Header returns a http.Header that can be modified by the caller to add
  2030  // headers to the request.
  2031  func (c *PostsListCall) Header() http.Header {
  2032  	if c.header_ == nil {
  2033  		c.header_ = make(http.Header)
  2034  	}
  2035  	return c.header_
  2036  }
  2037  
  2038  func (c *PostsListCall) doRequest(alt string) (*http.Response, error) {
  2039  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2040  	if c.ifNoneMatch_ != "" {
  2041  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2042  	}
  2043  	var body io.Reader = nil
  2044  	c.urlParams_.Set("alt", alt)
  2045  	c.urlParams_.Set("prettyPrint", "false")
  2046  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/blogs/{blogId}/posts")
  2047  	urls += "?" + c.urlParams_.Encode()
  2048  	req, err := http.NewRequest("GET", urls, body)
  2049  	if err != nil {
  2050  		return nil, err
  2051  	}
  2052  	req.Header = reqHeaders
  2053  	googleapi.Expand(req.URL, map[string]string{
  2054  		"blogId": c.blogId,
  2055  	})
  2056  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2057  }
  2058  
  2059  // Do executes the "blogger.posts.list" call.
  2060  // Any non-2xx status code is an error. Response headers are in either
  2061  // *PostList.ServerResponse.Header or (if a response was returned at all) in
  2062  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2063  // whether the returned error was because http.StatusNotModified was returned.
  2064  func (c *PostsListCall) Do(opts ...googleapi.CallOption) (*PostList, error) {
  2065  	gensupport.SetOptions(c.urlParams_, opts...)
  2066  	res, err := c.doRequest("json")
  2067  	if res != nil && res.StatusCode == http.StatusNotModified {
  2068  		if res.Body != nil {
  2069  			res.Body.Close()
  2070  		}
  2071  		return nil, gensupport.WrapError(&googleapi.Error{
  2072  			Code:   res.StatusCode,
  2073  			Header: res.Header,
  2074  		})
  2075  	}
  2076  	if err != nil {
  2077  		return nil, err
  2078  	}
  2079  	defer googleapi.CloseBody(res)
  2080  	if err := googleapi.CheckResponse(res); err != nil {
  2081  		return nil, gensupport.WrapError(err)
  2082  	}
  2083  	ret := &PostList{
  2084  		ServerResponse: googleapi.ServerResponse{
  2085  			Header:         res.Header,
  2086  			HTTPStatusCode: res.StatusCode,
  2087  		},
  2088  	}
  2089  	target := &ret
  2090  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2091  		return nil, err
  2092  	}
  2093  	return ret, nil
  2094  }
  2095  
  2096  // Pages invokes f for each page of results.
  2097  // A non-nil error returned from f will halt the iteration.
  2098  // The provided context supersedes any context provided to the Context method.
  2099  func (c *PostsListCall) Pages(ctx context.Context, f func(*PostList) error) error {
  2100  	c.ctx_ = ctx
  2101  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2102  	for {
  2103  		x, err := c.Do()
  2104  		if err != nil {
  2105  			return err
  2106  		}
  2107  		if err := f(x); err != nil {
  2108  			return err
  2109  		}
  2110  		if x.NextPageToken == "" {
  2111  			return nil
  2112  		}
  2113  		c.PageToken(x.NextPageToken)
  2114  	}
  2115  }
  2116  
  2117  type UsersGetCall struct {
  2118  	s            *Service
  2119  	userId       string
  2120  	urlParams_   gensupport.URLParams
  2121  	ifNoneMatch_ string
  2122  	ctx_         context.Context
  2123  	header_      http.Header
  2124  }
  2125  
  2126  // Get: Gets a user by user id.
  2127  //
  2128  // - userId: .
  2129  func (r *UsersService) Get(userId string) *UsersGetCall {
  2130  	c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2131  	c.userId = userId
  2132  	return c
  2133  }
  2134  
  2135  // Fields allows partial responses to be retrieved. See
  2136  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2137  // details.
  2138  func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
  2139  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2140  	return c
  2141  }
  2142  
  2143  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2144  // object's ETag matches the given value. This is useful for getting updates
  2145  // only after the object has changed since the last request.
  2146  func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
  2147  	c.ifNoneMatch_ = entityTag
  2148  	return c
  2149  }
  2150  
  2151  // Context sets the context to be used in this call's Do method.
  2152  func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
  2153  	c.ctx_ = ctx
  2154  	return c
  2155  }
  2156  
  2157  // Header returns a http.Header that can be modified by the caller to add
  2158  // headers to the request.
  2159  func (c *UsersGetCall) Header() http.Header {
  2160  	if c.header_ == nil {
  2161  		c.header_ = make(http.Header)
  2162  	}
  2163  	return c.header_
  2164  }
  2165  
  2166  func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
  2167  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2168  	if c.ifNoneMatch_ != "" {
  2169  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2170  	}
  2171  	var body io.Reader = nil
  2172  	c.urlParams_.Set("alt", alt)
  2173  	c.urlParams_.Set("prettyPrint", "false")
  2174  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{userId}")
  2175  	urls += "?" + c.urlParams_.Encode()
  2176  	req, err := http.NewRequest("GET", urls, body)
  2177  	if err != nil {
  2178  		return nil, err
  2179  	}
  2180  	req.Header = reqHeaders
  2181  	googleapi.Expand(req.URL, map[string]string{
  2182  		"userId": c.userId,
  2183  	})
  2184  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2185  }
  2186  
  2187  // Do executes the "blogger.users.get" call.
  2188  // Any non-2xx status code is an error. Response headers are in either
  2189  // *User.ServerResponse.Header or (if a response was returned at all) in
  2190  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2191  // whether the returned error was because http.StatusNotModified was returned.
  2192  func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
  2193  	gensupport.SetOptions(c.urlParams_, opts...)
  2194  	res, err := c.doRequest("json")
  2195  	if res != nil && res.StatusCode == http.StatusNotModified {
  2196  		if res.Body != nil {
  2197  			res.Body.Close()
  2198  		}
  2199  		return nil, gensupport.WrapError(&googleapi.Error{
  2200  			Code:   res.StatusCode,
  2201  			Header: res.Header,
  2202  		})
  2203  	}
  2204  	if err != nil {
  2205  		return nil, err
  2206  	}
  2207  	defer googleapi.CloseBody(res)
  2208  	if err := googleapi.CheckResponse(res); err != nil {
  2209  		return nil, gensupport.WrapError(err)
  2210  	}
  2211  	ret := &User{
  2212  		ServerResponse: googleapi.ServerResponse{
  2213  			Header:         res.Header,
  2214  			HTTPStatusCode: res.StatusCode,
  2215  		},
  2216  	}
  2217  	target := &ret
  2218  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2219  		return nil, err
  2220  	}
  2221  	return ret, nil
  2222  }
  2223  

View as plain text