...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package searchconsole provides access to the Google Search Console API.
     8  //
     9  // For product documentation, see: https://developers.google.com/webmaster-tools/search-console-api/
    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/searchconsole/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	searchconsoleService, err := searchconsole.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	searchconsoleService, err := searchconsole.NewService(ctx, option.WithScopes(searchconsole.WebmastersReadonlyScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	searchconsoleService, err := searchconsole.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	searchconsoleService, err := searchconsole.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package searchconsole // import "google.golang.org/api/searchconsole/v1"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "searchconsole:v1"
    95  const apiName = "searchconsole"
    96  const apiVersion = "v1"
    97  const basePath = "https://searchconsole.googleapis.com/"
    98  const basePathTemplate = "https://searchconsole.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://searchconsole.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// View and manage Search Console data for your verified sites
   104  	WebmastersScope = "https://www.googleapis.com/auth/webmasters"
   105  
   106  	// View Search Console data for your verified sites
   107  	WebmastersReadonlyScope = "https://www.googleapis.com/auth/webmasters.readonly"
   108  )
   109  
   110  // NewService creates a new Service.
   111  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   112  	scopesOption := internaloption.WithDefaultScopes(
   113  		"https://www.googleapis.com/auth/webmasters",
   114  		"https://www.googleapis.com/auth/webmasters.readonly",
   115  	)
   116  	// NOTE: prepend, so we don't override user-specified scopes.
   117  	opts = append([]option.ClientOption{scopesOption}, opts...)
   118  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   119  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   120  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   121  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   122  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   123  	if err != nil {
   124  		return nil, err
   125  	}
   126  	s, err := New(client)
   127  	if err != nil {
   128  		return nil, err
   129  	}
   130  	if endpoint != "" {
   131  		s.BasePath = endpoint
   132  	}
   133  	return s, nil
   134  }
   135  
   136  // New creates a new Service. It uses the provided http.Client for requests.
   137  //
   138  // Deprecated: please use NewService instead.
   139  // To provide a custom HTTP client, use option.WithHTTPClient.
   140  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   141  func New(client *http.Client) (*Service, error) {
   142  	if client == nil {
   143  		return nil, errors.New("client is nil")
   144  	}
   145  	s := &Service{client: client, BasePath: basePath}
   146  	s.Searchanalytics = NewSearchanalyticsService(s)
   147  	s.Sitemaps = NewSitemapsService(s)
   148  	s.Sites = NewSitesService(s)
   149  	s.UrlInspection = NewUrlInspectionService(s)
   150  	s.UrlTestingTools = NewUrlTestingToolsService(s)
   151  	return s, nil
   152  }
   153  
   154  type Service struct {
   155  	client    *http.Client
   156  	BasePath  string // API endpoint base URL
   157  	UserAgent string // optional additional User-Agent fragment
   158  
   159  	Searchanalytics *SearchanalyticsService
   160  
   161  	Sitemaps *SitemapsService
   162  
   163  	Sites *SitesService
   164  
   165  	UrlInspection *UrlInspectionService
   166  
   167  	UrlTestingTools *UrlTestingToolsService
   168  }
   169  
   170  func (s *Service) userAgent() string {
   171  	if s.UserAgent == "" {
   172  		return googleapi.UserAgent
   173  	}
   174  	return googleapi.UserAgent + " " + s.UserAgent
   175  }
   176  
   177  func NewSearchanalyticsService(s *Service) *SearchanalyticsService {
   178  	rs := &SearchanalyticsService{s: s}
   179  	return rs
   180  }
   181  
   182  type SearchanalyticsService struct {
   183  	s *Service
   184  }
   185  
   186  func NewSitemapsService(s *Service) *SitemapsService {
   187  	rs := &SitemapsService{s: s}
   188  	return rs
   189  }
   190  
   191  type SitemapsService struct {
   192  	s *Service
   193  }
   194  
   195  func NewSitesService(s *Service) *SitesService {
   196  	rs := &SitesService{s: s}
   197  	return rs
   198  }
   199  
   200  type SitesService struct {
   201  	s *Service
   202  }
   203  
   204  func NewUrlInspectionService(s *Service) *UrlInspectionService {
   205  	rs := &UrlInspectionService{s: s}
   206  	rs.Index = NewUrlInspectionIndexService(s)
   207  	return rs
   208  }
   209  
   210  type UrlInspectionService struct {
   211  	s *Service
   212  
   213  	Index *UrlInspectionIndexService
   214  }
   215  
   216  func NewUrlInspectionIndexService(s *Service) *UrlInspectionIndexService {
   217  	rs := &UrlInspectionIndexService{s: s}
   218  	return rs
   219  }
   220  
   221  type UrlInspectionIndexService struct {
   222  	s *Service
   223  }
   224  
   225  func NewUrlTestingToolsService(s *Service) *UrlTestingToolsService {
   226  	rs := &UrlTestingToolsService{s: s}
   227  	rs.MobileFriendlyTest = NewUrlTestingToolsMobileFriendlyTestService(s)
   228  	return rs
   229  }
   230  
   231  type UrlTestingToolsService struct {
   232  	s *Service
   233  
   234  	MobileFriendlyTest *UrlTestingToolsMobileFriendlyTestService
   235  }
   236  
   237  func NewUrlTestingToolsMobileFriendlyTestService(s *Service) *UrlTestingToolsMobileFriendlyTestService {
   238  	rs := &UrlTestingToolsMobileFriendlyTestService{s: s}
   239  	return rs
   240  }
   241  
   242  type UrlTestingToolsMobileFriendlyTestService struct {
   243  	s *Service
   244  }
   245  
   246  // AmpInspectionResult: AMP inspection result of the live page or the current
   247  // information from Google's index, depending on whether you requested a live
   248  // inspection or not.
   249  type AmpInspectionResult struct {
   250  	// AmpIndexStatusVerdict: Index status of the AMP URL.
   251  	//
   252  	// Possible values:
   253  	//   "VERDICT_UNSPECIFIED" - Unknown verdict.
   254  	//   "PASS" - Equivalent to "Valid" for the page or item in Search Console.
   255  	//   "PARTIAL" - Reserved, no longer in use.
   256  	//   "FAIL" - Equivalent to "Error" or "Invalid" for the page or item in Search
   257  	// Console.
   258  	//   "NEUTRAL" - Equivalent to "Excluded" for the page or item in Search
   259  	// Console.
   260  	AmpIndexStatusVerdict string `json:"ampIndexStatusVerdict,omitempty"`
   261  	// AmpUrl: URL of the AMP that was inspected. If the submitted URL is a desktop
   262  	// page that refers to an AMP version, the AMP version will be inspected.
   263  	AmpUrl string `json:"ampUrl,omitempty"`
   264  	// IndexingState: Whether or not the page blocks indexing through a noindex
   265  	// rule.
   266  	//
   267  	// Possible values:
   268  	//   "AMP_INDEXING_STATE_UNSPECIFIED" - Unknown indexing status.
   269  	//   "AMP_INDEXING_ALLOWED" - Indexing allowed.
   270  	//   "BLOCKED_DUE_TO_NOINDEX" - Indexing not allowed, 'noindex' detected.
   271  	//   "BLOCKED_DUE_TO_EXPIRED_UNAVAILABLE_AFTER" - Indexing not allowed,
   272  	// 'unavailable_after' date expired.
   273  	IndexingState string `json:"indexingState,omitempty"`
   274  	// Issues: A list of zero or more AMP issues found for the inspected URL.
   275  	Issues []*AmpIssue `json:"issues,omitempty"`
   276  	// LastCrawlTime: Last time this AMP version was crawled by Google. Absent if
   277  	// the URL was never crawled successfully.
   278  	LastCrawlTime string `json:"lastCrawlTime,omitempty"`
   279  	// PageFetchState: Whether or not Google could fetch the AMP.
   280  	//
   281  	// Possible values:
   282  	//   "PAGE_FETCH_STATE_UNSPECIFIED" - Unknown fetch state.
   283  	//   "SUCCESSFUL" - Successful fetch.
   284  	//   "SOFT_404" - Soft 404.
   285  	//   "BLOCKED_ROBOTS_TXT" - Blocked by robots.txt.
   286  	//   "NOT_FOUND" - Not found (404).
   287  	//   "ACCESS_DENIED" - Blocked due to unauthorized request (401).
   288  	//   "SERVER_ERROR" - Server error (5xx).
   289  	//   "REDIRECT_ERROR" - Redirection error.
   290  	//   "ACCESS_FORBIDDEN" - Blocked due to access forbidden (403).
   291  	//   "BLOCKED_4XX" - Blocked due to other 4xx issue (not 403, 404).
   292  	//   "INTERNAL_CRAWL_ERROR" - Internal error.
   293  	//   "INVALID_URL" - Invalid URL.
   294  	PageFetchState string `json:"pageFetchState,omitempty"`
   295  	// RobotsTxtState: Whether or not the page is blocked to Google by a robots.txt
   296  	// rule.
   297  	//
   298  	// Possible values:
   299  	//   "ROBOTS_TXT_STATE_UNSPECIFIED" - Unknown robots.txt state, typically
   300  	// because the page wasn't fetched or found, or because robots.txt itself
   301  	// couldn't be reached.
   302  	//   "ALLOWED" - Crawl allowed by robots.txt.
   303  	//   "DISALLOWED" - Crawl blocked by robots.txt.
   304  	RobotsTxtState string `json:"robotsTxtState,omitempty"`
   305  	// Verdict: The status of the most severe error on the page. If a page has both
   306  	// warnings and errors, the page status is error. Error status means the page
   307  	// cannot be shown in Search results.
   308  	//
   309  	// Possible values:
   310  	//   "VERDICT_UNSPECIFIED" - Unknown verdict.
   311  	//   "PASS" - Equivalent to "Valid" for the page or item in Search Console.
   312  	//   "PARTIAL" - Reserved, no longer in use.
   313  	//   "FAIL" - Equivalent to "Error" or "Invalid" for the page or item in Search
   314  	// Console.
   315  	//   "NEUTRAL" - Equivalent to "Excluded" for the page or item in Search
   316  	// Console.
   317  	Verdict string `json:"verdict,omitempty"`
   318  	// ForceSendFields is a list of field names (e.g. "AmpIndexStatusVerdict") to
   319  	// unconditionally include in API requests. By default, fields with empty or
   320  	// default values are omitted from API requests. See
   321  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   322  	// details.
   323  	ForceSendFields []string `json:"-"`
   324  	// NullFields is a list of field names (e.g. "AmpIndexStatusVerdict") to
   325  	// include in API requests with the JSON null value. By default, fields with
   326  	// empty values are omitted from API requests. See
   327  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   328  	NullFields []string `json:"-"`
   329  }
   330  
   331  func (s *AmpInspectionResult) MarshalJSON() ([]byte, error) {
   332  	type NoMethod AmpInspectionResult
   333  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   334  }
   335  
   336  // AmpIssue: AMP issue.
   337  type AmpIssue struct {
   338  	// IssueMessage: Brief description of this issue.
   339  	IssueMessage string `json:"issueMessage,omitempty"`
   340  	// Severity: Severity of this issue: WARNING or ERROR.
   341  	//
   342  	// Possible values:
   343  	//   "SEVERITY_UNSPECIFIED" - Unknown severity.
   344  	//   "WARNING" - Warning.
   345  	//   "ERROR" - Error.
   346  	Severity string `json:"severity,omitempty"`
   347  	// ForceSendFields is a list of field names (e.g. "IssueMessage") to
   348  	// unconditionally include in API requests. By default, fields with empty or
   349  	// default values are omitted from API requests. See
   350  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   351  	// details.
   352  	ForceSendFields []string `json:"-"`
   353  	// NullFields is a list of field names (e.g. "IssueMessage") to include in API
   354  	// requests with the JSON null value. By default, fields with empty values are
   355  	// omitted from API requests. See
   356  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   357  	NullFields []string `json:"-"`
   358  }
   359  
   360  func (s *AmpIssue) MarshalJSON() ([]byte, error) {
   361  	type NoMethod AmpIssue
   362  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   363  }
   364  
   365  type ApiDataRow struct {
   366  	Clicks      float64  `json:"clicks,omitempty"`
   367  	Ctr         float64  `json:"ctr,omitempty"`
   368  	Impressions float64  `json:"impressions,omitempty"`
   369  	Keys        []string `json:"keys,omitempty"`
   370  	Position    float64  `json:"position,omitempty"`
   371  	// ForceSendFields is a list of field names (e.g. "Clicks") to unconditionally
   372  	// include in API requests. By default, fields with empty or default values are
   373  	// omitted from API requests. See
   374  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   375  	// details.
   376  	ForceSendFields []string `json:"-"`
   377  	// NullFields is a list of field names (e.g. "Clicks") to include in API
   378  	// requests with the JSON null value. By default, fields with empty values are
   379  	// omitted from API requests. See
   380  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   381  	NullFields []string `json:"-"`
   382  }
   383  
   384  func (s *ApiDataRow) MarshalJSON() ([]byte, error) {
   385  	type NoMethod ApiDataRow
   386  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   387  }
   388  
   389  func (s *ApiDataRow) UnmarshalJSON(data []byte) error {
   390  	type NoMethod ApiDataRow
   391  	var s1 struct {
   392  		Clicks      gensupport.JSONFloat64 `json:"clicks"`
   393  		Ctr         gensupport.JSONFloat64 `json:"ctr"`
   394  		Impressions gensupport.JSONFloat64 `json:"impressions"`
   395  		Position    gensupport.JSONFloat64 `json:"position"`
   396  		*NoMethod
   397  	}
   398  	s1.NoMethod = (*NoMethod)(s)
   399  	if err := json.Unmarshal(data, &s1); err != nil {
   400  		return err
   401  	}
   402  	s.Clicks = float64(s1.Clicks)
   403  	s.Ctr = float64(s1.Ctr)
   404  	s.Impressions = float64(s1.Impressions)
   405  	s.Position = float64(s1.Position)
   406  	return nil
   407  }
   408  
   409  // ApiDimensionFilter: A filter test to be applied to each row in the data set,
   410  // where a match can return the row. Filters are string comparisons, and values
   411  // and dimension names are not case-sensitive. Individual filters are either
   412  // AND'ed or OR'ed within their parent filter group, according to the group's
   413  // group type. You do not need to group by a specified dimension to filter
   414  // against it.
   415  type ApiDimensionFilter struct {
   416  	// Possible values:
   417  	//   "QUERY"
   418  	//   "PAGE"
   419  	//   "COUNTRY"
   420  	//   "DEVICE"
   421  	//   "SEARCH_APPEARANCE"
   422  	Dimension  string `json:"dimension,omitempty"`
   423  	Expression string `json:"expression,omitempty"`
   424  	// Possible values:
   425  	//   "EQUALS"
   426  	//   "NOT_EQUALS"
   427  	//   "CONTAINS"
   428  	//   "NOT_CONTAINS"
   429  	//   "INCLUDING_REGEX"
   430  	//   "EXCLUDING_REGEX"
   431  	Operator string `json:"operator,omitempty"`
   432  	// ForceSendFields is a list of field names (e.g. "Dimension") to
   433  	// unconditionally include in API requests. By default, fields with empty or
   434  	// default values are omitted from API requests. See
   435  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   436  	// details.
   437  	ForceSendFields []string `json:"-"`
   438  	// NullFields is a list of field names (e.g. "Dimension") to include in API
   439  	// requests with the JSON null value. By default, fields with empty values are
   440  	// omitted from API requests. See
   441  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   442  	NullFields []string `json:"-"`
   443  }
   444  
   445  func (s *ApiDimensionFilter) MarshalJSON() ([]byte, error) {
   446  	type NoMethod ApiDimensionFilter
   447  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   448  }
   449  
   450  // ApiDimensionFilterGroup: A set of dimension value filters to test against
   451  // each row. Only rows that pass all filter groups will be returned. All
   452  // results within a filter group are either AND'ed or OR'ed together, depending
   453  // on the group type selected. All filter groups are AND'ed together.
   454  type ApiDimensionFilterGroup struct {
   455  	Filters []*ApiDimensionFilter `json:"filters,omitempty"`
   456  	// Possible values:
   457  	//   "AND"
   458  	GroupType string `json:"groupType,omitempty"`
   459  	// ForceSendFields is a list of field names (e.g. "Filters") to unconditionally
   460  	// include in API requests. By default, fields with empty or default values are
   461  	// omitted from API requests. See
   462  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   463  	// details.
   464  	ForceSendFields []string `json:"-"`
   465  	// NullFields is a list of field names (e.g. "Filters") to include in API
   466  	// requests with the JSON null value. By default, fields with empty values are
   467  	// omitted from API requests. See
   468  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   469  	NullFields []string `json:"-"`
   470  }
   471  
   472  func (s *ApiDimensionFilterGroup) MarshalJSON() ([]byte, error) {
   473  	type NoMethod ApiDimensionFilterGroup
   474  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   475  }
   476  
   477  // BlockedResource: Blocked resource.
   478  type BlockedResource struct {
   479  	// Url: URL of the blocked resource.
   480  	Url string `json:"url,omitempty"`
   481  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
   482  	// include in API requests. By default, fields with empty or default values are
   483  	// omitted from API requests. See
   484  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   485  	// details.
   486  	ForceSendFields []string `json:"-"`
   487  	// NullFields is a list of field names (e.g. "Url") to include in API requests
   488  	// with the JSON null value. By default, fields with empty values are omitted
   489  	// from API requests. See
   490  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   491  	NullFields []string `json:"-"`
   492  }
   493  
   494  func (s *BlockedResource) MarshalJSON() ([]byte, error) {
   495  	type NoMethod BlockedResource
   496  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   497  }
   498  
   499  // DetectedItems: Rich Results items grouped by type.
   500  type DetectedItems struct {
   501  	// Items: List of Rich Results items.
   502  	Items []*Item `json:"items,omitempty"`
   503  	// RichResultType: Rich Results type
   504  	RichResultType string `json:"richResultType,omitempty"`
   505  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
   506  	// include in API requests. By default, fields with empty or default values are
   507  	// omitted from API requests. See
   508  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   509  	// details.
   510  	ForceSendFields []string `json:"-"`
   511  	// NullFields is a list of field names (e.g. "Items") to include in API
   512  	// requests with the JSON null value. By default, fields with empty values are
   513  	// omitted from API requests. See
   514  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   515  	NullFields []string `json:"-"`
   516  }
   517  
   518  func (s *DetectedItems) MarshalJSON() ([]byte, error) {
   519  	type NoMethod DetectedItems
   520  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   521  }
   522  
   523  // Image: Describe image data.
   524  type Image struct {
   525  	// Data: Image data in format determined by the mime type. Currently, the
   526  	// format will always be "image/png", but this might change in the future.
   527  	Data string `json:"data,omitempty"`
   528  	// MimeType: The mime-type of the image data.
   529  	MimeType string `json:"mimeType,omitempty"`
   530  	// ForceSendFields is a list of field names (e.g. "Data") to unconditionally
   531  	// include in API requests. By default, fields with empty or default values are
   532  	// omitted from API requests. See
   533  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   534  	// details.
   535  	ForceSendFields []string `json:"-"`
   536  	// NullFields is a list of field names (e.g. "Data") to include in API requests
   537  	// with the JSON null value. By default, fields with empty values are omitted
   538  	// from API requests. See
   539  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   540  	NullFields []string `json:"-"`
   541  }
   542  
   543  func (s *Image) MarshalJSON() ([]byte, error) {
   544  	type NoMethod Image
   545  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   546  }
   547  
   548  // IndexStatusInspectionResult: Results of index status inspection for either
   549  // the live page or the version in Google's index, depending on whether you
   550  // requested a live inspection or not. For more information, see the Index
   551  // coverage report documentation
   552  // (https://support.google.com/webmasters/answer/7440203).
   553  type IndexStatusInspectionResult struct {
   554  	// CoverageState: Could Google find and index the page. More details about page
   555  	// indexing appear in 'indexing_state'.
   556  	CoverageState string `json:"coverageState,omitempty"`
   557  	// CrawledAs: Primary crawler that was used by Google to crawl your site.
   558  	//
   559  	// Possible values:
   560  	//   "CRAWLING_USER_AGENT_UNSPECIFIED" - Unknown user agent.
   561  	//   "DESKTOP" - Desktop user agent.
   562  	//   "MOBILE" - Mobile user agent.
   563  	CrawledAs string `json:"crawledAs,omitempty"`
   564  	// GoogleCanonical: The URL of the page that Google selected as canonical. If
   565  	// the page was not indexed, this field is absent.
   566  	GoogleCanonical string `json:"googleCanonical,omitempty"`
   567  	// IndexingState: Whether or not the page blocks indexing through a noindex
   568  	// rule.
   569  	//
   570  	// Possible values:
   571  	//   "INDEXING_STATE_UNSPECIFIED" - Unknown indexing status.
   572  	//   "INDEXING_ALLOWED" - Indexing allowed.
   573  	//   "BLOCKED_BY_META_TAG" - Indexing not allowed, 'noindex' detected in
   574  	// 'robots' meta tag.
   575  	//   "BLOCKED_BY_HTTP_HEADER" - Indexing not allowed, 'noindex' detected in
   576  	// 'X-Robots-Tag' http header.
   577  	//   "BLOCKED_BY_ROBOTS_TXT" - Reserved, no longer in use.
   578  	IndexingState string `json:"indexingState,omitempty"`
   579  	// LastCrawlTime: Last time this URL was crawled by Google using the primary
   580  	// crawler
   581  	// (https://support.google.com/webmasters/answer/7440203#primary_crawler).
   582  	// Absent if the URL was never crawled successfully.
   583  	LastCrawlTime string `json:"lastCrawlTime,omitempty"`
   584  	// PageFetchState: Whether or not Google could retrieve the page from your
   585  	// server. Equivalent to "page fetch"
   586  	// (https://support.google.com/webmasters/answer/9012289#index_coverage) in the
   587  	// URL inspection report.
   588  	//
   589  	// Possible values:
   590  	//   "PAGE_FETCH_STATE_UNSPECIFIED" - Unknown fetch state.
   591  	//   "SUCCESSFUL" - Successful fetch.
   592  	//   "SOFT_404" - Soft 404.
   593  	//   "BLOCKED_ROBOTS_TXT" - Blocked by robots.txt.
   594  	//   "NOT_FOUND" - Not found (404).
   595  	//   "ACCESS_DENIED" - Blocked due to unauthorized request (401).
   596  	//   "SERVER_ERROR" - Server error (5xx).
   597  	//   "REDIRECT_ERROR" - Redirection error.
   598  	//   "ACCESS_FORBIDDEN" - Blocked due to access forbidden (403).
   599  	//   "BLOCKED_4XX" - Blocked due to other 4xx issue (not 403, 404).
   600  	//   "INTERNAL_CRAWL_ERROR" - Internal error.
   601  	//   "INVALID_URL" - Invalid URL.
   602  	PageFetchState string `json:"pageFetchState,omitempty"`
   603  	// ReferringUrls: URLs that link to the inspected URL, directly and indirectly.
   604  	ReferringUrls []string `json:"referringUrls,omitempty"`
   605  	// RobotsTxtState: Whether or not the page is blocked to Google by a robots.txt
   606  	// rule.
   607  	//
   608  	// Possible values:
   609  	//   "ROBOTS_TXT_STATE_UNSPECIFIED" - Unknown robots.txt state, typically
   610  	// because the page wasn't fetched or found, or because robots.txt itself
   611  	// couldn't be reached.
   612  	//   "ALLOWED" - Crawl allowed by robots.txt.
   613  	//   "DISALLOWED" - Crawl blocked by robots.txt.
   614  	RobotsTxtState string `json:"robotsTxtState,omitempty"`
   615  	// Sitemap: Any sitemaps that this URL was listed in, as known by Google. Not
   616  	// guaranteed to be an exhaustive list, especially if Google did not discover
   617  	// this URL through a sitemap. Absent if no sitemaps were found.
   618  	Sitemap []string `json:"sitemap,omitempty"`
   619  	// UserCanonical: The URL that your page or site declares as canonical
   620  	// (https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls?#define-canonical).
   621  	// If you did not declare a canonical URL, this field is absent.
   622  	UserCanonical string `json:"userCanonical,omitempty"`
   623  	// Verdict: High level verdict about whether the URL *is* indexed (indexed
   624  	// status), or *can be* indexed (live inspection).
   625  	//
   626  	// Possible values:
   627  	//   "VERDICT_UNSPECIFIED" - Unknown verdict.
   628  	//   "PASS" - Equivalent to "Valid" for the page or item in Search Console.
   629  	//   "PARTIAL" - Reserved, no longer in use.
   630  	//   "FAIL" - Equivalent to "Error" or "Invalid" for the page or item in Search
   631  	// Console.
   632  	//   "NEUTRAL" - Equivalent to "Excluded" for the page or item in Search
   633  	// Console.
   634  	Verdict string `json:"verdict,omitempty"`
   635  	// ForceSendFields is a list of field names (e.g. "CoverageState") to
   636  	// unconditionally include in API requests. By default, fields with empty or
   637  	// default values are omitted from API requests. See
   638  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   639  	// details.
   640  	ForceSendFields []string `json:"-"`
   641  	// NullFields is a list of field names (e.g. "CoverageState") to include in API
   642  	// requests with the JSON null value. By default, fields with empty values are
   643  	// omitted from API requests. See
   644  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   645  	NullFields []string `json:"-"`
   646  }
   647  
   648  func (s *IndexStatusInspectionResult) MarshalJSON() ([]byte, error) {
   649  	type NoMethod IndexStatusInspectionResult
   650  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   651  }
   652  
   653  // InspectUrlIndexRequest: Index inspection request.
   654  type InspectUrlIndexRequest struct {
   655  	// InspectionUrl: Required. URL to inspect. Must be under the property
   656  	// specified in "site_url".
   657  	InspectionUrl string `json:"inspectionUrl,omitempty"`
   658  	// LanguageCode: Optional. An IETF BCP-47
   659  	// (https://en.wikipedia.org/wiki/IETF_language_tag) language code representing
   660  	// the requested language for translated issue messages, e.g. "en-US", "or
   661  	// "de-CH". Default value is "en-US".
   662  	LanguageCode string `json:"languageCode,omitempty"`
   663  	// SiteUrl: Required. The URL of the property as defined in Search Console.
   664  	// **Examples:** `http://www.example.com/` for a URL-prefix property, or
   665  	// `sc-domain:example.com` for a Domain property.
   666  	SiteUrl string `json:"siteUrl,omitempty"`
   667  	// ForceSendFields is a list of field names (e.g. "InspectionUrl") to
   668  	// unconditionally include in API requests. By default, fields with empty or
   669  	// default values are omitted from API requests. See
   670  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   671  	// details.
   672  	ForceSendFields []string `json:"-"`
   673  	// NullFields is a list of field names (e.g. "InspectionUrl") to include in API
   674  	// requests with the JSON null value. By default, fields with empty values are
   675  	// omitted from API requests. See
   676  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   677  	NullFields []string `json:"-"`
   678  }
   679  
   680  func (s *InspectUrlIndexRequest) MarshalJSON() ([]byte, error) {
   681  	type NoMethod InspectUrlIndexRequest
   682  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   683  }
   684  
   685  // InspectUrlIndexResponse: Index-Status inspection response.
   686  type InspectUrlIndexResponse struct {
   687  	// InspectionResult: URL inspection results.
   688  	InspectionResult *UrlInspectionResult `json:"inspectionResult,omitempty"`
   689  
   690  	// ServerResponse contains the HTTP response code and headers from the server.
   691  	googleapi.ServerResponse `json:"-"`
   692  	// ForceSendFields is a list of field names (e.g. "InspectionResult") to
   693  	// unconditionally include in API requests. By default, fields with empty or
   694  	// default values are omitted from API requests. See
   695  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   696  	// details.
   697  	ForceSendFields []string `json:"-"`
   698  	// NullFields is a list of field names (e.g. "InspectionResult") to include in
   699  	// API requests with the JSON null value. By default, fields with empty values
   700  	// are omitted from API requests. See
   701  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   702  	NullFields []string `json:"-"`
   703  }
   704  
   705  func (s *InspectUrlIndexResponse) MarshalJSON() ([]byte, error) {
   706  	type NoMethod InspectUrlIndexResponse
   707  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   708  }
   709  
   710  // Item: A specific rich result found on the page.
   711  type Item struct {
   712  	// Issues: A list of zero or more rich result issues found for this instance.
   713  	Issues []*RichResultsIssue `json:"issues,omitempty"`
   714  	// Name: The user-provided name of this item.
   715  	Name string `json:"name,omitempty"`
   716  	// ForceSendFields is a list of field names (e.g. "Issues") to unconditionally
   717  	// include in API requests. By default, fields with empty or default values are
   718  	// omitted from API requests. See
   719  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   720  	// details.
   721  	ForceSendFields []string `json:"-"`
   722  	// NullFields is a list of field names (e.g. "Issues") to include in API
   723  	// requests with the JSON null value. By default, fields with empty values are
   724  	// omitted from API requests. See
   725  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   726  	NullFields []string `json:"-"`
   727  }
   728  
   729  func (s *Item) MarshalJSON() ([]byte, error) {
   730  	type NoMethod Item
   731  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   732  }
   733  
   734  // MobileFriendlyIssue: Mobile-friendly issue.
   735  type MobileFriendlyIssue struct {
   736  	// Rule: Rule violated.
   737  	//
   738  	// Possible values:
   739  	//   "MOBILE_FRIENDLY_RULE_UNSPECIFIED" - Unknown rule. Sorry, we don't have
   740  	// any description for the rule that was broken.
   741  	//   "USES_INCOMPATIBLE_PLUGINS" - Plugins incompatible with mobile devices are
   742  	// being used. [Learn more]
   743  	// (https://support.google.com/webmasters/answer/6352293#flash_usage).
   744  	//   "CONFIGURE_VIEWPORT" - Viewport is not specified using the meta viewport
   745  	// tag. [Learn more]
   746  	// (https://support.google.com/webmasters/answer/6352293#viewport_not_configured).
   747  	//   "FIXED_WIDTH_VIEWPORT" - Viewport defined to a fixed width. [Learn more]
   748  	// (https://support.google.com/webmasters/answer/6352293#fixed-width_viewport).
   749  	//   "SIZE_CONTENT_TO_VIEWPORT" - Content not sized to viewport. [Learn more]
   750  	// (https://support.google.com/webmasters/answer/6352293#content_not_sized_to_viewport).
   751  	//   "USE_LEGIBLE_FONT_SIZES" - Font size is too small for easy reading on a
   752  	// small screen. [Learn More]
   753  	// (https://support.google.com/webmasters/answer/6352293#small_font_size).
   754  	//   "TAP_TARGETS_TOO_CLOSE" - Touch elements are too close to each other.
   755  	// [Learn more]
   756  	// (https://support.google.com/webmasters/answer/6352293#touch_elements_too_close).
   757  	Rule string `json:"rule,omitempty"`
   758  	// ForceSendFields is a list of field names (e.g. "Rule") to unconditionally
   759  	// include in API requests. By default, fields with empty or default values are
   760  	// omitted from API requests. See
   761  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   762  	// details.
   763  	ForceSendFields []string `json:"-"`
   764  	// NullFields is a list of field names (e.g. "Rule") to include in API requests
   765  	// with the JSON null value. By default, fields with empty values are omitted
   766  	// from API requests. See
   767  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   768  	NullFields []string `json:"-"`
   769  }
   770  
   771  func (s *MobileFriendlyIssue) MarshalJSON() ([]byte, error) {
   772  	type NoMethod MobileFriendlyIssue
   773  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   774  }
   775  
   776  // MobileUsabilityInspectionResult: Mobile-usability inspection results.
   777  type MobileUsabilityInspectionResult struct {
   778  	// Issues: A list of zero or more mobile-usability issues detected for this
   779  	// URL.
   780  	Issues []*MobileUsabilityIssue `json:"issues,omitempty"`
   781  	// Verdict: High-level mobile-usability inspection result for this URL.
   782  	//
   783  	// Possible values:
   784  	//   "VERDICT_UNSPECIFIED" - Unknown verdict.
   785  	//   "PASS" - Equivalent to "Valid" for the page or item in Search Console.
   786  	//   "PARTIAL" - Reserved, no longer in use.
   787  	//   "FAIL" - Equivalent to "Error" or "Invalid" for the page or item in Search
   788  	// Console.
   789  	//   "NEUTRAL" - Equivalent to "Excluded" for the page or item in Search
   790  	// Console.
   791  	Verdict string `json:"verdict,omitempty"`
   792  	// ForceSendFields is a list of field names (e.g. "Issues") to unconditionally
   793  	// include in API requests. By default, fields with empty or default values are
   794  	// omitted from API requests. See
   795  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   796  	// details.
   797  	ForceSendFields []string `json:"-"`
   798  	// NullFields is a list of field names (e.g. "Issues") to include in API
   799  	// requests with the JSON null value. By default, fields with empty values are
   800  	// omitted from API requests. See
   801  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   802  	NullFields []string `json:"-"`
   803  }
   804  
   805  func (s *MobileUsabilityInspectionResult) MarshalJSON() ([]byte, error) {
   806  	type NoMethod MobileUsabilityInspectionResult
   807  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   808  }
   809  
   810  // MobileUsabilityIssue: Mobile-usability issue.
   811  type MobileUsabilityIssue struct {
   812  	// IssueType: Mobile-usability issue type.
   813  	//
   814  	// Possible values:
   815  	//   "MOBILE_USABILITY_ISSUE_TYPE_UNSPECIFIED" - Unknown issue. Sorry, we don't
   816  	// have any description for the rule that was broken.
   817  	//   "USES_INCOMPATIBLE_PLUGINS" - Plugins incompatible with mobile devices are
   818  	// being used. [Learn more]
   819  	// (https://support.google.com/webmasters/answer/6352293#flash_usage#error-list).
   820  	//   "CONFIGURE_VIEWPORT" - Viewport is not specified using the meta viewport
   821  	// tag. [Learn more]
   822  	// (https://support.google.com/webmasters/answer/6352293#viewport_not_configured#error-list).
   823  	//   "FIXED_WIDTH_VIEWPORT" - Viewport defined to a fixed width. [Learn more]
   824  	// (https://support.google.com/webmasters/answer/6352293#fixed-width_viewport#error-list).
   825  	//   "SIZE_CONTENT_TO_VIEWPORT" - Content not sized to viewport. [Learn more]
   826  	// (https://support.google.com/webmasters/answer/6352293#content_not_sized_to_viewport#error-list).
   827  	//   "USE_LEGIBLE_FONT_SIZES" - Font size is too small for easy reading on a
   828  	// small screen. [Learn More]
   829  	// (https://support.google.com/webmasters/answer/6352293#small_font_size#error-list).
   830  	//   "TAP_TARGETS_TOO_CLOSE" - Touch elements are too close to each other.
   831  	// [Learn more]
   832  	// (https://support.google.com/webmasters/answer/6352293#touch_elements_too_close#error-list).
   833  	IssueType string `json:"issueType,omitempty"`
   834  	// Message: Additional information regarding the issue.
   835  	Message string `json:"message,omitempty"`
   836  	// Severity: Not returned; reserved for future use.
   837  	//
   838  	// Possible values:
   839  	//   "SEVERITY_UNSPECIFIED" - Unknown severity.
   840  	//   "WARNING" - Warning.
   841  	//   "ERROR" - Error.
   842  	Severity string `json:"severity,omitempty"`
   843  	// ForceSendFields is a list of field names (e.g. "IssueType") to
   844  	// unconditionally include in API requests. By default, fields with empty or
   845  	// default values are omitted from API requests. See
   846  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   847  	// details.
   848  	ForceSendFields []string `json:"-"`
   849  	// NullFields is a list of field names (e.g. "IssueType") to include in API
   850  	// requests with the JSON null value. By default, fields with empty values are
   851  	// omitted from API requests. See
   852  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   853  	NullFields []string `json:"-"`
   854  }
   855  
   856  func (s *MobileUsabilityIssue) MarshalJSON() ([]byte, error) {
   857  	type NoMethod MobileUsabilityIssue
   858  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   859  }
   860  
   861  // ResourceIssue: Information about a resource with issue.
   862  type ResourceIssue struct {
   863  	// BlockedResource: Describes a blocked resource issue.
   864  	BlockedResource *BlockedResource `json:"blockedResource,omitempty"`
   865  	// ForceSendFields is a list of field names (e.g. "BlockedResource") to
   866  	// unconditionally include in API requests. By default, fields with empty or
   867  	// default values are omitted from API requests. See
   868  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   869  	// details.
   870  	ForceSendFields []string `json:"-"`
   871  	// NullFields is a list of field names (e.g. "BlockedResource") to include in
   872  	// API requests with the JSON null value. By default, fields with empty values
   873  	// are omitted from API requests. See
   874  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   875  	NullFields []string `json:"-"`
   876  }
   877  
   878  func (s *ResourceIssue) MarshalJSON() ([]byte, error) {
   879  	type NoMethod ResourceIssue
   880  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   881  }
   882  
   883  // RichResultsInspectionResult: Rich-Results inspection result, including any
   884  // rich results found at this URL.
   885  type RichResultsInspectionResult struct {
   886  	// DetectedItems: A list of zero or more rich results detected on this page.
   887  	// Rich results that cannot even be parsed due to syntactic issues will not be
   888  	// listed here.
   889  	DetectedItems []*DetectedItems `json:"detectedItems,omitempty"`
   890  	// Verdict: High-level rich results inspection result for this URL.
   891  	//
   892  	// Possible values:
   893  	//   "VERDICT_UNSPECIFIED" - Unknown verdict.
   894  	//   "PASS" - Equivalent to "Valid" for the page or item in Search Console.
   895  	//   "PARTIAL" - Reserved, no longer in use.
   896  	//   "FAIL" - Equivalent to "Error" or "Invalid" for the page or item in Search
   897  	// Console.
   898  	//   "NEUTRAL" - Equivalent to "Excluded" for the page or item in Search
   899  	// Console.
   900  	Verdict string `json:"verdict,omitempty"`
   901  	// ForceSendFields is a list of field names (e.g. "DetectedItems") to
   902  	// unconditionally include in API requests. By default, fields with empty or
   903  	// default values are omitted from API requests. See
   904  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   905  	// details.
   906  	ForceSendFields []string `json:"-"`
   907  	// NullFields is a list of field names (e.g. "DetectedItems") to include in API
   908  	// requests with the JSON null value. By default, fields with empty values are
   909  	// omitted from API requests. See
   910  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   911  	NullFields []string `json:"-"`
   912  }
   913  
   914  func (s *RichResultsInspectionResult) MarshalJSON() ([]byte, error) {
   915  	type NoMethod RichResultsInspectionResult
   916  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   917  }
   918  
   919  // RichResultsIssue: Severity and status of a single issue affecting a single
   920  // rich result instance on a page.
   921  type RichResultsIssue struct {
   922  	// IssueMessage: Rich Results issue type.
   923  	IssueMessage string `json:"issueMessage,omitempty"`
   924  	// Severity: Severity of this issue: WARNING, or ERROR. Items with an issue of
   925  	// status ERROR cannot appear with rich result features in Google Search
   926  	// results.
   927  	//
   928  	// Possible values:
   929  	//   "SEVERITY_UNSPECIFIED" - Unknown severity.
   930  	//   "WARNING" - Warning.
   931  	//   "ERROR" - Error.
   932  	Severity string `json:"severity,omitempty"`
   933  	// ForceSendFields is a list of field names (e.g. "IssueMessage") to
   934  	// unconditionally include in API requests. By default, fields with empty or
   935  	// default values are omitted from API requests. See
   936  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   937  	// details.
   938  	ForceSendFields []string `json:"-"`
   939  	// NullFields is a list of field names (e.g. "IssueMessage") to include in API
   940  	// requests with the JSON null value. By default, fields with empty values are
   941  	// omitted from API requests. See
   942  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   943  	NullFields []string `json:"-"`
   944  }
   945  
   946  func (s *RichResultsIssue) MarshalJSON() ([]byte, error) {
   947  	type NoMethod RichResultsIssue
   948  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   949  }
   950  
   951  // RunMobileFriendlyTestRequest: Mobile-friendly test request.
   952  type RunMobileFriendlyTestRequest struct {
   953  	// RequestScreenshot: Whether or not screenshot is requested. Default is false.
   954  	RequestScreenshot bool `json:"requestScreenshot,omitempty"`
   955  	// Url: URL for inspection.
   956  	Url string `json:"url,omitempty"`
   957  	// ForceSendFields is a list of field names (e.g. "RequestScreenshot") to
   958  	// unconditionally include in API requests. By default, fields with empty or
   959  	// default values are omitted from API requests. See
   960  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   961  	// details.
   962  	ForceSendFields []string `json:"-"`
   963  	// NullFields is a list of field names (e.g. "RequestScreenshot") to include in
   964  	// API requests with the JSON null value. By default, fields with empty values
   965  	// are omitted from API requests. See
   966  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   967  	NullFields []string `json:"-"`
   968  }
   969  
   970  func (s *RunMobileFriendlyTestRequest) MarshalJSON() ([]byte, error) {
   971  	type NoMethod RunMobileFriendlyTestRequest
   972  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   973  }
   974  
   975  // RunMobileFriendlyTestResponse: Mobile-friendly test response, including
   976  // mobile-friendly issues and resource issues.
   977  type RunMobileFriendlyTestResponse struct {
   978  	// MobileFriendliness: Test verdict, whether the page is mobile friendly or
   979  	// not.
   980  	//
   981  	// Possible values:
   982  	//   "MOBILE_FRIENDLY_TEST_RESULT_UNSPECIFIED" - Internal error when running
   983  	// this test. Please try running the test again.
   984  	//   "MOBILE_FRIENDLY" - The page is mobile friendly.
   985  	//   "NOT_MOBILE_FRIENDLY" - The page is not mobile friendly.
   986  	MobileFriendliness string `json:"mobileFriendliness,omitempty"`
   987  	// MobileFriendlyIssues: List of mobile-usability issues.
   988  	MobileFriendlyIssues []*MobileFriendlyIssue `json:"mobileFriendlyIssues,omitempty"`
   989  	// ResourceIssues: Information about embedded resources issues.
   990  	ResourceIssues []*ResourceIssue `json:"resourceIssues,omitempty"`
   991  	// Screenshot: Screenshot of the requested URL.
   992  	Screenshot *Image `json:"screenshot,omitempty"`
   993  	// TestStatus: Final state of the test, can be either complete or an error.
   994  	TestStatus *TestStatus `json:"testStatus,omitempty"`
   995  
   996  	// ServerResponse contains the HTTP response code and headers from the server.
   997  	googleapi.ServerResponse `json:"-"`
   998  	// ForceSendFields is a list of field names (e.g. "MobileFriendliness") to
   999  	// unconditionally include in API requests. By default, fields with empty or
  1000  	// default values are omitted from API requests. See
  1001  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1002  	// details.
  1003  	ForceSendFields []string `json:"-"`
  1004  	// NullFields is a list of field names (e.g. "MobileFriendliness") to include
  1005  	// in API requests with the JSON null value. By default, fields with empty
  1006  	// values are omitted from API requests. See
  1007  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1008  	NullFields []string `json:"-"`
  1009  }
  1010  
  1011  func (s *RunMobileFriendlyTestResponse) MarshalJSON() ([]byte, error) {
  1012  	type NoMethod RunMobileFriendlyTestResponse
  1013  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1014  }
  1015  
  1016  type SearchAnalyticsQueryRequest struct {
  1017  	// AggregationType: [Optional; Default is \"auto\"] How data is aggregated. If
  1018  	// aggregated by property, all data for the same property is aggregated; if
  1019  	// aggregated by page, all data is aggregated by canonical URI. If you filter
  1020  	// or group by page, choose AUTO; otherwise you can aggregate either by
  1021  	// property or by page, depending on how you want your data calculated; see the
  1022  	// help documentation to learn how data is calculated differently by site
  1023  	// versus by page. **Note:** If you group or filter by page, you cannot
  1024  	// aggregate by property. If you specify any value other than AUTO, the
  1025  	// aggregation type in the result will match the requested type, or if you
  1026  	// request an invalid type, you will get an error. The API will never change
  1027  	// your aggregation type if the requested type is invalid.
  1028  	//
  1029  	// Possible values:
  1030  	//   "AUTO"
  1031  	//   "BY_PROPERTY"
  1032  	//   "BY_PAGE"
  1033  	//   "BY_NEWS_SHOWCASE_PANEL"
  1034  	AggregationType string `json:"aggregationType,omitempty"`
  1035  	// DataState: The data state to be fetched, can be full or all, the latter
  1036  	// including full and partial data.
  1037  	//
  1038  	// Possible values:
  1039  	//   "DATA_STATE_UNSPECIFIED" - Default value, should not be used.
  1040  	//   "FINAL" - Include full final data only, without partial.
  1041  	//   "ALL" - Include all data, full and partial.
  1042  	DataState string `json:"dataState,omitempty"`
  1043  	// DimensionFilterGroups: [Optional] Zero or more filters to apply to the
  1044  	// dimension grouping values; for example, 'query contains \"buy\"' to see only
  1045  	// data where the query string contains the substring \"buy\" (not
  1046  	// case-sensitive). You can filter by a dimension without grouping by it.
  1047  	DimensionFilterGroups []*ApiDimensionFilterGroup `json:"dimensionFilterGroups,omitempty"`
  1048  	// Dimensions: [Optional] Zero or more dimensions to group results by.
  1049  	// Dimensions are the group-by values in the Search Analytics page. Dimensions
  1050  	// are combined to create a unique row key for each row. Results are grouped in
  1051  	// the order that you supply these dimensions.
  1052  	//
  1053  	// Possible values:
  1054  	//   "DATE"
  1055  	//   "QUERY"
  1056  	//   "PAGE"
  1057  	//   "COUNTRY"
  1058  	//   "DEVICE"
  1059  	//   "SEARCH_APPEARANCE"
  1060  	Dimensions []string `json:"dimensions,omitempty"`
  1061  	// EndDate: [Required] End date of the requested date range, in YYYY-MM-DD
  1062  	// format, in PST (UTC - 8:00). Must be greater than or equal to the start
  1063  	// date. This value is included in the range.
  1064  	EndDate string `json:"endDate,omitempty"`
  1065  	// RowLimit: [Optional; Default is 1000] The maximum number of rows to return.
  1066  	// Must be a number from 1 to 25,000 (inclusive).
  1067  	RowLimit int64 `json:"rowLimit,omitempty"`
  1068  	// SearchType: [Optional; Default is \"web\"] The search type to filter for.
  1069  	//
  1070  	// Possible values:
  1071  	//   "WEB"
  1072  	//   "IMAGE"
  1073  	//   "VIDEO"
  1074  	//   "NEWS" - News tab in search.
  1075  	//   "DISCOVER" - Discover.
  1076  	//   "GOOGLE_NEWS" - Google News (news.google.com or mobile app).
  1077  	SearchType string `json:"searchType,omitempty"`
  1078  	// StartDate:  [Required] Start date of the requested date range, in YYYY-MM-DD
  1079  	// format, in PST time (UTC - 8:00). Must be less than or equal to the end
  1080  	// date. This value is included in the range.
  1081  	StartDate string `json:"startDate,omitempty"`
  1082  	// StartRow: [Optional; Default is 0] Zero-based index of the first row in the
  1083  	// response. Must be a non-negative number.
  1084  	StartRow int64 `json:"startRow,omitempty"`
  1085  	// Type: Optional. [Optional; Default is \"web\"] Type of report: search type,
  1086  	// or either Discover or Gnews.
  1087  	//
  1088  	// Possible values:
  1089  	//   "WEB"
  1090  	//   "IMAGE"
  1091  	//   "VIDEO"
  1092  	//   "NEWS" - News tab in search.
  1093  	//   "DISCOVER" - Discover.
  1094  	//   "GOOGLE_NEWS" - Google News (news.google.com or mobile app).
  1095  	Type string `json:"type,omitempty"`
  1096  	// ForceSendFields is a list of field names (e.g. "AggregationType") to
  1097  	// unconditionally include in API requests. By default, fields with empty or
  1098  	// default values are omitted from API requests. See
  1099  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1100  	// details.
  1101  	ForceSendFields []string `json:"-"`
  1102  	// NullFields is a list of field names (e.g. "AggregationType") to include in
  1103  	// API requests with the JSON null value. By default, fields with empty values
  1104  	// are omitted from API requests. See
  1105  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1106  	NullFields []string `json:"-"`
  1107  }
  1108  
  1109  func (s *SearchAnalyticsQueryRequest) MarshalJSON() ([]byte, error) {
  1110  	type NoMethod SearchAnalyticsQueryRequest
  1111  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1112  }
  1113  
  1114  // SearchAnalyticsQueryResponse: A list of rows, one per result, grouped by
  1115  // key. Metrics in each row are aggregated for all data grouped by that key
  1116  // either by page or property, as specified by the aggregation type parameter.
  1117  type SearchAnalyticsQueryResponse struct {
  1118  	// ResponseAggregationType: How the results were aggregated.
  1119  	//
  1120  	// Possible values:
  1121  	//   "AUTO"
  1122  	//   "BY_PROPERTY"
  1123  	//   "BY_PAGE"
  1124  	//   "BY_NEWS_SHOWCASE_PANEL"
  1125  	ResponseAggregationType string `json:"responseAggregationType,omitempty"`
  1126  	// Rows: A list of rows grouped by the key values in the order given in the
  1127  	// query.
  1128  	Rows []*ApiDataRow `json:"rows,omitempty"`
  1129  
  1130  	// ServerResponse contains the HTTP response code and headers from the server.
  1131  	googleapi.ServerResponse `json:"-"`
  1132  	// ForceSendFields is a list of field names (e.g. "ResponseAggregationType") to
  1133  	// unconditionally include in API requests. By default, fields with empty or
  1134  	// default values are omitted from API requests. See
  1135  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1136  	// details.
  1137  	ForceSendFields []string `json:"-"`
  1138  	// NullFields is a list of field names (e.g. "ResponseAggregationType") to
  1139  	// include in API requests with the JSON null value. By default, fields with
  1140  	// empty values are omitted from API requests. See
  1141  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1142  	NullFields []string `json:"-"`
  1143  }
  1144  
  1145  func (s *SearchAnalyticsQueryResponse) MarshalJSON() ([]byte, error) {
  1146  	type NoMethod SearchAnalyticsQueryResponse
  1147  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1148  }
  1149  
  1150  // SitemapsListResponse: List of sitemaps.
  1151  type SitemapsListResponse struct {
  1152  	// Sitemap: Contains detailed information about a specific URL submitted as a
  1153  	// sitemap (https://support.google.com/webmasters/answer/156184).
  1154  	Sitemap []*WmxSitemap `json:"sitemap,omitempty"`
  1155  
  1156  	// ServerResponse contains the HTTP response code and headers from the server.
  1157  	googleapi.ServerResponse `json:"-"`
  1158  	// ForceSendFields is a list of field names (e.g. "Sitemap") to unconditionally
  1159  	// include in API requests. By default, fields with empty or default values are
  1160  	// omitted from API requests. See
  1161  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1162  	// details.
  1163  	ForceSendFields []string `json:"-"`
  1164  	// NullFields is a list of field names (e.g. "Sitemap") to include in API
  1165  	// requests with the JSON null value. By default, fields with empty values are
  1166  	// omitted from API requests. See
  1167  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1168  	NullFields []string `json:"-"`
  1169  }
  1170  
  1171  func (s *SitemapsListResponse) MarshalJSON() ([]byte, error) {
  1172  	type NoMethod SitemapsListResponse
  1173  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1174  }
  1175  
  1176  // SitesListResponse: List of sites with access level information.
  1177  type SitesListResponse struct {
  1178  	// SiteEntry: Contains permission level information about a Search Console
  1179  	// site. For more information, see Permissions in Search Console
  1180  	// (https://support.google.com/webmasters/answer/2451999).
  1181  	SiteEntry []*WmxSite `json:"siteEntry,omitempty"`
  1182  
  1183  	// ServerResponse contains the HTTP response code and headers from the server.
  1184  	googleapi.ServerResponse `json:"-"`
  1185  	// ForceSendFields is a list of field names (e.g. "SiteEntry") to
  1186  	// unconditionally include in API requests. By default, fields with empty or
  1187  	// default values are omitted from API requests. See
  1188  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1189  	// details.
  1190  	ForceSendFields []string `json:"-"`
  1191  	// NullFields is a list of field names (e.g. "SiteEntry") to include in API
  1192  	// requests with the JSON null value. By default, fields with empty values are
  1193  	// omitted from API requests. See
  1194  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1195  	NullFields []string `json:"-"`
  1196  }
  1197  
  1198  func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
  1199  	type NoMethod SitesListResponse
  1200  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1201  }
  1202  
  1203  // TestStatus: Final state of the test, including error details if necessary.
  1204  type TestStatus struct {
  1205  	// Details: Error details if applicable.
  1206  	Details string `json:"details,omitempty"`
  1207  	// Status: Status of the test.
  1208  	//
  1209  	// Possible values:
  1210  	//   "TEST_STATUS_UNSPECIFIED" - Internal error when running this test. Please
  1211  	// try running the test again.
  1212  	//   "COMPLETE" - Inspection has completed without errors.
  1213  	//   "INTERNAL_ERROR" - Inspection terminated in an error state. This indicates
  1214  	// a problem in Google's infrastructure, not a user error. Please try again
  1215  	// later.
  1216  	//   "PAGE_UNREACHABLE" - Google can not access the URL because of a user error
  1217  	// such as a robots.txt blockage, a 403 or 500 code etc. Please make sure that
  1218  	// the URL provided is accessible by Googlebot and is not password protected.
  1219  	Status string `json:"status,omitempty"`
  1220  	// ForceSendFields is a list of field names (e.g. "Details") to unconditionally
  1221  	// include in API requests. By default, fields with empty or default values are
  1222  	// omitted from API requests. See
  1223  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1224  	// details.
  1225  	ForceSendFields []string `json:"-"`
  1226  	// NullFields is a list of field names (e.g. "Details") to include in API
  1227  	// requests with the JSON null value. By default, fields with empty values are
  1228  	// omitted from API requests. See
  1229  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1230  	NullFields []string `json:"-"`
  1231  }
  1232  
  1233  func (s *TestStatus) MarshalJSON() ([]byte, error) {
  1234  	type NoMethod TestStatus
  1235  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1236  }
  1237  
  1238  // UrlInspectionResult: URL inspection result, including all inspection
  1239  // results.
  1240  type UrlInspectionResult struct {
  1241  	// AmpResult: Result of the AMP analysis. Absent if the page is not an AMP
  1242  	// page.
  1243  	AmpResult *AmpInspectionResult `json:"ampResult,omitempty"`
  1244  	// IndexStatusResult: Result of the index status analysis.
  1245  	IndexStatusResult *IndexStatusInspectionResult `json:"indexStatusResult,omitempty"`
  1246  	// InspectionResultLink: Link to Search Console URL inspection.
  1247  	InspectionResultLink string `json:"inspectionResultLink,omitempty"`
  1248  	// MobileUsabilityResult: Result of the Mobile usability analysis.
  1249  	MobileUsabilityResult *MobileUsabilityInspectionResult `json:"mobileUsabilityResult,omitempty"`
  1250  	// RichResultsResult: Result of the Rich Results analysis. Absent if there are
  1251  	// no rich results found.
  1252  	RichResultsResult *RichResultsInspectionResult `json:"richResultsResult,omitempty"`
  1253  	// ForceSendFields is a list of field names (e.g. "AmpResult") to
  1254  	// unconditionally include in API requests. By default, fields with empty or
  1255  	// default values are omitted from API requests. See
  1256  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1257  	// details.
  1258  	ForceSendFields []string `json:"-"`
  1259  	// NullFields is a list of field names (e.g. "AmpResult") to include in API
  1260  	// requests with the JSON null value. By default, fields with empty values are
  1261  	// omitted from API requests. See
  1262  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1263  	NullFields []string `json:"-"`
  1264  }
  1265  
  1266  func (s *UrlInspectionResult) MarshalJSON() ([]byte, error) {
  1267  	type NoMethod UrlInspectionResult
  1268  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1269  }
  1270  
  1271  // WmxSite: Contains permission level information about a Search Console site.
  1272  // For more information, see Permissions in Search Console
  1273  // (https://support.google.com/webmasters/answer/2451999).
  1274  type WmxSite struct {
  1275  	// PermissionLevel: The user's permission level for the site.
  1276  	//
  1277  	// Possible values:
  1278  	//   "SITE_PERMISSION_LEVEL_UNSPECIFIED"
  1279  	//   "SITE_OWNER" - Owner has complete access to the site.
  1280  	//   "SITE_FULL_USER" - Full users can access all data, and perform most of the
  1281  	// operations.
  1282  	//   "SITE_RESTRICTED_USER" - Restricted users can access most of the data, and
  1283  	// perform some operations.
  1284  	//   "SITE_UNVERIFIED_USER" - Unverified user has no access to site's data.
  1285  	PermissionLevel string `json:"permissionLevel,omitempty"`
  1286  	// SiteUrl: The URL of the site.
  1287  	SiteUrl string `json:"siteUrl,omitempty"`
  1288  
  1289  	// ServerResponse contains the HTTP response code and headers from the server.
  1290  	googleapi.ServerResponse `json:"-"`
  1291  	// ForceSendFields is a list of field names (e.g. "PermissionLevel") to
  1292  	// unconditionally include in API requests. By default, fields with empty or
  1293  	// default values are omitted from API requests. See
  1294  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1295  	// details.
  1296  	ForceSendFields []string `json:"-"`
  1297  	// NullFields is a list of field names (e.g. "PermissionLevel") to include in
  1298  	// API requests with the JSON null value. By default, fields with empty values
  1299  	// are omitted from API requests. See
  1300  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1301  	NullFields []string `json:"-"`
  1302  }
  1303  
  1304  func (s *WmxSite) MarshalJSON() ([]byte, error) {
  1305  	type NoMethod WmxSite
  1306  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1307  }
  1308  
  1309  // WmxSitemap: Contains detailed information about a specific URL submitted as
  1310  // a sitemap (https://support.google.com/webmasters/answer/156184).
  1311  type WmxSitemap struct {
  1312  	// Contents: The various content types in the sitemap.
  1313  	Contents []*WmxSitemapContent `json:"contents,omitempty"`
  1314  	// Errors: Number of errors in the sitemap. These are issues with the sitemap
  1315  	// itself that need to be fixed before it can be processed correctly.
  1316  	Errors int64 `json:"errors,omitempty,string"`
  1317  	// IsPending: If true, the sitemap has not been processed.
  1318  	IsPending bool `json:"isPending,omitempty"`
  1319  	// IsSitemapsIndex: If true, the sitemap is a collection of sitemaps.
  1320  	IsSitemapsIndex bool `json:"isSitemapsIndex,omitempty"`
  1321  	// LastDownloaded: Date & time in which this sitemap was last downloaded. Date
  1322  	// format is in RFC 3339 format (yyyy-mm-dd).
  1323  	LastDownloaded string `json:"lastDownloaded,omitempty"`
  1324  	// LastSubmitted: Date & time in which this sitemap was submitted. Date format
  1325  	// is in RFC 3339 format (yyyy-mm-dd).
  1326  	LastSubmitted string `json:"lastSubmitted,omitempty"`
  1327  	// Path: The url of the sitemap.
  1328  	Path string `json:"path,omitempty"`
  1329  	// Type: The type of the sitemap. For example: `rssFeed`.
  1330  	//
  1331  	// Possible values:
  1332  	//   "NOT_SITEMAP"
  1333  	//   "URL_LIST"
  1334  	//   "SITEMAP"
  1335  	//   "RSS_FEED"
  1336  	//   "ATOM_FEED"
  1337  	//   "PATTERN_SITEMAP" - Unsupported sitemap types.
  1338  	//   "OCEANFRONT"
  1339  	Type string `json:"type,omitempty"`
  1340  	// Warnings: Number of warnings for the sitemap. These are generally
  1341  	// non-critical issues with URLs in the sitemaps.
  1342  	Warnings int64 `json:"warnings,omitempty,string"`
  1343  
  1344  	// ServerResponse contains the HTTP response code and headers from the server.
  1345  	googleapi.ServerResponse `json:"-"`
  1346  	// ForceSendFields is a list of field names (e.g. "Contents") to
  1347  	// unconditionally include in API requests. By default, fields with empty or
  1348  	// default values are omitted from API requests. See
  1349  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1350  	// details.
  1351  	ForceSendFields []string `json:"-"`
  1352  	// NullFields is a list of field names (e.g. "Contents") to include in API
  1353  	// requests with the JSON null value. By default, fields with empty values are
  1354  	// omitted from API requests. See
  1355  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1356  	NullFields []string `json:"-"`
  1357  }
  1358  
  1359  func (s *WmxSitemap) MarshalJSON() ([]byte, error) {
  1360  	type NoMethod WmxSitemap
  1361  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1362  }
  1363  
  1364  // WmxSitemapContent: Information about the various content types in the
  1365  // sitemap.
  1366  type WmxSitemapContent struct {
  1367  	// Indexed: *Deprecated; do not use.*
  1368  	Indexed int64 `json:"indexed,omitempty,string"`
  1369  	// Submitted: The number of URLs in the sitemap (of the content type).
  1370  	Submitted int64 `json:"submitted,omitempty,string"`
  1371  	// Type: The specific type of content in this sitemap. For example: `web`.
  1372  	//
  1373  	// Possible values:
  1374  	//   "WEB"
  1375  	//   "IMAGE"
  1376  	//   "VIDEO"
  1377  	//   "NEWS"
  1378  	//   "MOBILE"
  1379  	//   "ANDROID_APP"
  1380  	//   "PATTERN" - Unsupported content type.
  1381  	//   "IOS_APP"
  1382  	//   "DATA_FEED_ELEMENT" - Unsupported content type.
  1383  	Type string `json:"type,omitempty"`
  1384  	// ForceSendFields is a list of field names (e.g. "Indexed") to unconditionally
  1385  	// include in API requests. By default, fields with empty or default values are
  1386  	// omitted from API requests. See
  1387  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1388  	// details.
  1389  	ForceSendFields []string `json:"-"`
  1390  	// NullFields is a list of field names (e.g. "Indexed") to include in API
  1391  	// requests with the JSON null value. By default, fields with empty values are
  1392  	// omitted from API requests. See
  1393  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1394  	NullFields []string `json:"-"`
  1395  }
  1396  
  1397  func (s *WmxSitemapContent) MarshalJSON() ([]byte, error) {
  1398  	type NoMethod WmxSitemapContent
  1399  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1400  }
  1401  
  1402  type SearchanalyticsQueryCall struct {
  1403  	s                           *Service
  1404  	siteUrl                     string
  1405  	searchanalyticsqueryrequest *SearchAnalyticsQueryRequest
  1406  	urlParams_                  gensupport.URLParams
  1407  	ctx_                        context.Context
  1408  	header_                     http.Header
  1409  }
  1410  
  1411  // Query: Query your data with filters and parameters that you define. Returns
  1412  // zero or more rows grouped by the row keys that you define. You must define a
  1413  // date range of one or more days. When date is one of the group by values, any
  1414  // days without data are omitted from the result list. If you need to know
  1415  // which days have data, issue a broad date range query grouped by date for any
  1416  // metric, and see which day rows are returned.
  1417  //
  1418  //   - siteUrl: The site's URL, including protocol. For example:
  1419  //     `http://www.example.com/`.
  1420  func (r *SearchanalyticsService) Query(siteUrl string, searchanalyticsqueryrequest *SearchAnalyticsQueryRequest) *SearchanalyticsQueryCall {
  1421  	c := &SearchanalyticsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1422  	c.siteUrl = siteUrl
  1423  	c.searchanalyticsqueryrequest = searchanalyticsqueryrequest
  1424  	return c
  1425  }
  1426  
  1427  // Fields allows partial responses to be retrieved. See
  1428  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1429  // details.
  1430  func (c *SearchanalyticsQueryCall) Fields(s ...googleapi.Field) *SearchanalyticsQueryCall {
  1431  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1432  	return c
  1433  }
  1434  
  1435  // Context sets the context to be used in this call's Do method.
  1436  func (c *SearchanalyticsQueryCall) Context(ctx context.Context) *SearchanalyticsQueryCall {
  1437  	c.ctx_ = ctx
  1438  	return c
  1439  }
  1440  
  1441  // Header returns a http.Header that can be modified by the caller to add
  1442  // headers to the request.
  1443  func (c *SearchanalyticsQueryCall) Header() http.Header {
  1444  	if c.header_ == nil {
  1445  		c.header_ = make(http.Header)
  1446  	}
  1447  	return c.header_
  1448  }
  1449  
  1450  func (c *SearchanalyticsQueryCall) doRequest(alt string) (*http.Response, error) {
  1451  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1452  	var body io.Reader = nil
  1453  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchanalyticsqueryrequest)
  1454  	if err != nil {
  1455  		return nil, err
  1456  	}
  1457  	c.urlParams_.Set("alt", alt)
  1458  	c.urlParams_.Set("prettyPrint", "false")
  1459  	urls := googleapi.ResolveRelative(c.s.BasePath, "webmasters/v3/sites/{siteUrl}/searchAnalytics/query")
  1460  	urls += "?" + c.urlParams_.Encode()
  1461  	req, err := http.NewRequest("POST", urls, body)
  1462  	if err != nil {
  1463  		return nil, err
  1464  	}
  1465  	req.Header = reqHeaders
  1466  	googleapi.Expand(req.URL, map[string]string{
  1467  		"siteUrl": c.siteUrl,
  1468  	})
  1469  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1470  }
  1471  
  1472  // Do executes the "webmasters.searchanalytics.query" call.
  1473  // Any non-2xx status code is an error. Response headers are in either
  1474  // *SearchAnalyticsQueryResponse.ServerResponse.Header or (if a response was
  1475  // returned at all) in error.(*googleapi.Error).Header. Use
  1476  // googleapi.IsNotModified to check whether the returned error was because
  1477  // http.StatusNotModified was returned.
  1478  func (c *SearchanalyticsQueryCall) Do(opts ...googleapi.CallOption) (*SearchAnalyticsQueryResponse, error) {
  1479  	gensupport.SetOptions(c.urlParams_, opts...)
  1480  	res, err := c.doRequest("json")
  1481  	if res != nil && res.StatusCode == http.StatusNotModified {
  1482  		if res.Body != nil {
  1483  			res.Body.Close()
  1484  		}
  1485  		return nil, gensupport.WrapError(&googleapi.Error{
  1486  			Code:   res.StatusCode,
  1487  			Header: res.Header,
  1488  		})
  1489  	}
  1490  	if err != nil {
  1491  		return nil, err
  1492  	}
  1493  	defer googleapi.CloseBody(res)
  1494  	if err := googleapi.CheckResponse(res); err != nil {
  1495  		return nil, gensupport.WrapError(err)
  1496  	}
  1497  	ret := &SearchAnalyticsQueryResponse{
  1498  		ServerResponse: googleapi.ServerResponse{
  1499  			Header:         res.Header,
  1500  			HTTPStatusCode: res.StatusCode,
  1501  		},
  1502  	}
  1503  	target := &ret
  1504  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1505  		return nil, err
  1506  	}
  1507  	return ret, nil
  1508  }
  1509  
  1510  type SitemapsDeleteCall struct {
  1511  	s          *Service
  1512  	siteUrl    string
  1513  	feedpath   string
  1514  	urlParams_ gensupport.URLParams
  1515  	ctx_       context.Context
  1516  	header_    http.Header
  1517  }
  1518  
  1519  // Delete: Deletes a sitemap from the Sitemaps report. Does not stop Google
  1520  // from crawling this sitemap or the URLs that were previously crawled in the
  1521  // deleted sitemap.
  1522  //
  1523  //   - feedpath: The URL of the actual sitemap. For example:
  1524  //     `http://www.example.com/sitemap.xml`.
  1525  //   - siteUrl: The site's URL, including protocol. For example:
  1526  //     `http://www.example.com/`.
  1527  func (r *SitemapsService) Delete(siteUrl string, feedpath string) *SitemapsDeleteCall {
  1528  	c := &SitemapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1529  	c.siteUrl = siteUrl
  1530  	c.feedpath = feedpath
  1531  	return c
  1532  }
  1533  
  1534  // Fields allows partial responses to be retrieved. See
  1535  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1536  // details.
  1537  func (c *SitemapsDeleteCall) Fields(s ...googleapi.Field) *SitemapsDeleteCall {
  1538  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1539  	return c
  1540  }
  1541  
  1542  // Context sets the context to be used in this call's Do method.
  1543  func (c *SitemapsDeleteCall) Context(ctx context.Context) *SitemapsDeleteCall {
  1544  	c.ctx_ = ctx
  1545  	return c
  1546  }
  1547  
  1548  // Header returns a http.Header that can be modified by the caller to add
  1549  // headers to the request.
  1550  func (c *SitemapsDeleteCall) Header() http.Header {
  1551  	if c.header_ == nil {
  1552  		c.header_ = make(http.Header)
  1553  	}
  1554  	return c.header_
  1555  }
  1556  
  1557  func (c *SitemapsDeleteCall) doRequest(alt string) (*http.Response, error) {
  1558  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1559  	var body io.Reader = nil
  1560  	c.urlParams_.Set("alt", alt)
  1561  	c.urlParams_.Set("prettyPrint", "false")
  1562  	urls := googleapi.ResolveRelative(c.s.BasePath, "webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}")
  1563  	urls += "?" + c.urlParams_.Encode()
  1564  	req, err := http.NewRequest("DELETE", urls, body)
  1565  	if err != nil {
  1566  		return nil, err
  1567  	}
  1568  	req.Header = reqHeaders
  1569  	googleapi.Expand(req.URL, map[string]string{
  1570  		"siteUrl":  c.siteUrl,
  1571  		"feedpath": c.feedpath,
  1572  	})
  1573  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1574  }
  1575  
  1576  // Do executes the "webmasters.sitemaps.delete" call.
  1577  func (c *SitemapsDeleteCall) Do(opts ...googleapi.CallOption) error {
  1578  	gensupport.SetOptions(c.urlParams_, opts...)
  1579  	res, err := c.doRequest("json")
  1580  	if err != nil {
  1581  		return err
  1582  	}
  1583  	defer googleapi.CloseBody(res)
  1584  	if err := googleapi.CheckResponse(res); err != nil {
  1585  		return gensupport.WrapError(err)
  1586  	}
  1587  	return nil
  1588  }
  1589  
  1590  type SitemapsGetCall struct {
  1591  	s            *Service
  1592  	siteUrl      string
  1593  	feedpath     string
  1594  	urlParams_   gensupport.URLParams
  1595  	ifNoneMatch_ string
  1596  	ctx_         context.Context
  1597  	header_      http.Header
  1598  }
  1599  
  1600  // Get: Retrieves information about a specific sitemap.
  1601  //
  1602  //   - feedpath: The URL of the actual sitemap. For example:
  1603  //     `http://www.example.com/sitemap.xml`.
  1604  //   - siteUrl: The site's URL, including protocol. For example:
  1605  //     `http://www.example.com/`.
  1606  func (r *SitemapsService) Get(siteUrl string, feedpath string) *SitemapsGetCall {
  1607  	c := &SitemapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1608  	c.siteUrl = siteUrl
  1609  	c.feedpath = feedpath
  1610  	return c
  1611  }
  1612  
  1613  // Fields allows partial responses to be retrieved. See
  1614  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1615  // details.
  1616  func (c *SitemapsGetCall) Fields(s ...googleapi.Field) *SitemapsGetCall {
  1617  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1618  	return c
  1619  }
  1620  
  1621  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1622  // object's ETag matches the given value. This is useful for getting updates
  1623  // only after the object has changed since the last request.
  1624  func (c *SitemapsGetCall) IfNoneMatch(entityTag string) *SitemapsGetCall {
  1625  	c.ifNoneMatch_ = entityTag
  1626  	return c
  1627  }
  1628  
  1629  // Context sets the context to be used in this call's Do method.
  1630  func (c *SitemapsGetCall) Context(ctx context.Context) *SitemapsGetCall {
  1631  	c.ctx_ = ctx
  1632  	return c
  1633  }
  1634  
  1635  // Header returns a http.Header that can be modified by the caller to add
  1636  // headers to the request.
  1637  func (c *SitemapsGetCall) Header() http.Header {
  1638  	if c.header_ == nil {
  1639  		c.header_ = make(http.Header)
  1640  	}
  1641  	return c.header_
  1642  }
  1643  
  1644  func (c *SitemapsGetCall) doRequest(alt string) (*http.Response, error) {
  1645  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1646  	if c.ifNoneMatch_ != "" {
  1647  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1648  	}
  1649  	var body io.Reader = nil
  1650  	c.urlParams_.Set("alt", alt)
  1651  	c.urlParams_.Set("prettyPrint", "false")
  1652  	urls := googleapi.ResolveRelative(c.s.BasePath, "webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}")
  1653  	urls += "?" + c.urlParams_.Encode()
  1654  	req, err := http.NewRequest("GET", urls, body)
  1655  	if err != nil {
  1656  		return nil, err
  1657  	}
  1658  	req.Header = reqHeaders
  1659  	googleapi.Expand(req.URL, map[string]string{
  1660  		"siteUrl":  c.siteUrl,
  1661  		"feedpath": c.feedpath,
  1662  	})
  1663  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1664  }
  1665  
  1666  // Do executes the "webmasters.sitemaps.get" call.
  1667  // Any non-2xx status code is an error. Response headers are in either
  1668  // *WmxSitemap.ServerResponse.Header or (if a response was returned at all) in
  1669  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1670  // whether the returned error was because http.StatusNotModified was returned.
  1671  func (c *SitemapsGetCall) Do(opts ...googleapi.CallOption) (*WmxSitemap, error) {
  1672  	gensupport.SetOptions(c.urlParams_, opts...)
  1673  	res, err := c.doRequest("json")
  1674  	if res != nil && res.StatusCode == http.StatusNotModified {
  1675  		if res.Body != nil {
  1676  			res.Body.Close()
  1677  		}
  1678  		return nil, gensupport.WrapError(&googleapi.Error{
  1679  			Code:   res.StatusCode,
  1680  			Header: res.Header,
  1681  		})
  1682  	}
  1683  	if err != nil {
  1684  		return nil, err
  1685  	}
  1686  	defer googleapi.CloseBody(res)
  1687  	if err := googleapi.CheckResponse(res); err != nil {
  1688  		return nil, gensupport.WrapError(err)
  1689  	}
  1690  	ret := &WmxSitemap{
  1691  		ServerResponse: googleapi.ServerResponse{
  1692  			Header:         res.Header,
  1693  			HTTPStatusCode: res.StatusCode,
  1694  		},
  1695  	}
  1696  	target := &ret
  1697  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1698  		return nil, err
  1699  	}
  1700  	return ret, nil
  1701  }
  1702  
  1703  type SitemapsListCall struct {
  1704  	s            *Service
  1705  	siteUrl      string
  1706  	urlParams_   gensupport.URLParams
  1707  	ifNoneMatch_ string
  1708  	ctx_         context.Context
  1709  	header_      http.Header
  1710  }
  1711  
  1712  // List:  Lists the sitemaps-entries (/webmaster-tools/v3/sitemaps) submitted
  1713  // for this site, or included in the sitemap index file (if `sitemapIndex` is
  1714  // specified in the request).
  1715  //
  1716  //   - siteUrl: The site's URL, including protocol. For example:
  1717  //     `http://www.example.com/`.
  1718  func (r *SitemapsService) List(siteUrl string) *SitemapsListCall {
  1719  	c := &SitemapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1720  	c.siteUrl = siteUrl
  1721  	return c
  1722  }
  1723  
  1724  // SitemapIndex sets the optional parameter "sitemapIndex": A URL of a site's
  1725  // sitemap index. For example: `http://www.example.com/sitemapindex.xml`.
  1726  func (c *SitemapsListCall) SitemapIndex(sitemapIndex string) *SitemapsListCall {
  1727  	c.urlParams_.Set("sitemapIndex", sitemapIndex)
  1728  	return c
  1729  }
  1730  
  1731  // Fields allows partial responses to be retrieved. See
  1732  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1733  // details.
  1734  func (c *SitemapsListCall) Fields(s ...googleapi.Field) *SitemapsListCall {
  1735  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1736  	return c
  1737  }
  1738  
  1739  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1740  // object's ETag matches the given value. This is useful for getting updates
  1741  // only after the object has changed since the last request.
  1742  func (c *SitemapsListCall) IfNoneMatch(entityTag string) *SitemapsListCall {
  1743  	c.ifNoneMatch_ = entityTag
  1744  	return c
  1745  }
  1746  
  1747  // Context sets the context to be used in this call's Do method.
  1748  func (c *SitemapsListCall) Context(ctx context.Context) *SitemapsListCall {
  1749  	c.ctx_ = ctx
  1750  	return c
  1751  }
  1752  
  1753  // Header returns a http.Header that can be modified by the caller to add
  1754  // headers to the request.
  1755  func (c *SitemapsListCall) Header() http.Header {
  1756  	if c.header_ == nil {
  1757  		c.header_ = make(http.Header)
  1758  	}
  1759  	return c.header_
  1760  }
  1761  
  1762  func (c *SitemapsListCall) doRequest(alt string) (*http.Response, error) {
  1763  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1764  	if c.ifNoneMatch_ != "" {
  1765  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1766  	}
  1767  	var body io.Reader = nil
  1768  	c.urlParams_.Set("alt", alt)
  1769  	c.urlParams_.Set("prettyPrint", "false")
  1770  	urls := googleapi.ResolveRelative(c.s.BasePath, "webmasters/v3/sites/{siteUrl}/sitemaps")
  1771  	urls += "?" + c.urlParams_.Encode()
  1772  	req, err := http.NewRequest("GET", urls, body)
  1773  	if err != nil {
  1774  		return nil, err
  1775  	}
  1776  	req.Header = reqHeaders
  1777  	googleapi.Expand(req.URL, map[string]string{
  1778  		"siteUrl": c.siteUrl,
  1779  	})
  1780  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1781  }
  1782  
  1783  // Do executes the "webmasters.sitemaps.list" call.
  1784  // Any non-2xx status code is an error. Response headers are in either
  1785  // *SitemapsListResponse.ServerResponse.Header or (if a response was returned
  1786  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1787  // check whether the returned error was because http.StatusNotModified was
  1788  // returned.
  1789  func (c *SitemapsListCall) Do(opts ...googleapi.CallOption) (*SitemapsListResponse, error) {
  1790  	gensupport.SetOptions(c.urlParams_, opts...)
  1791  	res, err := c.doRequest("json")
  1792  	if res != nil && res.StatusCode == http.StatusNotModified {
  1793  		if res.Body != nil {
  1794  			res.Body.Close()
  1795  		}
  1796  		return nil, gensupport.WrapError(&googleapi.Error{
  1797  			Code:   res.StatusCode,
  1798  			Header: res.Header,
  1799  		})
  1800  	}
  1801  	if err != nil {
  1802  		return nil, err
  1803  	}
  1804  	defer googleapi.CloseBody(res)
  1805  	if err := googleapi.CheckResponse(res); err != nil {
  1806  		return nil, gensupport.WrapError(err)
  1807  	}
  1808  	ret := &SitemapsListResponse{
  1809  		ServerResponse: googleapi.ServerResponse{
  1810  			Header:         res.Header,
  1811  			HTTPStatusCode: res.StatusCode,
  1812  		},
  1813  	}
  1814  	target := &ret
  1815  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1816  		return nil, err
  1817  	}
  1818  	return ret, nil
  1819  }
  1820  
  1821  type SitemapsSubmitCall struct {
  1822  	s          *Service
  1823  	siteUrl    string
  1824  	feedpath   string
  1825  	urlParams_ gensupport.URLParams
  1826  	ctx_       context.Context
  1827  	header_    http.Header
  1828  }
  1829  
  1830  // Submit: Submits a sitemap for a site.
  1831  //
  1832  //   - feedpath: The URL of the actual sitemap. For example:
  1833  //     `http://www.example.com/sitemap.xml`.
  1834  //   - siteUrl: The site's URL, including protocol. For example:
  1835  //     `http://www.example.com/`.
  1836  func (r *SitemapsService) Submit(siteUrl string, feedpath string) *SitemapsSubmitCall {
  1837  	c := &SitemapsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1838  	c.siteUrl = siteUrl
  1839  	c.feedpath = feedpath
  1840  	return c
  1841  }
  1842  
  1843  // Fields allows partial responses to be retrieved. See
  1844  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1845  // details.
  1846  func (c *SitemapsSubmitCall) Fields(s ...googleapi.Field) *SitemapsSubmitCall {
  1847  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1848  	return c
  1849  }
  1850  
  1851  // Context sets the context to be used in this call's Do method.
  1852  func (c *SitemapsSubmitCall) Context(ctx context.Context) *SitemapsSubmitCall {
  1853  	c.ctx_ = ctx
  1854  	return c
  1855  }
  1856  
  1857  // Header returns a http.Header that can be modified by the caller to add
  1858  // headers to the request.
  1859  func (c *SitemapsSubmitCall) Header() http.Header {
  1860  	if c.header_ == nil {
  1861  		c.header_ = make(http.Header)
  1862  	}
  1863  	return c.header_
  1864  }
  1865  
  1866  func (c *SitemapsSubmitCall) doRequest(alt string) (*http.Response, error) {
  1867  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1868  	var body io.Reader = nil
  1869  	c.urlParams_.Set("alt", alt)
  1870  	c.urlParams_.Set("prettyPrint", "false")
  1871  	urls := googleapi.ResolveRelative(c.s.BasePath, "webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}")
  1872  	urls += "?" + c.urlParams_.Encode()
  1873  	req, err := http.NewRequest("PUT", urls, body)
  1874  	if err != nil {
  1875  		return nil, err
  1876  	}
  1877  	req.Header = reqHeaders
  1878  	googleapi.Expand(req.URL, map[string]string{
  1879  		"siteUrl":  c.siteUrl,
  1880  		"feedpath": c.feedpath,
  1881  	})
  1882  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1883  }
  1884  
  1885  // Do executes the "webmasters.sitemaps.submit" call.
  1886  func (c *SitemapsSubmitCall) Do(opts ...googleapi.CallOption) error {
  1887  	gensupport.SetOptions(c.urlParams_, opts...)
  1888  	res, err := c.doRequest("json")
  1889  	if err != nil {
  1890  		return err
  1891  	}
  1892  	defer googleapi.CloseBody(res)
  1893  	if err := googleapi.CheckResponse(res); err != nil {
  1894  		return gensupport.WrapError(err)
  1895  	}
  1896  	return nil
  1897  }
  1898  
  1899  type SitesAddCall struct {
  1900  	s          *Service
  1901  	siteUrl    string
  1902  	urlParams_ gensupport.URLParams
  1903  	ctx_       context.Context
  1904  	header_    http.Header
  1905  }
  1906  
  1907  // Add:  Adds a site to the set of the user's sites in Search Console.
  1908  //
  1909  // - siteUrl: The URL of the site to add.
  1910  func (r *SitesService) Add(siteUrl string) *SitesAddCall {
  1911  	c := &SitesAddCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1912  	c.siteUrl = siteUrl
  1913  	return c
  1914  }
  1915  
  1916  // Fields allows partial responses to be retrieved. See
  1917  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1918  // details.
  1919  func (c *SitesAddCall) Fields(s ...googleapi.Field) *SitesAddCall {
  1920  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1921  	return c
  1922  }
  1923  
  1924  // Context sets the context to be used in this call's Do method.
  1925  func (c *SitesAddCall) Context(ctx context.Context) *SitesAddCall {
  1926  	c.ctx_ = ctx
  1927  	return c
  1928  }
  1929  
  1930  // Header returns a http.Header that can be modified by the caller to add
  1931  // headers to the request.
  1932  func (c *SitesAddCall) Header() http.Header {
  1933  	if c.header_ == nil {
  1934  		c.header_ = make(http.Header)
  1935  	}
  1936  	return c.header_
  1937  }
  1938  
  1939  func (c *SitesAddCall) doRequest(alt string) (*http.Response, error) {
  1940  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1941  	var body io.Reader = nil
  1942  	c.urlParams_.Set("alt", alt)
  1943  	c.urlParams_.Set("prettyPrint", "false")
  1944  	urls := googleapi.ResolveRelative(c.s.BasePath, "webmasters/v3/sites/{siteUrl}")
  1945  	urls += "?" + c.urlParams_.Encode()
  1946  	req, err := http.NewRequest("PUT", urls, body)
  1947  	if err != nil {
  1948  		return nil, err
  1949  	}
  1950  	req.Header = reqHeaders
  1951  	googleapi.Expand(req.URL, map[string]string{
  1952  		"siteUrl": c.siteUrl,
  1953  	})
  1954  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1955  }
  1956  
  1957  // Do executes the "webmasters.sites.add" call.
  1958  func (c *SitesAddCall) Do(opts ...googleapi.CallOption) error {
  1959  	gensupport.SetOptions(c.urlParams_, opts...)
  1960  	res, err := c.doRequest("json")
  1961  	if err != nil {
  1962  		return err
  1963  	}
  1964  	defer googleapi.CloseBody(res)
  1965  	if err := googleapi.CheckResponse(res); err != nil {
  1966  		return gensupport.WrapError(err)
  1967  	}
  1968  	return nil
  1969  }
  1970  
  1971  type SitesDeleteCall struct {
  1972  	s          *Service
  1973  	siteUrl    string
  1974  	urlParams_ gensupport.URLParams
  1975  	ctx_       context.Context
  1976  	header_    http.Header
  1977  }
  1978  
  1979  // Delete:  Removes a site from the set of the user's Search Console sites.
  1980  //
  1981  //   - siteUrl: The URI of the property as defined in Search Console.
  1982  //     **Examples:** `http://www.example.com/` or `sc-domain:example.com`.
  1983  func (r *SitesService) Delete(siteUrl string) *SitesDeleteCall {
  1984  	c := &SitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1985  	c.siteUrl = siteUrl
  1986  	return c
  1987  }
  1988  
  1989  // Fields allows partial responses to be retrieved. See
  1990  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1991  // details.
  1992  func (c *SitesDeleteCall) Fields(s ...googleapi.Field) *SitesDeleteCall {
  1993  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1994  	return c
  1995  }
  1996  
  1997  // Context sets the context to be used in this call's Do method.
  1998  func (c *SitesDeleteCall) Context(ctx context.Context) *SitesDeleteCall {
  1999  	c.ctx_ = ctx
  2000  	return c
  2001  }
  2002  
  2003  // Header returns a http.Header that can be modified by the caller to add
  2004  // headers to the request.
  2005  func (c *SitesDeleteCall) Header() http.Header {
  2006  	if c.header_ == nil {
  2007  		c.header_ = make(http.Header)
  2008  	}
  2009  	return c.header_
  2010  }
  2011  
  2012  func (c *SitesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2013  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2014  	var body io.Reader = nil
  2015  	c.urlParams_.Set("alt", alt)
  2016  	c.urlParams_.Set("prettyPrint", "false")
  2017  	urls := googleapi.ResolveRelative(c.s.BasePath, "webmasters/v3/sites/{siteUrl}")
  2018  	urls += "?" + c.urlParams_.Encode()
  2019  	req, err := http.NewRequest("DELETE", urls, body)
  2020  	if err != nil {
  2021  		return nil, err
  2022  	}
  2023  	req.Header = reqHeaders
  2024  	googleapi.Expand(req.URL, map[string]string{
  2025  		"siteUrl": c.siteUrl,
  2026  	})
  2027  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2028  }
  2029  
  2030  // Do executes the "webmasters.sites.delete" call.
  2031  func (c *SitesDeleteCall) Do(opts ...googleapi.CallOption) error {
  2032  	gensupport.SetOptions(c.urlParams_, opts...)
  2033  	res, err := c.doRequest("json")
  2034  	if err != nil {
  2035  		return err
  2036  	}
  2037  	defer googleapi.CloseBody(res)
  2038  	if err := googleapi.CheckResponse(res); err != nil {
  2039  		return gensupport.WrapError(err)
  2040  	}
  2041  	return nil
  2042  }
  2043  
  2044  type SitesGetCall struct {
  2045  	s            *Service
  2046  	siteUrl      string
  2047  	urlParams_   gensupport.URLParams
  2048  	ifNoneMatch_ string
  2049  	ctx_         context.Context
  2050  	header_      http.Header
  2051  }
  2052  
  2053  // Get:  Retrieves information about specific site.
  2054  //
  2055  //   - siteUrl: The URI of the property as defined in Search Console.
  2056  //     **Examples:** `http://www.example.com/` or `sc-domain:example.com`.
  2057  func (r *SitesService) Get(siteUrl string) *SitesGetCall {
  2058  	c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2059  	c.siteUrl = siteUrl
  2060  	return c
  2061  }
  2062  
  2063  // Fields allows partial responses to be retrieved. See
  2064  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2065  // details.
  2066  func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
  2067  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2068  	return c
  2069  }
  2070  
  2071  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2072  // object's ETag matches the given value. This is useful for getting updates
  2073  // only after the object has changed since the last request.
  2074  func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
  2075  	c.ifNoneMatch_ = entityTag
  2076  	return c
  2077  }
  2078  
  2079  // Context sets the context to be used in this call's Do method.
  2080  func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
  2081  	c.ctx_ = ctx
  2082  	return c
  2083  }
  2084  
  2085  // Header returns a http.Header that can be modified by the caller to add
  2086  // headers to the request.
  2087  func (c *SitesGetCall) Header() http.Header {
  2088  	if c.header_ == nil {
  2089  		c.header_ = make(http.Header)
  2090  	}
  2091  	return c.header_
  2092  }
  2093  
  2094  func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
  2095  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2096  	if c.ifNoneMatch_ != "" {
  2097  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2098  	}
  2099  	var body io.Reader = nil
  2100  	c.urlParams_.Set("alt", alt)
  2101  	c.urlParams_.Set("prettyPrint", "false")
  2102  	urls := googleapi.ResolveRelative(c.s.BasePath, "webmasters/v3/sites/{siteUrl}")
  2103  	urls += "?" + c.urlParams_.Encode()
  2104  	req, err := http.NewRequest("GET", urls, body)
  2105  	if err != nil {
  2106  		return nil, err
  2107  	}
  2108  	req.Header = reqHeaders
  2109  	googleapi.Expand(req.URL, map[string]string{
  2110  		"siteUrl": c.siteUrl,
  2111  	})
  2112  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2113  }
  2114  
  2115  // Do executes the "webmasters.sites.get" call.
  2116  // Any non-2xx status code is an error. Response headers are in either
  2117  // *WmxSite.ServerResponse.Header or (if a response was returned at all) in
  2118  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2119  // whether the returned error was because http.StatusNotModified was returned.
  2120  func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*WmxSite, error) {
  2121  	gensupport.SetOptions(c.urlParams_, opts...)
  2122  	res, err := c.doRequest("json")
  2123  	if res != nil && res.StatusCode == http.StatusNotModified {
  2124  		if res.Body != nil {
  2125  			res.Body.Close()
  2126  		}
  2127  		return nil, gensupport.WrapError(&googleapi.Error{
  2128  			Code:   res.StatusCode,
  2129  			Header: res.Header,
  2130  		})
  2131  	}
  2132  	if err != nil {
  2133  		return nil, err
  2134  	}
  2135  	defer googleapi.CloseBody(res)
  2136  	if err := googleapi.CheckResponse(res); err != nil {
  2137  		return nil, gensupport.WrapError(err)
  2138  	}
  2139  	ret := &WmxSite{
  2140  		ServerResponse: googleapi.ServerResponse{
  2141  			Header:         res.Header,
  2142  			HTTPStatusCode: res.StatusCode,
  2143  		},
  2144  	}
  2145  	target := &ret
  2146  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2147  		return nil, err
  2148  	}
  2149  	return ret, nil
  2150  }
  2151  
  2152  type SitesListCall struct {
  2153  	s            *Service
  2154  	urlParams_   gensupport.URLParams
  2155  	ifNoneMatch_ string
  2156  	ctx_         context.Context
  2157  	header_      http.Header
  2158  }
  2159  
  2160  // List:  Lists the user's Search Console sites.
  2161  func (r *SitesService) List() *SitesListCall {
  2162  	c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2163  	return c
  2164  }
  2165  
  2166  // Fields allows partial responses to be retrieved. See
  2167  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2168  // details.
  2169  func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
  2170  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2171  	return c
  2172  }
  2173  
  2174  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2175  // object's ETag matches the given value. This is useful for getting updates
  2176  // only after the object has changed since the last request.
  2177  func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
  2178  	c.ifNoneMatch_ = entityTag
  2179  	return c
  2180  }
  2181  
  2182  // Context sets the context to be used in this call's Do method.
  2183  func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
  2184  	c.ctx_ = ctx
  2185  	return c
  2186  }
  2187  
  2188  // Header returns a http.Header that can be modified by the caller to add
  2189  // headers to the request.
  2190  func (c *SitesListCall) Header() http.Header {
  2191  	if c.header_ == nil {
  2192  		c.header_ = make(http.Header)
  2193  	}
  2194  	return c.header_
  2195  }
  2196  
  2197  func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
  2198  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2199  	if c.ifNoneMatch_ != "" {
  2200  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2201  	}
  2202  	var body io.Reader = nil
  2203  	c.urlParams_.Set("alt", alt)
  2204  	c.urlParams_.Set("prettyPrint", "false")
  2205  	urls := googleapi.ResolveRelative(c.s.BasePath, "webmasters/v3/sites")
  2206  	urls += "?" + c.urlParams_.Encode()
  2207  	req, err := http.NewRequest("GET", urls, body)
  2208  	if err != nil {
  2209  		return nil, err
  2210  	}
  2211  	req.Header = reqHeaders
  2212  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2213  }
  2214  
  2215  // Do executes the "webmasters.sites.list" call.
  2216  // Any non-2xx status code is an error. Response headers are in either
  2217  // *SitesListResponse.ServerResponse.Header or (if a response was returned at
  2218  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2219  // check whether the returned error was because http.StatusNotModified was
  2220  // returned.
  2221  func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
  2222  	gensupport.SetOptions(c.urlParams_, opts...)
  2223  	res, err := c.doRequest("json")
  2224  	if res != nil && res.StatusCode == http.StatusNotModified {
  2225  		if res.Body != nil {
  2226  			res.Body.Close()
  2227  		}
  2228  		return nil, gensupport.WrapError(&googleapi.Error{
  2229  			Code:   res.StatusCode,
  2230  			Header: res.Header,
  2231  		})
  2232  	}
  2233  	if err != nil {
  2234  		return nil, err
  2235  	}
  2236  	defer googleapi.CloseBody(res)
  2237  	if err := googleapi.CheckResponse(res); err != nil {
  2238  		return nil, gensupport.WrapError(err)
  2239  	}
  2240  	ret := &SitesListResponse{
  2241  		ServerResponse: googleapi.ServerResponse{
  2242  			Header:         res.Header,
  2243  			HTTPStatusCode: res.StatusCode,
  2244  		},
  2245  	}
  2246  	target := &ret
  2247  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2248  		return nil, err
  2249  	}
  2250  	return ret, nil
  2251  }
  2252  
  2253  type UrlInspectionIndexInspectCall struct {
  2254  	s                      *Service
  2255  	inspecturlindexrequest *InspectUrlIndexRequest
  2256  	urlParams_             gensupport.URLParams
  2257  	ctx_                   context.Context
  2258  	header_                http.Header
  2259  }
  2260  
  2261  // Inspect: Index inspection.
  2262  func (r *UrlInspectionIndexService) Inspect(inspecturlindexrequest *InspectUrlIndexRequest) *UrlInspectionIndexInspectCall {
  2263  	c := &UrlInspectionIndexInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2264  	c.inspecturlindexrequest = inspecturlindexrequest
  2265  	return c
  2266  }
  2267  
  2268  // Fields allows partial responses to be retrieved. See
  2269  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2270  // details.
  2271  func (c *UrlInspectionIndexInspectCall) Fields(s ...googleapi.Field) *UrlInspectionIndexInspectCall {
  2272  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2273  	return c
  2274  }
  2275  
  2276  // Context sets the context to be used in this call's Do method.
  2277  func (c *UrlInspectionIndexInspectCall) Context(ctx context.Context) *UrlInspectionIndexInspectCall {
  2278  	c.ctx_ = ctx
  2279  	return c
  2280  }
  2281  
  2282  // Header returns a http.Header that can be modified by the caller to add
  2283  // headers to the request.
  2284  func (c *UrlInspectionIndexInspectCall) Header() http.Header {
  2285  	if c.header_ == nil {
  2286  		c.header_ = make(http.Header)
  2287  	}
  2288  	return c.header_
  2289  }
  2290  
  2291  func (c *UrlInspectionIndexInspectCall) doRequest(alt string) (*http.Response, error) {
  2292  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2293  	var body io.Reader = nil
  2294  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.inspecturlindexrequest)
  2295  	if err != nil {
  2296  		return nil, err
  2297  	}
  2298  	c.urlParams_.Set("alt", alt)
  2299  	c.urlParams_.Set("prettyPrint", "false")
  2300  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/urlInspection/index:inspect")
  2301  	urls += "?" + c.urlParams_.Encode()
  2302  	req, err := http.NewRequest("POST", urls, body)
  2303  	if err != nil {
  2304  		return nil, err
  2305  	}
  2306  	req.Header = reqHeaders
  2307  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2308  }
  2309  
  2310  // Do executes the "searchconsole.urlInspection.index.inspect" call.
  2311  // Any non-2xx status code is an error. Response headers are in either
  2312  // *InspectUrlIndexResponse.ServerResponse.Header or (if a response was
  2313  // returned at all) in error.(*googleapi.Error).Header. Use
  2314  // googleapi.IsNotModified to check whether the returned error was because
  2315  // http.StatusNotModified was returned.
  2316  func (c *UrlInspectionIndexInspectCall) Do(opts ...googleapi.CallOption) (*InspectUrlIndexResponse, error) {
  2317  	gensupport.SetOptions(c.urlParams_, opts...)
  2318  	res, err := c.doRequest("json")
  2319  	if res != nil && res.StatusCode == http.StatusNotModified {
  2320  		if res.Body != nil {
  2321  			res.Body.Close()
  2322  		}
  2323  		return nil, gensupport.WrapError(&googleapi.Error{
  2324  			Code:   res.StatusCode,
  2325  			Header: res.Header,
  2326  		})
  2327  	}
  2328  	if err != nil {
  2329  		return nil, err
  2330  	}
  2331  	defer googleapi.CloseBody(res)
  2332  	if err := googleapi.CheckResponse(res); err != nil {
  2333  		return nil, gensupport.WrapError(err)
  2334  	}
  2335  	ret := &InspectUrlIndexResponse{
  2336  		ServerResponse: googleapi.ServerResponse{
  2337  			Header:         res.Header,
  2338  			HTTPStatusCode: res.StatusCode,
  2339  		},
  2340  	}
  2341  	target := &ret
  2342  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2343  		return nil, err
  2344  	}
  2345  	return ret, nil
  2346  }
  2347  
  2348  type UrlTestingToolsMobileFriendlyTestRunCall struct {
  2349  	s                            *Service
  2350  	runmobilefriendlytestrequest *RunMobileFriendlyTestRequest
  2351  	urlParams_                   gensupport.URLParams
  2352  	ctx_                         context.Context
  2353  	header_                      http.Header
  2354  }
  2355  
  2356  // Run: Runs Mobile-Friendly Test for a given URL.
  2357  func (r *UrlTestingToolsMobileFriendlyTestService) Run(runmobilefriendlytestrequest *RunMobileFriendlyTestRequest) *UrlTestingToolsMobileFriendlyTestRunCall {
  2358  	c := &UrlTestingToolsMobileFriendlyTestRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2359  	c.runmobilefriendlytestrequest = runmobilefriendlytestrequest
  2360  	return c
  2361  }
  2362  
  2363  // Fields allows partial responses to be retrieved. See
  2364  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2365  // details.
  2366  func (c *UrlTestingToolsMobileFriendlyTestRunCall) Fields(s ...googleapi.Field) *UrlTestingToolsMobileFriendlyTestRunCall {
  2367  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2368  	return c
  2369  }
  2370  
  2371  // Context sets the context to be used in this call's Do method.
  2372  func (c *UrlTestingToolsMobileFriendlyTestRunCall) Context(ctx context.Context) *UrlTestingToolsMobileFriendlyTestRunCall {
  2373  	c.ctx_ = ctx
  2374  	return c
  2375  }
  2376  
  2377  // Header returns a http.Header that can be modified by the caller to add
  2378  // headers to the request.
  2379  func (c *UrlTestingToolsMobileFriendlyTestRunCall) Header() http.Header {
  2380  	if c.header_ == nil {
  2381  		c.header_ = make(http.Header)
  2382  	}
  2383  	return c.header_
  2384  }
  2385  
  2386  func (c *UrlTestingToolsMobileFriendlyTestRunCall) doRequest(alt string) (*http.Response, error) {
  2387  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2388  	var body io.Reader = nil
  2389  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runmobilefriendlytestrequest)
  2390  	if err != nil {
  2391  		return nil, err
  2392  	}
  2393  	c.urlParams_.Set("alt", alt)
  2394  	c.urlParams_.Set("prettyPrint", "false")
  2395  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/urlTestingTools/mobileFriendlyTest:run")
  2396  	urls += "?" + c.urlParams_.Encode()
  2397  	req, err := http.NewRequest("POST", urls, body)
  2398  	if err != nil {
  2399  		return nil, err
  2400  	}
  2401  	req.Header = reqHeaders
  2402  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2403  }
  2404  
  2405  // Do executes the "searchconsole.urlTestingTools.mobileFriendlyTest.run" call.
  2406  // Any non-2xx status code is an error. Response headers are in either
  2407  // *RunMobileFriendlyTestResponse.ServerResponse.Header or (if a response was
  2408  // returned at all) in error.(*googleapi.Error).Header. Use
  2409  // googleapi.IsNotModified to check whether the returned error was because
  2410  // http.StatusNotModified was returned.
  2411  func (c *UrlTestingToolsMobileFriendlyTestRunCall) Do(opts ...googleapi.CallOption) (*RunMobileFriendlyTestResponse, error) {
  2412  	gensupport.SetOptions(c.urlParams_, opts...)
  2413  	res, err := c.doRequest("json")
  2414  	if res != nil && res.StatusCode == http.StatusNotModified {
  2415  		if res.Body != nil {
  2416  			res.Body.Close()
  2417  		}
  2418  		return nil, gensupport.WrapError(&googleapi.Error{
  2419  			Code:   res.StatusCode,
  2420  			Header: res.Header,
  2421  		})
  2422  	}
  2423  	if err != nil {
  2424  		return nil, err
  2425  	}
  2426  	defer googleapi.CloseBody(res)
  2427  	if err := googleapi.CheckResponse(res); err != nil {
  2428  		return nil, gensupport.WrapError(err)
  2429  	}
  2430  	ret := &RunMobileFriendlyTestResponse{
  2431  		ServerResponse: googleapi.ServerResponse{
  2432  			Header:         res.Header,
  2433  			HTTPStatusCode: res.StatusCode,
  2434  		},
  2435  	}
  2436  	target := &ret
  2437  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2438  		return nil, err
  2439  	}
  2440  	return ret, nil
  2441  }
  2442  

View as plain text