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