Debian Codegraph @

alertcenter/v1beta1/alertcenter-gen.go

raw symbols SCIP
1 // Copyright 2026 Google LLC.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated file. DO NOT EDIT.
6
7 // Package alertcenter provides access to the Google Workspace Alert Center API.
8 //
9 // For product documentation, see: https://developers.google.com/workspace/admin/alertcenter/
10 //
11 // # Library status
12 //
13 // These client libraries are officially supported by Google. However, this
14 // library is considered complete and is in maintenance mode. This means
15 // that we will address critical bugs and security issues but will not add
16 // any new features.
17 //
18 // When possible, we recommend using our newer
19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
20 // that are still actively being worked and iterated on.
21 //
22 // # Creating a client
23 //
24 // Usage example:
25 //
26 // import "google.golang.org/api/alertcenter/v1beta1"
27 // ...
28 // ctx := context.Background()
29 // alertcenterService, err := alertcenter.NewService(ctx)
30 //
31 // In this example, Google Application Default Credentials are used for
32 // authentication. For information on how to create and obtain Application
33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
34 //
35 // # Other authentication options
36 //
37 // To use an API key for authentication (note: some APIs do not support API
38 // keys), use [google.golang.org/api/option.WithAPIKey]:
39 //
40 // alertcenterService, err := alertcenter.NewService(ctx, option.WithAPIKey("AIza..."))
41 //
42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
43 // flow, use [google.golang.org/api/option.WithTokenSource]:
44 //
45 // config := &oauth2.Config{...}
46 // // ...
47 // token, err := config.Exchange(ctx, ...)
48 // alertcenterService, err := alertcenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
49 //
50 // See [google.golang.org/api/option.ClientOption] for details on options.
51 package alertcenter // import "google.golang.org/api/alertcenter/v1beta1"
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "log/slog"
61 "net/http"
62 "net/url"
63 "strconv"
64 "strings"
65
66 "github.com/googleapis/gax-go/v2/internallog"
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75 // Always reference these packages, just in case the auto-generated code
76 // below doesn't.
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90 var _ = internallog.New
91
92 const apiId = "alertcenter:v1beta1"
93 const apiName = "alertcenter"
94 const apiVersion = "v1beta1"
95 const basePath = "https://alertcenter.googleapis.com/"
96 const basePathTemplate = "https://alertcenter.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://alertcenter.mtls.googleapis.com/"
98
99 // OAuth2 scopes used by this API.
100 const (
101 // See and delete your domain's Google Workspace alerts, and send alert
102 // feedback
103 AppsAlertsScope = "https://www.googleapis.com/auth/apps.alerts"
104 )
105
106 // NewService creates a new Service.
107 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
108 scopesOption := internaloption.WithDefaultScopes(
109 "https://www.googleapis.com/auth/apps.alerts",
110 )
111 // NOTE: prepend, so we don't override user-specified scopes.
112 opts = append([]option.ClientOption{scopesOption}, opts...)
113 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
114 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
115 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
116 opts = append(opts, internaloption.EnableNewAuthLibrary())
117 client, endpoint, err := htransport.NewClient(ctx, opts...)
118 if err != nil {
119 return nil, err
120 }
121 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
122 s.Alerts = NewAlertsService(s)
123 s.V1beta1 = NewV1beta1Service(s)
124 if endpoint != "" {
125 s.BasePath = endpoint
126 }
127 return s, nil
128 }
129
130 // New creates a new Service. It uses the provided http.Client for requests.
131 //
132 // Deprecated: please use NewService instead.
133 // To provide a custom HTTP client, use option.WithHTTPClient.
134 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
135 func New(client *http.Client) (*Service, error) {
136 if client == nil {
137 return nil, errors.New("client is nil")
138 }
139 return NewService(context.TODO(), option.WithHTTPClient(client))
140 }
141
142 type Service struct {
143 client *http.Client
144 logger *slog.Logger
145 BasePath string // API endpoint base URL
146 UserAgent string // optional additional User-Agent fragment
147
148 Alerts *AlertsService
149
150 V1beta1 *V1beta1Service
151 }
152
153 func (s *Service) userAgent() string {
154 if s.UserAgent == "" {
155 return googleapi.UserAgent
156 }
157 return googleapi.UserAgent + " " + s.UserAgent
158 }
159
160 func NewAlertsService(s *Service) *AlertsService {
161 rs := &AlertsService{s: s}
162 rs.Feedback = NewAlertsFeedbackService(s)
163 return rs
164 }
165
166 type AlertsService struct {
167 s *Service
168
169 Feedback *AlertsFeedbackService
170 }
171
172 func NewAlertsFeedbackService(s *Service) *AlertsFeedbackService {
173 rs := &AlertsFeedbackService{s: s}
174 return rs
175 }
176
177 type AlertsFeedbackService struct {
178 s *Service
179 }
180
181 func NewV1beta1Service(s *Service) *V1beta1Service {
182 rs := &V1beta1Service{s: s}
183 return rs
184 }
185
186 type V1beta1Service struct {
187 s *Service
188 }
189
190 // AbuseDetected: A generic alert for abusive user activity occurring with a
191 // customer.
192 type AbuseDetected struct {
193 // AdditionalDetails: List of abusive users/entities to be displayed in a table
194 // in the alert.
195 AdditionalDetails *EntityList `json:"additionalDetails,omitempty"`
196 // Product: Product that the abuse is originating from.
197 Product string `json:"product,omitempty"`
198 // SubAlertId: Unique identifier of each sub alert that is onboarded.
199 SubAlertId string `json:"subAlertId,omitempty"`
200 // VariationType: Variation of AbuseDetected alerts. The variation_type
201 // determines the texts displayed the alert details. This differs from
202 // sub_alert_id because each sub alert can have multiple variation_types,
203 // representing different stages of the alert.
204 //
205 // Possible values:
206 // "ABUSE_DETECTED_VARIATION_TYPE_UNSPECIFIED" - AbuseDetected alert
207 // variation type unspecified. No alert should be unspecified.
208 // "DRIVE_ABUSIVE_CONTENT" - Variation displayed for Drive abusive content
209 // alerts.
210 // "LIMITED_DISABLE" - Variation displayed for Limited Disable alerts, when a
211 // Google service is disabled for a user, totally or partially, due to the
212 // user's abusive behavior.
213 VariationType string `json:"variationType,omitempty"`
214 // ForceSendFields is a list of field names (e.g. "AdditionalDetails") to
215 // unconditionally include in API requests. By default, fields with empty or
216 // default values are omitted from API requests. See
217 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
218 // details.
219 ForceSendFields []string `json:"-"`
220 // NullFields is a list of field names (e.g. "AdditionalDetails") to include in
221 // API requests with the JSON null value. By default, fields with empty values
222 // are omitted from API requests. See
223 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
224 NullFields []string `json:"-"`
225 }
226
227 func (s AbuseDetected) MarshalJSON() ([]byte, error) {
228 type NoMethod AbuseDetected
229 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
230 }
231
232 // AccessApproval: Alert that is triggered when Google support requests to
233 // access customer data.
234 type AccessApproval struct {
235 // JustificationReason: Justification for data access based on justification
236 // enums.
237 //
238 // Possible values:
239 // "JUSTIFICATION_UNSPECIFIED" - Justification unspecified
240 // "CUSTOMER_INITIATED_SUPPORT" - Customer Initiated Support
241 // "GOOGLE_INITIATED_REVIEW" - Google Initiated Review
242 // "GOOGLE_INITIATED_SERVICE" - Google Initiated Service
243 // "THIRD_PARTY_DATA_REQUEST" - Third Party Data Request
244 // "GOOGLE_RESPONSE_TO_PRODUCTION_ALERT" - Google Response to Production
245 // Alert
246 JustificationReason []string `json:"justificationReason,omitempty"`
247 // OfficeLocation: Office location of Google staff requesting access such as
248 // "US".
249 OfficeLocation string `json:"officeLocation,omitempty"`
250 // Products: Products within scope of the Access Approvals request.
251 Products []string `json:"products,omitempty"`
252 // RequestId: ID of the Access Approvals request. This is a helpful field when
253 // requesting support from Google.
254 RequestId string `json:"requestId,omitempty"`
255 // Scope: Scope of access, also known as a resource. This is further narrowed
256 // down by the product field.
257 Scope string `json:"scope,omitempty"`
258 // Tickets: Support tickets related to this Access Approvals request. Populated
259 // if there is an associated case number.
260 Tickets []*SupportTicket `json:"tickets,omitempty"`
261 // ForceSendFields is a list of field names (e.g. "JustificationReason") to
262 // unconditionally include in API requests. By default, fields with empty or
263 // default values are omitted from API requests. See
264 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
265 // details.
266 ForceSendFields []string `json:"-"`
267 // NullFields is a list of field names (e.g. "JustificationReason") to include
268 // in API requests with the JSON null value. By default, fields with empty
269 // values are omitted from API requests. See
270 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
271 NullFields []string `json:"-"`
272 }
273
274 func (s AccessApproval) MarshalJSON() ([]byte, error) {
275 type NoMethod AccessApproval
276 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
277 }
278
279 // AccountSuspensionDetails: Details about why an account is receiving an
280 // account suspension warning.
281 type AccountSuspensionDetails struct {
282 // AbuseReason: The reason why this account is receiving an account suspension
283 // warning.
284 //
285 // Possible values:
286 // "ACCOUNT_SUSPENSION_ABUSE_REASON_UNSPECIFIED" - Abuse reason is
287 // unspecified.
288 // "TOS_VIOLATION" - This account is being suspended for a Terms of Service
289 // violation.
290 // "SPAM" - This account is being suspended for spam.
291 // "PHISHING" - This account is being suspended for phishing.
292 // "TRAFFIC_PUMPING" - This account is being suspended for artificially
293 // boosting traffic to a website.
294 // "FRAUD" - This account is being suspended for fraud.
295 // "NUMBER_HARVESTING" - This account is being suspended for number
296 // harvesting.
297 // "PAYMENTS_FRAUD" - This account is being suspended for payments fraud.
298 // "UNWANTED_CONTENT" - This account is being suspended for unwanted content.
299 // "UNQUALIFIED_EDU" - This account is being suspended for being an
300 // unqualified educational institution.
301 AbuseReason string `json:"abuseReason,omitempty"`
302 // ProductName: The name of the product being abused. This is restricted to
303 // only the following values: "Gmail" "Google Workspace" "Payments" "Voice"
304 // "YouTube" "Other"
305 ProductName string `json:"productName,omitempty"`
306 // ForceSendFields is a list of field names (e.g. "AbuseReason") to
307 // unconditionally include in API requests. By default, fields with empty or
308 // default values are omitted from API requests. See
309 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
310 // details.
311 ForceSendFields []string `json:"-"`
312 // NullFields is a list of field names (e.g. "AbuseReason") to include in API
313 // requests with the JSON null value. By default, fields with empty values are
314 // omitted from API requests. See
315 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
316 NullFields []string `json:"-"`
317 }
318
319 func (s AccountSuspensionDetails) MarshalJSON() ([]byte, error) {
320 type NoMethod AccountSuspensionDetails
321 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
322 }
323
324 // AccountSuspensionWarning: A warning that the customer's account is about to
325 // be suspended.
326 type AccountSuspensionWarning struct {
327 // AppealWindow: The amount of time remaining to appeal an imminent suspension.
328 // After this window has elapsed, the account will be suspended. Only populated
329 // if the account suspension is in WARNING state.
330 AppealWindow string `json:"appealWindow,omitempty"`
331 // State: Account suspension warning state.
332 //
333 // Possible values:
334 // "ACCOUNT_SUSPENSION_WARNING_STATE_UNSPECIFIED" - State is unspecified.
335 // "WARNING" - Customer is receiving a warning about imminent suspension.
336 // "SUSPENDED" - Customer is being notified that their account has been
337 // suspended.
338 // "APPEAL_APPROVED" - Customer is being notified that their suspension
339 // appeal was approved.
340 // "APPEAL_SUBMITTED" - Customer has submitted their appeal, which is pending
341 // review.
342 State string `json:"state,omitempty"`
343 // SuspensionDetails: Details about why an account is being suspended.
344 SuspensionDetails []*AccountSuspensionDetails `json:"suspensionDetails,omitempty"`
345 // ForceSendFields is a list of field names (e.g. "AppealWindow") to
346 // unconditionally include in API requests. By default, fields with empty or
347 // default values are omitted from API requests. See
348 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
349 // details.
350 ForceSendFields []string `json:"-"`
351 // NullFields is a list of field names (e.g. "AppealWindow") to include in API
352 // requests with the JSON null value. By default, fields with empty values are
353 // omitted from API requests. See
354 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
355 NullFields []string `json:"-"`
356 }
357
358 func (s AccountSuspensionWarning) MarshalJSON() ([]byte, error) {
359 type NoMethod AccountSuspensionWarning
360 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
361 }
362
363 // AccountWarning: Alerts for user account warning events.
364 type AccountWarning struct {
365 // Email: Required. The email of the user that this event belongs to.
366 Email string `json:"email,omitempty"`
367 // LoginDetails: Optional. Details of the login action associated with the
368 // warning event. This is only available for: * Suspicious login * Suspicious
369 // login (less secure app) * Suspicious programmatic login * User suspended
370 // (suspicious activity)
371 LoginDetails *LoginDetails `json:"loginDetails,omitempty"`
372 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
373 // include in API requests. By default, fields with empty or default values are
374 // omitted from API requests. See
375 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
376 // details.
377 ForceSendFields []string `json:"-"`
378 // NullFields is a list of field names (e.g. "Email") to include in API
379 // requests with the JSON null value. By default, fields with empty values are
380 // omitted from API requests. See
381 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
382 NullFields []string `json:"-"`
383 }
384
385 func (s AccountWarning) MarshalJSON() ([]byte, error) {
386 type NoMethod AccountWarning
387 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
388 }
389
390 // ActionInfo: Metadata related to the action.
391 type ActionInfo struct {
392 // EvidenceLockerFilePath: Google Cloud Storage location of the content that
393 // violated the rule. This field has format: "/"
394 EvidenceLockerFilePath string `json:"evidenceLockerFilePath,omitempty"`
395 // ForceSendFields is a list of field names (e.g. "EvidenceLockerFilePath") to
396 // unconditionally include in API requests. By default, fields with empty or
397 // default values are omitted from API requests. See
398 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
399 // details.
400 ForceSendFields []string `json:"-"`
401 // NullFields is a list of field names (e.g. "EvidenceLockerFilePath") to
402 // include in API requests with the JSON null value. By default, fields with
403 // empty values are omitted from API requests. See
404 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
405 NullFields []string `json:"-"`
406 }
407
408 func (s ActionInfo) MarshalJSON() ([]byte, error) {
409 type NoMethod ActionInfo
410 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
411 }
412
413 // ActivityRule: Alerts from Google Workspace Security Center rules service
414 // configured by an admin.
415 type ActivityRule struct {
416 // ActionNames: List of action names associated with the rule threshold.
417 ActionNames []string `json:"actionNames,omitempty"`
418 // CreateTime: Rule create timestamp.
419 CreateTime string `json:"createTime,omitempty"`
420 // Description: Description of the rule.
421 Description string `json:"description,omitempty"`
422 // DisplayName: Alert display name.
423 DisplayName string `json:"displayName,omitempty"`
424 // Name: Rule name.
425 Name string `json:"name,omitempty"`
426 // Query: Query that is used to get the data from the associated source.
427 Query string `json:"query,omitempty"`
428 // SupersededAlerts: List of alert IDs superseded by this alert. It is used to
429 // indicate that this alert is essentially extension of superseded alerts and
430 // we found the relationship after creating these alerts.
431 SupersededAlerts []string `json:"supersededAlerts,omitempty"`
432 // SupersedingAlert: Alert ID superseding this alert. It is used to indicate
433 // that superseding alert is essentially extension of this alert and we found
434 // the relationship after creating both alerts.
435 SupersedingAlert string `json:"supersedingAlert,omitempty"`
436 // Threshold: Alert threshold is for example “COUNT > 5”.
437 Threshold string `json:"threshold,omitempty"`
438 // TriggerSource: The trigger sources for this rule. * GMAIL_EVENTS *
439 // DEVICE_EVENTS * USER_EVENTS
440 TriggerSource string `json:"triggerSource,omitempty"`
441 // UpdateTime: The timestamp of the last update to the rule.
442 UpdateTime string `json:"updateTime,omitempty"`
443 // WindowSize: Rule window size. Possible values are 1 hour or 24 hours.
444 WindowSize string `json:"windowSize,omitempty"`
445 // ForceSendFields is a list of field names (e.g. "ActionNames") to
446 // unconditionally include in API requests. By default, fields with empty or
447 // default values are omitted from API requests. See
448 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
449 // details.
450 ForceSendFields []string `json:"-"`
451 // NullFields is a list of field names (e.g. "ActionNames") to include in API
452 // requests with the JSON null value. By default, fields with empty values are
453 // omitted from API requests. See
454 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
455 NullFields []string `json:"-"`
456 }
457
458 func (s ActivityRule) MarshalJSON() ([]byte, error) {
459 type NoMethod ActivityRule
460 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
461 }
462
463 // Alert: An alert affecting a customer.
464 type Alert struct {
465 // AlertId: Output only. The unique identifier for the alert.
466 AlertId string `json:"alertId,omitempty"`
467 // CreateTime: Output only. The time this alert was created.
468 CreateTime string `json:"createTime,omitempty"`
469 // CustomerId: Output only. The unique identifier of the Google Workspace
470 // account of the customer.
471 CustomerId string `json:"customerId,omitempty"`
472 // Data: Optional. The data associated with this alert, for example
473 // google.apps.alertcenter.type.DeviceCompromised.
474 Data googleapi.RawMessage `json:"data,omitempty"`
475 // Deleted: Output only. `True` if this alert is marked for deletion.
476 Deleted bool `json:"deleted,omitempty"`
477 // EndTime: Optional. The time the event that caused this alert ceased being
478 // active. If provided, the end time must not be earlier than the start time.
479 // If not provided, it indicates an ongoing alert.
480 EndTime string `json:"endTime,omitempty"`
481 // Etag: Optional. `etag` is used for optimistic concurrency control as a way
482 // to help prevent simultaneous updates of an alert from overwriting each
483 // other. It is strongly suggested that systems make use of the `etag` in the
484 // read-modify-write cycle to perform alert updates in order to avoid race
485 // conditions: An `etag` is returned in the response which contains alerts, and
486 // systems are expected to put that etag in the request to update alert to
487 // ensure that their change will be applied to the same version of the alert.
488 // If no `etag` is provided in the call to update alert, then the existing
489 // alert is overwritten blindly.
490 Etag string `json:"etag,omitempty"`
491 // Metadata: Output only. The metadata associated with this alert.
492 Metadata *AlertMetadata `json:"metadata,omitempty"`
493 // SecurityInvestigationToolLink: Output only. An optional Security
494 // Investigation Tool (https://support.google.com/a/answer/7575955) query for
495 // this alert.
496 SecurityInvestigationToolLink string `json:"securityInvestigationToolLink,omitempty"`
497 // Source: Required. A unique identifier for the system that reported the
498 // alert. This is output only after alert is created. Supported sources are any
499 // of the following: * Google Operations * Mobile device management * Gmail
500 // phishing * Data Loss Prevention * Domain wide takeout * State sponsored
501 // attack * Google identity * Apps outage
502 Source string `json:"source,omitempty"`
503 // StartTime: Required. The time the event that caused this alert was started
504 // or detected.
505 StartTime string `json:"startTime,omitempty"`
506 // Type: Required. The type of the alert. This is output only after alert is
507 // created. For a list of available alert types see Google Workspace Alert
508 // types
509 // (https://developers.google.com/workspace/admin/alertcenter/reference/alert-types).
510 Type string `json:"type,omitempty"`
511 // UpdateTime: Output only. The time this alert was last updated.
512 UpdateTime string `json:"updateTime,omitempty"`
513
514 // ServerResponse contains the HTTP response code and headers from the server.
515 googleapi.ServerResponse `json:"-"`
516 // ForceSendFields is a list of field names (e.g. "AlertId") to unconditionally
517 // include in API requests. By default, fields with empty or default values are
518 // omitted from API requests. See
519 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
520 // details.
521 ForceSendFields []string `json:"-"`
522 // NullFields is a list of field names (e.g. "AlertId") to include in API
523 // requests with the JSON null value. By default, fields with empty values are
524 // omitted from API requests. See
525 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
526 NullFields []string `json:"-"`
527 }
528
529 func (s Alert) MarshalJSON() ([]byte, error) {
530 type NoMethod Alert
531 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
532 }
533
534 // AlertFeedback: A customer feedback about an alert.
535 type AlertFeedback struct {
536 // AlertId: Output only. The alert identifier.
537 AlertId string `json:"alertId,omitempty"`
538 // CreateTime: Output only. The time this feedback was created.
539 CreateTime string `json:"createTime,omitempty"`
540 // CustomerId: Output only. The unique identifier of the Google Workspace
541 // account of the customer.
542 CustomerId string `json:"customerId,omitempty"`
543 // Email: Output only. The email of the user that provided the feedback.
544 Email string `json:"email,omitempty"`
545 // FeedbackId: Output only. The unique identifier for the feedback.
546 FeedbackId string `json:"feedbackId,omitempty"`
547 // Type: Required. The type of the feedback.
548 //
549 // Possible values:
550 // "ALERT_FEEDBACK_TYPE_UNSPECIFIED" - The feedback type is not specified.
551 // "NOT_USEFUL" - The alert report is not useful.
552 // "SOMEWHAT_USEFUL" - The alert report is somewhat useful.
553 // "VERY_USEFUL" - The alert report is very useful.
554 Type string `json:"type,omitempty"`
555
556 // ServerResponse contains the HTTP response code and headers from the server.
557 googleapi.ServerResponse `json:"-"`
558 // ForceSendFields is a list of field names (e.g. "AlertId") to unconditionally
559 // include in API requests. By default, fields with empty or default values are
560 // omitted from API requests. See
561 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
562 // details.
563 ForceSendFields []string `json:"-"`
564 // NullFields is a list of field names (e.g. "AlertId") to include in API
565 // requests with the JSON null value. By default, fields with empty values are
566 // omitted from API requests. See
567 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
568 NullFields []string `json:"-"`
569 }
570
571 func (s AlertFeedback) MarshalJSON() ([]byte, error) {
572 type NoMethod AlertFeedback
573 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
574 }
575
576 // AlertMetadata: An alert metadata.
577 type AlertMetadata struct {
578 // AlertId: Output only. The alert identifier.
579 AlertId string `json:"alertId,omitempty"`
580 // Assignee: The email address of the user assigned to the alert.
581 Assignee string `json:"assignee,omitempty"`
582 // CustomerId: Output only. The unique identifier of the Google Workspace
583 // account of the customer.
584 CustomerId string `json:"customerId,omitempty"`
585 // Etag: Optional. `etag` is used for optimistic concurrency control as a way
586 // to help prevent simultaneous updates of an alert metadata from overwriting
587 // each other. It is strongly suggested that systems make use of the `etag` in
588 // the read-modify-write cycle to perform metadata updates in order to avoid
589 // race conditions: An `etag` is returned in the response which contains alert
590 // metadata, and systems are expected to put that etag in the request to update
591 // alert metadata to ensure that their change will be applied to the same
592 // version of the alert metadata. If no `etag` is provided in the call to
593 // update alert metadata, then the existing alert metadata is overwritten
594 // blindly.
595 Etag string `json:"etag,omitempty"`
596 // Severity: The severity value of the alert. Alert Center will set this field
597 // at alert creation time, default's to an empty string when it could not be
598 // determined. The supported values for update actions on this field are the
599 // following: * HIGH * MEDIUM * LOW
600 Severity string `json:"severity,omitempty"`
601 // Status: The current status of the alert. The supported values are the
602 // following: * NOT_STARTED * IN_PROGRESS * CLOSED
603 Status string `json:"status,omitempty"`
604 // UpdateTime: Output only. The time this metadata was last updated.
605 UpdateTime string `json:"updateTime,omitempty"`
606
607 // ServerResponse contains the HTTP response code and headers from the server.
608 googleapi.ServerResponse `json:"-"`
609 // ForceSendFields is a list of field names (e.g. "AlertId") to unconditionally
610 // include in API requests. By default, fields with empty or default values are
611 // omitted from API requests. See
612 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
613 // details.
614 ForceSendFields []string `json:"-"`
615 // NullFields is a list of field names (e.g. "AlertId") to include in API
616 // requests with the JSON null value. By default, fields with empty values are
617 // omitted from API requests. See
618 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
619 NullFields []string `json:"-"`
620 }
621
622 func (s AlertMetadata) MarshalJSON() ([]byte, error) {
623 type NoMethod AlertMetadata
624 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
625 }
626
627 // ApnsCertificateExpirationInfo: The explanation message associated with "APNS
628 // certificate is expiring soon" and "APNS certificate has expired" alerts.
629 type ApnsCertificateExpirationInfo struct {
630 // AppleId: The Apple ID used to create the certificate. It may be blank if
631 // admins didn't enter it.
632 AppleId string `json:"appleId,omitempty"`
633 // ExpirationTime: The expiration date of the APNS certificate.
634 ExpirationTime string `json:"expirationTime,omitempty"`
635 // Uid: The UID of the certificate.
636 Uid string `json:"uid,omitempty"`
637 // ForceSendFields is a list of field names (e.g. "AppleId") to unconditionally
638 // include in API requests. By default, fields with empty or default values are
639 // omitted from API requests. See
640 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
641 // details.
642 ForceSendFields []string `json:"-"`
643 // NullFields is a list of field names (e.g. "AppleId") to include in API
644 // requests with the JSON null value. By default, fields with empty values are
645 // omitted from API requests. See
646 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
647 NullFields []string `json:"-"`
648 }
649
650 func (s ApnsCertificateExpirationInfo) MarshalJSON() ([]byte, error) {
651 type NoMethod ApnsCertificateExpirationInfo
652 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
653 }
654
655 // AppMakerSqlSetupNotification: Alerts from App Maker to notify admins to set
656 // up default SQL instance.
657 type AppMakerSqlSetupNotification struct {
658 // RequestInfo: List of applications with requests for default SQL set up.
659 RequestInfo []*RequestInfo `json:"requestInfo,omitempty"`
660 // ForceSendFields is a list of field names (e.g. "RequestInfo") to
661 // unconditionally include in API requests. By default, fields with empty or
662 // default values are omitted from API requests. See
663 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
664 // details.
665 ForceSendFields []string `json:"-"`
666 // NullFields is a list of field names (e.g. "RequestInfo") to include in API
667 // requests with the JSON null value. By default, fields with empty values are
668 // omitted from API requests. See
669 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
670 NullFields []string `json:"-"`
671 }
672
673 func (s AppMakerSqlSetupNotification) MarshalJSON() ([]byte, error) {
674 type NoMethod AppMakerSqlSetupNotification
675 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
676 }
677
678 // AppSettingsChanged: Alerts from AppSettingsChanged bucket Rules configured
679 // by Admin which contain the following rules: - Calendar settings changed -
680 // Drive settings changed - Email settings changed - Mobile settings changed
681 type AppSettingsChanged struct {
682 // AlertDetails: Any other associated alert details, for example,
683 // AlertConfiguration.
684 AlertDetails string `json:"alertDetails,omitempty"`
685 // Name: Rule name
686 Name string `json:"name,omitempty"`
687 // ForceSendFields is a list of field names (e.g. "AlertDetails") to
688 // unconditionally include in API requests. By default, fields with empty or
689 // default values are omitted from API requests. See
690 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
691 // details.
692 ForceSendFields []string `json:"-"`
693 // NullFields is a list of field names (e.g. "AlertDetails") to include in API
694 // requests with the JSON null value. By default, fields with empty values are
695 // omitted from API requests. See
696 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
697 NullFields []string `json:"-"`
698 }
699
700 func (s AppSettingsChanged) MarshalJSON() ([]byte, error) {
701 type NoMethod AppSettingsChanged
702 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
703 }
704
705 // AppsOutage: An outage incident reported for a Google Workspace service.
706 type AppsOutage struct {
707 // DashboardUri: Link to the outage event in Google Workspace Status Dashboard
708 DashboardUri string `json:"dashboardUri,omitempty"`
709 // IncidentTrackingId: Incident tracking ID.
710 IncidentTrackingId string `json:"incidentTrackingId,omitempty"`
711 // MergeInfo: Indicates new alert details under which the outage is
712 // communicated. Only populated when Status is MERGED.
713 MergeInfo *MergeInfo `json:"mergeInfo,omitempty"`
714 // NextUpdateTime: Timestamp by which the next update is expected to arrive.
715 NextUpdateTime string `json:"nextUpdateTime,omitempty"`
716 // Products: List of products impacted by the outage.
717 Products []string `json:"products,omitempty"`
718 // ResolutionTime: Timestamp when the outage is expected to be resolved, or has
719 // confirmed resolution. Provided only when known.
720 ResolutionTime string `json:"resolutionTime,omitempty"`
721 // Status: Current outage status.
722 //
723 // Possible values:
724 // "STATUS_UNSPECIFIED" - Status is unspecified.
725 // "NEW" - The incident has just been reported.
726 // "ONGOING" - The incident is ongoing.
727 // "RESOLVED" - The incident has been resolved.
728 // "FALSE_POSITIVE" - Further assessment indicated no customer impact.
729 // "PARTIALLY_RESOLVED" - The incident has been partially resolved.
730 // "MERGED" - The incident was merged into a parent.
731 // "DOWNGRADED" - The incident has lower impact than initially anticipated.
732 Status string `json:"status,omitempty"`
733 // ForceSendFields is a list of field names (e.g. "DashboardUri") to
734 // unconditionally include in API requests. By default, fields with empty or
735 // default values are omitted from API requests. See
736 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
737 // details.
738 ForceSendFields []string `json:"-"`
739 // NullFields is a list of field names (e.g. "DashboardUri") to include in API
740 // requests with the JSON null value. By default, fields with empty values are
741 // omitted from API requests. See
742 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
743 NullFields []string `json:"-"`
744 }
745
746 func (s AppsOutage) MarshalJSON() ([]byte, error) {
747 type NoMethod AppsOutage
748 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
749 }
750
751 // Attachment: Attachment with application-specific information about an alert.
752 type Attachment struct {
753 // Csv: A CSV file attachment.
754 Csv *Csv `json:"csv,omitempty"`
755 // ForceSendFields is a list of field names (e.g. "Csv") to unconditionally
756 // include in API requests. By default, fields with empty or default values are
757 // omitted from API requests. See
758 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
759 // details.
760 ForceSendFields []string `json:"-"`
761 // NullFields is a list of field names (e.g. "Csv") to include in API requests
762 // with the JSON null value. By default, fields with empty values are omitted
763 // from API requests. See
764 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
765 NullFields []string `json:"-"`
766 }
767
768 func (s Attachment) MarshalJSON() ([]byte, error) {
769 type NoMethod Attachment
770 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
771 }
772
773 // BadWhitelist: Alert for setting the domain or IP that malicious email comes
774 // from as whitelisted domain or IP in Gmail advanced settings.
775 type BadWhitelist struct {
776 // DomainId: The domain ID.
777 DomainId *DomainId `json:"domainId,omitempty"`
778 // MaliciousEntity: The entity whose actions triggered a Gmail phishing alert.
779 MaliciousEntity *MaliciousEntity `json:"maliciousEntity,omitempty"`
780 // Messages: The list of messages contained by this alert.
781 Messages []*GmailMessageInfo `json:"messages,omitempty"`
782 // SourceIp: The source IP address of the malicious email, for example,
783 // `127.0.0.1`.
784 SourceIp string `json:"sourceIp,omitempty"`
785 // ForceSendFields is a list of field names (e.g. "DomainId") to
786 // unconditionally include in API requests. By default, fields with empty or
787 // default values are omitted from API requests. See
788 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
789 // details.
790 ForceSendFields []string `json:"-"`
791 // NullFields is a list of field names (e.g. "DomainId") to include in API
792 // requests with the JSON null value. By default, fields with empty values are
793 // omitted from API requests. See
794 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
795 NullFields []string `json:"-"`
796 }
797
798 func (s BadWhitelist) MarshalJSON() ([]byte, error) {
799 type NoMethod BadWhitelist
800 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
801 }
802
803 // BatchDeleteAlertsRequest: A request to perform batch delete on alerts.
804 type BatchDeleteAlertsRequest struct {
805 // AlertId: Required. The list of alert IDs to delete.
806 AlertId []string `json:"alertId,omitempty"`
807 // CustomerId: Optional. The unique identifier of the Google Workspace account
808 // of the customer the alerts are associated with. The `customer_id` must have
809 // the initial "C" stripped (for example, `046psxkn`). Inferred from the caller
810 // identity if not provided. Find your customer ID
811 // (https://support.google.com/cloudidentity/answer/10070793).
812 CustomerId string `json:"customerId,omitempty"`
813 // ForceSendFields is a list of field names (e.g. "AlertId") to unconditionally
814 // include in API requests. By default, fields with empty or default values are
815 // omitted from API requests. See
816 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
817 // details.
818 ForceSendFields []string `json:"-"`
819 // NullFields is a list of field names (e.g. "AlertId") to include in API
820 // requests with the JSON null value. By default, fields with empty values are
821 // omitted from API requests. See
822 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
823 NullFields []string `json:"-"`
824 }
825
826 func (s BatchDeleteAlertsRequest) MarshalJSON() ([]byte, error) {
827 type NoMethod BatchDeleteAlertsRequest
828 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
829 }
830
831 // BatchDeleteAlertsResponse: Response to batch delete operation on alerts.
832 type BatchDeleteAlertsResponse struct {
833 // FailedAlertStatus: The status details for each failed `alert_id`.
834 FailedAlertStatus map[string]Status `json:"failedAlertStatus,omitempty"`
835 // SuccessAlertIds: The successful list of alert IDs.
836 SuccessAlertIds []string `json:"successAlertIds,omitempty"`
837
838 // ServerResponse contains the HTTP response code and headers from the server.
839 googleapi.ServerResponse `json:"-"`
840 // ForceSendFields is a list of field names (e.g. "FailedAlertStatus") to
841 // unconditionally include in API requests. By default, fields with empty or
842 // default values are omitted from API requests. See
843 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
844 // details.
845 ForceSendFields []string `json:"-"`
846 // NullFields is a list of field names (e.g. "FailedAlertStatus") to include in
847 // API requests with the JSON null value. By default, fields with empty values
848 // are omitted from API requests. See
849 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
850 NullFields []string `json:"-"`
851 }
852
853 func (s BatchDeleteAlertsResponse) MarshalJSON() ([]byte, error) {
854 type NoMethod BatchDeleteAlertsResponse
855 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
856 }
857
858 // BatchUndeleteAlertsRequest: A request to perform batch undelete on alerts.
859 type BatchUndeleteAlertsRequest struct {
860 // AlertId: Required. The list of alert IDs to undelete.
861 AlertId []string `json:"alertId,omitempty"`
862 // CustomerId: Optional. The unique identifier of the Google Workspace account
863 // of the customer the alerts are associated with. The `customer_id` must have
864 // the initial "C" stripped (for example, `046psxkn`). Inferred from the caller
865 // identity if not provided. Find your customer ID
866 // (https://support.google.com/cloudidentity/answer/10070793).
867 CustomerId string `json:"customerId,omitempty"`
868 // ForceSendFields is a list of field names (e.g. "AlertId") to unconditionally
869 // include in API requests. By default, fields with empty or default values are
870 // omitted from API requests. See
871 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
872 // details.
873 ForceSendFields []string `json:"-"`
874 // NullFields is a list of field names (e.g. "AlertId") to include in API
875 // requests with the JSON null value. By default, fields with empty values are
876 // omitted from API requests. See
877 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
878 NullFields []string `json:"-"`
879 }
880
881 func (s BatchUndeleteAlertsRequest) MarshalJSON() ([]byte, error) {
882 type NoMethod BatchUndeleteAlertsRequest
883 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
884 }
885
886 // BatchUndeleteAlertsResponse: Response to batch undelete operation on alerts.
887 type BatchUndeleteAlertsResponse struct {
888 // FailedAlertStatus: The status details for each failed `alert_id`.
889 FailedAlertStatus map[string]Status `json:"failedAlertStatus,omitempty"`
890 // SuccessAlertIds: The successful list of alert IDs.
891 SuccessAlertIds []string `json:"successAlertIds,omitempty"`
892
893 // ServerResponse contains the HTTP response code and headers from the server.
894 googleapi.ServerResponse `json:"-"`
895 // ForceSendFields is a list of field names (e.g. "FailedAlertStatus") to
896 // unconditionally include in API requests. By default, fields with empty or
897 // default values are omitted from API requests. See
898 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
899 // details.
900 ForceSendFields []string `json:"-"`
901 // NullFields is a list of field names (e.g. "FailedAlertStatus") to include in
902 // API requests with the JSON null value. By default, fields with empty values
903 // are omitted from API requests. See
904 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
905 NullFields []string `json:"-"`
906 }
907
908 func (s BatchUndeleteAlertsResponse) MarshalJSON() ([]byte, error) {
909 type NoMethod BatchUndeleteAlertsResponse
910 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
911 }
912
913 // ClientSideEncryptionServiceUnavailable: Alerts for client-side encryption
914 // outages.
915 type ClientSideEncryptionServiceUnavailable struct {
916 // IdpError: Identity providers impacted by an outage or misconfiguration.
917 IdpError []*IdentityProviderError `json:"idpError,omitempty"`
918 // KeyServiceError: External key services impacted by an outage or
919 // misconfiguration.
920 KeyServiceError []*KeyServiceError `json:"keyServiceError,omitempty"`
921 // ForceSendFields is a list of field names (e.g. "IdpError") to
922 // unconditionally include in API requests. By default, fields with empty or
923 // default values are omitted from API requests. See
924 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
925 // details.
926 ForceSendFields []string `json:"-"`
927 // NullFields is a list of field names (e.g. "IdpError") to include in API
928 // requests with the JSON null value. By default, fields with empty values are
929 // omitted from API requests. See
930 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
931 NullFields []string `json:"-"`
932 }
933
934 func (s ClientSideEncryptionServiceUnavailable) MarshalJSON() ([]byte, error) {
935 type NoMethod ClientSideEncryptionServiceUnavailable
936 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
937 }
938
939 // CloudPubsubTopic: A reference to a Cloud Pubsub topic. To register for
940 // notifications, the owner of the topic must grant
941 // `[email protected]` the
942 // `projects.topics.publish` permission.
943 type CloudPubsubTopic struct {
944 // PayloadFormat: Optional. The format of the payload that would be sent. If
945 // not specified the format will be JSON.
946 //
947 // Possible values:
948 // "PAYLOAD_FORMAT_UNSPECIFIED" - Payload format is not specified (will use
949 // JSON as default).
950 // "JSON" - Use JSON.
951 PayloadFormat string `json:"payloadFormat,omitempty"`
952 // TopicName: The `name` field of a Cloud Pubsub [Topic]
953 // (https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic).
954 TopicName string `json:"topicName,omitempty"`
955 // ForceSendFields is a list of field names (e.g. "PayloadFormat") to
956 // unconditionally include in API requests. By default, fields with empty or
957 // default values are omitted from API requests. See
958 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
959 // details.
960 ForceSendFields []string `json:"-"`
961 // NullFields is a list of field names (e.g. "PayloadFormat") to include in API
962 // requests with the JSON null value. By default, fields with empty values are
963 // omitted from API requests. See
964 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
965 NullFields []string `json:"-"`
966 }
967
968 func (s CloudPubsubTopic) MarshalJSON() ([]byte, error) {
969 type NoMethod CloudPubsubTopic
970 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
971 }
972
973 // Csv: A representation of a CSV file attachment, as a list of column headers
974 // and a list of data rows.
975 type Csv struct {
976 // DataRows: The list of data rows in a CSV file, as string arrays rather than
977 // as a single comma-separated string.
978 DataRows []*CsvRow `json:"dataRows,omitempty"`
979 // Headers: The list of headers for data columns in a CSV file.
980 Headers []string `json:"headers,omitempty"`
981 // ForceSendFields is a list of field names (e.g. "DataRows") to
982 // unconditionally include in API requests. By default, fields with empty or
983 // default values are omitted from API requests. See
984 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
985 // details.
986 ForceSendFields []string `json:"-"`
987 // NullFields is a list of field names (e.g. "DataRows") to include in API
988 // requests with the JSON null value. By default, fields with empty values are
989 // omitted from API requests. See
990 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
991 NullFields []string `json:"-"`
992 }
993
994 func (s Csv) MarshalJSON() ([]byte, error) {
995 type NoMethod Csv
996 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
997 }
998
999 // CsvRow: A representation of a single data row in a CSV file.
1000 type CsvRow struct {
1001 // Entries: The data entries in a CSV file row, as a string array rather than a
1002 // single comma-separated string.
1003 Entries []string `json:"entries,omitempty"`
1004 // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally
1005 // include in API requests. By default, fields with empty or default values are
1006 // omitted from API requests. See
1007 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1008 // details.
1009 ForceSendFields []string `json:"-"`
1010 // NullFields is a list of field names (e.g. "Entries") to include in API
1011 // requests with the JSON null value. By default, fields with empty values are
1012 // omitted from API requests. See
1013 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1014 NullFields []string `json:"-"`
1015 }
1016
1017 func (s CsvRow) MarshalJSON() ([]byte, error) {
1018 type NoMethod CsvRow
1019 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1020 }
1021
1022 // DeviceCompromised: A mobile device compromised alert. Derived from audit
1023 // logs.
1024 type DeviceCompromised struct {
1025 // Email: The email of the user this alert was created for.
1026 Email string `json:"email,omitempty"`
1027 // Events: Required. The list of security events.
1028 Events []*DeviceCompromisedSecurityDetail `json:"events,omitempty"`
1029 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
1030 // include in API requests. By default, fields with empty or default values are
1031 // omitted from API requests. See
1032 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1033 // details.
1034 ForceSendFields []string `json:"-"`
1035 // NullFields is a list of field names (e.g. "Email") to include in API
1036 // requests with the JSON null value. By default, fields with empty values are
1037 // omitted from API requests. See
1038 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1039 NullFields []string `json:"-"`
1040 }
1041
1042 func (s DeviceCompromised) MarshalJSON() ([]byte, error) {
1043 type NoMethod DeviceCompromised
1044 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1045 }
1046
1047 // DeviceCompromisedSecurityDetail: Detailed information of a single MDM device
1048 // compromised event.
1049 type DeviceCompromisedSecurityDetail struct {
1050 // DeviceCompromisedState: The device compromised state. Possible values are
1051 // "Compromised" or "Not Compromised".
1052 DeviceCompromisedState string `json:"deviceCompromisedState,omitempty"`
1053 // DeviceId: Required. The device ID.
1054 DeviceId string `json:"deviceId,omitempty"`
1055 // DeviceModel: The model of the device.
1056 DeviceModel string `json:"deviceModel,omitempty"`
1057 // DeviceType: The type of the device.
1058 DeviceType string `json:"deviceType,omitempty"`
1059 // IosVendorId: Required for iOS, empty for others.
1060 IosVendorId string `json:"iosVendorId,omitempty"`
1061 // ResourceId: The device resource ID.
1062 ResourceId string `json:"resourceId,omitempty"`
1063 // SerialNumber: The serial number of the device.
1064 SerialNumber string `json:"serialNumber,omitempty"`
1065 // ForceSendFields is a list of field names (e.g. "DeviceCompromisedState") to
1066 // unconditionally include in API requests. By default, fields with empty or
1067 // default values are omitted from API requests. See
1068 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1069 // details.
1070 ForceSendFields []string `json:"-"`
1071 // NullFields is a list of field names (e.g. "DeviceCompromisedState") to
1072 // include in API requests with the JSON null value. By default, fields with
1073 // empty values are omitted from API requests. See
1074 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1075 NullFields []string `json:"-"`
1076 }
1077
1078 func (s DeviceCompromisedSecurityDetail) MarshalJSON() ([]byte, error) {
1079 type NoMethod DeviceCompromisedSecurityDetail
1080 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1081 }
1082
1083 // DeviceManagementRule: Alerts from Device Management Rules configured by
1084 // Admin.
1085 type DeviceManagementRule struct {
1086 // DeviceId: Required. The device ID.
1087 DeviceId string `json:"deviceId,omitempty"`
1088 // DeviceModel: The model of the device.
1089 DeviceModel string `json:"deviceModel,omitempty"`
1090 // DeviceType: The type of the device.
1091 DeviceType string `json:"deviceType,omitempty"`
1092 // Email: The email of the user this alert was created for.
1093 Email string `json:"email,omitempty"`
1094 // Id: ID of the rule that triggered the alert
1095 Id string `json:"id,omitempty"`
1096 // IosVendorId: Required for iOS, empty for others.
1097 IosVendorId string `json:"iosVendorId,omitempty"`
1098 // OwnerId: Obfuscated ID of the owner of the device
1099 OwnerId string `json:"ownerId,omitempty"`
1100 // ResourceId: The device resource ID.
1101 ResourceId string `json:"resourceId,omitempty"`
1102 // RuleAction: Action taken as result of the rule
1103 RuleAction string `json:"ruleAction,omitempty"`
1104 // SerialNumber: The serial number of the device.
1105 SerialNumber string `json:"serialNumber,omitempty"`
1106 // ForceSendFields is a list of field names (e.g. "DeviceId") to
1107 // unconditionally include in API requests. By default, fields with empty or
1108 // default values are omitted from API requests. See
1109 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1110 // details.
1111 ForceSendFields []string `json:"-"`
1112 // NullFields is a list of field names (e.g. "DeviceId") to include in API
1113 // requests with the JSON null value. By default, fields with empty values are
1114 // omitted from API requests. See
1115 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1116 NullFields []string `json:"-"`
1117 }
1118
1119 func (s DeviceManagementRule) MarshalJSON() ([]byte, error) {
1120 type NoMethod DeviceManagementRule
1121 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1122 }
1123
1124 // DlpRuleViolation: Alerts that get triggered on violations of Data Loss
1125 // Prevention (DLP) rules.
1126 type DlpRuleViolation struct {
1127 // RuleViolationInfo: Details about the violated DLP rule. Admins can use the
1128 // predefined detectors provided by Google Cloud DLP
1129 // https://cloud.google.com/dlp/ when setting up a DLP rule. Matched Cloud DLP
1130 // detectors in this violation if any will be captured in the
1131 // MatchInfo.predefined_detector.
1132 RuleViolationInfo *RuleViolationInfo `json:"ruleViolationInfo,omitempty"`
1133 // ForceSendFields is a list of field names (e.g. "RuleViolationInfo") to
1134 // unconditionally include in API requests. By default, fields with empty or
1135 // default values are omitted from API requests. See
1136 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1137 // details.
1138 ForceSendFields []string `json:"-"`
1139 // NullFields is a list of field names (e.g. "RuleViolationInfo") to include in
1140 // API requests with the JSON null value. By default, fields with empty values
1141 // are omitted from API requests. See
1142 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1143 NullFields []string `json:"-"`
1144 }
1145
1146 func (s DlpRuleViolation) MarshalJSON() ([]byte, error) {
1147 type NoMethod DlpRuleViolation
1148 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1149 }
1150
1151 // DomainId: Domain ID of Gmail phishing alerts.
1152 type DomainId struct {
1153 // CustomerPrimaryDomain: The primary domain for the customer.
1154 CustomerPrimaryDomain string `json:"customerPrimaryDomain,omitempty"`
1155 // ForceSendFields is a list of field names (e.g. "CustomerPrimaryDomain") to
1156 // unconditionally include in API requests. By default, fields with empty or
1157 // default values are omitted from API requests. See
1158 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1159 // details.
1160 ForceSendFields []string `json:"-"`
1161 // NullFields is a list of field names (e.g. "CustomerPrimaryDomain") to
1162 // include in API requests with the JSON null value. By default, fields with
1163 // empty values are omitted from API requests. See
1164 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1165 NullFields []string `json:"-"`
1166 }
1167
1168 func (s DomainId) MarshalJSON() ([]byte, error) {
1169 type NoMethod DomainId
1170 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1171 }
1172
1173 // DomainWideTakeoutInitiated: A takeout operation for the entire domain was
1174 // initiated by an admin. Derived from audit logs.
1175 type DomainWideTakeoutInitiated struct {
1176 // Email: The email of the admin who initiated the takeout.
1177 Email string `json:"email,omitempty"`
1178 // TakeoutRequestId: The takeout request ID.
1179 TakeoutRequestId string `json:"takeoutRequestId,omitempty"`
1180 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
1181 // include in API requests. By default, fields with empty or default values are
1182 // omitted from API requests. See
1183 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1184 // details.
1185 ForceSendFields []string `json:"-"`
1186 // NullFields is a list of field names (e.g. "Email") to include in API
1187 // requests with the JSON null value. By default, fields with empty values are
1188 // omitted from API requests. See
1189 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1190 NullFields []string `json:"-"`
1191 }
1192
1193 func (s DomainWideTakeoutInitiated) MarshalJSON() ([]byte, error) {
1194 type NoMethod DomainWideTakeoutInitiated
1195 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1196 }
1197
1198 // Empty: A generic empty message that you can re-use to avoid defining
1199 // duplicated empty messages in your APIs. A typical example is to use it as
1200 // the request or the response type of an API method. For instance: service Foo
1201 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
1202 type Empty struct {
1203 // ServerResponse contains the HTTP response code and headers from the server.
1204 googleapi.ServerResponse `json:"-"`
1205 }
1206
1207 // Entity: Individual entity affected by, or related to, an alert.
1208 type Entity struct {
1209 // Link: Link to a Security Investigation Tool search based on this entity, if
1210 // available.
1211 Link string `json:"link,omitempty"`
1212 // Name: Human-readable name of this entity, such as an email address, file ID,
1213 // or device name.
1214 Name string `json:"name,omitempty"`
1215 // Values: Extra values beyond name. The order of values should align with
1216 // headers in EntityList.
1217 Values []string `json:"values,omitempty"`
1218 // ForceSendFields is a list of field names (e.g. "Link") to unconditionally
1219 // include in API requests. By default, fields with empty or default values are
1220 // omitted from API requests. See
1221 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1222 // details.
1223 ForceSendFields []string `json:"-"`
1224 // NullFields is a list of field names (e.g. "Link") to include in API requests
1225 // with the JSON null value. By default, fields with empty values are omitted
1226 // from API requests. See
1227 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1228 NullFields []string `json:"-"`
1229 }
1230
1231 func (s Entity) MarshalJSON() ([]byte, error) {
1232 type NoMethod Entity
1233 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1234 }
1235
1236 // EntityList: EntityList stores entities in a format that can be translated to
1237 // a table in the Alert Center UI.
1238 type EntityList struct {
1239 // Entities: List of entities affected by the alert.
1240 Entities []*Entity `json:"entities,omitempty"`
1241 // Headers: Headers of the values in entities. If no value is defined in
1242 // Entity, this field should be empty.
1243 Headers []string `json:"headers,omitempty"`
1244 // Name: Name of the key detail used to display this entity list.
1245 Name string `json:"name,omitempty"`
1246 // ForceSendFields is a list of field names (e.g. "Entities") to
1247 // unconditionally include in API requests. By default, fields with empty or
1248 // default values are omitted from API requests. See
1249 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1250 // details.
1251 ForceSendFields []string `json:"-"`
1252 // NullFields is a list of field names (e.g. "Entities") to include in API
1253 // requests with the JSON null value. By default, fields with empty values are
1254 // omitted from API requests. See
1255 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1256 NullFields []string `json:"-"`
1257 }
1258
1259 func (s EntityList) MarshalJSON() ([]byte, error) {
1260 type NoMethod EntityList
1261 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1262 }
1263
1264 // GmailMessageInfo: Details of a message in phishing spike alert.
1265 type GmailMessageInfo struct {
1266 // AttachmentsSha256Hash: The `SHA256` hash of email's attachment and all MIME
1267 // parts.
1268 AttachmentsSha256Hash []string `json:"attachmentsSha256Hash,omitempty"`
1269 // Date: The date of the event related to this email.
1270 Date string `json:"date,omitempty"`
1271 // Md5HashMessageBody: The hash of the message body text.
1272 Md5HashMessageBody string `json:"md5HashMessageBody,omitempty"`
1273 // Md5HashSubject: The MD5 Hash of email's subject (only available for reported
1274 // emails).
1275 Md5HashSubject string `json:"md5HashSubject,omitempty"`
1276 // MessageBodySnippet: The snippet of the message body text (only available for
1277 // reported emails).
1278 MessageBodySnippet string `json:"messageBodySnippet,omitempty"`
1279 // MessageId: The message ID.
1280 MessageId string `json:"messageId,omitempty"`
1281 // Recipient: The recipient of this email.
1282 Recipient string `json:"recipient,omitempty"`
1283 // SentTime: The sent time of the email.
1284 SentTime string `json:"sentTime,omitempty"`
1285 // SubjectText: The email subject text (only available for reported emails).
1286 SubjectText string `json:"subjectText,omitempty"`
1287 // ForceSendFields is a list of field names (e.g. "AttachmentsSha256Hash") to
1288 // unconditionally include in API requests. By default, fields with empty or
1289 // default values are omitted from API requests. See
1290 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1291 // details.
1292 ForceSendFields []string `json:"-"`
1293 // NullFields is a list of field names (e.g. "AttachmentsSha256Hash") to
1294 // include in API requests with the JSON null value. By default, fields with
1295 // empty values are omitted from API requests. See
1296 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1297 NullFields []string `json:"-"`
1298 }
1299
1300 func (s GmailMessageInfo) MarshalJSON() ([]byte, error) {
1301 type NoMethod GmailMessageInfo
1302 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1303 }
1304
1305 // GoogleOperations: An incident reported by Google Operations for a Google
1306 // Workspace application.
1307 type GoogleOperations struct {
1308 // AffectedUserEmails: The list of emails which correspond to the users
1309 // directly affected by the incident.
1310 AffectedUserEmails []string `json:"affectedUserEmails,omitempty"`
1311 // AttachmentData: Optional. Application-specific data for an incident,
1312 // provided when the Google Workspace application which reported the incident
1313 // cannot be completely restored to a valid state.
1314 AttachmentData *Attachment `json:"attachmentData,omitempty"`
1315 // Description: A detailed, freeform incident description.
1316 Description string `json:"description,omitempty"`
1317 // Domain: Customer domain for email template personalization.
1318 Domain string `json:"domain,omitempty"`
1319 // Header: A header to display above the incident message. Typically used to
1320 // attach a localized notice on the timeline for followup comms translations.
1321 Header string `json:"header,omitempty"`
1322 // Title: A one-line incident description.
1323 Title string `json:"title,omitempty"`
1324 // ForceSendFields is a list of field names (e.g. "AffectedUserEmails") to
1325 // unconditionally include in API requests. By default, fields with empty or
1326 // default values are omitted from API requests. See
1327 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1328 // details.
1329 ForceSendFields []string `json:"-"`
1330 // NullFields is a list of field names (e.g. "AffectedUserEmails") to include
1331 // in API requests with the JSON null value. By default, fields with empty
1332 // values are omitted from API requests. See
1333 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1334 NullFields []string `json:"-"`
1335 }
1336
1337 func (s GoogleOperations) MarshalJSON() ([]byte, error) {
1338 type NoMethod GoogleOperations
1339 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1340 }
1341
1342 // IdentityProviderError: Error related to an identity provider.
1343 type IdentityProviderError struct {
1344 // AuthorizationBaseUrl: Authorization base url of the identity provider.
1345 AuthorizationBaseUrl string `json:"authorizationBaseUrl,omitempty"`
1346 // ErrorCount: Number of similar errors encountered.
1347 ErrorCount int64 `json:"errorCount,omitempty,string"`
1348 // ErrorInfo: Info on the identity provider error.
1349 //
1350 // Possible values:
1351 // "IDENTITY_PROVIDER_ERROR_INFO_UNSPECIFIED" - Error info not specified.
1352 // "EMAIL_MISMATCH" - Email in the ID token is different from the user's
1353 // email.
1354 // "UNAVAILABLE_DISCOVERY_CONTENT" - Discovery URL was unreachable.
1355 // "INVALID_DISCOVERY_CONTENT" - Discovery URL did not contain all the
1356 // necessary information.
1357 // "UNAVAILABLE_CSE_CONFIGURATION_CONTENT" - URL for client-side encryption
1358 // configuration content was unreachable.
1359 // "INVALID_CSE_CONFIGURATION_CONTENT" - Client-side encryption .well-known
1360 // URL did not contain all the necessary information.
1361 // "INVALID_ID_TOKEN" - ID token returned by the identity provider is
1362 // invalid.
1363 // "INVALID_OIDC_SETUP" - OIDC setup error.
1364 // "UNAVAILABLE_IDP" - Identity provider was unreachable.
1365 // "AUTH_CODE_EXCHANGE_ERROR" - Auth code exchange error.
1366 // "AUTHENTICATION_TOKEN_MISSING_CLAIM_EMAIL" - Authentication token has no
1367 // "email" or "google_email" claim.
1368 ErrorInfo string `json:"errorInfo,omitempty"`
1369 // ForceSendFields is a list of field names (e.g. "AuthorizationBaseUrl") to
1370 // unconditionally include in API requests. By default, fields with empty or
1371 // default values are omitted from API requests. See
1372 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1373 // details.
1374 ForceSendFields []string `json:"-"`
1375 // NullFields is a list of field names (e.g. "AuthorizationBaseUrl") to include
1376 // in API requests with the JSON null value. By default, fields with empty
1377 // values are omitted from API requests. See
1378 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1379 NullFields []string `json:"-"`
1380 }
1381
1382 func (s IdentityProviderError) MarshalJSON() ([]byte, error) {
1383 type NoMethod IdentityProviderError
1384 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1385 }
1386
1387 // KeyServiceError: Error related to an external key service.
1388 type KeyServiceError struct {
1389 // ErrorCount: Number of similar errors encountered.
1390 ErrorCount int64 `json:"errorCount,omitempty,string"`
1391 // ErrorInfo: Info on the key service error.
1392 //
1393 // Possible values:
1394 // "KEY_SERVICE_ERROR_INFO_UNSPECIFIED" - Error info not specified.
1395 // "MALFORMED_JSON" - The response has malformed JSON.
1396 // "MISSING_KEY" - The response did not contain the wrapped/unwrapped key.
1397 // "MISSING_SIGNATURE" - SMIME sign only: The sign response did not contain
1398 // the signature.
1399 // "MISSING_ALGORITHM_NAME" - SMIME only: The sign response does not include
1400 // the algorithm name.
1401 // "UNSUPPORTED_ALGORITHM" - SMIME only: the algorithm name in the response
1402 // is not supported by the client.
1403 // "FETCH_REQUEST_ERROR" - Fetch request on the client has failed.
1404 ErrorInfo string `json:"errorInfo,omitempty"`
1405 // HttpResponseCode: HTTP response status code from the key service.
1406 HttpResponseCode int64 `json:"httpResponseCode,omitempty,string"`
1407 // KeyServiceUrl: Url of the external key service.
1408 KeyServiceUrl string `json:"keyServiceUrl,omitempty"`
1409 // ForceSendFields is a list of field names (e.g. "ErrorCount") to
1410 // unconditionally include in API requests. By default, fields with empty or
1411 // default values are omitted from API requests. See
1412 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1413 // details.
1414 ForceSendFields []string `json:"-"`
1415 // NullFields is a list of field names (e.g. "ErrorCount") to include in API
1416 // requests with the JSON null value. By default, fields with empty values are
1417 // omitted from API requests. See
1418 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1419 NullFields []string `json:"-"`
1420 }
1421
1422 func (s KeyServiceError) MarshalJSON() ([]byte, error) {
1423 type NoMethod KeyServiceError
1424 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1425 }
1426
1427 // ListAlertFeedbackResponse: Response message for an alert feedback listing
1428 // request.
1429 type ListAlertFeedbackResponse struct {
1430 // Feedback: The list of alert feedback. Feedback entries for each alert are
1431 // ordered by creation time descending.
1432 Feedback []*AlertFeedback `json:"feedback,omitempty"`
1433
1434 // ServerResponse contains the HTTP response code and headers from the server.
1435 googleapi.ServerResponse `json:"-"`
1436 // ForceSendFields is a list of field names (e.g. "Feedback") to
1437 // unconditionally include in API requests. By default, fields with empty or
1438 // default values are omitted from API requests. See
1439 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1440 // details.
1441 ForceSendFields []string `json:"-"`
1442 // NullFields is a list of field names (e.g. "Feedback") to include in API
1443 // requests with the JSON null value. By default, fields with empty values are
1444 // omitted from API requests. See
1445 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1446 NullFields []string `json:"-"`
1447 }
1448
1449 func (s ListAlertFeedbackResponse) MarshalJSON() ([]byte, error) {
1450 type NoMethod ListAlertFeedbackResponse
1451 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1452 }
1453
1454 // ListAlertsResponse: Response message for an alert listing request.
1455 type ListAlertsResponse struct {
1456 // Alerts: The list of alerts.
1457 Alerts []*Alert `json:"alerts,omitempty"`
1458 // NextPageToken: The token for the next page. If not empty, indicates that
1459 // there may be more alerts that match the listing request; this value can be
1460 // used in a subsequent ListAlertsRequest to get alerts continuing from last
1461 // result of the current list call.
1462 NextPageToken string `json:"nextPageToken,omitempty"`
1463
1464 // ServerResponse contains the HTTP response code and headers from the server.
1465 googleapi.ServerResponse `json:"-"`
1466 // ForceSendFields is a list of field names (e.g. "Alerts") to unconditionally
1467 // include in API requests. By default, fields with empty or default values are
1468 // omitted from API requests. See
1469 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1470 // details.
1471 ForceSendFields []string `json:"-"`
1472 // NullFields is a list of field names (e.g. "Alerts") to include in API
1473 // requests with the JSON null value. By default, fields with empty values are
1474 // omitted from API requests. See
1475 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1476 NullFields []string `json:"-"`
1477 }
1478
1479 func (s ListAlertsResponse) MarshalJSON() ([]byte, error) {
1480 type NoMethod ListAlertsResponse
1481 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1482 }
1483
1484 // LoginDetails: The details of the login action.
1485 type LoginDetails struct {
1486 // IpAddress: Optional. The human-readable IP address (for example,
1487 // `11.22.33.44`) that is associated with the warning event.
1488 IpAddress string `json:"ipAddress,omitempty"`
1489 // LoginTime: Optional. The successful login time that is associated with the
1490 // warning event. This isn't present for blocked login attempts.
1491 LoginTime string `json:"loginTime,omitempty"`
1492 // ForceSendFields is a list of field names (e.g. "IpAddress") to
1493 // unconditionally include in API requests. By default, fields with empty or
1494 // default values are omitted from API requests. See
1495 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1496 // details.
1497 ForceSendFields []string `json:"-"`
1498 // NullFields is a list of field names (e.g. "IpAddress") to include in API
1499 // requests with the JSON null value. By default, fields with empty values are
1500 // omitted from API requests. See
1501 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1502 NullFields []string `json:"-"`
1503 }
1504
1505 func (s LoginDetails) MarshalJSON() ([]byte, error) {
1506 type NoMethod LoginDetails
1507 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1508 }
1509
1510 // MailPhishing: Proto for all phishing alerts with common payload. Supported
1511 // types are any of the following: * User reported phishing * User reported
1512 // spam spike * Suspicious message reported * Phishing reclassification *
1513 // Malware reclassification * Gmail potential employee spoofing
1514 type MailPhishing struct {
1515 // DomainId: The domain ID.
1516 DomainId *DomainId `json:"domainId,omitempty"`
1517 // IsInternal: If `true`, the email originated from within the organization.
1518 IsInternal bool `json:"isInternal,omitempty"`
1519 // MaliciousEntity: The entity whose actions triggered a Gmail phishing alert.
1520 MaliciousEntity *MaliciousEntity `json:"maliciousEntity,omitempty"`
1521 // Messages: The list of messages contained by this alert.
1522 Messages []*GmailMessageInfo `json:"messages,omitempty"`
1523 // SystemActionType: System actions on the messages.
1524 //
1525 // Possible values:
1526 // "SYSTEM_ACTION_TYPE_UNSPECIFIED" - System action is unspecified.
1527 // "NO_OPERATION" - No operation.
1528 // "REMOVED_FROM_INBOX" - Messages were removed from the inbox.
1529 SystemActionType string `json:"systemActionType,omitempty"`
1530 // ForceSendFields is a list of field names (e.g. "DomainId") to
1531 // unconditionally include in API requests. By default, fields with empty or
1532 // default values are omitted from API requests. See
1533 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1534 // details.
1535 ForceSendFields []string `json:"-"`
1536 // NullFields is a list of field names (e.g. "DomainId") to include in API
1537 // requests with the JSON null value. By default, fields with empty values are
1538 // omitted from API requests. See
1539 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1540 NullFields []string `json:"-"`
1541 }
1542
1543 func (s MailPhishing) MarshalJSON() ([]byte, error) {
1544 type NoMethod MailPhishing
1545 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1546 }
1547
1548 // MaliciousEntity: Entity whose actions triggered a Gmail phishing alert.
1549 type MaliciousEntity struct {
1550 // DisplayName: The header from display name.
1551 DisplayName string `json:"displayName,omitempty"`
1552 // Entity: The actor who triggered a gmail phishing alert.
1553 Entity *User `json:"entity,omitempty"`
1554 // FromHeader: The sender email address.
1555 FromHeader string `json:"fromHeader,omitempty"`
1556 // ForceSendFields is a list of field names (e.g. "DisplayName") to
1557 // unconditionally include in API requests. By default, fields with empty or
1558 // default values are omitted from API requests. See
1559 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1560 // details.
1561 ForceSendFields []string `json:"-"`
1562 // NullFields is a list of field names (e.g. "DisplayName") to include in API
1563 // requests with the JSON null value. By default, fields with empty values are
1564 // omitted from API requests. See
1565 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1566 NullFields []string `json:"-"`
1567 }
1568
1569 func (s MaliciousEntity) MarshalJSON() ([]byte, error) {
1570 type NoMethod MaliciousEntity
1571 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1572 }
1573
1574 // MandatoryServiceAnnouncement: Alert Created by the MSA team for
1575 // communications necessary for continued use of Google Workspace Products.
1576 type MandatoryServiceAnnouncement struct {
1577 // Description: Detailed, freeform text describing the announcement
1578 Description string `json:"description,omitempty"`
1579 // Title: One line summary of the announcement
1580 Title string `json:"title,omitempty"`
1581 // ForceSendFields is a list of field names (e.g. "Description") to
1582 // unconditionally include in API requests. By default, fields with empty or
1583 // default values are omitted from API requests. See
1584 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1585 // details.
1586 ForceSendFields []string `json:"-"`
1587 // NullFields is a list of field names (e.g. "Description") to include in API
1588 // requests with the JSON null value. By default, fields with empty values are
1589 // omitted from API requests. See
1590 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1591 NullFields []string `json:"-"`
1592 }
1593
1594 func (s MandatoryServiceAnnouncement) MarshalJSON() ([]byte, error) {
1595 type NoMethod MandatoryServiceAnnouncement
1596 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1597 }
1598
1599 // MatchInfo: Proto that contains match information from the condition part of
1600 // the rule.
1601 type MatchInfo struct {
1602 // PredefinedDetector: For matched detector predefined by Google.
1603 PredefinedDetector *PredefinedDetectorInfo `json:"predefinedDetector,omitempty"`
1604 // UserDefinedDetector: For matched detector defined by administrators.
1605 UserDefinedDetector *UserDefinedDetectorInfo `json:"userDefinedDetector,omitempty"`
1606 // ForceSendFields is a list of field names (e.g. "PredefinedDetector") to
1607 // unconditionally include in API requests. By default, fields with empty or
1608 // default values are omitted from API requests. See
1609 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1610 // details.
1611 ForceSendFields []string `json:"-"`
1612 // NullFields is a list of field names (e.g. "PredefinedDetector") to include
1613 // in API requests with the JSON null value. By default, fields with empty
1614 // values are omitted from API requests. See
1615 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1616 NullFields []string `json:"-"`
1617 }
1618
1619 func (s MatchInfo) MarshalJSON() ([]byte, error) {
1620 type NoMethod MatchInfo
1621 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1622 }
1623
1624 // MergeInfo: New alert tracking numbers.
1625 type MergeInfo struct {
1626 // NewAlertId: Optional. New alert ID. Reference the
1627 // [google.apps.alertcenter.Alert] with this ID for the current state.
1628 NewAlertId string `json:"newAlertId,omitempty"`
1629 // NewIncidentTrackingId: The new tracking ID from the parent incident.
1630 NewIncidentTrackingId string `json:"newIncidentTrackingId,omitempty"`
1631 // ForceSendFields is a list of field names (e.g. "NewAlertId") to
1632 // unconditionally include in API requests. By default, fields with empty or
1633 // default values are omitted from API requests. See
1634 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1635 // details.
1636 ForceSendFields []string `json:"-"`
1637 // NullFields is a list of field names (e.g. "NewAlertId") to include in API
1638 // requests with the JSON null value. By default, fields with empty values are
1639 // omitted from API requests. See
1640 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1641 NullFields []string `json:"-"`
1642 }
1643
1644 func (s MergeInfo) MarshalJSON() ([]byte, error) {
1645 type NoMethod MergeInfo
1646 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1647 }
1648
1649 // Notification: Settings for callback notifications. For more details see
1650 // Google Workspace Alert Notification
1651 // (https://developers.google.com/workspace/admin/alertcenter/guides/notifications).
1652 type Notification struct {
1653 // CloudPubsubTopic: A Google Cloud Pub/sub topic destination.
1654 CloudPubsubTopic *CloudPubsubTopic `json:"cloudPubsubTopic,omitempty"`
1655 // ForceSendFields is a list of field names (e.g. "CloudPubsubTopic") to
1656 // unconditionally include in API requests. By default, fields with empty or
1657 // default values are omitted from API requests. See
1658 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1659 // details.
1660 ForceSendFields []string `json:"-"`
1661 // NullFields is a list of field names (e.g. "CloudPubsubTopic") to include in
1662 // API requests with the JSON null value. By default, fields with empty values
1663 // are omitted from API requests. See
1664 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1665 NullFields []string `json:"-"`
1666 }
1667
1668 func (s Notification) MarshalJSON() ([]byte, error) {
1669 type NoMethod Notification
1670 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1671 }
1672
1673 // PhishingSpike: Alert for a spike in user reported phishing. *Warning*: This
1674 // type has been deprecated. Use MailPhishing
1675 // (https://developers.google.com/workspace/admin/alertcenter/reference/rest/v1beta1/MailPhishing)
1676 // instead.
1677 type PhishingSpike struct {
1678 // DomainId: The domain ID.
1679 DomainId *DomainId `json:"domainId,omitempty"`
1680 // IsInternal: If `true`, the email originated from within the organization.
1681 IsInternal bool `json:"isInternal,omitempty"`
1682 // MaliciousEntity: The entity whose actions triggered a Gmail phishing alert.
1683 MaliciousEntity *MaliciousEntity `json:"maliciousEntity,omitempty"`
1684 // Messages: The list of messages contained by this alert.
1685 Messages []*GmailMessageInfo `json:"messages,omitempty"`
1686 // ForceSendFields is a list of field names (e.g. "DomainId") to
1687 // unconditionally include in API requests. By default, fields with empty or
1688 // default values are omitted from API requests. See
1689 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1690 // details.
1691 ForceSendFields []string `json:"-"`
1692 // NullFields is a list of field names (e.g. "DomainId") to include in API
1693 // requests with the JSON null value. By default, fields with empty values are
1694 // omitted from API requests. See
1695 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1696 NullFields []string `json:"-"`
1697 }
1698
1699 func (s PhishingSpike) MarshalJSON() ([]byte, error) {
1700 type NoMethod PhishingSpike
1701 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1702 }
1703
1704 // PredefinedDetectorInfo: Detector provided by Google.
1705 type PredefinedDetectorInfo struct {
1706 // DetectorName: Name that uniquely identifies the detector.
1707 DetectorName string `json:"detectorName,omitempty"`
1708 // ForceSendFields is a list of field names (e.g. "DetectorName") to
1709 // unconditionally include in API requests. By default, fields with empty or
1710 // default values are omitted from API requests. See
1711 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1712 // details.
1713 ForceSendFields []string `json:"-"`
1714 // NullFields is a list of field names (e.g. "DetectorName") to include in API
1715 // requests with the JSON null value. By default, fields with empty values are
1716 // omitted from API requests. See
1717 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1718 NullFields []string `json:"-"`
1719 }
1720
1721 func (s PredefinedDetectorInfo) MarshalJSON() ([]byte, error) {
1722 type NoMethod PredefinedDetectorInfo
1723 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1724 }
1725
1726 // PrimaryAdminChangedEvent: Event occurred when primary admin changed in
1727 // customer's account. The event are being received from insight forwarder
1728 type PrimaryAdminChangedEvent struct {
1729 // Domain: domain in which actioned occurred
1730 Domain string `json:"domain,omitempty"`
1731 // PreviousAdminEmail: Email of person who was the primary admin before the
1732 // action
1733 PreviousAdminEmail string `json:"previousAdminEmail,omitempty"`
1734 // UpdatedAdminEmail: Email of person who is the primary admin after the action
1735 UpdatedAdminEmail string `json:"updatedAdminEmail,omitempty"`
1736 // ForceSendFields is a list of field names (e.g. "Domain") to unconditionally
1737 // include in API requests. By default, fields with empty or default values are
1738 // omitted from API requests. See
1739 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1740 // details.
1741 ForceSendFields []string `json:"-"`
1742 // NullFields is a list of field names (e.g. "Domain") to include in API
1743 // requests with the JSON null value. By default, fields with empty values are
1744 // omitted from API requests. See
1745 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1746 NullFields []string `json:"-"`
1747 }
1748
1749 func (s PrimaryAdminChangedEvent) MarshalJSON() ([]byte, error) {
1750 type NoMethod PrimaryAdminChangedEvent
1751 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1752 }
1753
1754 // ReportingRule: Alerts from Reporting Rules configured by Admin.
1755 type ReportingRule struct {
1756 // AlertDetails: Any other associated alert details, for example,
1757 // AlertConfiguration.
1758 AlertDetails string `json:"alertDetails,omitempty"`
1759 // Name: Rule name
1760 Name string `json:"name,omitempty"`
1761 // Query: Alert Rule query Sample Query query { condition { filter {
1762 // expected_application_id: 777491262838 expected_event_name:
1763 // "indexable_content_change" filter_op: IN } } conjunction_operator: OR }
1764 Query string `json:"query,omitempty"`
1765 // ForceSendFields is a list of field names (e.g. "AlertDetails") to
1766 // unconditionally include in API requests. By default, fields with empty or
1767 // default values are omitted from API requests. See
1768 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1769 // details.
1770 ForceSendFields []string `json:"-"`
1771 // NullFields is a list of field names (e.g. "AlertDetails") to include in API
1772 // requests with the JSON null value. By default, fields with empty values are
1773 // omitted from API requests. See
1774 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1775 NullFields []string `json:"-"`
1776 }
1777
1778 func (s ReportingRule) MarshalJSON() ([]byte, error) {
1779 type NoMethod ReportingRule
1780 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1781 }
1782
1783 // RequestInfo: Requests for one application that needs default SQL setup.
1784 type RequestInfo struct {
1785 // AppDeveloperEmail: List of app developers who triggered notifications for
1786 // above application.
1787 AppDeveloperEmail []string `json:"appDeveloperEmail,omitempty"`
1788 // AppKey: Required. The application that requires the SQL setup.
1789 AppKey string `json:"appKey,omitempty"`
1790 // NumberOfRequests: Required. Number of requests sent for this application to
1791 // set up default SQL instance.
1792 NumberOfRequests int64 `json:"numberOfRequests,omitempty,string"`
1793 // ForceSendFields is a list of field names (e.g. "AppDeveloperEmail") to
1794 // unconditionally include in API requests. By default, fields with empty or
1795 // default values are omitted from API requests. See
1796 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1797 // details.
1798 ForceSendFields []string `json:"-"`
1799 // NullFields is a list of field names (e.g. "AppDeveloperEmail") to include in
1800 // API requests with the JSON null value. By default, fields with empty values
1801 // are omitted from API requests. See
1802 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1803 NullFields []string `json:"-"`
1804 }
1805
1806 func (s RequestInfo) MarshalJSON() ([]byte, error) {
1807 type NoMethod RequestInfo
1808 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1809 }
1810
1811 // ResourceInfo: Proto that contains resource information.
1812 type ResourceInfo struct {
1813 // ChatAttachmentId: Chat attachment ID.
1814 ChatAttachmentId string `json:"chatAttachmentId,omitempty"`
1815 // ChatMessageId: Chat message ID.
1816 ChatMessageId string `json:"chatMessageId,omitempty"`
1817 // DeviceId: Id to identify a device. For example, for Android devices, this is
1818 // the "Android Device Id" and for Chrome OS devices, it's the "Device Virtual
1819 // Id".
1820 DeviceId string `json:"deviceId,omitempty"`
1821 // DocumentId: Drive file ID.
1822 DocumentId string `json:"documentId,omitempty"`
1823 // MessageId: RFC2822 message ID.
1824 MessageId string `json:"messageId,omitempty"`
1825 // ResourceTitle: Title of the resource, for example email subject, or document
1826 // title.
1827 ResourceTitle string `json:"resourceTitle,omitempty"`
1828 // ForceSendFields is a list of field names (e.g. "ChatAttachmentId") to
1829 // unconditionally include in API requests. By default, fields with empty or
1830 // default values are omitted from API requests. See
1831 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1832 // details.
1833 ForceSendFields []string `json:"-"`
1834 // NullFields is a list of field names (e.g. "ChatAttachmentId") to include in
1835 // API requests with the JSON null value. By default, fields with empty values
1836 // are omitted from API requests. See
1837 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1838 NullFields []string `json:"-"`
1839 }
1840
1841 func (s ResourceInfo) MarshalJSON() ([]byte, error) {
1842 type NoMethod ResourceInfo
1843 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1844 }
1845
1846 // RuleInfo: Proto that contains rule information.
1847 type RuleInfo struct {
1848 // DisplayName: User provided name of the rule.
1849 DisplayName string `json:"displayName,omitempty"`
1850 // ResourceName: Resource name that uniquely identifies the rule.
1851 ResourceName string `json:"resourceName,omitempty"`
1852 // ForceSendFields is a list of field names (e.g. "DisplayName") to
1853 // unconditionally include in API requests. By default, fields with empty or
1854 // default values are omitted from API requests. See
1855 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1856 // details.
1857 ForceSendFields []string `json:"-"`
1858 // NullFields is a list of field names (e.g. "DisplayName") to include in API
1859 // requests with the JSON null value. By default, fields with empty values are
1860 // omitted from API requests. See
1861 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1862 NullFields []string `json:"-"`
1863 }
1864
1865 func (s RuleInfo) MarshalJSON() ([]byte, error) {
1866 type NoMethod RuleInfo
1867 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1868 }
1869
1870 // RuleViolationInfo: Common alert information about violated rules that are
1871 // configured by Google Workspace administrators.
1872 type RuleViolationInfo struct {
1873 // DataSource: Source of the data.
1874 //
1875 // Possible values:
1876 // "DATA_SOURCE_UNSPECIFIED" - Data source is unspecified.
1877 // "DRIVE" - Drive data source.
1878 // "GMAIL" - Gmail data source.
1879 // "CHROME" - Chrome data source.
1880 // "CHAT" - Chat data source.
1881 DataSource string `json:"dataSource,omitempty"`
1882 // EventType: Event associated with this alert after applying the rule.
1883 //
1884 // Possible values:
1885 // "EVENT_TYPE_UNSPECIFIED" - Event type wasn't set.
1886 // "ACCESS_BLOCKED" - An access attempt was blocked.
1887 // "SHARING_BLOCKED" - A sharing attempt was blocked.
1888 EventType string `json:"eventType,omitempty"`
1889 // MatchInfo: List of matches that were found in the resource content.
1890 MatchInfo []*MatchInfo `json:"matchInfo,omitempty"`
1891 // Recipients: Resource recipients. For Drive, they are grantees that the Drive
1892 // file was shared with at the time of rule triggering. Valid values include
1893 // user emails, group emails, domains, or 'anyone' if the file was publicly
1894 // accessible. If the file was private the recipients list will be empty. For
1895 // Gmail, they are emails of the users or groups that the Gmail message was
1896 // sent to.
1897 Recipients []string `json:"recipients,omitempty"`
1898 // ResourceInfo: Details of the resource which violated the rule.
1899 ResourceInfo *ResourceInfo `json:"resourceInfo,omitempty"`
1900 // RuleInfo: Details of the violated rule.
1901 RuleInfo *RuleInfo `json:"ruleInfo,omitempty"`
1902 // SuppressedActionTypes: Actions suppressed due to other actions with higher
1903 // priority.
1904 //
1905 // Possible values:
1906 // "ACTION_TYPE_UNSPECIFIED" - Action type is unspecified.
1907 // "DRIVE_BLOCK_EXTERNAL_SHARING" - Block sharing a file externally.
1908 // "DRIVE_WARN_ON_EXTERNAL_SHARING" - Show a warning message when sharing a
1909 // file externally.
1910 // "DRIVE_RESTRICT_DOWNLOAD_PRINT_COPY" - Disable download, print, and copy
1911 // for commenters and viewers in drive.
1912 // "DRIVE_RESTRICT_DOWNLOAD_PRINT_COPY_FOR_ALL" - Disable download, print,
1913 // and copy for all collaborators in drive.
1914 // "DRIVE_APPLY_DRIVE_LABELS" - Apply customer specified Drive labels to the
1915 // file.
1916 // "GMAIL_QUARANTINE_MESSAGE" - Quarantine message.
1917 // "GMAIL_BLOCK_MESSAGE" - Block message.
1918 // "GMAIL_WARN_USERS" - Warn users.
1919 // "GMAIL_APPLY_CLASSIFICATION_LABELS" - Apply classification labels.
1920 // "CHROME_BLOCK_FILE_DOWNLOAD" - Chrome actions. Block file download.
1921 // "CHROME_WARN_FILE_DOWNLOAD" - Warn user about downloaded file.
1922 // "CHROME_BLOCK_FILE_UPLOAD" - Block file upload.
1923 // "CHROME_WARN_FILE_UPLOAD" - Warn user about uploaded file.
1924 // "CHROME_BLOCK_WEB_CONTENT_UPLOAD" - Block web content upload.
1925 // "CHROME_WARN_WEB_CONTENT_UPLOAD" - Warn user about uploaded web content.
1926 // "CHROME_BLOCK_PAGE_PRINT" - Block page print.
1927 // "CHROME_WARN_PAGE_PRINT" - Warn user about printed page.
1928 // "CHROME_BLOCK_FILE_TRANSFER" - Block ChromeOS file transfer.
1929 // "CHROME_WARN_FILE_TRANSFER" - Warn user about ChromeOS file transfer.
1930 // "CHROME_BLOCK_URL_VISITED" - Block Chrome URL visit.
1931 // "CHROME_WARN_URL_VISITED" - Warn user about Chrome URL visited.
1932 // "CHROME_BLOCK_SCREENSHOT" - Block screenshot alert.
1933 // "CHROME_STORE_CONTENT" - Store the content that violated the rule.
1934 // "CHROME_WATERMARK" - Send watermark alert
1935 // "CHROME_FORCE_SAVE_TO_CLOUD" - Force save to cloud storage.
1936 // "DELETE_WEBPROTECT_EVIDENCE" - Delete web protect evidence file
1937 // "CHAT_BLOCK_CONTENT" - Chat actions. Block Chat content to be sent out.
1938 // "CHAT_WARN_USER" - Warn end user about Chat content.
1939 // "ALERT" - Send alert.
1940 // "RULE_ACTIVATE" - Activate Rule Action
1941 // "RULE_DEACTIVATE" - Deactivate Rule Action
1942 SuppressedActionTypes []string `json:"suppressedActionTypes,omitempty"`
1943 // Trigger: Trigger of the rule.
1944 //
1945 // Possible values:
1946 // "TRIGGER_UNSPECIFIED" - Trigger is unspecified.
1947 // "DRIVE_SHARE" - A Drive file is shared.
1948 // "MAIL_BEING_SENT" - An email message is sent.
1949 // "CHROME_FILE_DOWNLOAD" - A file being downloaded in a Chrome browser.
1950 // "CHROME_FILE_UPLOAD" - A file being uploaded from a Chrome browser.
1951 // "CHROME_WEB_CONTENT_UPLOAD" - Web content being uploaded from a Chrome
1952 // browser.
1953 // "CHAT_MESSAGE_SENT" - A Chat message is sent.
1954 // "CHAT_ATTACHMENT_UPLOADED" - A Chat attachment is uploaded.
1955 // "CHROME_PAGE_PRINT" - A page is being printed by Chrome.
1956 // "CHROME_URL_VISITED" - A URL is visited within Chrome.
1957 // "CHROMEOS_FILE_TRANSFER" - A file being transferred (copy or moved)
1958 // between different file systems on ChromeOS.
1959 // "GEMINI_ACCESS" - Gemini access.
1960 Trigger string `json:"trigger,omitempty"`
1961 // TriggeredActionInfo: Metadata related to the triggered actions.
1962 TriggeredActionInfo []*ActionInfo `json:"triggeredActionInfo,omitempty"`
1963 // TriggeredActionTypes: Actions applied as a consequence of the rule being
1964 // triggered.
1965 //
1966 // Possible values:
1967 // "ACTION_TYPE_UNSPECIFIED" - Action type is unspecified.
1968 // "DRIVE_BLOCK_EXTERNAL_SHARING" - Block sharing a file externally.
1969 // "DRIVE_WARN_ON_EXTERNAL_SHARING" - Show a warning message when sharing a
1970 // file externally.
1971 // "DRIVE_RESTRICT_DOWNLOAD_PRINT_COPY" - Disable download, print, and copy
1972 // for commenters and viewers in drive.
1973 // "DRIVE_RESTRICT_DOWNLOAD_PRINT_COPY_FOR_ALL" - Disable download, print,
1974 // and copy for all collaborators in drive.
1975 // "DRIVE_APPLY_DRIVE_LABELS" - Apply customer specified Drive labels to the
1976 // file.
1977 // "GMAIL_QUARANTINE_MESSAGE" - Quarantine message.
1978 // "GMAIL_BLOCK_MESSAGE" - Block message.
1979 // "GMAIL_WARN_USERS" - Warn users.
1980 // "GMAIL_APPLY_CLASSIFICATION_LABELS" - Apply classification labels.
1981 // "CHROME_BLOCK_FILE_DOWNLOAD" - Chrome actions. Block file download.
1982 // "CHROME_WARN_FILE_DOWNLOAD" - Warn user about downloaded file.
1983 // "CHROME_BLOCK_FILE_UPLOAD" - Block file upload.
1984 // "CHROME_WARN_FILE_UPLOAD" - Warn user about uploaded file.
1985 // "CHROME_BLOCK_WEB_CONTENT_UPLOAD" - Block web content upload.
1986 // "CHROME_WARN_WEB_CONTENT_UPLOAD" - Warn user about uploaded web content.
1987 // "CHROME_BLOCK_PAGE_PRINT" - Block page print.
1988 // "CHROME_WARN_PAGE_PRINT" - Warn user about printed page.
1989 // "CHROME_BLOCK_FILE_TRANSFER" - Block ChromeOS file transfer.
1990 // "CHROME_WARN_FILE_TRANSFER" - Warn user about ChromeOS file transfer.
1991 // "CHROME_BLOCK_URL_VISITED" - Block Chrome URL visit.
1992 // "CHROME_WARN_URL_VISITED" - Warn user about Chrome URL visited.
1993 // "CHROME_BLOCK_SCREENSHOT" - Block screenshot alert.
1994 // "CHROME_STORE_CONTENT" - Store the content that violated the rule.
1995 // "CHROME_WATERMARK" - Send watermark alert
1996 // "CHROME_FORCE_SAVE_TO_CLOUD" - Force save to cloud storage.
1997 // "DELETE_WEBPROTECT_EVIDENCE" - Delete web protect evidence file
1998 // "CHAT_BLOCK_CONTENT" - Chat actions. Block Chat content to be sent out.
1999 // "CHAT_WARN_USER" - Warn end user about Chat content.
2000 // "ALERT" - Send alert.
2001 // "RULE_ACTIVATE" - Activate Rule Action
2002 // "RULE_DEACTIVATE" - Deactivate Rule Action
2003 TriggeredActionTypes []string `json:"triggeredActionTypes,omitempty"`
2004 // TriggeringUserEmail: Email of the user who caused the violation. Value could
2005 // be empty if not applicable, for example, a violation found by drive
2006 // continuous scan.
2007 TriggeringUserEmail string `json:"triggeringUserEmail,omitempty"`
2008 // ForceSendFields is a list of field names (e.g. "DataSource") to
2009 // unconditionally include in API requests. By default, fields with empty or
2010 // default values are omitted from API requests. See
2011 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2012 // details.
2013 ForceSendFields []string `json:"-"`
2014 // NullFields is a list of field names (e.g. "DataSource") to include in API
2015 // requests with the JSON null value. By default, fields with empty values are
2016 // omitted from API requests. See
2017 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2018 NullFields []string `json:"-"`
2019 }
2020
2021 func (s RuleViolationInfo) MarshalJSON() ([]byte, error) {
2022 type NoMethod RuleViolationInfo
2023 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2024 }
2025
2026 // SSOProfileCreatedEvent: Event occurred when SSO Profile created in
2027 // customer's account. The event are being received from insight forwarder
2028 type SSOProfileCreatedEvent struct {
2029 // InboundSsoProfileName: sso profile name which got created
2030 InboundSsoProfileName string `json:"inboundSsoProfileName,omitempty"`
2031 // ForceSendFields is a list of field names (e.g. "InboundSsoProfileName") to
2032 // unconditionally include in API requests. By default, fields with empty or
2033 // default values are omitted from API requests. See
2034 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2035 // details.
2036 ForceSendFields []string `json:"-"`
2037 // NullFields is a list of field names (e.g. "InboundSsoProfileName") to
2038 // include in API requests with the JSON null value. By default, fields with
2039 // empty values are omitted from API requests. See
2040 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2041 NullFields []string `json:"-"`
2042 }
2043
2044 func (s SSOProfileCreatedEvent) MarshalJSON() ([]byte, error) {
2045 type NoMethod SSOProfileCreatedEvent
2046 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2047 }
2048
2049 // SSOProfileDeletedEvent: Event occurred when SSO Profile deleted in
2050 // customer's account. The event are being received from insight forwarder
2051 type SSOProfileDeletedEvent struct {
2052 // InboundSsoProfileName: sso profile name which got deleted
2053 InboundSsoProfileName string `json:"inboundSsoProfileName,omitempty"`
2054 // ForceSendFields is a list of field names (e.g. "InboundSsoProfileName") to
2055 // unconditionally include in API requests. By default, fields with empty or
2056 // default values are omitted from API requests. See
2057 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2058 // details.
2059 ForceSendFields []string `json:"-"`
2060 // NullFields is a list of field names (e.g. "InboundSsoProfileName") to
2061 // include in API requests with the JSON null value. By default, fields with
2062 // empty values are omitted from API requests. See
2063 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2064 NullFields []string `json:"-"`
2065 }
2066
2067 func (s SSOProfileDeletedEvent) MarshalJSON() ([]byte, error) {
2068 type NoMethod SSOProfileDeletedEvent
2069 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2070 }
2071
2072 // SSOProfileUpdatedEvent: Event occurred when SSO Profile updated in
2073 // customer's account. The event are being received from insight forwarder
2074 type SSOProfileUpdatedEvent struct {
2075 // InboundSsoProfileChanges: changes made to sso profile
2076 InboundSsoProfileChanges string `json:"inboundSsoProfileChanges,omitempty"`
2077 // InboundSsoProfileName: sso profile name which got updated
2078 InboundSsoProfileName string `json:"inboundSsoProfileName,omitempty"`
2079 // ForceSendFields is a list of field names (e.g. "InboundSsoProfileChanges")
2080 // to unconditionally include in API requests. By default, fields with empty or
2081 // default values are omitted from API requests. See
2082 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2083 // details.
2084 ForceSendFields []string `json:"-"`
2085 // NullFields is a list of field names (e.g. "InboundSsoProfileChanges") to
2086 // include in API requests with the JSON null value. By default, fields with
2087 // empty values are omitted from API requests. See
2088 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2089 NullFields []string `json:"-"`
2090 }
2091
2092 func (s SSOProfileUpdatedEvent) MarshalJSON() ([]byte, error) {
2093 type NoMethod SSOProfileUpdatedEvent
2094 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2095 }
2096
2097 // SensitiveAdminAction: Alert that is triggered when Sensitive Admin Action
2098 // occur in customer account.
2099 type SensitiveAdminAction struct {
2100 // ActorEmail: Email of person who performed the action
2101 ActorEmail string `json:"actorEmail,omitempty"`
2102 // EventTime: The time at which event occurred
2103 EventTime string `json:"eventTime,omitempty"`
2104 // PrimaryAdminChangedEvent: Event occurred when primary admin changed in
2105 // customer's account
2106 PrimaryAdminChangedEvent *PrimaryAdminChangedEvent `json:"primaryAdminChangedEvent,omitempty"`
2107 // SsoProfileCreatedEvent: Event occurred when SSO Profile created in
2108 // customer's account
2109 SsoProfileCreatedEvent *SSOProfileCreatedEvent `json:"ssoProfileCreatedEvent,omitempty"`
2110 // SsoProfileDeletedEvent: Event occurred when SSO Profile deleted in
2111 // customer's account
2112 SsoProfileDeletedEvent *SSOProfileDeletedEvent `json:"ssoProfileDeletedEvent,omitempty"`
2113 // SsoProfileUpdatedEvent: Event occurred when SSO Profile updated in
2114 // customer's account
2115 SsoProfileUpdatedEvent *SSOProfileUpdatedEvent `json:"ssoProfileUpdatedEvent,omitempty"`
2116 // SuperAdminPasswordResetEvent: Event occurred when password was reset for
2117 // super admin in customer's account
2118 SuperAdminPasswordResetEvent *SuperAdminPasswordResetEvent `json:"superAdminPasswordResetEvent,omitempty"`
2119 // ForceSendFields is a list of field names (e.g. "ActorEmail") to
2120 // unconditionally include in API requests. By default, fields with empty or
2121 // default values are omitted from API requests. See
2122 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2123 // details.
2124 ForceSendFields []string `json:"-"`
2125 // NullFields is a list of field names (e.g. "ActorEmail") to include in API
2126 // requests with the JSON null value. By default, fields with empty values are
2127 // omitted from API requests. See
2128 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2129 NullFields []string `json:"-"`
2130 }
2131
2132 func (s SensitiveAdminAction) MarshalJSON() ([]byte, error) {
2133 type NoMethod SensitiveAdminAction
2134 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2135 }
2136
2137 // Settings: Customer-level settings.
2138 type Settings struct {
2139 // Notifications: The list of notifications.
2140 Notifications []*Notification `json:"notifications,omitempty"`
2141
2142 // ServerResponse contains the HTTP response code and headers from the server.
2143 googleapi.ServerResponse `json:"-"`
2144 // ForceSendFields is a list of field names (e.g. "Notifications") to
2145 // unconditionally include in API requests. By default, fields with empty or
2146 // default values are omitted from API requests. See
2147 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2148 // details.
2149 ForceSendFields []string `json:"-"`
2150 // NullFields is a list of field names (e.g. "Notifications") to include in API
2151 // requests with the JSON null value. By default, fields with empty values are
2152 // omitted from API requests. See
2153 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2154 NullFields []string `json:"-"`
2155 }
2156
2157 func (s Settings) MarshalJSON() ([]byte, error) {
2158 type NoMethod Settings
2159 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2160 }
2161
2162 // StateSponsoredAttack: A state-sponsored attack alert. Derived from audit
2163 // logs.
2164 type StateSponsoredAttack struct {
2165 // Email: The email of the user this incident was created for.
2166 Email string `json:"email,omitempty"`
2167 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
2168 // include in API requests. By default, fields with empty or default values are
2169 // omitted from API requests. See
2170 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2171 // details.
2172 ForceSendFields []string `json:"-"`
2173 // NullFields is a list of field names (e.g. "Email") to include in API
2174 // requests with the JSON null value. By default, fields with empty values are
2175 // omitted from API requests. See
2176 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2177 NullFields []string `json:"-"`
2178 }
2179
2180 func (s StateSponsoredAttack) MarshalJSON() ([]byte, error) {
2181 type NoMethod StateSponsoredAttack
2182 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2183 }
2184
2185 // Status: The `Status` type defines a logical error model that is suitable for
2186 // different programming environments, including REST APIs and RPC APIs. It is
2187 // used by gRPC (https://github.com/grpc). Each `Status` message contains three
2188 // pieces of data: error code, error message, and error details. You can find
2189 // out more about this error model and how to work with it in the API Design
2190 // Guide (https://cloud.google.com/apis/design/errors).
2191 type Status struct {
2192 // Code: The status code, which should be an enum value of google.rpc.Code.
2193 Code int64 `json:"code,omitempty"`
2194 // Details: A list of messages that carry the error details. There is a common
2195 // set of message types for APIs to use.
2196 Details []googleapi.RawMessage `json:"details,omitempty"`
2197 // Message: A developer-facing error message, which should be in English. Any
2198 // user-facing error message should be localized and sent in the
2199 // google.rpc.Status.details field, or localized by the client.
2200 Message string `json:"message,omitempty"`
2201 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2202 // include in API requests. By default, fields with empty or default values are
2203 // omitted from API requests. See
2204 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2205 // details.
2206 ForceSendFields []string `json:"-"`
2207 // NullFields is a list of field names (e.g. "Code") to include in API requests
2208 // with the JSON null value. By default, fields with empty values are omitted
2209 // from API requests. See
2210 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2211 NullFields []string `json:"-"`
2212 }
2213
2214 func (s Status) MarshalJSON() ([]byte, error) {
2215 type NoMethod Status
2216 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2217 }
2218
2219 // SuperAdminPasswordResetEvent: Event occurred when password was reset for
2220 // super admin in customer's account. The event are being received from insight
2221 // forwarder
2222 type SuperAdminPasswordResetEvent struct {
2223 // UserEmail: email of person whose password was reset
2224 UserEmail string `json:"userEmail,omitempty"`
2225 // ForceSendFields is a list of field names (e.g. "UserEmail") to
2226 // unconditionally include in API requests. By default, fields with empty or
2227 // default values are omitted from API requests. See
2228 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2229 // details.
2230 ForceSendFields []string `json:"-"`
2231 // NullFields is a list of field names (e.g. "UserEmail") to include in API
2232 // requests with the JSON null value. By default, fields with empty values are
2233 // omitted from API requests. See
2234 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2235 NullFields []string `json:"-"`
2236 }
2237
2238 func (s SuperAdminPasswordResetEvent) MarshalJSON() ([]byte, error) {
2239 type NoMethod SuperAdminPasswordResetEvent
2240 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2241 }
2242
2243 // SupportTicket: Support ticket related to Access Approvals request
2244 type SupportTicket struct {
2245 // TicketId: Support ticket ID
2246 TicketId string `json:"ticketId,omitempty"`
2247 // TicketUrl: Link to support ticket
2248 TicketUrl string `json:"ticketUrl,omitempty"`
2249 // ForceSendFields is a list of field names (e.g. "TicketId") to
2250 // unconditionally include in API requests. By default, fields with empty or
2251 // default values are omitted from API requests. See
2252 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2253 // details.
2254 ForceSendFields []string `json:"-"`
2255 // NullFields is a list of field names (e.g. "TicketId") to include in API
2256 // requests with the JSON null value. By default, fields with empty values are
2257 // omitted from API requests. See
2258 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2259 NullFields []string `json:"-"`
2260 }
2261
2262 func (s SupportTicket) MarshalJSON() ([]byte, error) {
2263 type NoMethod SupportTicket
2264 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2265 }
2266
2267 // SuspiciousActivity: A mobile suspicious activity alert. Derived from audit
2268 // logs.
2269 type SuspiciousActivity struct {
2270 // Email: The email of the user this alert was created for.
2271 Email string `json:"email,omitempty"`
2272 // Events: Required. The list of security events.
2273 Events []*SuspiciousActivitySecurityDetail `json:"events,omitempty"`
2274 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
2275 // include in API requests. By default, fields with empty or default values are
2276 // omitted from API requests. See
2277 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2278 // details.
2279 ForceSendFields []string `json:"-"`
2280 // NullFields is a list of field names (e.g. "Email") to include in API
2281 // requests with the JSON null value. By default, fields with empty values are
2282 // omitted from API requests. See
2283 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2284 NullFields []string `json:"-"`
2285 }
2286
2287 func (s SuspiciousActivity) MarshalJSON() ([]byte, error) {
2288 type NoMethod SuspiciousActivity
2289 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2290 }
2291
2292 // SuspiciousActivitySecurityDetail: Detailed information of a single MDM
2293 // suspicious activity event.
2294 type SuspiciousActivitySecurityDetail struct {
2295 // DeviceId: Required. The device ID.
2296 DeviceId string `json:"deviceId,omitempty"`
2297 // DeviceModel: The model of the device.
2298 DeviceModel string `json:"deviceModel,omitempty"`
2299 // DeviceProperty: The device property which was changed.
2300 DeviceProperty string `json:"deviceProperty,omitempty"`
2301 // DeviceType: The type of the device.
2302 DeviceType string `json:"deviceType,omitempty"`
2303 // IosVendorId: Required for iOS, empty for others.
2304 IosVendorId string `json:"iosVendorId,omitempty"`
2305 // NewValue: The new value of the device property after the change.
2306 NewValue string `json:"newValue,omitempty"`
2307 // OldValue: The old value of the device property before the change.
2308 OldValue string `json:"oldValue,omitempty"`
2309 // ResourceId: The device resource ID.
2310 ResourceId string `json:"resourceId,omitempty"`
2311 // SerialNumber: The serial number of the device.
2312 SerialNumber string `json:"serialNumber,omitempty"`
2313 // ForceSendFields is a list of field names (e.g. "DeviceId") to
2314 // unconditionally include in API requests. By default, fields with empty or
2315 // default values are omitted from API requests. See
2316 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2317 // details.
2318 ForceSendFields []string `json:"-"`
2319 // NullFields is a list of field names (e.g. "DeviceId") to include in API
2320 // requests with the JSON null value. By default, fields with empty values are
2321 // omitted from API requests. See
2322 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2323 NullFields []string `json:"-"`
2324 }
2325
2326 func (s SuspiciousActivitySecurityDetail) MarshalJSON() ([]byte, error) {
2327 type NoMethod SuspiciousActivitySecurityDetail
2328 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2329 }
2330
2331 // TransferError: Details for an invalid transfer or forward.
2332 type TransferError struct {
2333 // Email: User's email address. This may be unavailable if the entity was
2334 // deleted.
2335 Email string `json:"email,omitempty"`
2336 // EntityType: Type of entity being transferred to. For ring group members,
2337 // this should always be USER.
2338 //
2339 // Possible values:
2340 // "TRANSFER_ENTITY_TYPE_UNSPECIFIED" - Entity type wasn't set.
2341 // "TRANSFER_AUTO_ATTENDANT" - Transfer to auto attendant.
2342 // "TRANSFER_RING_GROUP" - Transfer to ring group.
2343 // "TRANSFER_USER" - Transfer to user.
2344 EntityType string `json:"entityType,omitempty"`
2345 // Id: Ring group or auto attendant ID. Not set for users.
2346 Id string `json:"id,omitempty"`
2347 // InvalidReason: Reason for the error.
2348 //
2349 // Possible values:
2350 // "TRANSFER_INVALID_REASON_UNSPECIFIED" - Reason wasn't specified.
2351 // "TRANSFER_TARGET_DELETED" - The transfer target can't be found—most
2352 // likely it was deleted.
2353 // "UNLICENSED" - The user's Google Voice license was removed.
2354 // "SUSPENDED" - The user's Google Workspace account was suspended.
2355 // "NO_PHONE_NUMBER" - The transfer target no longer has a phone number. This
2356 // reason should become deprecated once we support numberless transfer.
2357 InvalidReason string `json:"invalidReason,omitempty"`
2358 // Name: User's full name, or the ring group / auto attendant name. This may be
2359 // unavailable if the entity was deleted.
2360 Name string `json:"name,omitempty"`
2361 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
2362 // include in API requests. By default, fields with empty or default values are
2363 // omitted from API requests. See
2364 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2365 // details.
2366 ForceSendFields []string `json:"-"`
2367 // NullFields is a list of field names (e.g. "Email") to include in API
2368 // requests with the JSON null value. By default, fields with empty values are
2369 // omitted from API requests. See
2370 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2371 NullFields []string `json:"-"`
2372 }
2373
2374 func (s TransferError) MarshalJSON() ([]byte, error) {
2375 type NoMethod TransferError
2376 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2377 }
2378
2379 // TransferMisconfiguration: Error related to transferring or forwarding a
2380 // phone call.
2381 type TransferMisconfiguration struct {
2382 // Errors: Details for each invalid transfer or forward.
2383 Errors []*TransferError `json:"errors,omitempty"`
2384 // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally
2385 // include in API requests. By default, fields with empty or default values are
2386 // omitted from API requests. See
2387 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2388 // details.
2389 ForceSendFields []string `json:"-"`
2390 // NullFields is a list of field names (e.g. "Errors") to include in API
2391 // requests with the JSON null value. By default, fields with empty values are
2392 // omitted from API requests. See
2393 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2394 NullFields []string `json:"-"`
2395 }
2396
2397 func (s TransferMisconfiguration) MarshalJSON() ([]byte, error) {
2398 type NoMethod TransferMisconfiguration
2399 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2400 }
2401
2402 // UndeleteAlertRequest: A request to undelete a specific alert that was marked
2403 // for deletion.
2404 type UndeleteAlertRequest struct {
2405 // CustomerId: Optional. The unique identifier of the Google Workspace account
2406 // of the customer the alert is associated with. The `customer_id` must have
2407 // the initial "C" stripped (for example, `046psxkn`). Inferred from the caller
2408 // identity if not provided. Find your customer ID
2409 // (https://support.google.com/cloudidentity/answer/10070793).
2410 CustomerId string `json:"customerId,omitempty"`
2411 // ForceSendFields is a list of field names (e.g. "CustomerId") to
2412 // unconditionally include in API requests. By default, fields with empty or
2413 // default values are omitted from API requests. See
2414 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2415 // details.
2416 ForceSendFields []string `json:"-"`
2417 // NullFields is a list of field names (e.g. "CustomerId") to include in API
2418 // requests with the JSON null value. By default, fields with empty values are
2419 // omitted from API requests. See
2420 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2421 NullFields []string `json:"-"`
2422 }
2423
2424 func (s UndeleteAlertRequest) MarshalJSON() ([]byte, error) {
2425 type NoMethod UndeleteAlertRequest
2426 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2427 }
2428
2429 // User: A user.
2430 type User struct {
2431 // DisplayName: Display name of the user.
2432 DisplayName string `json:"displayName,omitempty"`
2433 // EmailAddress: Email address of the user.
2434 EmailAddress string `json:"emailAddress,omitempty"`
2435 // ForceSendFields is a list of field names (e.g. "DisplayName") to
2436 // unconditionally include in API requests. By default, fields with empty or
2437 // default values are omitted from API requests. See
2438 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2439 // details.
2440 ForceSendFields []string `json:"-"`
2441 // NullFields is a list of field names (e.g. "DisplayName") to include in API
2442 // requests with the JSON null value. By default, fields with empty values are
2443 // omitted from API requests. See
2444 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2445 NullFields []string `json:"-"`
2446 }
2447
2448 func (s User) MarshalJSON() ([]byte, error) {
2449 type NoMethod User
2450 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2451 }
2452
2453 // UserChanges: Alerts from UserChanges bucket Rules for predefined rules which
2454 // contain the following rules: - Suspended user made active - New user added -
2455 // User suspended (by admin) - User granted admin privileges - User admin
2456 // privileges revoked - User deleted - Users password changed
2457 type UserChanges struct {
2458 // Name: Rule name
2459 Name string `json:"name,omitempty"`
2460 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
2461 // include in API requests. By default, fields with empty or default values are
2462 // omitted from API requests. See
2463 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2464 // details.
2465 ForceSendFields []string `json:"-"`
2466 // NullFields is a list of field names (e.g. "Name") to include in API requests
2467 // with the JSON null value. By default, fields with empty values are omitted
2468 // from API requests. See
2469 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2470 NullFields []string `json:"-"`
2471 }
2472
2473 func (s UserChanges) MarshalJSON() ([]byte, error) {
2474 type NoMethod UserChanges
2475 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2476 }
2477
2478 // UserDefinedDetectorInfo: Detector defined by administrators.
2479 type UserDefinedDetectorInfo struct {
2480 // DisplayName: Display name of the detector.
2481 DisplayName string `json:"displayName,omitempty"`
2482 // ResourceName: Resource name that uniquely identifies the detector.
2483 ResourceName string `json:"resourceName,omitempty"`
2484 // ForceSendFields is a list of field names (e.g. "DisplayName") to
2485 // unconditionally include in API requests. By default, fields with empty or
2486 // default values are omitted from API requests. See
2487 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2488 // details.
2489 ForceSendFields []string `json:"-"`
2490 // NullFields is a list of field names (e.g. "DisplayName") to include in API
2491 // requests with the JSON null value. By default, fields with empty values are
2492 // omitted from API requests. See
2493 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2494 NullFields []string `json:"-"`
2495 }
2496
2497 func (s UserDefinedDetectorInfo) MarshalJSON() ([]byte, error) {
2498 type NoMethod UserDefinedDetectorInfo
2499 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2500 }
2501
2502 // VaultAcceleratedDeletion: Alert that is triggered when a Vault accelerated
2503 // deletion request is created or canceled.
2504 type VaultAcceleratedDeletion struct {
2505 // ActionType: The action can be one of create and cancel
2506 //
2507 // Possible values:
2508 // "VAULT_ACCELERATED_DELETION_ACTION_TYPE_UNSPECIFIED" - Unspecified action
2509 // type
2510 // "VAULT_ACCELERATED_DELETION_ACTION_TYPE_CREATE" - AD Create action type
2511 // "VAULT_ACCELERATED_DELETION_ACTION_TYPE_CANCEL" - AD Cancel action type
2512 ActionType string `json:"actionType,omitempty"`
2513 // AppType: Currentlty only Gmail is supported as app type
2514 //
2515 // Possible values:
2516 // "VAULT_ACCELERATED_DELETION_APP_TYPE_UNSPECIFIED" - Unspecified app type
2517 // "VAULT_ACCELERATED_DELETION_APP_TYPE_GMAIL" - Gmail app type
2518 AppType string `json:"appType,omitempty"`
2519 // CreateTime: The UTC timestamp of when the AD request was created
2520 CreateTime string `json:"createTime,omitempty"`
2521 // DeletionRequestId: Accelerated deletion request ID intended to be used to
2522 // construct the Vault UI link to the AD request
2523 DeletionRequestId string `json:"deletionRequestId,omitempty"`
2524 // MatterId: Matter ID of the accelerated deletion request intended to be used
2525 // to construct the Vault UI link to the AD request
2526 MatterId string `json:"matterId,omitempty"`
2527 // ForceSendFields is a list of field names (e.g. "ActionType") to
2528 // unconditionally include in API requests. By default, fields with empty or
2529 // default values are omitted from API requests. See
2530 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2531 // details.
2532 ForceSendFields []string `json:"-"`
2533 // NullFields is a list of field names (e.g. "ActionType") to include in API
2534 // requests with the JSON null value. By default, fields with empty values are
2535 // omitted from API requests. See
2536 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2537 NullFields []string `json:"-"`
2538 }
2539
2540 func (s VaultAcceleratedDeletion) MarshalJSON() ([]byte, error) {
2541 type NoMethod VaultAcceleratedDeletion
2542 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2543 }
2544
2545 // VoiceMisconfiguration: An alert triggered when Google Voice configuration
2546 // becomes invalid, generally due to an external entity being modified or
2547 // deleted.
2548 type VoiceMisconfiguration struct {
2549 // EntityName: Name of the entity whose configuration is now invalid.
2550 EntityName string `json:"entityName,omitempty"`
2551 // EntityType: Type of the entity whose configuration is now invalid.
2552 //
2553 // Possible values:
2554 // "ENTITY_TYPE_UNSPECIFIED" - Entity type wasn't set.
2555 // "AUTO_ATTENDANT" - Invalid auto attendant.
2556 // "RING_GROUP" - Invalid ring group.
2557 EntityType string `json:"entityType,omitempty"`
2558 // FixUri: Link that the admin can follow to fix the issue.
2559 FixUri string `json:"fixUri,omitempty"`
2560 // MembersMisconfiguration: Issue(s) with members of a ring group.
2561 MembersMisconfiguration *TransferMisconfiguration `json:"membersMisconfiguration,omitempty"`
2562 // TransferMisconfiguration: Issue(s) with transferring or forwarding to an
2563 // external entity.
2564 TransferMisconfiguration *TransferMisconfiguration `json:"transferMisconfiguration,omitempty"`
2565 // VoicemailMisconfiguration: Issue(s) with sending to voicemail.
2566 VoicemailMisconfiguration *VoicemailMisconfiguration `json:"voicemailMisconfiguration,omitempty"`
2567 // ForceSendFields is a list of field names (e.g. "EntityName") to
2568 // unconditionally include in API requests. By default, fields with empty or
2569 // default values are omitted from API requests. See
2570 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2571 // details.
2572 ForceSendFields []string `json:"-"`
2573 // NullFields is a list of field names (e.g. "EntityName") to include in API
2574 // requests with the JSON null value. By default, fields with empty values are
2575 // omitted from API requests. See
2576 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2577 NullFields []string `json:"-"`
2578 }
2579
2580 func (s VoiceMisconfiguration) MarshalJSON() ([]byte, error) {
2581 type NoMethod VoiceMisconfiguration
2582 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2583 }
2584
2585 // VoicemailMisconfiguration: Issue(s) with sending to voicemail.
2586 type VoicemailMisconfiguration struct {
2587 // Errors: Issue(s) with voicemail recipients.
2588 Errors []*VoicemailRecipientError `json:"errors,omitempty"`
2589 // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally
2590 // include in API requests. By default, fields with empty or default values are
2591 // omitted from API requests. See
2592 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2593 // details.
2594 ForceSendFields []string `json:"-"`
2595 // NullFields is a list of field names (e.g. "Errors") to include in API
2596 // requests with the JSON null value. By default, fields with empty values are
2597 // omitted from API requests. See
2598 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2599 NullFields []string `json:"-"`
2600 }
2601
2602 func (s VoicemailMisconfiguration) MarshalJSON() ([]byte, error) {
2603 type NoMethod VoicemailMisconfiguration
2604 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2605 }
2606
2607 // VoicemailRecipientError: Issue(s) with a voicemail recipient.
2608 type VoicemailRecipientError struct {
2609 // Email: Email address of the invalid recipient. This may be unavailable if
2610 // the recipient was deleted.
2611 Email string `json:"email,omitempty"`
2612 // InvalidReason: Reason for the error.
2613 //
2614 // Possible values:
2615 // "EMAIL_INVALID_REASON_UNSPECIFIED" - Reason wasn't specified.
2616 // "OUT_OF_QUOTA" - User can't receive emails due to insufficient quota.
2617 // "RECIPIENT_DELETED" - All recipients were deleted.
2618 InvalidReason string `json:"invalidReason,omitempty"`
2619 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
2620 // include in API requests. By default, fields with empty or default values are
2621 // omitted from API requests. See
2622 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2623 // details.
2624 ForceSendFields []string `json:"-"`
2625 // NullFields is a list of field names (e.g. "Email") to include in API
2626 // requests with the JSON null value. By default, fields with empty values are
2627 // omitted from API requests. See
2628 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2629 NullFields []string `json:"-"`
2630 }
2631
2632 func (s VoicemailRecipientError) MarshalJSON() ([]byte, error) {
2633 type NoMethod VoicemailRecipientError
2634 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2635 }
2636
2637 type AlertsBatchDeleteCall struct {
2638 s *Service
2639 batchdeletealertsrequest *BatchDeleteAlertsRequest
2640 urlParams_ gensupport.URLParams
2641 ctx_ context.Context
2642 header_ http.Header
2643 }
2644
2645 // BatchDelete: Performs batch delete operation on alerts.
2646 func (r *AlertsService) BatchDelete(batchdeletealertsrequest *BatchDeleteAlertsRequest) *AlertsBatchDeleteCall {
2647 c := &AlertsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2648 c.batchdeletealertsrequest = batchdeletealertsrequest
2649 return c
2650 }
2651
2652 // Fields allows partial responses to be retrieved. See
2653 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2654 // details.
2655 func (c *AlertsBatchDeleteCall) Fields(s ...googleapi.Field) *AlertsBatchDeleteCall {
2656 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2657 return c
2658 }
2659
2660 // Context sets the context to be used in this call's Do method.
2661 func (c *AlertsBatchDeleteCall) Context(ctx context.Context) *AlertsBatchDeleteCall {
2662 c.ctx_ = ctx
2663 return c
2664 }
2665
2666 // Header returns a http.Header that can be modified by the caller to add
2667 // headers to the request.
2668 func (c *AlertsBatchDeleteCall) Header() http.Header {
2669 if c.header_ == nil {
2670 c.header_ = make(http.Header)
2671 }
2672 return c.header_
2673 }
2674
2675 func (c *AlertsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
2676 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2677 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.batchdeletealertsrequest)
2678 if err != nil {
2679 return nil, err
2680 }
2681 c.urlParams_.Set("alt", alt)
2682 c.urlParams_.Set("prettyPrint", "false")
2683 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/alerts:batchDelete")
2684 urls += "?" + c.urlParams_.Encode()
2685 req, err := http.NewRequest("POST", urls, body)
2686 if err != nil {
2687 return nil, err
2688 }
2689 req.Header = reqHeaders
2690 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.alerts.batchDelete", "request", internallog.HTTPRequest(req, body.Bytes()))
2691 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2692 }
2693
2694 // Do executes the "alertcenter.alerts.batchDelete" call.
2695 // Any non-2xx status code is an error. Response headers are in either
2696 // *BatchDeleteAlertsResponse.ServerResponse.Header or (if a response was
2697 // returned at all) in error.(*googleapi.Error).Header. Use
2698 // googleapi.IsNotModified to check whether the returned error was because
2699 // http.StatusNotModified was returned.
2700 func (c *AlertsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*BatchDeleteAlertsResponse, error) {
2701 gensupport.SetOptions(c.urlParams_, opts...)
2702 res, err := c.doRequest("json")
2703 if res != nil && res.StatusCode == http.StatusNotModified {
2704 if res.Body != nil {
2705 res.Body.Close()
2706 }
2707 return nil, gensupport.WrapError(&googleapi.Error{
2708 Code: res.StatusCode,
2709 Header: res.Header,
2710 })
2711 }
2712 if err != nil {
2713 return nil, err
2714 }
2715 defer googleapi.CloseBody(res)
2716 if err := googleapi.CheckResponse(res); err != nil {
2717 return nil, gensupport.WrapError(err)
2718 }
2719 ret := &BatchDeleteAlertsResponse{
2720 ServerResponse: googleapi.ServerResponse{
2721 Header: res.Header,
2722 HTTPStatusCode: res.StatusCode,
2723 },
2724 }
2725 target := &ret
2726 b, err := gensupport.DecodeResponseBytes(target, res)
2727 if err != nil {
2728 return nil, err
2729 }
2730 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.alerts.batchDelete", "response", internallog.HTTPResponse(res, b))
2731 return ret, nil
2732 }
2733
2734 type AlertsBatchUndeleteCall struct {
2735 s *Service
2736 batchundeletealertsrequest *BatchUndeleteAlertsRequest
2737 urlParams_ gensupport.URLParams
2738 ctx_ context.Context
2739 header_ http.Header
2740 }
2741
2742 // BatchUndelete: Performs batch undelete operation on alerts.
2743 func (r *AlertsService) BatchUndelete(batchundeletealertsrequest *BatchUndeleteAlertsRequest) *AlertsBatchUndeleteCall {
2744 c := &AlertsBatchUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2745 c.batchundeletealertsrequest = batchundeletealertsrequest
2746 return c
2747 }
2748
2749 // Fields allows partial responses to be retrieved. See
2750 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2751 // details.
2752 func (c *AlertsBatchUndeleteCall) Fields(s ...googleapi.Field) *AlertsBatchUndeleteCall {
2753 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2754 return c
2755 }
2756
2757 // Context sets the context to be used in this call's Do method.
2758 func (c *AlertsBatchUndeleteCall) Context(ctx context.Context) *AlertsBatchUndeleteCall {
2759 c.ctx_ = ctx
2760 return c
2761 }
2762
2763 // Header returns a http.Header that can be modified by the caller to add
2764 // headers to the request.
2765 func (c *AlertsBatchUndeleteCall) Header() http.Header {
2766 if c.header_ == nil {
2767 c.header_ = make(http.Header)
2768 }
2769 return c.header_
2770 }
2771
2772 func (c *AlertsBatchUndeleteCall) doRequest(alt string) (*http.Response, error) {
2773 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2774 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.batchundeletealertsrequest)
2775 if err != nil {
2776 return nil, err
2777 }
2778 c.urlParams_.Set("alt", alt)
2779 c.urlParams_.Set("prettyPrint", "false")
2780 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/alerts:batchUndelete")
2781 urls += "?" + c.urlParams_.Encode()
2782 req, err := http.NewRequest("POST", urls, body)
2783 if err != nil {
2784 return nil, err
2785 }
2786 req.Header = reqHeaders
2787 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.alerts.batchUndelete", "request", internallog.HTTPRequest(req, body.Bytes()))
2788 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2789 }
2790
2791 // Do executes the "alertcenter.alerts.batchUndelete" call.
2792 // Any non-2xx status code is an error. Response headers are in either
2793 // *BatchUndeleteAlertsResponse.ServerResponse.Header or (if a response was
2794 // returned at all) in error.(*googleapi.Error).Header. Use
2795 // googleapi.IsNotModified to check whether the returned error was because
2796 // http.StatusNotModified was returned.
2797 func (c *AlertsBatchUndeleteCall) Do(opts ...googleapi.CallOption) (*BatchUndeleteAlertsResponse, error) {
2798 gensupport.SetOptions(c.urlParams_, opts...)
2799 res, err := c.doRequest("json")
2800 if res != nil && res.StatusCode == http.StatusNotModified {
2801 if res.Body != nil {
2802 res.Body.Close()
2803 }
2804 return nil, gensupport.WrapError(&googleapi.Error{
2805 Code: res.StatusCode,
2806 Header: res.Header,
2807 })
2808 }
2809 if err != nil {
2810 return nil, err
2811 }
2812 defer googleapi.CloseBody(res)
2813 if err := googleapi.CheckResponse(res); err != nil {
2814 return nil, gensupport.WrapError(err)
2815 }
2816 ret := &BatchUndeleteAlertsResponse{
2817 ServerResponse: googleapi.ServerResponse{
2818 Header: res.Header,
2819 HTTPStatusCode: res.StatusCode,
2820 },
2821 }
2822 target := &ret
2823 b, err := gensupport.DecodeResponseBytes(target, res)
2824 if err != nil {
2825 return nil, err
2826 }
2827 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.alerts.batchUndelete", "response", internallog.HTTPResponse(res, b))
2828 return ret, nil
2829 }
2830
2831 type AlertsDeleteCall struct {
2832 s *Service
2833 alertId string
2834 urlParams_ gensupport.URLParams
2835 ctx_ context.Context
2836 header_ http.Header
2837 }
2838
2839 // Delete: Marks the specified alert for deletion. An alert that has been
2840 // marked for deletion is removed from Alert Center after 30 days. Marking an
2841 // alert for deletion has no effect on an alert which has already been marked
2842 // for deletion. Attempting to mark a nonexistent alert for deletion results in
2843 // a `NOT_FOUND` error.
2844 //
2845 // - alertId: The identifier of the alert to delete.
2846 func (r *AlertsService) Delete(alertId string) *AlertsDeleteCall {
2847 c := &AlertsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2848 c.alertId = alertId
2849 return c
2850 }
2851
2852 // CustomerId sets the optional parameter "customerId": The unique identifier
2853 // of the Google Workspace account of the customer the alert is associated
2854 // with. The `customer_id` must have the initial "C" stripped (for example,
2855 // `046psxkn`). Inferred from the caller identity if not provided. Find your
2856 // customer ID (https://support.google.com/cloudidentity/answer/10070793).
2857 func (c *AlertsDeleteCall) CustomerId(customerId string) *AlertsDeleteCall {
2858 c.urlParams_.Set("customerId", customerId)
2859 return c
2860 }
2861
2862 // Fields allows partial responses to be retrieved. See
2863 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2864 // details.
2865 func (c *AlertsDeleteCall) Fields(s ...googleapi.Field) *AlertsDeleteCall {
2866 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2867 return c
2868 }
2869
2870 // Context sets the context to be used in this call's Do method.
2871 func (c *AlertsDeleteCall) Context(ctx context.Context) *AlertsDeleteCall {
2872 c.ctx_ = ctx
2873 return c
2874 }
2875
2876 // Header returns a http.Header that can be modified by the caller to add
2877 // headers to the request.
2878 func (c *AlertsDeleteCall) Header() http.Header {
2879 if c.header_ == nil {
2880 c.header_ = make(http.Header)
2881 }
2882 return c.header_
2883 }
2884
2885 func (c *AlertsDeleteCall) doRequest(alt string) (*http.Response, error) {
2886 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2887 c.urlParams_.Set("alt", alt)
2888 c.urlParams_.Set("prettyPrint", "false")
2889 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/alerts/{alertId}")
2890 urls += "?" + c.urlParams_.Encode()
2891 req, err := http.NewRequest("DELETE", urls, nil)
2892 if err != nil {
2893 return nil, err
2894 }
2895 req.Header = reqHeaders
2896 googleapi.Expand(req.URL, map[string]string{
2897 "alertId": c.alertId,
2898 })
2899 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.alerts.delete", "request", internallog.HTTPRequest(req, nil))
2900 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2901 }
2902
2903 // Do executes the "alertcenter.alerts.delete" call.
2904 // Any non-2xx status code is an error. Response headers are in either
2905 // *Empty.ServerResponse.Header or (if a response was returned at all) in
2906 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2907 // whether the returned error was because http.StatusNotModified was returned.
2908 func (c *AlertsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2909 gensupport.SetOptions(c.urlParams_, opts...)
2910 res, err := c.doRequest("json")
2911 if res != nil && res.StatusCode == http.StatusNotModified {
2912 if res.Body != nil {
2913 res.Body.Close()
2914 }
2915 return nil, gensupport.WrapError(&googleapi.Error{
2916 Code: res.StatusCode,
2917 Header: res.Header,
2918 })
2919 }
2920 if err != nil {
2921 return nil, err
2922 }
2923 defer googleapi.CloseBody(res)
2924 if err := googleapi.CheckResponse(res); err != nil {
2925 return nil, gensupport.WrapError(err)
2926 }
2927 ret := &Empty{
2928 ServerResponse: googleapi.ServerResponse{
2929 Header: res.Header,
2930 HTTPStatusCode: res.StatusCode,
2931 },
2932 }
2933 target := &ret
2934 b, err := gensupport.DecodeResponseBytes(target, res)
2935 if err != nil {
2936 return nil, err
2937 }
2938 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.alerts.delete", "response", internallog.HTTPResponse(res, b))
2939 return ret, nil
2940 }
2941
2942 type AlertsGetCall struct {
2943 s *Service
2944 alertId string
2945 urlParams_ gensupport.URLParams
2946 ifNoneMatch_ string
2947 ctx_ context.Context
2948 header_ http.Header
2949 }
2950
2951 // Get: Gets the specified alert. Attempting to get a nonexistent alert returns
2952 // `NOT_FOUND` error.
2953 //
2954 // - alertId: The identifier of the alert to retrieve.
2955 func (r *AlertsService) Get(alertId string) *AlertsGetCall {
2956 c := &AlertsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2957 c.alertId = alertId
2958 return c
2959 }
2960
2961 // CustomerId sets the optional parameter "customerId": The unique identifier
2962 // of the Google Workspace account of the customer the alert is associated
2963 // with. The `customer_id` must have the initial "C" stripped (for example,
2964 // `046psxkn`). Inferred from the caller identity if not provided. Find your
2965 // customer ID (https://support.google.com/cloudidentity/answer/10070793).
2966 func (c *AlertsGetCall) CustomerId(customerId string) *AlertsGetCall {
2967 c.urlParams_.Set("customerId", customerId)
2968 return c
2969 }
2970
2971 // Fields allows partial responses to be retrieved. See
2972 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2973 // details.
2974 func (c *AlertsGetCall) Fields(s ...googleapi.Field) *AlertsGetCall {
2975 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2976 return c
2977 }
2978
2979 // IfNoneMatch sets an optional parameter which makes the operation fail if the
2980 // object's ETag matches the given value. This is useful for getting updates
2981 // only after the object has changed since the last request.
2982 func (c *AlertsGetCall) IfNoneMatch(entityTag string) *AlertsGetCall {
2983 c.ifNoneMatch_ = entityTag
2984 return c
2985 }
2986
2987 // Context sets the context to be used in this call's Do method.
2988 func (c *AlertsGetCall) Context(ctx context.Context) *AlertsGetCall {
2989 c.ctx_ = ctx
2990 return c
2991 }
2992
2993 // Header returns a http.Header that can be modified by the caller to add
2994 // headers to the request.
2995 func (c *AlertsGetCall) Header() http.Header {
2996 if c.header_ == nil {
2997 c.header_ = make(http.Header)
2998 }
2999 return c.header_
3000 }
3001
3002 func (c *AlertsGetCall) doRequest(alt string) (*http.Response, error) {
3003 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3004 if c.ifNoneMatch_ != "" {
3005 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3006 }
3007 c.urlParams_.Set("alt", alt)
3008 c.urlParams_.Set("prettyPrint", "false")
3009 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/alerts/{alertId}")
3010 urls += "?" + c.urlParams_.Encode()
3011 req, err := http.NewRequest("GET", urls, nil)
3012 if err != nil {
3013 return nil, err
3014 }
3015 req.Header = reqHeaders
3016 googleapi.Expand(req.URL, map[string]string{
3017 "alertId": c.alertId,
3018 })
3019 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.alerts.get", "request", internallog.HTTPRequest(req, nil))
3020 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3021 }
3022
3023 // Do executes the "alertcenter.alerts.get" call.
3024 // Any non-2xx status code is an error. Response headers are in either
3025 // *Alert.ServerResponse.Header or (if a response was returned at all) in
3026 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3027 // whether the returned error was because http.StatusNotModified was returned.
3028 func (c *AlertsGetCall) Do(opts ...googleapi.CallOption) (*Alert, error) {
3029 gensupport.SetOptions(c.urlParams_, opts...)
3030 res, err := c.doRequest("json")
3031 if res != nil && res.StatusCode == http.StatusNotModified {
3032 if res.Body != nil {
3033 res.Body.Close()
3034 }
3035 return nil, gensupport.WrapError(&googleapi.Error{
3036 Code: res.StatusCode,
3037 Header: res.Header,
3038 })
3039 }
3040 if err != nil {
3041 return nil, err
3042 }
3043 defer googleapi.CloseBody(res)
3044 if err := googleapi.CheckResponse(res); err != nil {
3045 return nil, gensupport.WrapError(err)
3046 }
3047 ret := &Alert{
3048 ServerResponse: googleapi.ServerResponse{
3049 Header: res.Header,
3050 HTTPStatusCode: res.StatusCode,
3051 },
3052 }
3053 target := &ret
3054 b, err := gensupport.DecodeResponseBytes(target, res)
3055 if err != nil {
3056 return nil, err
3057 }
3058 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.alerts.get", "response", internallog.HTTPResponse(res, b))
3059 return ret, nil
3060 }
3061
3062 type AlertsGetMetadataCall struct {
3063 s *Service
3064 alertId string
3065 urlParams_ gensupport.URLParams
3066 ifNoneMatch_ string
3067 ctx_ context.Context
3068 header_ http.Header
3069 }
3070
3071 // GetMetadata: Returns the metadata of an alert. Attempting to get metadata
3072 // for a non-existent alert returns `NOT_FOUND` error.
3073 //
3074 // - alertId: The identifier of the alert this metadata belongs to.
3075 func (r *AlertsService) GetMetadata(alertId string) *AlertsGetMetadataCall {
3076 c := &AlertsGetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3077 c.alertId = alertId
3078 return c
3079 }
3080
3081 // CustomerId sets the optional parameter "customerId": The unique identifier
3082 // of the Google Workspace account of the customer the alert metadata is
3083 // associated with. The `customer_id` must have the initial "C" stripped (for
3084 // example, `046psxkn`). Inferred from the caller identity if not provided.
3085 // Find your customer ID
3086 // (https://support.google.com/cloudidentity/answer/10070793).
3087 func (c *AlertsGetMetadataCall) CustomerId(customerId string) *AlertsGetMetadataCall {
3088 c.urlParams_.Set("customerId", customerId)
3089 return c
3090 }
3091
3092 // Fields allows partial responses to be retrieved. See
3093 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3094 // details.
3095 func (c *AlertsGetMetadataCall) Fields(s ...googleapi.Field) *AlertsGetMetadataCall {
3096 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3097 return c
3098 }
3099
3100 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3101 // object's ETag matches the given value. This is useful for getting updates
3102 // only after the object has changed since the last request.
3103 func (c *AlertsGetMetadataCall) IfNoneMatch(entityTag string) *AlertsGetMetadataCall {
3104 c.ifNoneMatch_ = entityTag
3105 return c
3106 }
3107
3108 // Context sets the context to be used in this call's Do method.
3109 func (c *AlertsGetMetadataCall) Context(ctx context.Context) *AlertsGetMetadataCall {
3110 c.ctx_ = ctx
3111 return c
3112 }
3113
3114 // Header returns a http.Header that can be modified by the caller to add
3115 // headers to the request.
3116 func (c *AlertsGetMetadataCall) Header() http.Header {
3117 if c.header_ == nil {
3118 c.header_ = make(http.Header)
3119 }
3120 return c.header_
3121 }
3122
3123 func (c *AlertsGetMetadataCall) doRequest(alt string) (*http.Response, error) {
3124 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3125 if c.ifNoneMatch_ != "" {
3126 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3127 }
3128 c.urlParams_.Set("alt", alt)
3129 c.urlParams_.Set("prettyPrint", "false")
3130 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/alerts/{alertId}/metadata")
3131 urls += "?" + c.urlParams_.Encode()
3132 req, err := http.NewRequest("GET", urls, nil)
3133 if err != nil {
3134 return nil, err
3135 }
3136 req.Header = reqHeaders
3137 googleapi.Expand(req.URL, map[string]string{
3138 "alertId": c.alertId,
3139 })
3140 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.alerts.getMetadata", "request", internallog.HTTPRequest(req, nil))
3141 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3142 }
3143
3144 // Do executes the "alertcenter.alerts.getMetadata" call.
3145 // Any non-2xx status code is an error. Response headers are in either
3146 // *AlertMetadata.ServerResponse.Header or (if a response was returned at all)
3147 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3148 // whether the returned error was because http.StatusNotModified was returned.
3149 func (c *AlertsGetMetadataCall) Do(opts ...googleapi.CallOption) (*AlertMetadata, error) {
3150 gensupport.SetOptions(c.urlParams_, opts...)
3151 res, err := c.doRequest("json")
3152 if res != nil && res.StatusCode == http.StatusNotModified {
3153 if res.Body != nil {
3154 res.Body.Close()
3155 }
3156 return nil, gensupport.WrapError(&googleapi.Error{
3157 Code: res.StatusCode,
3158 Header: res.Header,
3159 })
3160 }
3161 if err != nil {
3162 return nil, err
3163 }
3164 defer googleapi.CloseBody(res)
3165 if err := googleapi.CheckResponse(res); err != nil {
3166 return nil, gensupport.WrapError(err)
3167 }
3168 ret := &AlertMetadata{
3169 ServerResponse: googleapi.ServerResponse{
3170 Header: res.Header,
3171 HTTPStatusCode: res.StatusCode,
3172 },
3173 }
3174 target := &ret
3175 b, err := gensupport.DecodeResponseBytes(target, res)
3176 if err != nil {
3177 return nil, err
3178 }
3179 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.alerts.getMetadata", "response", internallog.HTTPResponse(res, b))
3180 return ret, nil
3181 }
3182
3183 type AlertsListCall struct {
3184 s *Service
3185 urlParams_ gensupport.URLParams
3186 ifNoneMatch_ string
3187 ctx_ context.Context
3188 header_ http.Header
3189 }
3190
3191 // List: Lists the alerts.
3192 func (r *AlertsService) List() *AlertsListCall {
3193 c := &AlertsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3194 return c
3195 }
3196
3197 // CustomerId sets the optional parameter "customerId": The unique identifier
3198 // of the Google Workspace account of the customer the alerts are associated
3199 // with. The `customer_id` must have the initial "C" stripped (for example,
3200 // `046psxkn`). Inferred from the caller identity if not provided. Find your
3201 // customer ID (https://support.google.com/cloudidentity/answer/10070793).
3202 func (c *AlertsListCall) CustomerId(customerId string) *AlertsListCall {
3203 c.urlParams_.Set("customerId", customerId)
3204 return c
3205 }
3206
3207 // Filter sets the optional parameter "filter": A query string for filtering
3208 // alert results. For more details, see Query filters
3209 // (https://developers.google.com/workspace/admin/alertcenter/guides/query-filters)
3210 // and Supported query filter fields
3211 // (https://developers.google.com/workspace/admin/alertcenter/reference/filter-fields#alerts.list).
3212 func (c *AlertsListCall) Filter(filter string) *AlertsListCall {
3213 c.urlParams_.Set("filter", filter)
3214 return c
3215 }
3216
3217 // OrderBy sets the optional parameter "orderBy": The sort order of the list
3218 // results. If not specified results may be returned in arbitrary order. You
3219 // can sort the results in descending order based on the creation timestamp
3220 // using `order_by="create_time desc". Currently, supported sorting are
3221 // `create_time asc`, `create_time desc`, `update_time desc`
3222 func (c *AlertsListCall) OrderBy(orderBy string) *AlertsListCall {
3223 c.urlParams_.Set("orderBy", orderBy)
3224 return c
3225 }
3226
3227 // PageSize sets the optional parameter "pageSize": The requested page size.
3228 // Server may return fewer items than requested. If unspecified, server picks
3229 // an appropriate default.
3230 func (c *AlertsListCall) PageSize(pageSize int64) *AlertsListCall {
3231 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3232 return c
3233 }
3234
3235 // PageToken sets the optional parameter "pageToken": A token identifying a
3236 // page of results the server should return. If empty, a new iteration is
3237 // started. To continue an iteration, pass in the value from the previous
3238 // ListAlertsResponse's next_page_token field.
3239 func (c *AlertsListCall) PageToken(pageToken string) *AlertsListCall {
3240 c.urlParams_.Set("pageToken", pageToken)
3241 return c
3242 }
3243
3244 // Fields allows partial responses to be retrieved. See
3245 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3246 // details.
3247 func (c *AlertsListCall) Fields(s ...googleapi.Field) *AlertsListCall {
3248 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3249 return c
3250 }
3251
3252 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3253 // object's ETag matches the given value. This is useful for getting updates
3254 // only after the object has changed since the last request.
3255 func (c *AlertsListCall) IfNoneMatch(entityTag string) *AlertsListCall {
3256 c.ifNoneMatch_ = entityTag
3257 return c
3258 }
3259
3260 // Context sets the context to be used in this call's Do method.
3261 func (c *AlertsListCall) Context(ctx context.Context) *AlertsListCall {
3262 c.ctx_ = ctx
3263 return c
3264 }
3265
3266 // Header returns a http.Header that can be modified by the caller to add
3267 // headers to the request.
3268 func (c *AlertsListCall) Header() http.Header {
3269 if c.header_ == nil {
3270 c.header_ = make(http.Header)
3271 }
3272 return c.header_
3273 }
3274
3275 func (c *AlertsListCall) doRequest(alt string) (*http.Response, error) {
3276 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3277 if c.ifNoneMatch_ != "" {
3278 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3279 }
3280 c.urlParams_.Set("alt", alt)
3281 c.urlParams_.Set("prettyPrint", "false")
3282 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/alerts")
3283 urls += "?" + c.urlParams_.Encode()
3284 req, err := http.NewRequest("GET", urls, nil)
3285 if err != nil {
3286 return nil, err
3287 }
3288 req.Header = reqHeaders
3289 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.alerts.list", "request", internallog.HTTPRequest(req, nil))
3290 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3291 }
3292
3293 // Do executes the "alertcenter.alerts.list" call.
3294 // Any non-2xx status code is an error. Response headers are in either
3295 // *ListAlertsResponse.ServerResponse.Header or (if a response was returned at
3296 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3297 // check whether the returned error was because http.StatusNotModified was
3298 // returned.
3299 func (c *AlertsListCall) Do(opts ...googleapi.CallOption) (*ListAlertsResponse, error) {
3300 gensupport.SetOptions(c.urlParams_, opts...)
3301 res, err := c.doRequest("json")
3302 if res != nil && res.StatusCode == http.StatusNotModified {
3303 if res.Body != nil {
3304 res.Body.Close()
3305 }
3306 return nil, gensupport.WrapError(&googleapi.Error{
3307 Code: res.StatusCode,
3308 Header: res.Header,
3309 })
3310 }
3311 if err != nil {
3312 return nil, err
3313 }
3314 defer googleapi.CloseBody(res)
3315 if err := googleapi.CheckResponse(res); err != nil {
3316 return nil, gensupport.WrapError(err)
3317 }
3318 ret := &ListAlertsResponse{
3319 ServerResponse: googleapi.ServerResponse{
3320 Header: res.Header,
3321 HTTPStatusCode: res.StatusCode,
3322 },
3323 }
3324 target := &ret
3325 b, err := gensupport.DecodeResponseBytes(target, res)
3326 if err != nil {
3327 return nil, err
3328 }
3329 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.alerts.list", "response", internallog.HTTPResponse(res, b))
3330 return ret, nil
3331 }
3332
3333 // Pages invokes f for each page of results.
3334 // A non-nil error returned from f will halt the iteration.
3335 // The provided context supersedes any context provided to the Context method.
3336 func (c *AlertsListCall) Pages(ctx context.Context, f func(*ListAlertsResponse) error) error {
3337 c.ctx_ = ctx
3338 defer c.PageToken(c.urlParams_.Get("pageToken"))
3339 for {
3340 x, err := c.Do()
3341 if err != nil {
3342 return err
3343 }
3344 if err := f(x); err != nil {
3345 return err
3346 }
3347 if x.NextPageToken == "" {
3348 return nil
3349 }
3350 c.PageToken(x.NextPageToken)
3351 }
3352 }
3353
3354 type AlertsUndeleteCall struct {
3355 s *Service
3356 alertId string
3357 undeletealertrequest *UndeleteAlertRequest
3358 urlParams_ gensupport.URLParams
3359 ctx_ context.Context
3360 header_ http.Header
3361 }
3362
3363 // Undelete: Restores, or "undeletes", an alert that was marked for deletion
3364 // within the past 30 days. Attempting to undelete an alert which was marked
3365 // for deletion over 30 days ago (which has been removed from the Alert Center
3366 // database) or a nonexistent alert returns a `NOT_FOUND` error. Attempting to
3367 // undelete an alert which has not been marked for deletion has no effect.
3368 //
3369 // - alertId: The identifier of the alert to undelete.
3370 func (r *AlertsService) Undelete(alertId string, undeletealertrequest *UndeleteAlertRequest) *AlertsUndeleteCall {
3371 c := &AlertsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3372 c.alertId = alertId
3373 c.undeletealertrequest = undeletealertrequest
3374 return c
3375 }
3376
3377 // Fields allows partial responses to be retrieved. See
3378 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3379 // details.
3380 func (c *AlertsUndeleteCall) Fields(s ...googleapi.Field) *AlertsUndeleteCall {
3381 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3382 return c
3383 }
3384
3385 // Context sets the context to be used in this call's Do method.
3386 func (c *AlertsUndeleteCall) Context(ctx context.Context) *AlertsUndeleteCall {
3387 c.ctx_ = ctx
3388 return c
3389 }
3390
3391 // Header returns a http.Header that can be modified by the caller to add
3392 // headers to the request.
3393 func (c *AlertsUndeleteCall) Header() http.Header {
3394 if c.header_ == nil {
3395 c.header_ = make(http.Header)
3396 }
3397 return c.header_
3398 }
3399
3400 func (c *AlertsUndeleteCall) doRequest(alt string) (*http.Response, error) {
3401 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3402 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undeletealertrequest)
3403 if err != nil {
3404 return nil, err
3405 }
3406 c.urlParams_.Set("alt", alt)
3407 c.urlParams_.Set("prettyPrint", "false")
3408 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/alerts/{alertId}:undelete")
3409 urls += "?" + c.urlParams_.Encode()
3410 req, err := http.NewRequest("POST", urls, body)
3411 if err != nil {
3412 return nil, err
3413 }
3414 req.Header = reqHeaders
3415 googleapi.Expand(req.URL, map[string]string{
3416 "alertId": c.alertId,
3417 })
3418 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.alerts.undelete", "request", internallog.HTTPRequest(req, body.Bytes()))
3419 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3420 }
3421
3422 // Do executes the "alertcenter.alerts.undelete" call.
3423 // Any non-2xx status code is an error. Response headers are in either
3424 // *Alert.ServerResponse.Header or (if a response was returned at all) in
3425 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3426 // whether the returned error was because http.StatusNotModified was returned.
3427 func (c *AlertsUndeleteCall) Do(opts ...googleapi.CallOption) (*Alert, error) {
3428 gensupport.SetOptions(c.urlParams_, opts...)
3429 res, err := c.doRequest("json")
3430 if res != nil && res.StatusCode == http.StatusNotModified {
3431 if res.Body != nil {
3432 res.Body.Close()
3433 }
3434 return nil, gensupport.WrapError(&googleapi.Error{
3435 Code: res.StatusCode,
3436 Header: res.Header,
3437 })
3438 }
3439 if err != nil {
3440 return nil, err
3441 }
3442 defer googleapi.CloseBody(res)
3443 if err := googleapi.CheckResponse(res); err != nil {
3444 return nil, gensupport.WrapError(err)
3445 }
3446 ret := &Alert{
3447 ServerResponse: googleapi.ServerResponse{
3448 Header: res.Header,
3449 HTTPStatusCode: res.StatusCode,
3450 },
3451 }
3452 target := &ret
3453 b, err := gensupport.DecodeResponseBytes(target, res)
3454 if err != nil {
3455 return nil, err
3456 }
3457 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.alerts.undelete", "response", internallog.HTTPResponse(res, b))
3458 return ret, nil
3459 }
3460
3461 type AlertsFeedbackCreateCall struct {
3462 s *Service
3463 alertId string
3464 alertfeedback *AlertFeedback
3465 urlParams_ gensupport.URLParams
3466 ctx_ context.Context
3467 header_ http.Header
3468 }
3469
3470 // Create: Creates new feedback for an alert. Attempting to create a feedback
3471 // for a non-existent alert returns `NOT_FOUND` error. Attempting to create a
3472 // feedback for an alert that is marked for deletion returns
3473 // `FAILED_PRECONDITION' error.
3474 //
3475 // - alertId: The identifier of the alert this feedback belongs to.
3476 func (r *AlertsFeedbackService) Create(alertId string, alertfeedback *AlertFeedback) *AlertsFeedbackCreateCall {
3477 c := &AlertsFeedbackCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3478 c.alertId = alertId
3479 c.alertfeedback = alertfeedback
3480 return c
3481 }
3482
3483 // CustomerId sets the optional parameter "customerId": The unique identifier
3484 // of the Google Workspace account of the customer the alert is associated
3485 // with. The `customer_id` must have the initial "C" stripped (for example,
3486 // `046psxkn`). Inferred from the caller identity if not provided. Find your
3487 // customer ID (https://support.google.com/cloudidentity/answer/10070793).
3488 func (c *AlertsFeedbackCreateCall) CustomerId(customerId string) *AlertsFeedbackCreateCall {
3489 c.urlParams_.Set("customerId", customerId)
3490 return c
3491 }
3492
3493 // Fields allows partial responses to be retrieved. See
3494 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3495 // details.
3496 func (c *AlertsFeedbackCreateCall) Fields(s ...googleapi.Field) *AlertsFeedbackCreateCall {
3497 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3498 return c
3499 }
3500
3501 // Context sets the context to be used in this call's Do method.
3502 func (c *AlertsFeedbackCreateCall) Context(ctx context.Context) *AlertsFeedbackCreateCall {
3503 c.ctx_ = ctx
3504 return c
3505 }
3506
3507 // Header returns a http.Header that can be modified by the caller to add
3508 // headers to the request.
3509 func (c *AlertsFeedbackCreateCall) Header() http.Header {
3510 if c.header_ == nil {
3511 c.header_ = make(http.Header)
3512 }
3513 return c.header_
3514 }
3515
3516 func (c *AlertsFeedbackCreateCall) doRequest(alt string) (*http.Response, error) {
3517 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3518 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.alertfeedback)
3519 if err != nil {
3520 return nil, err
3521 }
3522 c.urlParams_.Set("alt", alt)
3523 c.urlParams_.Set("prettyPrint", "false")
3524 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/alerts/{alertId}/feedback")
3525 urls += "?" + c.urlParams_.Encode()
3526 req, err := http.NewRequest("POST", urls, body)
3527 if err != nil {
3528 return nil, err
3529 }
3530 req.Header = reqHeaders
3531 googleapi.Expand(req.URL, map[string]string{
3532 "alertId": c.alertId,
3533 })
3534 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.alerts.feedback.create", "request", internallog.HTTPRequest(req, body.Bytes()))
3535 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3536 }
3537
3538 // Do executes the "alertcenter.alerts.feedback.create" call.
3539 // Any non-2xx status code is an error. Response headers are in either
3540 // *AlertFeedback.ServerResponse.Header or (if a response was returned at all)
3541 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3542 // whether the returned error was because http.StatusNotModified was returned.
3543 func (c *AlertsFeedbackCreateCall) Do(opts ...googleapi.CallOption) (*AlertFeedback, error) {
3544 gensupport.SetOptions(c.urlParams_, opts...)
3545 res, err := c.doRequest("json")
3546 if res != nil && res.StatusCode == http.StatusNotModified {
3547 if res.Body != nil {
3548 res.Body.Close()
3549 }
3550 return nil, gensupport.WrapError(&googleapi.Error{
3551 Code: res.StatusCode,
3552 Header: res.Header,
3553 })
3554 }
3555 if err != nil {
3556 return nil, err
3557 }
3558 defer googleapi.CloseBody(res)
3559 if err := googleapi.CheckResponse(res); err != nil {
3560 return nil, gensupport.WrapError(err)
3561 }
3562 ret := &AlertFeedback{
3563 ServerResponse: googleapi.ServerResponse{
3564 Header: res.Header,
3565 HTTPStatusCode: res.StatusCode,
3566 },
3567 }
3568 target := &ret
3569 b, err := gensupport.DecodeResponseBytes(target, res)
3570 if err != nil {
3571 return nil, err
3572 }
3573 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.alerts.feedback.create", "response", internallog.HTTPResponse(res, b))
3574 return ret, nil
3575 }
3576
3577 type AlertsFeedbackListCall struct {
3578 s *Service
3579 alertId string
3580 urlParams_ gensupport.URLParams
3581 ifNoneMatch_ string
3582 ctx_ context.Context
3583 header_ http.Header
3584 }
3585
3586 // List: Lists all the feedback for an alert. Attempting to list feedbacks for
3587 // a non-existent alert returns `NOT_FOUND` error.
3588 //
3589 // - alertId: The alert identifier. The "-" wildcard could be used to represent
3590 // all alerts.
3591 func (r *AlertsFeedbackService) List(alertId string) *AlertsFeedbackListCall {
3592 c := &AlertsFeedbackListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3593 c.alertId = alertId
3594 return c
3595 }
3596
3597 // CustomerId sets the optional parameter "customerId": The unique identifier
3598 // of the Google Workspace account of the customer the alert is associated
3599 // with. The `customer_id` must have the initial "C" stripped (for example,
3600 // `046psxkn`). Inferred from the caller identity if not provided. Find your
3601 // customer ID (https://support.google.com/cloudidentity/answer/10070793).
3602 func (c *AlertsFeedbackListCall) CustomerId(customerId string) *AlertsFeedbackListCall {
3603 c.urlParams_.Set("customerId", customerId)
3604 return c
3605 }
3606
3607 // Filter sets the optional parameter "filter": A query string for filtering
3608 // alert feedback results. For more details, see Query filters
3609 // (https://developers.google.com/workspace/admin/alertcenter/guides/query-filters)
3610 // and Supported query filter fields
3611 // (https://developers.google.com/workspace/admin/alertcenter/reference/filter-fields#alerts.feedback.list).
3612 func (c *AlertsFeedbackListCall) Filter(filter string) *AlertsFeedbackListCall {
3613 c.urlParams_.Set("filter", filter)
3614 return c
3615 }
3616
3617 // Fields allows partial responses to be retrieved. See
3618 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3619 // details.
3620 func (c *AlertsFeedbackListCall) Fields(s ...googleapi.Field) *AlertsFeedbackListCall {
3621 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3622 return c
3623 }
3624
3625 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3626 // object's ETag matches the given value. This is useful for getting updates
3627 // only after the object has changed since the last request.
3628 func (c *AlertsFeedbackListCall) IfNoneMatch(entityTag string) *AlertsFeedbackListCall {
3629 c.ifNoneMatch_ = entityTag
3630 return c
3631 }
3632
3633 // Context sets the context to be used in this call's Do method.
3634 func (c *AlertsFeedbackListCall) Context(ctx context.Context) *AlertsFeedbackListCall {
3635 c.ctx_ = ctx
3636 return c
3637 }
3638
3639 // Header returns a http.Header that can be modified by the caller to add
3640 // headers to the request.
3641 func (c *AlertsFeedbackListCall) Header() http.Header {
3642 if c.header_ == nil {
3643 c.header_ = make(http.Header)
3644 }
3645 return c.header_
3646 }
3647
3648 func (c *AlertsFeedbackListCall) doRequest(alt string) (*http.Response, error) {
3649 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3650 if c.ifNoneMatch_ != "" {
3651 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3652 }
3653 c.urlParams_.Set("alt", alt)
3654 c.urlParams_.Set("prettyPrint", "false")
3655 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/alerts/{alertId}/feedback")
3656 urls += "?" + c.urlParams_.Encode()
3657 req, err := http.NewRequest("GET", urls, nil)
3658 if err != nil {
3659 return nil, err
3660 }
3661 req.Header = reqHeaders
3662 googleapi.Expand(req.URL, map[string]string{
3663 "alertId": c.alertId,
3664 })
3665 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.alerts.feedback.list", "request", internallog.HTTPRequest(req, nil))
3666 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3667 }
3668
3669 // Do executes the "alertcenter.alerts.feedback.list" call.
3670 // Any non-2xx status code is an error. Response headers are in either
3671 // *ListAlertFeedbackResponse.ServerResponse.Header or (if a response was
3672 // returned at all) in error.(*googleapi.Error).Header. Use
3673 // googleapi.IsNotModified to check whether the returned error was because
3674 // http.StatusNotModified was returned.
3675 func (c *AlertsFeedbackListCall) Do(opts ...googleapi.CallOption) (*ListAlertFeedbackResponse, error) {
3676 gensupport.SetOptions(c.urlParams_, opts...)
3677 res, err := c.doRequest("json")
3678 if res != nil && res.StatusCode == http.StatusNotModified {
3679 if res.Body != nil {
3680 res.Body.Close()
3681 }
3682 return nil, gensupport.WrapError(&googleapi.Error{
3683 Code: res.StatusCode,
3684 Header: res.Header,
3685 })
3686 }
3687 if err != nil {
3688 return nil, err
3689 }
3690 defer googleapi.CloseBody(res)
3691 if err := googleapi.CheckResponse(res); err != nil {
3692 return nil, gensupport.WrapError(err)
3693 }
3694 ret := &ListAlertFeedbackResponse{
3695 ServerResponse: googleapi.ServerResponse{
3696 Header: res.Header,
3697 HTTPStatusCode: res.StatusCode,
3698 },
3699 }
3700 target := &ret
3701 b, err := gensupport.DecodeResponseBytes(target, res)
3702 if err != nil {
3703 return nil, err
3704 }
3705 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.alerts.feedback.list", "response", internallog.HTTPResponse(res, b))
3706 return ret, nil
3707 }
3708
3709 type V1beta1GetSettingsCall struct {
3710 s *Service
3711 urlParams_ gensupport.URLParams
3712 ifNoneMatch_ string
3713 ctx_ context.Context
3714 header_ http.Header
3715 }
3716
3717 // GetSettings: Returns customer-level settings.
3718 func (r *V1beta1Service) GetSettings() *V1beta1GetSettingsCall {
3719 c := &V1beta1GetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3720 return c
3721 }
3722
3723 // CustomerId sets the optional parameter "customerId": The unique identifier
3724 // of the Google Workspace account of the customer the alert settings are
3725 // associated with. The `customer_id` must/ have the initial "C" stripped (for
3726 // example, `046psxkn`). Inferred from the caller identity if not provided.
3727 // Find your customer ID
3728 // (https://support.google.com/cloudidentity/answer/10070793).
3729 func (c *V1beta1GetSettingsCall) CustomerId(customerId string) *V1beta1GetSettingsCall {
3730 c.urlParams_.Set("customerId", customerId)
3731 return c
3732 }
3733
3734 // Fields allows partial responses to be retrieved. See
3735 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3736 // details.
3737 func (c *V1beta1GetSettingsCall) Fields(s ...googleapi.Field) *V1beta1GetSettingsCall {
3738 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3739 return c
3740 }
3741
3742 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3743 // object's ETag matches the given value. This is useful for getting updates
3744 // only after the object has changed since the last request.
3745 func (c *V1beta1GetSettingsCall) IfNoneMatch(entityTag string) *V1beta1GetSettingsCall {
3746 c.ifNoneMatch_ = entityTag
3747 return c
3748 }
3749
3750 // Context sets the context to be used in this call's Do method.
3751 func (c *V1beta1GetSettingsCall) Context(ctx context.Context) *V1beta1GetSettingsCall {
3752 c.ctx_ = ctx
3753 return c
3754 }
3755
3756 // Header returns a http.Header that can be modified by the caller to add
3757 // headers to the request.
3758 func (c *V1beta1GetSettingsCall) Header() http.Header {
3759 if c.header_ == nil {
3760 c.header_ = make(http.Header)
3761 }
3762 return c.header_
3763 }
3764
3765 func (c *V1beta1GetSettingsCall) doRequest(alt string) (*http.Response, error) {
3766 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3767 if c.ifNoneMatch_ != "" {
3768 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3769 }
3770 c.urlParams_.Set("alt", alt)
3771 c.urlParams_.Set("prettyPrint", "false")
3772 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/settings")
3773 urls += "?" + c.urlParams_.Encode()
3774 req, err := http.NewRequest("GET", urls, nil)
3775 if err != nil {
3776 return nil, err
3777 }
3778 req.Header = reqHeaders
3779 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.getSettings", "request", internallog.HTTPRequest(req, nil))
3780 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3781 }
3782
3783 // Do executes the "alertcenter.getSettings" call.
3784 // Any non-2xx status code is an error. Response headers are in either
3785 // *Settings.ServerResponse.Header or (if a response was returned at all) in
3786 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3787 // whether the returned error was because http.StatusNotModified was returned.
3788 func (c *V1beta1GetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
3789 gensupport.SetOptions(c.urlParams_, opts...)
3790 res, err := c.doRequest("json")
3791 if res != nil && res.StatusCode == http.StatusNotModified {
3792 if res.Body != nil {
3793 res.Body.Close()
3794 }
3795 return nil, gensupport.WrapError(&googleapi.Error{
3796 Code: res.StatusCode,
3797 Header: res.Header,
3798 })
3799 }
3800 if err != nil {
3801 return nil, err
3802 }
3803 defer googleapi.CloseBody(res)
3804 if err := googleapi.CheckResponse(res); err != nil {
3805 return nil, gensupport.WrapError(err)
3806 }
3807 ret := &Settings{
3808 ServerResponse: googleapi.ServerResponse{
3809 Header: res.Header,
3810 HTTPStatusCode: res.StatusCode,
3811 },
3812 }
3813 target := &ret
3814 b, err := gensupport.DecodeResponseBytes(target, res)
3815 if err != nil {
3816 return nil, err
3817 }
3818 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.getSettings", "response", internallog.HTTPResponse(res, b))
3819 return ret, nil
3820 }
3821
3822 type V1beta1UpdateSettingsCall struct {
3823 s *Service
3824 settings *Settings
3825 urlParams_ gensupport.URLParams
3826 ctx_ context.Context
3827 header_ http.Header
3828 }
3829
3830 // UpdateSettings: Updates the customer-level settings.
3831 func (r *V1beta1Service) UpdateSettings(settings *Settings) *V1beta1UpdateSettingsCall {
3832 c := &V1beta1UpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3833 c.settings = settings
3834 return c
3835 }
3836
3837 // CustomerId sets the optional parameter "customerId": The unique identifier
3838 // of the Google Workspace account of the customer the alert settings are
3839 // associated with. The `customer_id` must have the initial "C" stripped (for
3840 // example, `046psxkn`). Inferred from the caller identity if not provided.
3841 // Find your customer ID
3842 // (https://support.google.com/cloudidentity/answer/10070793).
3843 func (c *V1beta1UpdateSettingsCall) CustomerId(customerId string) *V1beta1UpdateSettingsCall {
3844 c.urlParams_.Set("customerId", customerId)
3845 return c
3846 }
3847
3848 // Fields allows partial responses to be retrieved. See
3849 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3850 // details.
3851 func (c *V1beta1UpdateSettingsCall) Fields(s ...googleapi.Field) *V1beta1UpdateSettingsCall {
3852 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3853 return c
3854 }
3855
3856 // Context sets the context to be used in this call's Do method.
3857 func (c *V1beta1UpdateSettingsCall) Context(ctx context.Context) *V1beta1UpdateSettingsCall {
3858 c.ctx_ = ctx
3859 return c
3860 }
3861
3862 // Header returns a http.Header that can be modified by the caller to add
3863 // headers to the request.
3864 func (c *V1beta1UpdateSettingsCall) Header() http.Header {
3865 if c.header_ == nil {
3866 c.header_ = make(http.Header)
3867 }
3868 return c.header_
3869 }
3870
3871 func (c *V1beta1UpdateSettingsCall) doRequest(alt string) (*http.Response, error) {
3872 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3873 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.settings)
3874 if err != nil {
3875 return nil, err
3876 }
3877 c.urlParams_.Set("alt", alt)
3878 c.urlParams_.Set("prettyPrint", "false")
3879 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/settings")
3880 urls += "?" + c.urlParams_.Encode()
3881 req, err := http.NewRequest("PATCH", urls, body)
3882 if err != nil {
3883 return nil, err
3884 }
3885 req.Header = reqHeaders
3886 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "alertcenter.updateSettings", "request", internallog.HTTPRequest(req, body.Bytes()))
3887 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3888 }
3889
3890 // Do executes the "alertcenter.updateSettings" call.
3891 // Any non-2xx status code is an error. Response headers are in either
3892 // *Settings.ServerResponse.Header or (if a response was returned at all) in
3893 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3894 // whether the returned error was because http.StatusNotModified was returned.
3895 func (c *V1beta1UpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) {
3896 gensupport.SetOptions(c.urlParams_, opts...)
3897 res, err := c.doRequest("json")
3898 if res != nil && res.StatusCode == http.StatusNotModified {
3899 if res.Body != nil {
3900 res.Body.Close()
3901 }
3902 return nil, gensupport.WrapError(&googleapi.Error{
3903 Code: res.StatusCode,
3904 Header: res.Header,
3905 })
3906 }
3907 if err != nil {
3908 return nil, err
3909 }
3910 defer googleapi.CloseBody(res)
3911 if err := googleapi.CheckResponse(res); err != nil {
3912 return nil, gensupport.WrapError(err)
3913 }
3914 ret := &Settings{
3915 ServerResponse: googleapi.ServerResponse{
3916 Header: res.Header,
3917 HTTPStatusCode: res.StatusCode,
3918 },
3919 }
3920 target := &ret
3921 b, err := gensupport.DecodeResponseBytes(target, res)
3922 if err != nil {
3923 return nil, err
3924 }
3925 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "alertcenter.updateSettings", "response", internallog.HTTPResponse(res, b))
3926 return ret, nil
3927 }