Documentation
¶
Overview ¶
Package gmailpostmastertools provides access to the Gmail Postmaster Tools API.
For product documentation, see: https://developers.google.com/workspace/gmail/postmaster
Library status ¶
These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.
When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.
Creating a client ¶
Usage example:
import "google.golang.org/api/gmailpostmastertools/v2" ... ctx := context.Background() gmailpostmastertoolsService, err := gmailpostmastertools.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options ¶
By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use google.golang.org/api/option.WithScopes:
gmailpostmastertoolsService, err := gmailpostmastertools.NewService(ctx, option.WithScopes(gmailpostmastertools.PostmasterUserScope))
To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:
gmailpostmastertoolsService, err := gmailpostmastertools.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
gmailpostmastertoolsService, err := gmailpostmastertools.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See google.golang.org/api/option.ClientOption for details on options.
Index ¶
- Constants
- type BaseMetric
- type BatchQueryDomainStatsRequest
- type BatchQueryDomainStatsResponse
- type BatchQueryDomainStatsResult
- type ComplianceRowData
- type ComplianceStatus
- type CreateDomainRequest
- type CreateUserRequest
- type Date
- type DateList
- type DateRange
- type DateRanges
- type DeliverabilityStatusVerdict
- type Domain
- type DomainComplianceData
- type DomainComplianceStatus
- type DomainStat
- type DomainStatsBatchQueryCall
- func (c *DomainStatsBatchQueryCall) Context(ctx context.Context) *DomainStatsBatchQueryCall
- func (c *DomainStatsBatchQueryCall) Do(opts ...googleapi.CallOption) (*BatchQueryDomainStatsResponse, error)
- func (c *DomainStatsBatchQueryCall) Fields(s ...googleapi.Field) *DomainStatsBatchQueryCall
- func (c *DomainStatsBatchQueryCall) Header() http.Header
- type DomainStatsService
- type DomainVerificationToken
- type DomainsCreateCall
- type DomainsDeleteCall
- type DomainsDomainStatsQueryCall
- func (c *DomainsDomainStatsQueryCall) Context(ctx context.Context) *DomainsDomainStatsQueryCall
- func (c *DomainsDomainStatsQueryCall) Do(opts ...googleapi.CallOption) (*QueryDomainStatsResponse, error)
- func (c *DomainsDomainStatsQueryCall) Fields(s ...googleapi.Field) *DomainsDomainStatsQueryCall
- func (c *DomainsDomainStatsQueryCall) Header() http.Header
- func (c *DomainsDomainStatsQueryCall) Pages(ctx context.Context, f func(*QueryDomainStatsResponse) error) error
- type DomainsDomainStatsService
- type DomainsGetCall
- func (c *DomainsGetCall) Context(ctx context.Context) *DomainsGetCall
- func (c *DomainsGetCall) Do(opts ...googleapi.CallOption) (*Domain, error)
- func (c *DomainsGetCall) Fields(s ...googleapi.Field) *DomainsGetCall
- func (c *DomainsGetCall) Header() http.Header
- func (c *DomainsGetCall) IfNoneMatch(entityTag string) *DomainsGetCall
- type DomainsGetComplianceStatusCall
- func (c *DomainsGetComplianceStatusCall) Context(ctx context.Context) *DomainsGetComplianceStatusCall
- func (c *DomainsGetComplianceStatusCall) Do(opts ...googleapi.CallOption) (*DomainComplianceStatus, error)
- func (c *DomainsGetComplianceStatusCall) Fields(s ...googleapi.Field) *DomainsGetComplianceStatusCall
- func (c *DomainsGetComplianceStatusCall) Header() http.Header
- func (c *DomainsGetComplianceStatusCall) IfNoneMatch(entityTag string) *DomainsGetComplianceStatusCall
- type DomainsGetVerificationTokenCall
- func (c *DomainsGetVerificationTokenCall) Context(ctx context.Context) *DomainsGetVerificationTokenCall
- func (c *DomainsGetVerificationTokenCall) Do(opts ...googleapi.CallOption) (*DomainVerificationToken, error)
- func (c *DomainsGetVerificationTokenCall) Fields(s ...googleapi.Field) *DomainsGetVerificationTokenCall
- func (c *DomainsGetVerificationTokenCall) Header() http.Header
- func (c *DomainsGetVerificationTokenCall) IfNoneMatch(entityTag string) *DomainsGetVerificationTokenCall
- func (c *DomainsGetVerificationTokenCall) VerificationMethod(verificationMethod string) *DomainsGetVerificationTokenCall
- type DomainsListCall
- func (c *DomainsListCall) Context(ctx context.Context) *DomainsListCall
- func (c *DomainsListCall) Do(opts ...googleapi.CallOption) (*ListDomainsResponse, error)
- func (c *DomainsListCall) Fields(s ...googleapi.Field) *DomainsListCall
- func (c *DomainsListCall) Header() http.Header
- func (c *DomainsListCall) IfNoneMatch(entityTag string) *DomainsListCall
- func (c *DomainsListCall) PageSize(pageSize int64) *DomainsListCall
- func (c *DomainsListCall) PageToken(pageToken string) *DomainsListCall
- func (c *DomainsListCall) Pages(ctx context.Context, f func(*ListDomainsResponse) error) error
- type DomainsService
- func (r *DomainsService) Create(createdomainrequest *CreateDomainRequest) *DomainsCreateCall
- func (r *DomainsService) Delete(name string) *DomainsDeleteCall
- func (r *DomainsService) Get(name string) *DomainsGetCall
- func (r *DomainsService) GetComplianceStatus(name string) *DomainsGetComplianceStatusCall
- func (r *DomainsService) GetVerificationToken(name string) *DomainsGetVerificationTokenCall
- func (r *DomainsService) List() *DomainsListCall
- func (r *DomainsService) Verify(name string, verifydomainrequest *VerifyDomainRequest) *DomainsVerifyCall
- type DomainsUsersCreateCall
- func (c *DomainsUsersCreateCall) Context(ctx context.Context) *DomainsUsersCreateCall
- func (c *DomainsUsersCreateCall) Do(opts ...googleapi.CallOption) (*User, error)
- func (c *DomainsUsersCreateCall) Fields(s ...googleapi.Field) *DomainsUsersCreateCall
- func (c *DomainsUsersCreateCall) Header() http.Header
- type DomainsUsersDeleteCall
- func (c *DomainsUsersDeleteCall) Context(ctx context.Context) *DomainsUsersDeleteCall
- func (c *DomainsUsersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *DomainsUsersDeleteCall) Fields(s ...googleapi.Field) *DomainsUsersDeleteCall
- func (c *DomainsUsersDeleteCall) Header() http.Header
- type DomainsUsersGetCall
- func (c *DomainsUsersGetCall) Context(ctx context.Context) *DomainsUsersGetCall
- func (c *DomainsUsersGetCall) Do(opts ...googleapi.CallOption) (*User, error)
- func (c *DomainsUsersGetCall) Fields(s ...googleapi.Field) *DomainsUsersGetCall
- func (c *DomainsUsersGetCall) Header() http.Header
- func (c *DomainsUsersGetCall) IfNoneMatch(entityTag string) *DomainsUsersGetCall
- type DomainsUsersListCall
- func (c *DomainsUsersListCall) Context(ctx context.Context) *DomainsUsersListCall
- func (c *DomainsUsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, error)
- func (c *DomainsUsersListCall) Fields(s ...googleapi.Field) *DomainsUsersListCall
- func (c *DomainsUsersListCall) Header() http.Header
- func (c *DomainsUsersListCall) IfNoneMatch(entityTag string) *DomainsUsersListCall
- func (c *DomainsUsersListCall) PageSize(pageSize int64) *DomainsUsersListCall
- func (c *DomainsUsersListCall) PageToken(pageToken string) *DomainsUsersListCall
- func (c *DomainsUsersListCall) Pages(ctx context.Context, f func(*ListUsersResponse) error) error
- type DomainsUsersPatchCall
- func (c *DomainsUsersPatchCall) Context(ctx context.Context) *DomainsUsersPatchCall
- func (c *DomainsUsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error)
- func (c *DomainsUsersPatchCall) Fields(s ...googleapi.Field) *DomainsUsersPatchCall
- func (c *DomainsUsersPatchCall) Header() http.Header
- func (c *DomainsUsersPatchCall) UpdateMask(updateMask string) *DomainsUsersPatchCall
- type DomainsUsersService
- func (r *DomainsUsersService) Create(parent string, createuserrequest *CreateUserRequest) *DomainsUsersCreateCall
- func (r *DomainsUsersService) Delete(name string) *DomainsUsersDeleteCall
- func (r *DomainsUsersService) Get(name string) *DomainsUsersGetCall
- func (r *DomainsUsersService) List(parent string) *DomainsUsersListCall
- func (r *DomainsUsersService) Patch(name string, user *User) *DomainsUsersPatchCall
- type DomainsVerifyCall
- type Empty
- type HonorUnsubscribeVerdict
- type ListDomainsResponse
- type ListUsersResponse
- type MetricDefinition
- type OneClickUnsubscribeVerdict
- type QueryDomainStatsRequest
- type QueryDomainStatsResponse
- type Service
- type StatisticValue
- type Status
- type StringList
- type TimeQuery
- type User
- type VerifyDomainRequest
- type VerifyDomainResponse
Constants ¶
const ( // Get email traffic metrics, manage domains, and manage domain users for the // domains you have registered with Postmaster Tools PostmasterScope = "https://www.googleapis.com/auth/postmaster" // View and manage the domains you have registered with Postmaster Tools PostmasterDomainScope = "https://www.googleapis.com/auth/postmaster.domain" // Get email traffic metrics for the domains you have registered with // Postmaster Tools PostmasterTrafficReadonlyScope = "https://www.googleapis.com/auth/postmaster.traffic.readonly" // View and manage users for the domains you have registered with Postmaster // Tools PostmasterUserScope = "https://www.googleapis.com/auth/postmaster.user" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMetric ¶
type BaseMetric struct {
// StandardMetric: A predefined standard metric.
//
// Possible values:
// "STANDARD_METRIC_UNSPECIFIED" - Unspecified standard metric. This value
// should not be used directly.
// "FEEDBACK_LOOP_ID" - Predefined metric for Feedback Loop (FBL) id. The
// `filter` field supports selecting the aggregation key type. Supported
// format: `aggregation_key_type` = "". Supported values: * `FROM_HEADER`:
// (Default) The metric includes messages with From: header domain matching the
// requested domain. * `ALL_DKIM`: The metric includes messages with one of the
// signed DKIM domains matching the requested domain.
// "FEEDBACK_LOOP_SPAM_RATE" - Predefined metric for Feedback Loop (FBL) spam
// rate. The `filter` field requires a `feedback_loop_id` and optionally
// accepts an `aggregation_key_type`. Supported formats are: *
// `feedback_loop_id` = "" * `feedback_loop_id` = "" AND `aggregation_key_type`
// = "" If `aggregation_key_type` is omitted, it defaults to `FROM_HEADER`.
// Supported values: * `FROM_HEADER`: (Default) The metric includes messages
// with From: header domain matching the requested domain. * `ALL_DKIM`: The
// metric includes messages with one of the signed DKIM domains matching the
// requested domain.
// "SPAM_RATE" - Predefined metric for spam rate.
// "AUTH_SUCCESS_RATE" - The success rate of authentication mechanisms (DKIM,
// SPF, DMARC). Filter must be of type auth_type = "" where is one of: [spf,
// dkim, dmarc]
// "TLS_ENCRYPTION_MESSAGE_COUNT" - The rate of messages that were TLS
// encrypted in transit Filter must be of type traffic_direction = "" where is
// one of: [inbound, outbound]
// "TLS_ENCRYPTION_RATE" - The rate of messages that were TLS encrypted in
// transit Filter must be of type traffic_direction = "" where is one of:
// [inbound, outbound]
// "DELIVERY_ERROR_COUNT" - The total count of delivery errors encountered
// (temporary or permanent rejects). The `filter` field supports a limited
// syntax. Supported formats are: * Empty: No filter is applied. * `error_type`
// = "" * `error_type` = "" AND `error_reason` = "" If an empty filter is
// provided, the metric will be aggregated across all error types and reasons.
// If only `error_type` is specified, the metric will be aggregated across all
// reasons for that type. Supported values: * reject * temp_fail Supported
// values depend on the : * For 'reject': [bad_attachment,
// bad_or_missing_ptr_record, ip_in_rbls, low_domain_reputation,
// low_ip_reputation, spammy_content, stamp_policy_error, other] * For
// 'temp_fail': [anomalous_traffic_pattern, other]
// "DELIVERY_ERROR_RATE" - Delivery error rate for the specified delivery
// error type. The `filter` field supports a limited syntax. Supported formats
// are: * Empty: No filter is applied. * `error_type` = "" * `error_type` = ""
// AND `error_reason` = "" If an empty filter is provided, the metric will be
// aggregated across all error types and reasons. If only `error_type` is
// specified, the metric will be aggregated across all reasons for that type.
// Supported values: * reject * temp_fail Supported values depend on the : *
// For 'reject': [bad_attachment, bad_or_missing_ptr_record, ip_in_rbls,
// low_domain_reputation, low_ip_reputation, spammy_content,
// stamp_policy_error, other] * For 'temp_fail': [anomalous_traffic_pattern,
// other]
StandardMetric string `json:"standardMetric,omitempty"`
// ForceSendFields is a list of field names (e.g. "StandardMetric") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "StandardMetric") to include in
// API requests with the JSON null value. By default, fields with empty values
// are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
BaseMetric: Specifies the base metric to query, which can be a predefined standard metric or a user-defined custom metric (if supported in the future).
func (BaseMetric) MarshalJSON ¶
func (s BaseMetric) MarshalJSON() ([]byte, error)
type BatchQueryDomainStatsRequest ¶
type BatchQueryDomainStatsRequest struct {
// Requests: Required. A list of individual query requests. Each request can be
// for a different domain. A maximum of 100 requests can be included in a
// single batch.
Requests []*QueryDomainStatsRequest `json:"requests,omitempty"`
// ForceSendFields is a list of field names (e.g. "Requests") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Requests") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
BatchQueryDomainStatsRequest: Request message for BatchQueryDomainStats.
func (BatchQueryDomainStatsRequest) MarshalJSON ¶
func (s BatchQueryDomainStatsRequest) MarshalJSON() ([]byte, error)
type BatchQueryDomainStatsResponse ¶
type BatchQueryDomainStatsResponse struct {
// Results: A list of responses, one for each query in the
// BatchQueryDomainStatsRequest. The order of responses will correspond to the
// order of requests.
Results []*BatchQueryDomainStatsResult `json:"results,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Results") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Results") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
BatchQueryDomainStatsResponse: Response message for BatchQueryDomainStats.
func (BatchQueryDomainStatsResponse) MarshalJSON ¶
func (s BatchQueryDomainStatsResponse) MarshalJSON() ([]byte, error)
type BatchQueryDomainStatsResult ¶
type BatchQueryDomainStatsResult struct {
// Error: The error status if the individual query failed.
Error *Status `json:"error,omitempty"`
// Response: The successful response for the individual query.
Response *QueryDomainStatsResponse `json:"response,omitempty"`
// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Error") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
BatchQueryDomainStatsResult: Represents the result of a single QueryDomainStatsRequest within a batch.
func (BatchQueryDomainStatsResult) MarshalJSON ¶
func (s BatchQueryDomainStatsResult) MarshalJSON() ([]byte, error)
type ComplianceRowData ¶
type ComplianceRowData struct {
// Requirement: The compliance requirement.
//
// Possible values:
// "COMPLIANCE_REQUIREMENT_UNSPECIFIED" - Unspecified.
// "SPF" - Whether the sender has properly configured SPF.
// "DKIM" - Whether the sender has properly configured DKIM.
// "SPF_AND_DKIM" - Whether the sender has properly configured both SPF and
// DKIM.
// "DMARC_POLICY" - Whether the sender has configured DMARC policy.
// "DMARC_ALIGNMENT" - Whether the From: header is aligned with DKIM or SPF
// "MESSAGE_FORMATTING" - Whether messages are correctly formatted according
// to RFC 5322.
// "DNS_RECORDS" - Whether the domain has forward and reverse DNS records.
// "ENCRYPTION" - Whether messages has TLS encryption.
// "USER_REPORTED_SPAM_RATE" - Whether the sender is below a threshold for
// user-reported spam rate.
// "ONE_CLICK_UNSUBSCRIBE" - Whether the sender sufficiently supports
// one-click unsubscribe. Note that the user-facing requirement is "one-click
// unsubscribe", but we require satisfaction of multiple "unsubscribe support"
// rules.
// "HONOR_UNSUBSCRIBE" - Whether the sender honors user-initiated unsubscribe
// requests.
Requirement string `json:"requirement,omitempty"`
// Status: The compliance status for the requirement.
Status *ComplianceStatus `json:"status,omitempty"`
// ForceSendFields is a list of field names (e.g. "Requirement") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Requirement") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
ComplianceRowData: Data for a single row of the compliance status table.
func (ComplianceRowData) MarshalJSON ¶
func (s ComplianceRowData) MarshalJSON() ([]byte, error)
type ComplianceStatus ¶
type ComplianceStatus struct {
// Status: Output only. The compliance status.
//
// Possible values:
// "STATE_UNSPECIFIED" - Unspecified.
// "COMPLIANT" - The compliance requirement is met, and the sender is deemed
// compliant.
// "NEEDS_WORK" - The compliance requirement is unmet, and the sender needs
// to do work to achieve compliance.
Status string `json:"status,omitempty"`
// ForceSendFields is a list of field names (e.g. "Status") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Status") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
ComplianceStatus: The status of a sender compliance requirement.
func (ComplianceStatus) MarshalJSON ¶
func (s ComplianceStatus) MarshalJSON() ([]byte, error)
type CreateDomainRequest ¶ added in v0.287.0
type CreateDomainRequest struct {
// DomainId: Required. The domain to add. e.g., "example.com"
DomainId string `json:"domainId,omitempty"`
// ForceSendFields is a list of field names (e.g. "DomainId") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DomainId") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
CreateDomainRequest: Developer Preview (https://developers.google.com/workspace/preview): Request message for CreateDomain.
func (CreateDomainRequest) MarshalJSON ¶ added in v0.287.0
func (s CreateDomainRequest) MarshalJSON() ([]byte, error)
type CreateUserRequest ¶ added in v0.287.0
type CreateUserRequest struct {
// Permission: Optional. Specifies the permission level to give the user for
// the specified domain. If not specified, the default value for this field is
// READER.
//
// Possible values:
// "PERMISSION_UNSPECIFIED" - Unspecified permission.
// "READER" - User has read access to the domain.
// "ADMIN" - User has admin access to the domain.
// "OWNER" - User has owner access to the domain.
// "NONE" - User has no access to the domain.
Permission string `json:"permission,omitempty"`
// UserId: Required. The user to create.
UserId string `json:"userId,omitempty"`
// ForceSendFields is a list of field names (e.g. "Permission") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Permission") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
CreateUserRequest: Developer Preview (https://developers.google.com/workspace/preview): Request message for CreateUser.
func (CreateUserRequest) MarshalJSON ¶ added in v0.287.0
func (s CreateUserRequest) MarshalJSON() ([]byte, error)
type Date ¶
type Date struct {
// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
// or 0 to specify a year by itself or a year and month where the day isn't
// significant.
Day int64 `json:"day,omitempty"`
// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
// a month and day.
Month int64 `json:"month,omitempty"`
// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
// without a year.
Year int64 `json:"year,omitempty"`
// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Day") to include in API requests
// with the JSON null value. By default, fields with empty values are omitted
// from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
Date: Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
func (Date) MarshalJSON ¶
type DateList ¶
type DateList struct {
// Dates: Required. The list of specific dates for which to retrieve data.
Dates []*Date `json:"dates,omitempty"`
// ForceSendFields is a list of field names (e.g. "Dates") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Dates") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
DateList: A set of specific dates.
func (DateList) MarshalJSON ¶
type DateRange ¶
type DateRange struct {
// End: Required. The inclusive end date of the date range.
End *Date `json:"end,omitempty"`
// Start: Required. The inclusive start date of the date range.
Start *Date `json:"start,omitempty"`
// ForceSendFields is a list of field names (e.g. "End") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "End") to include in API requests
// with the JSON null value. By default, fields with empty values are omitted
// from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
DateRange: A single date range defined by a start and end date.
func (DateRange) MarshalJSON ¶
type DateRanges ¶
type DateRanges struct {
// DateRanges: Required. The list of date ranges for which to retrieve data.
DateRanges []*DateRange `json:"dateRanges,omitempty"`
// ForceSendFields is a list of field names (e.g. "DateRanges") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DateRanges") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
DateRanges: A set of date ranges.
func (DateRanges) MarshalJSON ¶
func (s DateRanges) MarshalJSON() ([]byte, error)
type DeliverabilityStatusVerdict ¶ added in v0.287.0
type DeliverabilityStatusVerdict struct {
// Reason: Output only. The specific reason for the compliance verdict.
//
// Possible values:
// "REASON_UNSPECIFIED" - Unspecified.
// "MESSAGE_VOLUME_LOW" - Not enough outgoing email.
// "SMTP_ERRORS_HIGH" - Many messages with delivery errors.
// "SENDER_NOT_COMPLIANT" - The sender does not meet the sender requirements.
// "SPAM_RATE_HIGH" - The spam rate is above 0.1%.
// "USER_FEEDBACK_NEGATIVE" - Indicates users do not want to receive email
// messages.
// "USER_FEEDBACK_LOW" - Users do not take action on messages.
// "USER_FEEDBACK_POSITIVE" - Users signal they want to receive email
// messages.
Reason string `json:"reason,omitempty"`
// State: Output only. The compliance state.
State *ComplianceStatus `json:"state,omitempty"`
// ForceSendFields is a list of field names (e.g. "Reason") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Reason") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
DeliverabilityStatusVerdict: Developer Preview (https://developers.google.com/workspace/preview): Verdict of domain deliverability status.
func (DeliverabilityStatusVerdict) MarshalJSON ¶ added in v0.287.0
func (s DeliverabilityStatusVerdict) MarshalJSON() ([]byte, error)
type Domain ¶
type Domain struct {
// CreateTime: Output only. Immutable. The timestamp at which the domain was
// added to the user's account.
CreateTime string `json:"createTime,omitempty"`
// LastVerifyTime: The timestamp at which the domain was last verified by the
// user.
LastVerifyTime string `json:"lastVerifyTime,omitempty"`
// Name: Identifier. The resource name of the domain. Format:
// `domains/{domain_name}`, where domain_name is the fully qualified domain
// name (i.e., mymail.mydomain.com).
Name string `json:"name,omitempty"`
// Permission: Output only. User's permission of this domain.
//
// Possible values:
// "PERMISSION_UNSPECIFIED" - Unspecified permission.
// "READER" - User has read access to the domain.
// "ADMIN" - User has admin access to the domain.
// "OWNER" - User has owner access to the domain.
// "NONE" - User has no access to the domain.
Permission string `json:"permission,omitempty"`
// VerificationState: Output only. Information about a user's verification
// history and properties for the domain.
//
// Possible values:
// "VERIFICATION_STATE_UNSPECIFIED" - Unspecified.
// "UNVERIFIED" - The domain is unverified.
// "VERIFIED" - The domain is verified.
VerificationState string `json:"verificationState,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
Domain: Information about a domain registered by the user.
func (Domain) MarshalJSON ¶
type DomainComplianceData ¶
type DomainComplianceData struct {
// DeliverabilityStatusVerdict: Output only. Deliverability status verdict.
DeliverabilityStatusVerdict *DeliverabilityStatusVerdict `json:"deliverabilityStatusVerdict,omitempty"`
// DomainId: Domain that this data is for.
DomainId string `json:"domainId,omitempty"`
// HonorUnsubscribeVerdict: Unsubscribe honoring compliance verdict.
HonorUnsubscribeVerdict *HonorUnsubscribeVerdict `json:"honorUnsubscribeVerdict,omitempty"`
// OneClickUnsubscribeVerdict: One-click unsubscribe compliance verdict.
OneClickUnsubscribeVerdict *OneClickUnsubscribeVerdict `json:"oneClickUnsubscribeVerdict,omitempty"`
// RowData: Data for each of the rows of the table. Each message contains all
// the data that backs a single row.
RowData []*ComplianceRowData `json:"rowData,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "DeliverabilityStatusVerdict") to unconditionally include in API requests.
// By default, fields with empty or default values are omitted from API
// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
// for more details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DeliverabilityStatusVerdict") to
// include in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
DomainComplianceData: Compliance data for a given domain.
func (DomainComplianceData) MarshalJSON ¶
func (s DomainComplianceData) MarshalJSON() ([]byte, error)
type DomainComplianceStatus ¶
type DomainComplianceStatus struct {
// ComplianceData: Compliance data for the registrable domain part of the
// domain in `name`. For example, if `name` is
// `domains/example.com/complianceStatus`, this field contains compliance data
// for `example.com`.
ComplianceData *DomainComplianceData `json:"complianceData,omitempty"`
// Name: Identifier. The resource name of the domain's compliance status.
// Format: `domains/{domain_id}/complianceStatus`.
Name string `json:"name,omitempty"`
// SubdomainComplianceData: Compliance data calculated specifically for the
// subdomain in `name`. This field is only populated if the domain in `name` is
// a subdomain that differs from its registrable domain (e.g.,
// `sub.example.com`), and if compliance data is available for that specific
// subdomain.
SubdomainComplianceData *DomainComplianceData `json:"subdomainComplianceData,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ComplianceData") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ComplianceData") to include in
// API requests with the JSON null value. By default, fields with empty values
// are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
DomainComplianceStatus: Compliance status for a domain.
func (DomainComplianceStatus) MarshalJSON ¶
func (s DomainComplianceStatus) MarshalJSON() ([]byte, error)
type DomainStat ¶
type DomainStat struct {
// Date: Optional. The specific date for these stats, if granularity is DAILY.
// This field is populated if the QueryDomainStatsRequest specified a DAILY
// aggregation granularity.
Date *Date `json:"date,omitempty"`
// Metric: The user-defined name from MetricDefinition.name in the request,
// used to correlate this result with the requested metric.
Metric string `json:"metric,omitempty"`
// Name: Output only. The resource name of the DomainStat resource. Format:
// domains/{domain}/domainStats/{domain_stat} The `{domain_stat}` segment is an
// opaque, server-generated ID. We recommend using the `metric` field to
// identify queried metrics instead of parsing the name.
Name string `json:"name,omitempty"`
// Value: The value of the corresponding metric.
Value *StatisticValue `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "Date") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Date") to include in API requests
// with the JSON null value. By default, fields with empty values are omitted
// from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
DomainStat: Email statistics for a domain for a specified time period or date.
func (DomainStat) MarshalJSON ¶
func (s DomainStat) MarshalJSON() ([]byte, error)
type DomainStatsBatchQueryCall ¶
type DomainStatsBatchQueryCall struct {
// contains filtered or unexported fields
}
func (*DomainStatsBatchQueryCall) Context ¶
func (c *DomainStatsBatchQueryCall) Context(ctx context.Context) *DomainStatsBatchQueryCall
Context sets the context to be used in this call's Do method.
func (*DomainStatsBatchQueryCall) Do ¶
func (c *DomainStatsBatchQueryCall) Do(opts ...googleapi.CallOption) (*BatchQueryDomainStatsResponse, error)
Do executes the "gmailpostmastertools.domainStats.batchQuery" call. Any non-2xx status code is an error. Response headers are in either *BatchQueryDomainStatsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainStatsBatchQueryCall) Fields ¶
func (c *DomainStatsBatchQueryCall) Fields(s ...googleapi.Field) *DomainStatsBatchQueryCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainStatsBatchQueryCall) Header ¶
func (c *DomainStatsBatchQueryCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type DomainStatsService ¶
type DomainStatsService struct {
// contains filtered or unexported fields
}
func NewDomainStatsService ¶
func NewDomainStatsService(s *Service) *DomainStatsService
func (*DomainStatsService) BatchQuery ¶
func (r *DomainStatsService) BatchQuery(batchquerydomainstatsrequest *BatchQueryDomainStatsRequest) *DomainStatsBatchQueryCall
BatchQuery: Executes a batch of QueryDomainStats requests for multiple domains. Returns PERMISSION_DENIED if you don't have permission to access DomainStats for any of the requested domains.
type DomainVerificationToken ¶ added in v0.287.0
type DomainVerificationToken struct {
// Name: Identifier. The resource name of the domain verification token.
// Format: domains/{domain}/verificationToken
Name string `json:"name,omitempty"`
// Token: The verification token.
Token string `json:"token,omitempty"`
// VerificationMethod: The verification method used.
//
// Possible values:
// "DOMAIN_VERIFICATION_METHOD_UNSPECIFIED" - Unspecified.
// "TXT" - Generate a DNS TXT verification token.
// "CNAME" - Generate a DNS CNAME verification token.
VerificationMethod string `json:"verificationMethod,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API requests
// with the JSON null value. By default, fields with empty values are omitted
// from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
DomainVerificationToken: Developer Preview (https://developers.google.com/workspace/preview): The DNS token a user can use to verify ownership of a domain.
func (DomainVerificationToken) MarshalJSON ¶ added in v0.287.0
func (s DomainVerificationToken) MarshalJSON() ([]byte, error)
type DomainsCreateCall ¶ added in v0.287.0
type DomainsCreateCall struct {
// contains filtered or unexported fields
}
func (*DomainsCreateCall) Context ¶ added in v0.287.0
func (c *DomainsCreateCall) Context(ctx context.Context) *DomainsCreateCall
Context sets the context to be used in this call's Do method.
func (*DomainsCreateCall) Do ¶ added in v0.287.0
func (c *DomainsCreateCall) Do(opts ...googleapi.CallOption) (*Domain, error)
Do executes the "gmailpostmastertools.domains.create" call. Any non-2xx status code is an error. Response headers are in either *Domain.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsCreateCall) Fields ¶ added in v0.287.0
func (c *DomainsCreateCall) Fields(s ...googleapi.Field) *DomainsCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsCreateCall) Header ¶ added in v0.287.0
func (c *DomainsCreateCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type DomainsDeleteCall ¶ added in v0.287.0
type DomainsDeleteCall struct {
// contains filtered or unexported fields
}
func (*DomainsDeleteCall) Context ¶ added in v0.287.0
func (c *DomainsDeleteCall) Context(ctx context.Context) *DomainsDeleteCall
Context sets the context to be used in this call's Do method.
func (*DomainsDeleteCall) Do ¶ added in v0.287.0
func (c *DomainsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "gmailpostmastertools.domains.delete" call. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsDeleteCall) Fields ¶ added in v0.287.0
func (c *DomainsDeleteCall) Fields(s ...googleapi.Field) *DomainsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsDeleteCall) Header ¶ added in v0.287.0
func (c *DomainsDeleteCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type DomainsDomainStatsQueryCall ¶
type DomainsDomainStatsQueryCall struct {
// contains filtered or unexported fields
}
func (*DomainsDomainStatsQueryCall) Context ¶
func (c *DomainsDomainStatsQueryCall) Context(ctx context.Context) *DomainsDomainStatsQueryCall
Context sets the context to be used in this call's Do method.
func (*DomainsDomainStatsQueryCall) Do ¶
func (c *DomainsDomainStatsQueryCall) Do(opts ...googleapi.CallOption) (*QueryDomainStatsResponse, error)
Do executes the "gmailpostmastertools.domains.domainStats.query" call. Any non-2xx status code is an error. Response headers are in either *QueryDomainStatsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsDomainStatsQueryCall) Fields ¶
func (c *DomainsDomainStatsQueryCall) Fields(s ...googleapi.Field) *DomainsDomainStatsQueryCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsDomainStatsQueryCall) Header ¶
func (c *DomainsDomainStatsQueryCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*DomainsDomainStatsQueryCall) Pages ¶
func (c *DomainsDomainStatsQueryCall) Pages(ctx context.Context, f func(*QueryDomainStatsResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
type DomainsDomainStatsService ¶
type DomainsDomainStatsService struct {
// contains filtered or unexported fields
}
func NewDomainsDomainStatsService ¶
func NewDomainsDomainStatsService(s *Service) *DomainsDomainStatsService
func (*DomainsDomainStatsService) Query ¶
func (r *DomainsDomainStatsService) Query(parent string, querydomainstatsrequest *QueryDomainStatsRequest) *DomainsDomainStatsQueryCall
Query: Retrieves a list of domain statistics for a given domain and time period. Returns statistics only for dates where data is available. Returns PERMISSION_DENIED if you don't have permission to access DomainStats for the domain.
- parent: The parent resource name where the stats are queried. Format: domains/{domain}.
type DomainsGetCall ¶
type DomainsGetCall struct {
// contains filtered or unexported fields
}
func (*DomainsGetCall) Context ¶
func (c *DomainsGetCall) Context(ctx context.Context) *DomainsGetCall
Context sets the context to be used in this call's Do method.
func (*DomainsGetCall) Do ¶
func (c *DomainsGetCall) Do(opts ...googleapi.CallOption) (*Domain, error)
Do executes the "gmailpostmastertools.domains.get" call. Any non-2xx status code is an error. Response headers are in either *Domain.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsGetCall) Fields ¶
func (c *DomainsGetCall) Fields(s ...googleapi.Field) *DomainsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsGetCall) Header ¶
func (c *DomainsGetCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*DomainsGetCall) IfNoneMatch ¶
func (c *DomainsGetCall) IfNoneMatch(entityTag string) *DomainsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
type DomainsGetComplianceStatusCall ¶
type DomainsGetComplianceStatusCall struct {
// contains filtered or unexported fields
}
func (*DomainsGetComplianceStatusCall) Context ¶
func (c *DomainsGetComplianceStatusCall) Context(ctx context.Context) *DomainsGetComplianceStatusCall
Context sets the context to be used in this call's Do method.
func (*DomainsGetComplianceStatusCall) Do ¶
func (c *DomainsGetComplianceStatusCall) Do(opts ...googleapi.CallOption) (*DomainComplianceStatus, error)
Do executes the "gmailpostmastertools.domains.getComplianceStatus" call. Any non-2xx status code is an error. Response headers are in either *DomainComplianceStatus.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsGetComplianceStatusCall) Fields ¶
func (c *DomainsGetComplianceStatusCall) Fields(s ...googleapi.Field) *DomainsGetComplianceStatusCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsGetComplianceStatusCall) Header ¶
func (c *DomainsGetComplianceStatusCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*DomainsGetComplianceStatusCall) IfNoneMatch ¶
func (c *DomainsGetComplianceStatusCall) IfNoneMatch(entityTag string) *DomainsGetComplianceStatusCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
type DomainsGetVerificationTokenCall ¶ added in v0.287.0
type DomainsGetVerificationTokenCall struct {
// contains filtered or unexported fields
}
func (*DomainsGetVerificationTokenCall) Context ¶ added in v0.287.0
func (c *DomainsGetVerificationTokenCall) Context(ctx context.Context) *DomainsGetVerificationTokenCall
Context sets the context to be used in this call's Do method.
func (*DomainsGetVerificationTokenCall) Do ¶ added in v0.287.0
func (c *DomainsGetVerificationTokenCall) Do(opts ...googleapi.CallOption) (*DomainVerificationToken, error)
Do executes the "gmailpostmastertools.domains.getVerificationToken" call. Any non-2xx status code is an error. Response headers are in either *DomainVerificationToken.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsGetVerificationTokenCall) Fields ¶ added in v0.287.0
func (c *DomainsGetVerificationTokenCall) Fields(s ...googleapi.Field) *DomainsGetVerificationTokenCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsGetVerificationTokenCall) Header ¶ added in v0.287.0
func (c *DomainsGetVerificationTokenCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*DomainsGetVerificationTokenCall) IfNoneMatch ¶ added in v0.287.0
func (c *DomainsGetVerificationTokenCall) IfNoneMatch(entityTag string) *DomainsGetVerificationTokenCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
func (*DomainsGetVerificationTokenCall) VerificationMethod ¶ added in v0.287.0
func (c *DomainsGetVerificationTokenCall) VerificationMethod(verificationMethod string) *DomainsGetVerificationTokenCall
VerificationMethod sets the optional parameter "verificationMethod": Required. The verification method used. Must be specified, i.e. TXT or CNAME.
Possible values:
"DOMAIN_VERIFICATION_METHOD_UNSPECIFIED" - Unspecified. "TXT" - Generate a DNS TXT verification token. "CNAME" - Generate a DNS CNAME verification token.
type DomainsListCall ¶
type DomainsListCall struct {
// contains filtered or unexported fields
}
func (*DomainsListCall) Context ¶
func (c *DomainsListCall) Context(ctx context.Context) *DomainsListCall
Context sets the context to be used in this call's Do method.
func (*DomainsListCall) Do ¶
func (c *DomainsListCall) Do(opts ...googleapi.CallOption) (*ListDomainsResponse, error)
Do executes the "gmailpostmastertools.domains.list" call. Any non-2xx status code is an error. Response headers are in either *ListDomainsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsListCall) Fields ¶
func (c *DomainsListCall) Fields(s ...googleapi.Field) *DomainsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsListCall) Header ¶
func (c *DomainsListCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*DomainsListCall) IfNoneMatch ¶
func (c *DomainsListCall) IfNoneMatch(entityTag string) *DomainsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
func (*DomainsListCall) PageSize ¶
func (c *DomainsListCall) PageSize(pageSize int64) *DomainsListCall
PageSize sets the optional parameter "pageSize": Requested page size. Server may return fewer domains than requested. If unspecified, the default value for this field is 10. The maximum value for this field is 200.
func (*DomainsListCall) PageToken ¶
func (c *DomainsListCall) PageToken(pageToken string) *DomainsListCall
PageToken sets the optional parameter "pageToken": The next_page_token value returned from a previous List request, if any.
func (*DomainsListCall) Pages ¶
func (c *DomainsListCall) Pages(ctx context.Context, f func(*ListDomainsResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
type DomainsService ¶
type DomainsService struct {
DomainStats *DomainsDomainStatsService
Users *DomainsUsersService
// contains filtered or unexported fields
}
func NewDomainsService ¶
func NewDomainsService(s *Service) *DomainsService
func (*DomainsService) Create ¶ added in v0.287.0
func (r *DomainsService) Create(createdomainrequest *CreateDomainRequest) *DomainsCreateCall
Create: Developer Preview (https://developers.google.com/workspace/preview): Adds a domain to the user's account. Returns INVALID_ARGUMENT if a domain is not provided. Returns ALREADY_EXISTS if the domain is already registered by the user.
func (*DomainsService) Delete ¶ added in v0.287.0
func (r *DomainsService) Delete(name string) *DomainsDeleteCall
Delete: Developer Preview (https://developers.google.com/workspace/preview): Deletes a domain from the user's account. Returns NOT_FOUND if the domain is not registered by the user.
- name: The domain to delete.
func (*DomainsService) Get ¶
func (r *DomainsService) Get(name string) *DomainsGetCall
Get: Retrieves detailed information about a domain registered by you. Returns NOT_FOUND if the domain is not registered by you. Domain represents the metadata of a domain that has been registered within the system and linked to a user.
- name: The resource name of the domain. Format: `domains/{domain_name}`, where domain_name is the fully qualified domain name (i.e., mymail.mydomain.com).
func (*DomainsService) GetComplianceStatus ¶
func (r *DomainsService) GetComplianceStatus(name string) *DomainsGetComplianceStatusCall
GetComplianceStatus: Retrieves the compliance status for a given domain. Returns PERMISSION_DENIED if you don't have permission to access compliance status for the domain.
- name: The resource name of the domain's compliance status to retrieve. Format: `domains/{domain_id}/complianceStatus`.
func (*DomainsService) GetVerificationToken ¶ added in v0.287.0
func (r *DomainsService) GetVerificationToken(name string) *DomainsGetVerificationTokenCall
GetVerificationToken: Developer Preview (https://developers.google.com/workspace/preview): Gets a verification token used for verifying a user's ownership over a domain.
- name: The resource name of the verification token to retrieve. Format: `domains/{domain}/verificationToken`.
func (*DomainsService) List ¶
func (r *DomainsService) List() *DomainsListCall
List: Retrieves a list of all domains registered by you, along with their corresponding metadata. The order of domains in the response is unspecified and non-deterministic. Newly registered domains will not necessarily be added to the end of this list.
func (*DomainsService) Verify ¶ added in v0.287.0
func (r *DomainsService) Verify(name string, verifydomainrequest *VerifyDomainRequest) *DomainsVerifyCall
Verify: Developer Preview (https://developers.google.com/workspace/preview): Verifies a user's ownership of a domain at the DNS level. Note that this is distinct from checking if the user has OWNER status within IRDB.
- name: The domain to verify.
type DomainsUsersCreateCall ¶ added in v0.287.0
type DomainsUsersCreateCall struct {
// contains filtered or unexported fields
}
func (*DomainsUsersCreateCall) Context ¶ added in v0.287.0
func (c *DomainsUsersCreateCall) Context(ctx context.Context) *DomainsUsersCreateCall
Context sets the context to be used in this call's Do method.
func (*DomainsUsersCreateCall) Do ¶ added in v0.287.0
func (c *DomainsUsersCreateCall) Do(opts ...googleapi.CallOption) (*User, error)
Do executes the "gmailpostmastertools.domains.users.create" call. Any non-2xx status code is an error. Response headers are in either *User.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsUsersCreateCall) Fields ¶ added in v0.287.0
func (c *DomainsUsersCreateCall) Fields(s ...googleapi.Field) *DomainsUsersCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsUsersCreateCall) Header ¶ added in v0.287.0
func (c *DomainsUsersCreateCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type DomainsUsersDeleteCall ¶ added in v0.287.0
type DomainsUsersDeleteCall struct {
// contains filtered or unexported fields
}
func (*DomainsUsersDeleteCall) Context ¶ added in v0.287.0
func (c *DomainsUsersDeleteCall) Context(ctx context.Context) *DomainsUsersDeleteCall
Context sets the context to be used in this call's Do method.
func (*DomainsUsersDeleteCall) Do ¶ added in v0.287.0
func (c *DomainsUsersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "gmailpostmastertools.domains.users.delete" call. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsUsersDeleteCall) Fields ¶ added in v0.287.0
func (c *DomainsUsersDeleteCall) Fields(s ...googleapi.Field) *DomainsUsersDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsUsersDeleteCall) Header ¶ added in v0.287.0
func (c *DomainsUsersDeleteCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type DomainsUsersGetCall ¶ added in v0.287.0
type DomainsUsersGetCall struct {
// contains filtered or unexported fields
}
func (*DomainsUsersGetCall) Context ¶ added in v0.287.0
func (c *DomainsUsersGetCall) Context(ctx context.Context) *DomainsUsersGetCall
Context sets the context to be used in this call's Do method.
func (*DomainsUsersGetCall) Do ¶ added in v0.287.0
func (c *DomainsUsersGetCall) Do(opts ...googleapi.CallOption) (*User, error)
Do executes the "gmailpostmastertools.domains.users.get" call. Any non-2xx status code is an error. Response headers are in either *User.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsUsersGetCall) Fields ¶ added in v0.287.0
func (c *DomainsUsersGetCall) Fields(s ...googleapi.Field) *DomainsUsersGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsUsersGetCall) Header ¶ added in v0.287.0
func (c *DomainsUsersGetCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*DomainsUsersGetCall) IfNoneMatch ¶ added in v0.287.0
func (c *DomainsUsersGetCall) IfNoneMatch(entityTag string) *DomainsUsersGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
type DomainsUsersListCall ¶ added in v0.287.0
type DomainsUsersListCall struct {
// contains filtered or unexported fields
}
func (*DomainsUsersListCall) Context ¶ added in v0.287.0
func (c *DomainsUsersListCall) Context(ctx context.Context) *DomainsUsersListCall
Context sets the context to be used in this call's Do method.
func (*DomainsUsersListCall) Do ¶ added in v0.287.0
func (c *DomainsUsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, error)
Do executes the "gmailpostmastertools.domains.users.list" call. Any non-2xx status code is an error. Response headers are in either *ListUsersResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsUsersListCall) Fields ¶ added in v0.287.0
func (c *DomainsUsersListCall) Fields(s ...googleapi.Field) *DomainsUsersListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsUsersListCall) Header ¶ added in v0.287.0
func (c *DomainsUsersListCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*DomainsUsersListCall) IfNoneMatch ¶ added in v0.287.0
func (c *DomainsUsersListCall) IfNoneMatch(entityTag string) *DomainsUsersListCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
func (*DomainsUsersListCall) PageSize ¶ added in v0.287.0
func (c *DomainsUsersListCall) PageSize(pageSize int64) *DomainsUsersListCall
PageSize sets the optional parameter "pageSize": Requested page size. Server may return fewer users than requested. If unspecified, the default value for this field is 10. The maximum value for this field is 200.
func (*DomainsUsersListCall) PageToken ¶ added in v0.287.0
func (c *DomainsUsersListCall) PageToken(pageToken string) *DomainsUsersListCall
PageToken sets the optional parameter "pageToken": The next_page_token value returned from a previous List request, if any.
func (*DomainsUsersListCall) Pages ¶ added in v0.287.0
func (c *DomainsUsersListCall) Pages(ctx context.Context, f func(*ListUsersResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
type DomainsUsersPatchCall ¶ added in v0.287.0
type DomainsUsersPatchCall struct {
// contains filtered or unexported fields
}
func (*DomainsUsersPatchCall) Context ¶ added in v0.287.0
func (c *DomainsUsersPatchCall) Context(ctx context.Context) *DomainsUsersPatchCall
Context sets the context to be used in this call's Do method.
func (*DomainsUsersPatchCall) Do ¶ added in v0.287.0
func (c *DomainsUsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error)
Do executes the "gmailpostmastertools.domains.users.patch" call. Any non-2xx status code is an error. Response headers are in either *User.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsUsersPatchCall) Fields ¶ added in v0.287.0
func (c *DomainsUsersPatchCall) Fields(s ...googleapi.Field) *DomainsUsersPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsUsersPatchCall) Header ¶ added in v0.287.0
func (c *DomainsUsersPatchCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*DomainsUsersPatchCall) UpdateMask ¶ added in v0.287.0
func (c *DomainsUsersPatchCall) UpdateMask(updateMask string) *DomainsUsersPatchCall
UpdateMask sets the optional parameter "updateMask": The list of fields to update.
type DomainsUsersService ¶ added in v0.287.0
type DomainsUsersService struct {
// contains filtered or unexported fields
}
func NewDomainsUsersService ¶ added in v0.287.0
func NewDomainsUsersService(s *Service) *DomainsUsersService
func (*DomainsUsersService) Create ¶ added in v0.287.0
func (r *DomainsUsersService) Create(parent string, createuserrequest *CreateUserRequest) *DomainsUsersCreateCall
Create: Developer Preview (https://developers.google.com/workspace/preview): Creates a user, who has access to a domain. Returns INVALID_ARGUMENT if a user is not provided.
- parent: The parent resource where this user will be created. Format: domains/{domain}.
func (*DomainsUsersService) Delete ¶ added in v0.287.0
func (r *DomainsUsersService) Delete(name string) *DomainsUsersDeleteCall
Delete: Developer Preview (https://developers.google.com/workspace/preview): Deletes a user from a domain. Returns NOT_FOUND if the user does not exist.
- name: The resource name of the user to delete. Format: domains/{domain}/users/{user}.
func (*DomainsUsersService) Get ¶ added in v0.287.0
func (r *DomainsUsersService) Get(name string) *DomainsUsersGetCall
Get: Developer Preview (https://developers.google.com/workspace/preview): Retrieves detailed information about a user that has access to a domain. Returns NOT_FOUND if the user does not exist.
- name: The resource name of the user to retrieve. Format: `domains/{domain}/users/{user}`.
func (*DomainsUsersService) List ¶ added in v0.287.0
func (r *DomainsUsersService) List(parent string) *DomainsUsersListCall
List: Developer Preview (https://developers.google.com/workspace/preview): Lists the users that have access to a domain.
- parent: The parent resource name for which to list users. Format: `domains/{domain}`.
func (*DomainsUsersService) Patch ¶ added in v0.287.0
func (r *DomainsUsersService) Patch(name string, user *User) *DomainsUsersPatchCall
Patch: Developer Preview (https://developers.google.com/workspace/preview): Updates a user for a domain. Only Owners and Admins can execute this RPC, only a user's domain permission will be allowed to be updated. Returns NOT_FOUND if the user does not exist. Returns INVALID_ARGUMENT if a permission is not provided or is PERMISSION_UNSPECIFIED, NONE, or OWNER.
- name: Identifier. The resource name of the user. Format: users/{user} Note: {user} is the user's email address.
type DomainsVerifyCall ¶ added in v0.287.0
type DomainsVerifyCall struct {
// contains filtered or unexported fields
}
func (*DomainsVerifyCall) Context ¶ added in v0.287.0
func (c *DomainsVerifyCall) Context(ctx context.Context) *DomainsVerifyCall
Context sets the context to be used in this call's Do method.
func (*DomainsVerifyCall) Do ¶ added in v0.287.0
func (c *DomainsVerifyCall) Do(opts ...googleapi.CallOption) (*VerifyDomainResponse, error)
Do executes the "gmailpostmastertools.domains.verify" call. Any non-2xx status code is an error. Response headers are in either *VerifyDomainResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*DomainsVerifyCall) Fields ¶ added in v0.287.0
func (c *DomainsVerifyCall) Fields(s ...googleapi.Field) *DomainsVerifyCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*DomainsVerifyCall) Header ¶ added in v0.287.0
func (c *DomainsVerifyCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type Empty ¶ added in v0.287.0
type Empty struct {
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
}
Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
type HonorUnsubscribeVerdict ¶
type HonorUnsubscribeVerdict struct {
// Reason: The specific reason for the compliance verdict. Must be empty if the
// status is compliant.
//
// Possible values:
// "REASON_UNSPECIFIED" - Unspecified.
// "NOT_HONORING" - The sender does not honor unsubscribe requests.
// "NOT_HONORING_TOO_FEW_CAMPAIGNS" - The sender does not honor unsubscribe
// requests and consider to increase the number of relevant campaigns.
// "NOT_HONORING_TOO_MANY_CAMPAIGNS" - The sender does not honor unsubscribe
// requests and consider to reduce the number of relevant campaigns.
Reason string `json:"reason,omitempty"`
// Status: The compliance status.
Status *ComplianceStatus `json:"status,omitempty"`
// ForceSendFields is a list of field names (e.g. "Reason") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Reason") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
HonorUnsubscribeVerdict: Compliance verdict for whether a sender meets the unsubscribe honoring compliance requirement.
func (HonorUnsubscribeVerdict) MarshalJSON ¶
func (s HonorUnsubscribeVerdict) MarshalJSON() ([]byte, error)
type ListDomainsResponse ¶
type ListDomainsResponse struct {
// Domains: The domains that have been registered by the user.
Domains []*Domain `json:"domains,omitempty"`
// NextPageToken: Token to retrieve the next page of results, or empty if there
// are no more results in the list.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Domains") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Domains") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
ListDomainsResponse: Response message for ListDomains.
func (ListDomainsResponse) MarshalJSON ¶
func (s ListDomainsResponse) MarshalJSON() ([]byte, error)
type ListUsersResponse ¶ added in v0.287.0
type ListUsersResponse struct {
// NextPageToken: Token to retrieve the next page of results, or empty if there
// are no more results in the list.
NextPageToken string `json:"nextPageToken,omitempty"`
// Users: The users that have access to the domain.
Users []*User `json:"users,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
ListUsersResponse: Developer Preview (https://developers.google.com/workspace/preview): Response message for ListUsers.
func (ListUsersResponse) MarshalJSON ¶ added in v0.287.0
func (s ListUsersResponse) MarshalJSON() ([]byte, error)
type MetricDefinition ¶
type MetricDefinition struct {
// BaseMetric: Required. The underlying metric to query.
BaseMetric *BaseMetric `json:"baseMetric,omitempty"`
// Filter: Optional. Optional filters to apply to the metric.
Filter string `json:"filter,omitempty"`
// Name: Required. The user-defined name for this metric. This name will be
// used as the key for this metric's value in the response.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "BaseMetric") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BaseMetric") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
MetricDefinition: Defines a specific metric to query, including a user-defined name, the base metric type, and optional filters.
func (MetricDefinition) MarshalJSON ¶
func (s MetricDefinition) MarshalJSON() ([]byte, error)
type OneClickUnsubscribeVerdict ¶
type OneClickUnsubscribeVerdict struct {
// Reason: The specific reason for the compliance verdict. Must be empty if the
// status is compliant.
//
// Possible values:
// "REASON_UNSPECIFIED" - Unspecified.
// "NO_UNSUB_GENERAL" - Sender does not support one-click unsubscribe for the
// majority of their messages.
// "NO_UNSUB_SPAM_REPORTS" - Sender does not support one-click unsubscribe
// for most messages that are manually reported as spam.
// "NO_UNSUB_PROMO_SPAM_REPORTS" - Sender does not support one-click
// unsubscribe for most promotional messages that are manually reported as
// spam. This classification of messages is a subset of those encompassed by
// `NO_UNSUB_SPAM_REPORTS`.
Reason string `json:"reason,omitempty"`
// Status: The compliance status.
Status *ComplianceStatus `json:"status,omitempty"`
// ForceSendFields is a list of field names (e.g. "Reason") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Reason") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
OneClickUnsubscribeVerdict: Compliance verdict for whether a sender meets the one-click unsubscribe compliance requirement.
func (OneClickUnsubscribeVerdict) MarshalJSON ¶
func (s OneClickUnsubscribeVerdict) MarshalJSON() ([]byte, error)
type QueryDomainStatsRequest ¶
type QueryDomainStatsRequest struct {
// AggregationGranularity: Optional. The granularity at which to aggregate the
// statistics. If unspecified, defaults to DAILY.
//
// Possible values:
// "AGGREGATION_GRANULARITY_UNSPECIFIED" - Unspecified granularity. Defaults
// to DAILY.
// "DAILY" - Statistics are aggregated on a daily basis. Each DomainStats
// entry in the response will correspond to a single day.
// "OVERALL" - Statistics are aggregated over the entire requested time
// period. Each DomainStats entry in the response will represent the total for
// the period.
AggregationGranularity string `json:"aggregationGranularity,omitempty"`
// MetricDefinitions: Required. The specific metrics to query. You can define a
// custom name for each metric, which will be used in the response.
MetricDefinitions []*MetricDefinition `json:"metricDefinitions,omitempty"`
// PageSize: Optional. The maximum number of DomainStats resources to return in
// the response. The server may return fewer than this value. If unspecified, a
// default value of 10 will be used. The maximum value is 200.
PageSize int64 `json:"pageSize,omitempty"`
// PageToken: Optional. The next_page_token value returned from a previous List
// request, if any. If the aggregation granularity is DAILY, the page token
// will be the encoded date + "/" + metric name. If the aggregation granularity
// is OVERALL, the page token will be the encoded metric name.
PageToken string `json:"pageToken,omitempty"`
// Parent: Required. The parent resource name where the stats are queried.
// Format: domains/{domain}
Parent string `json:"parent,omitempty"`
// TimeQuery: Required. The time range or specific dates for which to retrieve
// the metrics.
TimeQuery *TimeQuery `json:"timeQuery,omitempty"`
// ForceSendFields is a list of field names (e.g. "AggregationGranularity") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AggregationGranularity") to
// include in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
QueryDomainStatsRequest: Request message for QueryDomainStats.
func (QueryDomainStatsRequest) MarshalJSON ¶
func (s QueryDomainStatsRequest) MarshalJSON() ([]byte, error)
type QueryDomainStatsResponse ¶
type QueryDomainStatsResponse struct {
// DomainStats: The list of domain statistics. Each DomainStat object contains
// the value for a metric requested in the QueryDomainStatsRequest.
DomainStats []*DomainStat `json:"domainStats,omitempty"`
// NextPageToken: Token to retrieve the next page of results, or empty if there
// are no more results in the list.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "DomainStats") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DomainStats") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
QueryDomainStatsResponse: Response message for QueryDomainStats.
func (QueryDomainStatsResponse) MarshalJSON ¶
func (s QueryDomainStatsResponse) MarshalJSON() ([]byte, error)
type Service ¶
type Service struct {
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
DomainStats *DomainStatsService
Domains *DomainsService
// contains filtered or unexported fields
}
func New
deprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func NewService ¶
NewService creates a new Service.
type StatisticValue ¶
type StatisticValue struct {
// DoubleValue: Double value.
DoubleValue float64 `json:"doubleValue,omitempty"`
// FloatValue: Float value.
FloatValue float64 `json:"floatValue,omitempty"`
// IntValue: Integer value.
IntValue int64 `json:"intValue,omitempty,string"`
// StringList: List of string values.
StringList *StringList `json:"stringList,omitempty"`
// StringValue: String value.
StringValue string `json:"stringValue,omitempty"`
// ForceSendFields is a list of field names (e.g. "DoubleValue") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DoubleValue") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
StatisticValue: The actual value of a statistic.
func (StatisticValue) MarshalJSON ¶
func (s StatisticValue) MarshalJSON() ([]byte, error)
func (*StatisticValue) UnmarshalJSON ¶
func (s *StatisticValue) UnmarshalJSON(data []byte) error
type Status ¶
type Status struct {
// Code: The status code, which should be an enum value of google.rpc.Code.
Code int64 `json:"code,omitempty"`
// Details: A list of messages that carry the error details. There is a common
// set of message types for APIs to use.
Details []googleapi.RawMessage `json:"details,omitempty"`
// Message: A developer-facing error message, which should be in English. Any
// user-facing error message should be localized and sent in the
// google.rpc.Status.details field, or localized by the client.
Message string `json:"message,omitempty"`
// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Code") to include in API requests
// with the JSON null value. By default, fields with empty values are omitted
// from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).
func (Status) MarshalJSON ¶
type StringList ¶
type StringList struct {
// Values: The string values.
Values []string `json:"values,omitempty"`
// ForceSendFields is a list of field names (e.g. "Values") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Values") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
StringList: Represents a list of strings.
func (StringList) MarshalJSON ¶
func (s StringList) MarshalJSON() ([]byte, error)
type TimeQuery ¶
type TimeQuery struct {
// DateList: A list of specific dates.
DateList *DateList `json:"dateList,omitempty"`
// DateRanges: A list of date ranges.
DateRanges *DateRanges `json:"dateRanges,omitempty"`
// ForceSendFields is a list of field names (e.g. "DateList") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DateList") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
TimeQuery: The date ranges or specific dates for which you want to retrieve data.
func (TimeQuery) MarshalJSON ¶
type User ¶ added in v0.287.0
type User struct {
// AccessGranter: Output only. The user that added the current user.
AccessGranter string `json:"accessGranter,omitempty"`
// CreateTime: Output only. The time the user was granted access.
CreateTime string `json:"createTime,omitempty"`
// Name: Identifier. The resource name of the user. Format: users/{user} Note:
// {user} is the user's email address.
Name string `json:"name,omitempty"`
// Permission: The permission level that the user has for the specified domain.
//
// Possible values:
// "PERMISSION_UNSPECIFIED" - Unspecified permission.
// "READER" - User has read access to the domain.
// "ADMIN" - User has admin access to the domain.
// "OWNER" - User has owner access to the domain.
// "NONE" - User has no access to the domain.
Permission string `json:"permission,omitempty"`
// User: The user's email address.
User string `json:"user,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AccessGranter") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AccessGranter") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
User: Developer Preview (https://developers.google.com/workspace/preview): Information about a user's access to a domain.
func (User) MarshalJSON ¶ added in v0.287.0
type VerifyDomainRequest ¶ added in v0.287.0
type VerifyDomainRequest struct {
// VerificationMethod: Required. The verification method used. Must be
// specified, i.e. TXT or CNAME.
//
// Possible values:
// "DOMAIN_VERIFICATION_METHOD_UNSPECIFIED" - Unspecified.
// "TXT" - Generate a DNS TXT verification token.
// "CNAME" - Generate a DNS CNAME verification token.
VerificationMethod string `json:"verificationMethod,omitempty"`
// ForceSendFields is a list of field names (e.g. "VerificationMethod") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "VerificationMethod") to include
// in API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
VerifyDomainRequest: Developer Preview (https://developers.google.com/workspace/preview): Request message for VerifyDomain.
func (VerifyDomainRequest) MarshalJSON ¶ added in v0.287.0
func (s VerifyDomainRequest) MarshalJSON() ([]byte, error)
type VerifyDomainResponse ¶ added in v0.287.0
type VerifyDomainResponse struct {
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
}
VerifyDomainResponse: Developer Preview (https://developers.google.com/workspace/preview): Response message for VerifyDomain.