alertcenter

package
v0.0.0-...-39567f0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: BSD-3-Clause Imports: 13 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountWarning

type AccountWarning struct {
	// Email: Required. 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. Assigned by
	// the server.
	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. Specific data associated with this alert.
	// e.g. google.apps.alertcenter.type.DeviceCompromised.
	Data googleapi.RawMessage `json:"data,omitempty"`

	// Deleted: Output only. Whether this alert has been marked for
	// deletion.
	Deleted bool `json:"deleted,omitempty"`

	// EndTime: Optional. The time this alert was no longer active. If
	// provided, the
	// end time must not be earlier than the start time. If not provided,
	// the end
	// time will default to the start time.
	EndTime string `json:"endTime,omitempty"`

	// SecurityInvestigationToolLink: Output only. An optional Security
	// Investigation Tool 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 this alert became active.
	StartTime string `json:"startTime,omitempty"`

	// Type: Required. The type of the alert.
	//
	// Supported types are any of the following:
	//  * "Google Operations"
	//  * "Device compromised"
	//  * "Suspicious activity"
	//  * "User reported phishing"
	//  * "Misconfigured whitelist"
	//  * "Customer takeout initiated"
	//  * "Government attack warning"
	//  * "User reported spam spike"
	//  * "Suspicious message reported"
	//  * "Phishing reclassification"
	//  * "Malware reclassification"
	// LINT.IfChange
	//  * "Suspicious login"
	//  * "Suspicious login (less secure app)"
	//  * "User suspended"
	//  * "Leaked password"
	//  * "User suspended (suspicious activity)"
	//  * "User suspended (spam)"
	//  * "User suspended (spam through
	// relay)"
	// LINT.ThenChange(//depot/google3/apps/albert/data/albert_enums.
	// proto)
	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. Assigned
	// by the server.
	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. A unique identifier for the feedback. When
	// creating a new
	// feedback the system will assign one.
	FeedbackId string `json:"feedbackId,omitempty"`

	// Type: Required. The type of the feedback.
	//
	// Possible values:
	//   "ALERT_FEEDBACK_TYPE_UNSPECIFIED" - Feedback type is not specified.
	//   "NOT_USEFUL" - Alert report is not useful.
	//   "SOMEWHAT_USEFUL" - Alert report is somewhat useful.
	//   "VERY_USEFUL" - 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 Google account of the customer the alert is associated with. This is obfuscated and not the plain customer ID as stored internally. 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 Google account of the customer the alert's feedback is associated with. This is obfuscated and not the plain customer ID as stored internally. 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 Google account of the customer the alert is associated with. This is obfuscated and not the plain customer ID as stored internally. 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) 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 a new alert feedback.

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 Google account of the customer the alert is associated with. This is obfuscated and not the plain customer ID as stored internally. 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 Google account of the customer the alerts are associated with. This is obfuscated and not the plain customer ID as stored internally. 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": Query string for filtering alert results. This string must be specified as an expression or list of expressions, using the following grammar:

### Expressions

An expression has the general form `<field> <operator> <value>`.

A field or value which contains a space or a colon must be enclosed by double quotes.

#### Operators

Operators follow the BNF specification:

`<equalityOperator> ::= "=" | ":"

`<relationalOperator> ::= "<" | ">" | "<=" | ">="

Relational operators are defined only for timestamp fields. Equality operators are defined only for string fields.

#### Timestamp fields

The value supplied for a timestamp field must be an [RFC 3339](https://tools.ietf.org/html/rfc3339) date-time string.

Supported timestamp fields are `create_time`, `start_time`, and `end_time`.

#### String fields

The value supplied for a string field may be an arbitrary string.

#### Examples

To query for all alerts created on or after April 5, 2018:

`create_time >= "2018-04-05T00:00:00Z"

To query for all alerts from the source "Gmail phishing":

`source:"Gmail phishing"

### Joining expressions

Expressions may be joined to form a more complex query. The BNF specification is:

`<expressionList> ::= <expression> | <expressionList> <conjunction> <expressionList> | <negation> <expressionList>` `<conjunction> ::= "AND" | "OR" | "" `<negation> ::= "NOT"

Using the empty string as a conjunction acts as an implicit AND.

The precedence of joining operations, from highest to lowest, is NOT, AND, OR.

#### Examples

To query for all alerts which started in 2017:

`start_time >= "2017-01-01T00:00:00Z" AND start_time < "2018-01-01T00:00:00Z"

To query for all user reported phishing alerts from the source "Gmail phishing":

`type:"User reported phishing" source:"Gmail phishing"

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": Sort the list results by a certain order. If not specified results may be returned in arbitrary order. You can sort the results in a 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": Requested page size. Server may return fewer items than requested. If unspecified, server will pick 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 will be excluded from the results of a List operation by default, and will be removed from the Alert Center after 30 days. Marking an alert for deletion will have no effect on an alert which has already been marked for deletion. Attempting to mark a nonexistent alert for deletion will return NOT_FOUND.

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 all the alerts for the current user and application.

type Attachment

type Attachment struct {
	// Csv: 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: Domain id.
	DomainId *DomainId `json:"domainId,omitempty"`

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

	// Messages: Every alert could contain multiple messages.
	Messages []*GmailMessageInfo `json:"messages,omitempty"`

	// SourceIp: The source ip address of the malicious email. e.g.
	// "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: 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: 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: 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: 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: 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. 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: Device compromised state includes:
	// "Compromised" and "Not Compromised".
	DeviceCompromisedState string `json:"deviceCompromisedState,omitempty"`

	// DeviceId: Required. Device Info.
	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: Email of the admin who initiated the takeout.
	Email string `json:"email,omitempty"`

	// TakeoutRequestId: 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: 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: Hash of message body text.
	Md5HashMessageBody string `json:"md5HashMessageBody,omitempty"`

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

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

	// MessageId: Message id.
	MessageId string `json:"messageId,omitempty"`

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

	// SubjectText: 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: 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: Detailed, freeform incident description.
	Description string `json:"description,omitempty"`

	// Title: 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.
	// Result is ordered descending by creation time.
	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: If not empty, indicates that there may be more alerts
	// that match the
	// request; this value can be passed in a new ListAlertsRequest to get
	// the
	// next page of values.
	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. Human readable IP address (e.g., 11.22.33.44)
	// that is
	// associated with the warning event.
	IpAddress string `json:"ipAddress,omitempty"`

	// LoginTime: Optional. Login time that is associated with the warning
	// event.
	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: Details of the login action

func (*LoginDetails) MarshalJSON

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

type MailPhishing

type MailPhishing struct {
	// DomainId: Domain id.
	DomainId *DomainId `json:"domainId,omitempty"`

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

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

	// Messages: Every alert could contain multiple messages.
	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: 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: Domain id.
	DomainId *DomainId `json:"domainId,omitempty"`

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

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

	// Messages: Every alert could contain multiple messages.
	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. This will be deprecated in favor of MailPhishing.

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. 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. Device Info.
	DeviceId string `json:"deviceId,omitempty"`

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

	// DeviceProperty: Device property which is 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: New value of the device property after change.
	NewValue string `json:"newValue,omitempty"`

	// OldValue: Old value of the device property before 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)

Jump to

Keyboard shortcuts

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