alertcenter

package
v0.0.0-...-41dc4b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2018 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package alertcenter provides access to the G Suite Alert Center API.

See https://developers.google.com/admin-sdk/alertcenter/

Usage example:

import "google.golang.org/api/alertcenter/v1beta1"
...
alertcenterService, err := alertcenter.New(oauthHttpClient)

Index

Constants

View Source
const (
	// See and delete your domain's G Suite alerts, and send alert feedback
	AppsAlertsScope = "https://www.googleapis.com/auth/apps.alerts"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountWarning

type AccountWarning struct {
	// Email: Required. The email of the user that this event belongs to.
	Email string `json:"email,omitempty"`

	// LoginDetails: Optional. Details of the login action associated with
	// the warning event.
	// This is only available for:
	//
	// * Suspicious login
	// * Suspicious login (less secure app)
	// * User suspended (suspicious activity)
	LoginDetails *LoginDetails `json:"loginDetails,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Email") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Email") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

AccountWarning: Alerts for user account warning events.

func (*AccountWarning) MarshalJSON

func (s *AccountWarning) MarshalJSON() ([]byte, error)

type Alert

type Alert struct {
	// AlertId: Output only. The unique identifier for the alert.
	AlertId string `json:"alertId,omitempty"`

	// CreateTime: Output only. The time this alert was created.
	CreateTime string `json:"createTime,omitempty"`

	// CustomerId: Output only. The unique identifier of the Google account
	// of the customer.
	CustomerId string `json:"customerId,omitempty"`

	// Data: Optional. The data associated with this alert, for
	// example
	// google.apps.alertcenter.type.DeviceCompromised.
	Data googleapi.RawMessage `json:"data,omitempty"`

	// Deleted: Output only. `True` if this alert is marked for deletion.
	Deleted bool `json:"deleted,omitempty"`

	// EndTime: Optional. The time the event that caused this alert ceased
	// being active.
	// If provided, the end time must not be earlier than the start time.
	// If not provided, the end time defaults to the start time.
	EndTime string `json:"endTime,omitempty"`

	// SecurityInvestigationToolLink: Output only. An optional
	// [Security Investigation
	// Tool](https://support.google.com/a/answer/7575955)
	// query for this alert.
	SecurityInvestigationToolLink string `json:"securityInvestigationToolLink,omitempty"`

	// Source: Required. A unique identifier for the system that is reported
	// the alert.
	//
	// Supported sources are any of the following:
	//
	// * Google Operations
	// * Mobile device management
	// * Gmail phishing
	// * Domain wide takeout
	// * Government attack warning
	// * Google identity
	Source string `json:"source,omitempty"`

	// StartTime: Required. The time the event that caused this alert was
	// started or
	// detected.
	StartTime string `json:"startTime,omitempty"`

	// Type: Required. The type of the alert.
	// For a list of available alert types see
	// [G Suite Alert types](/admin-sdk/alertcenter/reference/alert-types).
	Type string `json:"type,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AlertId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AlertId") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Alert: An alert affecting a customer. All fields are read-only once created.

func (*Alert) MarshalJSON

func (s *Alert) MarshalJSON() ([]byte, error)

type AlertFeedback

type AlertFeedback struct {
	// AlertId: Output only. The alert identifier.
	AlertId string `json:"alertId,omitempty"`

	// CreateTime: Output only. The time this feedback was created.
	CreateTime string `json:"createTime,omitempty"`

	// CustomerId: Output only. The unique identifier of the Google account
	// of the customer.
	CustomerId string `json:"customerId,omitempty"`

	// Email: Output only. The email of the user that provided the feedback.
	Email string `json:"email,omitempty"`

	// FeedbackId: Output only. The unique identifier for the feedback.
	FeedbackId string `json:"feedbackId,omitempty"`

	// Type: Required. The type of the feedback.
	//
	// Possible values:
	//   "ALERT_FEEDBACK_TYPE_UNSPECIFIED" - The feedback type is not
	// specified.
	//   "NOT_USEFUL" - The alert report is not useful.
	//   "SOMEWHAT_USEFUL" - The alert report is somewhat useful.
	//   "VERY_USEFUL" - The alert report is very useful.
	Type string `json:"type,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AlertId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AlertId") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

AlertFeedback: A customer feedback about an alert.

func (*AlertFeedback) MarshalJSON

func (s *AlertFeedback) MarshalJSON() ([]byte, error)

type AlertsDeleteCall

type AlertsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*AlertsDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlertsDeleteCall) CustomerId

func (c *AlertsDeleteCall) CustomerId(customerId string) *AlertsDeleteCall

CustomerId sets the optional parameter "customerId": The unique identifier of the G Suite organization account of the customer the alert is associated with. Inferred from the caller identity if not provided.

func (*AlertsDeleteCall) Do

func (c *AlertsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)

Do executes the "alertcenter.alerts.delete" call. Exactly one of *Empty or error will be non-nil. 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 (*AlertsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlertsDeleteCall) Header

func (c *AlertsDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type AlertsFeedbackCreateCall

type AlertsFeedbackCreateCall struct {
	// contains filtered or unexported fields
}

func (*AlertsFeedbackCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlertsFeedbackCreateCall) CustomerId

func (c *AlertsFeedbackCreateCall) CustomerId(customerId string) *AlertsFeedbackCreateCall

CustomerId sets the optional parameter "customerId": The unique identifier of the G Suite organization account of the customer the alert is associated with. Inferred from the caller identity if not provided.

func (*AlertsFeedbackCreateCall) Do

Do executes the "alertcenter.alerts.feedback.create" call. Exactly one of *AlertFeedback or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AlertFeedback.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 (*AlertsFeedbackCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlertsFeedbackCreateCall) Header

func (c *AlertsFeedbackCreateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type AlertsFeedbackListCall

type AlertsFeedbackListCall struct {
	// contains filtered or unexported fields
}

func (*AlertsFeedbackListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlertsFeedbackListCall) CustomerId

func (c *AlertsFeedbackListCall) CustomerId(customerId string) *AlertsFeedbackListCall

CustomerId sets the optional parameter "customerId": The unique identifier of the G Suite organization account of the customer the alert feedback are associated with. Inferred from the caller identity if not provided.

func (*AlertsFeedbackListCall) Do

Do executes the "alertcenter.alerts.feedback.list" call. Exactly one of *ListAlertFeedbackResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListAlertFeedbackResponse.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 (*AlertsFeedbackListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlertsFeedbackListCall) Filter

Filter sets the optional parameter "filter": A query string for filtering alert feedback results. For more details, see [Query filters](/admin-sdk/alertcenter/guides/query-filters) and [Supported query filter fields](/admin-sdk/alertcenter/reference/filter-fields#alerts.feedback .list).

func (*AlertsFeedbackListCall) Header

func (c *AlertsFeedbackListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AlertsFeedbackListCall) IfNoneMatch

func (c *AlertsFeedbackListCall) IfNoneMatch(entityTag string) *AlertsFeedbackListCall

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AlertsFeedbackService

type AlertsFeedbackService struct {
	// contains filtered or unexported fields
}

func NewAlertsFeedbackService

func NewAlertsFeedbackService(s *Service) *AlertsFeedbackService

func (*AlertsFeedbackService) Create

func (r *AlertsFeedbackService) Create(alertId string, alertfeedback *AlertFeedback) *AlertsFeedbackCreateCall

Create: Creates new feedback for an alert.

func (*AlertsFeedbackService) List

List: Lists all the feedback for an alert.

type AlertsGetCall

type AlertsGetCall struct {
	// contains filtered or unexported fields
}

func (*AlertsGetCall) Context

func (c *AlertsGetCall) Context(ctx context.Context) *AlertsGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlertsGetCall) CustomerId

func (c *AlertsGetCall) CustomerId(customerId string) *AlertsGetCall

CustomerId sets the optional parameter "customerId": The unique identifier of the G Suite organization account of the customer the alert is associated with. Inferred from the caller identity if not provided.

func (*AlertsGetCall) Do

func (c *AlertsGetCall) Do(opts ...googleapi.CallOption) (*Alert, error)

Do executes the "alertcenter.alerts.get" call. Exactly one of *Alert or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Alert.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 (*AlertsGetCall) Fields

func (c *AlertsGetCall) Fields(s ...googleapi.Field) *AlertsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlertsGetCall) Header

func (c *AlertsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AlertsGetCall) IfNoneMatch

func (c *AlertsGetCall) IfNoneMatch(entityTag string) *AlertsGetCall

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AlertsListCall

type AlertsListCall struct {
	// contains filtered or unexported fields
}

func (*AlertsListCall) Context

func (c *AlertsListCall) Context(ctx context.Context) *AlertsListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlertsListCall) CustomerId

func (c *AlertsListCall) CustomerId(customerId string) *AlertsListCall

CustomerId sets the optional parameter "customerId": The unique identifier of the G Suite organization account of the customer the alerts are associated with. Inferred from the caller identity if not provided.

func (*AlertsListCall) Do

Do executes the "alertcenter.alerts.list" call. Exactly one of *ListAlertsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListAlertsResponse.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 (*AlertsListCall) Fields

func (c *AlertsListCall) Fields(s ...googleapi.Field) *AlertsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlertsListCall) Filter

func (c *AlertsListCall) Filter(filter string) *AlertsListCall

Filter sets the optional parameter "filter": A query string for filtering alert results. For more details, see [Query filters](/admin-sdk/alertcenter/guides/query-filters) and [Supported query filter fields](/admin-sdk/alertcenter/reference/filter-fields#alerts.list).

func (*AlertsListCall) Header

func (c *AlertsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AlertsListCall) IfNoneMatch

func (c *AlertsListCall) IfNoneMatch(entityTag string) *AlertsListCall

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AlertsListCall) OrderBy

func (c *AlertsListCall) OrderBy(orderBy string) *AlertsListCall

OrderBy sets the optional parameter "orderBy": The sort order of the list results. If not specified results may be returned in arbitrary order. You can sort the results in descending order based on the creation timestamp using `order_by="create_time desc". Currently, only sorting by `create_time desc` is supported.

func (*AlertsListCall) PageSize

func (c *AlertsListCall) PageSize(pageSize int64) *AlertsListCall

PageSize sets the optional parameter "pageSize": The requested page size. Server may return fewer items than requested. If unspecified, server picks an appropriate default.

func (*AlertsListCall) PageToken

func (c *AlertsListCall) PageToken(pageToken string) *AlertsListCall

PageToken sets the optional parameter "pageToken": A token identifying a page of results the server should return. If empty, a new iteration is started. To continue an iteration, pass in the value from the previous ListAlertsResponse's next_page_token field.

func (*AlertsListCall) Pages

func (c *AlertsListCall) Pages(ctx context.Context, f func(*ListAlertsResponse) 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 AlertsService

type AlertsService struct {
	Feedback *AlertsFeedbackService
	// contains filtered or unexported fields
}

func NewAlertsService

func NewAlertsService(s *Service) *AlertsService

func (*AlertsService) Delete

func (r *AlertsService) Delete(alertId string) *AlertsDeleteCall

Delete: Marks the specified alert for deletion. An alert that has been marked for deletion is removed from Alert Center after 30 days. Marking an alert for deletion has no effect on an alert which has already been marked for deletion. Attempting to mark a nonexistent alert for deletion results in a `NOT_FOUND` error.

func (*AlertsService) Get

func (r *AlertsService) Get(alertId string) *AlertsGetCall

Get: Gets the specified alert.

func (*AlertsService) List

func (r *AlertsService) List() *AlertsListCall

List: Lists the alerts.

func (*AlertsService) Undelete

func (r *AlertsService) Undelete(alertId string, undeletealertrequest *UndeleteAlertRequest) *AlertsUndeleteCall

Undelete: Restores, or "undeletes", an alert that was marked for deletion within the past 30 days. Attempting to undelete an alert which was marked for deletion over 30 days ago (which has been removed from the Alert Center database) or a nonexistent alert returns a `NOT_FOUND` error. Attempting to undelete an alert which has not been marked for deletion has no effect.

type AlertsUndeleteCall

type AlertsUndeleteCall struct {
	// contains filtered or unexported fields
}

func (*AlertsUndeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlertsUndeleteCall) Do

func (c *AlertsUndeleteCall) Do(opts ...googleapi.CallOption) (*Alert, error)

Do executes the "alertcenter.alerts.undelete" call. Exactly one of *Alert or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Alert.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 (*AlertsUndeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlertsUndeleteCall) Header

func (c *AlertsUndeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type Attachment

type Attachment struct {
	// Csv: A CSV file attachment.
	Csv *Csv `json:"csv,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Csv") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Csv") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Attachment: Attachment with application-specific information about an alert.

func (*Attachment) MarshalJSON

func (s *Attachment) MarshalJSON() ([]byte, error)

type BadWhitelist

type BadWhitelist struct {
	// DomainId: The domain ID.
	DomainId *DomainId `json:"domainId,omitempty"`

	// MaliciousEntity: The entity whose actions triggered a Gmail phishing
	// alert.
	MaliciousEntity *MaliciousEntity `json:"maliciousEntity,omitempty"`

	// Messages: The list of messages contained by this alert.
	Messages []*GmailMessageInfo `json:"messages,omitempty"`

	// SourceIp: The source IP address of the malicious email, for
	// example,
	// `127.0.0.1`.
	SourceIp string `json:"sourceIp,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DomainId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	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. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

BadWhitelist: Alert for setting the domain or IP that malicious email comes from as whitelisted domain or IP in Gmail advanced settings.

func (*BadWhitelist) MarshalJSON

func (s *BadWhitelist) MarshalJSON() ([]byte, error)

type Csv

type Csv struct {
	// DataRows: The list of data rows in a CSV file, as string arrays
	// rather than as a
	// single comma-separated string.
	DataRows []*CsvRow `json:"dataRows,omitempty"`

	// Headers: The list of headers for data columns in a CSV file.
	Headers []string `json:"headers,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DataRows") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DataRows") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Csv: A representation of a CSV file attachment, as a list of column headers and a list of data rows.

func (*Csv) MarshalJSON

func (s *Csv) MarshalJSON() ([]byte, error)

type CsvRow

type CsvRow struct {
	// Entries: The data entries in a CSV file row, as a string array rather
	// than a
	// single comma-separated string.
	Entries []string `json:"entries,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Entries") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Entries") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

CsvRow: A representation of a single data row in a CSV file.

func (*CsvRow) MarshalJSON

func (s *CsvRow) MarshalJSON() ([]byte, error)

type DeviceCompromised

type DeviceCompromised struct {
	// Email: The email of the user this alert was created for.
	Email string `json:"email,omitempty"`

	// Events: Required. The list of security events.
	Events []*DeviceCompromisedSecurityDetail `json:"events,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Email") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Email") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DeviceCompromised: A mobile device compromised alert. Derived from audit logs.

func (*DeviceCompromised) MarshalJSON

func (s *DeviceCompromised) MarshalJSON() ([]byte, error)

type DeviceCompromisedSecurityDetail

type DeviceCompromisedSecurityDetail struct {
	// DeviceCompromisedState: The device compromised state. Possible values
	// are "Compromised" or
	// "Not Compromised".
	DeviceCompromisedState string `json:"deviceCompromisedState,omitempty"`

	// DeviceId: Required. The device ID.
	DeviceId string `json:"deviceId,omitempty"`

	// DeviceModel: The model of the device.
	DeviceModel string `json:"deviceModel,omitempty"`

	// DeviceType: The type of the device.
	DeviceType string `json:"deviceType,omitempty"`

	// IosVendorId: Required for iOS, empty for others.
	IosVendorId string `json:"iosVendorId,omitempty"`

	// ResourceId: The device resource ID.
	ResourceId string `json:"resourceId,omitempty"`

	// SerialNumber: The serial number of the device.
	SerialNumber string `json:"serialNumber,omitempty"`

	// ForceSendFields is a list of field names (e.g.
	// "DeviceCompromisedState") to unconditionally include in API requests.
	// By default, fields with empty values are omitted from API requests.
	// However, any non-pointer, non-interface field appearing in
	// ForceSendFields will be sent to the server regardless of whether the
	// field is empty or not. This may be used to include empty fields in
	// Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DeviceCompromisedState")
	// to include in API requests with the JSON null value. By default,
	// fields with empty values are omitted from API requests. However, any
	// field with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

DeviceCompromisedSecurityDetail: Detailed information of a single MDM device compromised event.

func (*DeviceCompromisedSecurityDetail) MarshalJSON

func (s *DeviceCompromisedSecurityDetail) MarshalJSON() ([]byte, error)

type DomainId

type DomainId struct {
	// CustomerPrimaryDomain: The primary domain for the customer.
	CustomerPrimaryDomain string `json:"customerPrimaryDomain,omitempty"`

	// ForceSendFields is a list of field names (e.g.
	// "CustomerPrimaryDomain") to unconditionally include in API requests.
	// By default, fields with empty values are omitted from API requests.
	// However, any non-pointer, non-interface field appearing in
	// ForceSendFields will be sent to the server regardless of whether the
	// field is empty or not. This may be used to include empty fields in
	// Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CustomerPrimaryDomain") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

DomainId: Domain ID of Gmail phishing alerts.

func (*DomainId) MarshalJSON

func (s *DomainId) MarshalJSON() ([]byte, error)

type DomainWideTakeoutInitiated

type DomainWideTakeoutInitiated struct {
	// Email: The email of the admin who initiated the takeout.
	Email string `json:"email,omitempty"`

	// TakeoutRequestId: The takeout request ID.
	TakeoutRequestId string `json:"takeoutRequestId,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Email") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Email") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DomainWideTakeoutInitiated: A takeout operation for the entire domain was initiated by an admin. Derived from audit logs.

func (*DomainWideTakeoutInitiated) MarshalJSON

func (s *DomainWideTakeoutInitiated) MarshalJSON() ([]byte, error)

type Empty

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);

}

The JSON representation for `Empty` is empty JSON object `{}`.

type GmailMessageInfo

type GmailMessageInfo struct {
	// AttachmentsSha256Hash: The `SHA256` hash of email's attachment and
	// all MIME parts.
	AttachmentsSha256Hash []string `json:"attachmentsSha256Hash,omitempty"`

	// Date: The date the malicious email was sent.
	Date string `json:"date,omitempty"`

	// Md5HashMessageBody: The hash of the message body text.
	Md5HashMessageBody string `json:"md5HashMessageBody,omitempty"`

	// Md5HashSubject: The MD5 Hash of email's subject (only available for
	// reported emails).
	Md5HashSubject string `json:"md5HashSubject,omitempty"`

	// MessageBodySnippet: The snippet of the message body text (only
	// available for reported emails).
	MessageBodySnippet string `json:"messageBodySnippet,omitempty"`

	// MessageId: The message ID.
	MessageId string `json:"messageId,omitempty"`

	// Recipient: The recipient of this email.
	Recipient string `json:"recipient,omitempty"`

	// SubjectText: The email subject text (only available for reported
	// emails).
	SubjectText string `json:"subjectText,omitempty"`

	// ForceSendFields is a list of field names (e.g.
	// "AttachmentsSha256Hash") to unconditionally include in API requests.
	// By default, fields with empty values are omitted from API requests.
	// However, any non-pointer, non-interface field appearing in
	// ForceSendFields will be sent to the server regardless of whether the
	// field is empty or not. This may be used to include empty fields in
	// Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AttachmentsSha256Hash") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

GmailMessageInfo: Details of a message in phishing spike alert.

func (*GmailMessageInfo) MarshalJSON

func (s *GmailMessageInfo) MarshalJSON() ([]byte, error)

type GoogleOperations

type GoogleOperations struct {
	// AffectedUserEmails: The list of emails which correspond to the users
	// directly affected by the
	// incident.
	AffectedUserEmails []string `json:"affectedUserEmails,omitempty"`

	// AttachmentData: Optional. Application-specific data for an incident,
	// provided when the
	// G Suite application which reported the incident cannot be
	// completely
	// restored to a valid state.
	AttachmentData *Attachment `json:"attachmentData,omitempty"`

	// Description: A detailed, freeform incident description.
	Description string `json:"description,omitempty"`

	// Title: A one-line incident description.
	Title string `json:"title,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AffectedUserEmails")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AffectedUserEmails") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

GoogleOperations: An incident reported by Google Operations for a G Suite application.

func (*GoogleOperations) MarshalJSON

func (s *GoogleOperations) MarshalJSON() ([]byte, error)

type ListAlertFeedbackResponse

type ListAlertFeedbackResponse struct {
	// Feedback: The list of alert feedback.
	// Feedback entries for each alert are ordered by creation time
	// descending.
	Feedback []*AlertFeedback `json:"feedback,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Feedback") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Feedback") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListAlertFeedbackResponse: Response message for an alert feedback listing request.

func (*ListAlertFeedbackResponse) MarshalJSON

func (s *ListAlertFeedbackResponse) MarshalJSON() ([]byte, error)

type ListAlertsResponse

type ListAlertsResponse struct {
	// Alerts: The list of alerts.
	Alerts []*Alert `json:"alerts,omitempty"`

	// NextPageToken: The token for the next page. If not empty, indicates
	// that there may be more
	// alerts that match the listing request; this value can be used in
	// a
	// subsequent ListAlertsRequest to get alerts continuing from last
	// result
	// of the current list call.
	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. "Alerts") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Alerts") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListAlertsResponse: Response message for an alert listing request.

func (*ListAlertsResponse) MarshalJSON

func (s *ListAlertsResponse) MarshalJSON() ([]byte, error)

type LoginDetails

type LoginDetails struct {
	// IpAddress: Optional. The human-readable IP address (for
	// example,
	// `11.22.33.44`) that is associated with the warning event.
	IpAddress string `json:"ipAddress,omitempty"`

	// LoginTime: Optional. The successful login time that is associated
	// with the warning
	// event. This will not be present for blocked login attempts.
	LoginTime string `json:"loginTime,omitempty"`

	// ForceSendFields is a list of field names (e.g. "IpAddress") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "IpAddress") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

LoginDetails: The details of the login action.

func (*LoginDetails) MarshalJSON

func (s *LoginDetails) MarshalJSON() ([]byte, error)

type MailPhishing

type MailPhishing struct {
	// DomainId: The domain ID.
	DomainId *DomainId `json:"domainId,omitempty"`

	// IsInternal: If `true`, the email originated from within the
	// organization.
	IsInternal bool `json:"isInternal,omitempty"`

	// MaliciousEntity: The entity whose actions triggered a Gmail phishing
	// alert.
	MaliciousEntity *MaliciousEntity `json:"maliciousEntity,omitempty"`

	// Messages: The list of messages contained by this alert.
	Messages []*GmailMessageInfo `json:"messages,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DomainId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	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. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MailPhishing: Proto for all phishing alerts with common payload. Supported types are any of the following:

* User reported phishing * User reported spam spike * Suspicious message reported * Phishing reclassification * Malware reclassification

func (*MailPhishing) MarshalJSON

func (s *MailPhishing) MarshalJSON() ([]byte, error)

type MaliciousEntity

type MaliciousEntity struct {
	// FromHeader: The sender email address.
	FromHeader string `json:"fromHeader,omitempty"`

	// ForceSendFields is a list of field names (e.g. "FromHeader") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "FromHeader") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MaliciousEntity: Entity whose actions triggered a Gmail phishing alert.

func (*MaliciousEntity) MarshalJSON

func (s *MaliciousEntity) MarshalJSON() ([]byte, error)

type PhishingSpike

type PhishingSpike struct {
	// DomainId: The domain ID.
	DomainId *DomainId `json:"domainId,omitempty"`

	// IsInternal: If `true`, the email originated from within the
	// organization.
	IsInternal bool `json:"isInternal,omitempty"`

	// MaliciousEntity: The entity whose actions triggered a Gmail phishing
	// alert.
	MaliciousEntity *MaliciousEntity `json:"maliciousEntity,omitempty"`

	// Messages: The list of messages contained by this alert.
	Messages []*GmailMessageInfo `json:"messages,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DomainId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	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. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

PhishingSpike: Alert for a spike in user reported phishing. <aside class="warning"><b>Warning</b>: This type has been deprecated. Use MailPhishing(/admin-sdk/alertcenter/reference/rest/v1beta1/MailP hishing) instead.</aside>

func (*PhishingSpike) MarshalJSON

func (s *PhishingSpike) MarshalJSON() ([]byte, error)

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Alerts *AlertsService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type StateSponsoredAttack

type StateSponsoredAttack struct {
	// Email: The email of the user this incident was created for.
	Email string `json:"email,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Email") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Email") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

StateSponsoredAttack: A state-sponsored attack alert. Derived from audit logs.

func (*StateSponsoredAttack) MarshalJSON

func (s *StateSponsoredAttack) MarshalJSON() ([]byte, error)

type SuspiciousActivity

type SuspiciousActivity struct {
	// Email: The email of the user this alert was created for.
	Email string `json:"email,omitempty"`

	// Events: Required. The list of security events.
	Events []*SuspiciousActivitySecurityDetail `json:"events,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Email") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Email") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SuspiciousActivity: A mobile suspicious activity alert. Derived from audit logs.

func (*SuspiciousActivity) MarshalJSON

func (s *SuspiciousActivity) MarshalJSON() ([]byte, error)

type SuspiciousActivitySecurityDetail

type SuspiciousActivitySecurityDetail struct {
	// DeviceId: Required. The device ID.
	DeviceId string `json:"deviceId,omitempty"`

	// DeviceModel: The model of the device.
	DeviceModel string `json:"deviceModel,omitempty"`

	// DeviceProperty: The device property which was changed.
	DeviceProperty string `json:"deviceProperty,omitempty"`

	// DeviceType: The type of the device.
	DeviceType string `json:"deviceType,omitempty"`

	// IosVendorId: Required for iOS, empty for others.
	IosVendorId string `json:"iosVendorId,omitempty"`

	// NewValue: The new value of the device property after the change.
	NewValue string `json:"newValue,omitempty"`

	// OldValue: The old value of the device property before the change.
	OldValue string `json:"oldValue,omitempty"`

	// ResourceId: The device resource ID.
	ResourceId string `json:"resourceId,omitempty"`

	// SerialNumber: The serial number of the device.
	SerialNumber string `json:"serialNumber,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DeviceId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DeviceId") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SuspiciousActivitySecurityDetail: Detailed information of a single MDM suspicious activity event.

func (*SuspiciousActivitySecurityDetail) MarshalJSON

func (s *SuspiciousActivitySecurityDetail) MarshalJSON() ([]byte, error)

type UndeleteAlertRequest

type UndeleteAlertRequest struct {
	// CustomerId: Optional. The unique identifier of the G Suite
	// organization account of the
	// customer the alert is associated with.
	// Inferred from the caller identity if not provided.
	CustomerId string `json:"customerId,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CustomerId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CustomerId") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

UndeleteAlertRequest: A request to undelete a specific alert that was marked for deletion.

func (*UndeleteAlertRequest) MarshalJSON

func (s *UndeleteAlertRequest) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL