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 driveactivity provides access to the Drive Activity API. 8 // 9 // For product documentation, see: https://developers.google.com/drive/activity/ 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/driveactivity/v2" 27 // ... 28 // ctx := context.Background() 29 // driveactivityService, err := driveactivity.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 // By default, all available scopes (see "Constants") are used to authenticate. 38 // To restrict scopes, use [google.golang.org/api/option.WithScopes]: 39 // 40 // driveactivityService, err := driveactivity.NewService(ctx, option.WithScopes(driveactivity.DriveActivityReadonlyScope)) 41 // 42 // To use an API key for authentication (note: some APIs do not support API 43 // keys), use [google.golang.org/api/option.WithAPIKey]: 44 // 45 // driveactivityService, err := driveactivity.NewService(ctx, option.WithAPIKey("AIza...")) 46 // 47 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 48 // flow, use [google.golang.org/api/option.WithTokenSource]: 49 // 50 // config := &oauth2.Config{...} 51 // // ... 52 // token, err := config.Exchange(ctx, ...) 53 // driveactivityService, err := driveactivity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 54 // 55 // See [google.golang.org/api/option.ClientOption] for details on options. 56 package driveactivity // import "google.golang.org/api/driveactivity/v2" 57 58 import ( 59 "bytes" 60 "context" 61 "encoding/json" 62 "errors" 63 "fmt" 64 "io" 65 "net/http" 66 "net/url" 67 "strconv" 68 "strings" 69 70 googleapi "google.golang.org/api/googleapi" 71 internal "google.golang.org/api/internal" 72 gensupport "google.golang.org/api/internal/gensupport" 73 option "google.golang.org/api/option" 74 internaloption "google.golang.org/api/option/internaloption" 75 htransport "google.golang.org/api/transport/http" 76 ) 77 78 // Always reference these packages, just in case the auto-generated code 79 // below doesn't. 80 var _ = bytes.NewBuffer 81 var _ = strconv.Itoa 82 var _ = fmt.Sprintf 83 var _ = json.NewDecoder 84 var _ = io.Copy 85 var _ = url.Parse 86 var _ = gensupport.MarshalJSON 87 var _ = googleapi.Version 88 var _ = errors.New 89 var _ = strings.Replace 90 var _ = context.Canceled 91 var _ = internaloption.WithDefaultEndpoint 92 var _ = internal.Version 93 94 const apiId = "driveactivity:v2" 95 const apiName = "driveactivity" 96 const apiVersion = "v2" 97 const basePath = "https://driveactivity.googleapis.com/" 98 const basePathTemplate = "https://driveactivity.UNIVERSE_DOMAIN/" 99 const mtlsBasePath = "https://driveactivity.mtls.googleapis.com/" 100 101 // OAuth2 scopes used by this API. 102 const ( 103 // View and add to the activity record of files in your Google Drive 104 DriveActivityScope = "https://www.googleapis.com/auth/drive.activity" 105 106 // View the activity record of files in your Google Drive 107 DriveActivityReadonlyScope = "https://www.googleapis.com/auth/drive.activity.readonly" 108 ) 109 110 // NewService creates a new Service. 111 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 112 scopesOption := internaloption.WithDefaultScopes( 113 "https://www.googleapis.com/auth/drive.activity", 114 "https://www.googleapis.com/auth/drive.activity.readonly", 115 ) 116 // NOTE: prepend, so we don't override user-specified scopes. 117 opts = append([]option.ClientOption{scopesOption}, opts...) 118 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 119 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 120 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 121 opts = append(opts, internaloption.EnableNewAuthLibrary()) 122 client, endpoint, err := htransport.NewClient(ctx, opts...) 123 if err != nil { 124 return nil, err 125 } 126 s, err := New(client) 127 if err != nil { 128 return nil, err 129 } 130 if endpoint != "" { 131 s.BasePath = endpoint 132 } 133 return s, nil 134 } 135 136 // New creates a new Service. It uses the provided http.Client for requests. 137 // 138 // Deprecated: please use NewService instead. 139 // To provide a custom HTTP client, use option.WithHTTPClient. 140 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 141 func New(client *http.Client) (*Service, error) { 142 if client == nil { 143 return nil, errors.New("client is nil") 144 } 145 s := &Service{client: client, BasePath: basePath} 146 s.Activity = NewActivityService(s) 147 return s, nil 148 } 149 150 type Service struct { 151 client *http.Client 152 BasePath string // API endpoint base URL 153 UserAgent string // optional additional User-Agent fragment 154 155 Activity *ActivityService 156 } 157 158 func (s *Service) userAgent() string { 159 if s.UserAgent == "" { 160 return googleapi.UserAgent 161 } 162 return googleapi.UserAgent + " " + s.UserAgent 163 } 164 165 func NewActivityService(s *Service) *ActivityService { 166 rs := &ActivityService{s: s} 167 return rs 168 } 169 170 type ActivityService struct { 171 s *Service 172 } 173 174 // Action: Information about the action. 175 type Action struct { 176 // Actor: The actor responsible for this action (or empty if all actors are 177 // responsible). 178 Actor *Actor `json:"actor,omitempty"` 179 // Detail: The type and detailed information about the action. 180 Detail *ActionDetail `json:"detail,omitempty"` 181 // Target: The target this action affects (or empty if affecting all targets). 182 // This represents the state of the target immediately after this action 183 // occurred. 184 Target *Target `json:"target,omitempty"` 185 // TimeRange: The action occurred over this time range. 186 TimeRange *TimeRange `json:"timeRange,omitempty"` 187 // Timestamp: The action occurred at this specific time. 188 Timestamp string `json:"timestamp,omitempty"` 189 // ForceSendFields is a list of field names (e.g. "Actor") to unconditionally 190 // include in API requests. By default, fields with empty or default values are 191 // omitted from API requests. See 192 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 193 // details. 194 ForceSendFields []string `json:"-"` 195 // NullFields is a list of field names (e.g. "Actor") to include in API 196 // requests with the JSON null value. By default, fields with empty values are 197 // omitted from API requests. See 198 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 199 NullFields []string `json:"-"` 200 } 201 202 func (s *Action) MarshalJSON() ([]byte, error) { 203 type NoMethod Action 204 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 205 } 206 207 // ActionDetail: Data describing the type and additional information of an 208 // action. 209 type ActionDetail struct { 210 // AppliedLabelChange: Label was changed. 211 AppliedLabelChange *AppliedLabelChange `json:"appliedLabelChange,omitempty"` 212 // Comment: A change about comments was made. 213 Comment *Comment `json:"comment,omitempty"` 214 // Create: An object was created. 215 Create *Create `json:"create,omitempty"` 216 // Delete: An object was deleted. 217 Delete *Delete `json:"delete,omitempty"` 218 // DlpChange: A change happened in data leak prevention status. 219 DlpChange *DataLeakPreventionChange `json:"dlpChange,omitempty"` 220 // Edit: An object was edited. 221 Edit *Edit `json:"edit,omitempty"` 222 // Move: An object was moved. 223 Move *Move `json:"move,omitempty"` 224 // PermissionChange: The permission on an object was changed. 225 PermissionChange *PermissionChange `json:"permissionChange,omitempty"` 226 // Reference: An object was referenced in an application outside of Drive/Docs. 227 Reference *ApplicationReference `json:"reference,omitempty"` 228 // Rename: An object was renamed. 229 Rename *Rename `json:"rename,omitempty"` 230 // Restore: A deleted object was restored. 231 Restore *Restore `json:"restore,omitempty"` 232 // SettingsChange: Settings were changed. 233 SettingsChange *SettingsChange `json:"settingsChange,omitempty"` 234 // ForceSendFields is a list of field names (e.g. "AppliedLabelChange") to 235 // unconditionally include in API requests. By default, fields with empty or 236 // default values are omitted from API requests. See 237 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 238 // details. 239 ForceSendFields []string `json:"-"` 240 // NullFields is a list of field names (e.g. "AppliedLabelChange") to include 241 // in API requests with the JSON null value. By default, fields with empty 242 // values are omitted from API requests. See 243 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 244 NullFields []string `json:"-"` 245 } 246 247 func (s *ActionDetail) MarshalJSON() ([]byte, error) { 248 type NoMethod ActionDetail 249 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 250 } 251 252 // Actor: The actor of a Drive activity. 253 type Actor struct { 254 // Administrator: An administrator. 255 Administrator *Administrator `json:"administrator,omitempty"` 256 // Anonymous: An anonymous user. 257 Anonymous *AnonymousUser `json:"anonymous,omitempty"` 258 // Impersonation: An account acting on behalf of another. 259 Impersonation *Impersonation `json:"impersonation,omitempty"` 260 // System: A non-user actor (i.e. system triggered). 261 System *SystemEvent `json:"system,omitempty"` 262 // User: An end user. 263 User *User `json:"user,omitempty"` 264 // ForceSendFields is a list of field names (e.g. "Administrator") to 265 // unconditionally include in API requests. By default, fields with empty or 266 // default values are omitted from API requests. See 267 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 268 // details. 269 ForceSendFields []string `json:"-"` 270 // NullFields is a list of field names (e.g. "Administrator") to include in API 271 // requests with the JSON null value. By default, fields with empty values are 272 // omitted from API requests. See 273 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 274 NullFields []string `json:"-"` 275 } 276 277 func (s *Actor) MarshalJSON() ([]byte, error) { 278 type NoMethod Actor 279 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 280 } 281 282 // Administrator: Empty message representing an administrator. 283 type Administrator struct { 284 } 285 286 // AnonymousUser: Empty message representing an anonymous user or indicating 287 // the authenticated user should be anonymized. 288 type AnonymousUser struct { 289 } 290 291 // Anyone: Represents any user (including a logged out user). 292 type Anyone struct { 293 } 294 295 // ApplicationReference: Activity in applications other than Drive. 296 type ApplicationReference struct { 297 // Type: The reference type corresponding to this event. 298 // 299 // Possible values: 300 // "UNSPECIFIED_REFERENCE_TYPE" - The type is not available. 301 // "LINK" - The links of one or more Drive items were posted. 302 // "DISCUSS" - Comments were made regarding a Drive item. 303 Type string `json:"type,omitempty"` 304 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 305 // include in API requests. By default, fields with empty or default values are 306 // omitted from API requests. See 307 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 308 // details. 309 ForceSendFields []string `json:"-"` 310 // NullFields is a list of field names (e.g. "Type") to include in API requests 311 // with the JSON null value. By default, fields with empty values are omitted 312 // from API requests. See 313 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 314 NullFields []string `json:"-"` 315 } 316 317 func (s *ApplicationReference) MarshalJSON() ([]byte, error) { 318 type NoMethod ApplicationReference 319 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 320 } 321 322 // AppliedLabelChange: Label changes that were made on the Target. 323 type AppliedLabelChange struct { 324 // Changes: Changes that were made to the Label on the Target. 325 Changes []*AppliedLabelChangeDetail `json:"changes,omitempty"` 326 // ForceSendFields is a list of field names (e.g. "Changes") to unconditionally 327 // include in API requests. By default, fields with empty or default values are 328 // omitted from API requests. See 329 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 330 // details. 331 ForceSendFields []string `json:"-"` 332 // NullFields is a list of field names (e.g. "Changes") to include in API 333 // requests with the JSON null value. By default, fields with empty values are 334 // omitted from API requests. See 335 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 336 NullFields []string `json:"-"` 337 } 338 339 func (s *AppliedLabelChange) MarshalJSON() ([]byte, error) { 340 type NoMethod AppliedLabelChange 341 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 342 } 343 344 // AppliedLabelChangeDetail: A change made to a Label on the Target. 345 type AppliedLabelChangeDetail struct { 346 // FieldChanges: Field Changes. Only present if `types` contains 347 // `LABEL_FIELD_VALUE_CHANGED`. 348 FieldChanges []*FieldValueChange `json:"fieldChanges,omitempty"` 349 // Label: The Label name representing the Label that changed. This name always 350 // contains the revision of the Label that was used when this Action occurred. 351 // The format is `labels/id@revision`. 352 Label string `json:"label,omitempty"` 353 // Title: The human-readable title of the label that changed. 354 Title string `json:"title,omitempty"` 355 // Types: The types of changes made to the Label on the Target. 356 // 357 // Possible values: 358 // "TYPE_UNSPECIFIED" - The type of change to this Label is not available. 359 // "LABEL_ADDED" - The identified Label was added to the Target. 360 // "LABEL_REMOVED" - The identified Label was removed from the Target. 361 // "LABEL_FIELD_VALUE_CHANGED" - Field values were changed on the Target. 362 // "LABEL_APPLIED_BY_ITEM_CREATE" - The Label was applied as a side-effect of 363 // Drive item creation. 364 Types []string `json:"types,omitempty"` 365 // ForceSendFields is a list of field names (e.g. "FieldChanges") to 366 // unconditionally include in API requests. By default, fields with empty or 367 // default values are omitted from API requests. See 368 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 369 // details. 370 ForceSendFields []string `json:"-"` 371 // NullFields is a list of field names (e.g. "FieldChanges") to include in API 372 // requests with the JSON null value. By default, fields with empty values are 373 // omitted from API requests. See 374 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 375 NullFields []string `json:"-"` 376 } 377 378 func (s *AppliedLabelChangeDetail) MarshalJSON() ([]byte, error) { 379 type NoMethod AppliedLabelChangeDetail 380 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 381 } 382 383 // Assignment: A comment with an assignment. 384 type Assignment struct { 385 // AssignedUser: The user to whom the comment was assigned. 386 AssignedUser *User `json:"assignedUser,omitempty"` 387 // Subtype: The sub-type of this event. 388 // 389 // Possible values: 390 // "SUBTYPE_UNSPECIFIED" - Subtype not available. 391 // "ADDED" - An assignment was added. 392 // "DELETED" - An assignment was deleted. 393 // "REPLY_ADDED" - An assignment reply was added. 394 // "REPLY_DELETED" - An assignment reply was deleted. 395 // "RESOLVED" - An assignment was resolved. 396 // "REOPENED" - A resolved assignment was reopened. 397 // "REASSIGNED" - An assignment was reassigned. 398 Subtype string `json:"subtype,omitempty"` 399 // ForceSendFields is a list of field names (e.g. "AssignedUser") to 400 // unconditionally include in API requests. By default, fields with empty or 401 // default values are omitted from API requests. See 402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 403 // details. 404 ForceSendFields []string `json:"-"` 405 // NullFields is a list of field names (e.g. "AssignedUser") to include in API 406 // requests with the JSON null value. By default, fields with empty values are 407 // omitted from API requests. See 408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 409 NullFields []string `json:"-"` 410 } 411 412 func (s *Assignment) MarshalJSON() ([]byte, error) { 413 type NoMethod Assignment 414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 415 } 416 417 // Comment: A change about comments on an object. 418 type Comment struct { 419 // Assignment: A change on an assignment. 420 Assignment *Assignment `json:"assignment,omitempty"` 421 // MentionedUsers: Users who are mentioned in this comment. 422 MentionedUsers []*User `json:"mentionedUsers,omitempty"` 423 // Post: A change on a regular posted comment. 424 Post *Post `json:"post,omitempty"` 425 // Suggestion: A change on a suggestion. 426 Suggestion *Suggestion `json:"suggestion,omitempty"` 427 // ForceSendFields is a list of field names (e.g. "Assignment") to 428 // unconditionally include in API requests. By default, fields with empty or 429 // default values are omitted from API requests. See 430 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 431 // details. 432 ForceSendFields []string `json:"-"` 433 // NullFields is a list of field names (e.g. "Assignment") to include in API 434 // requests with the JSON null value. By default, fields with empty values are 435 // omitted from API requests. See 436 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 437 NullFields []string `json:"-"` 438 } 439 440 func (s *Comment) MarshalJSON() ([]byte, error) { 441 type NoMethod Comment 442 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 443 } 444 445 // ConsolidationStrategy: How the individual activities are consolidated. If a 446 // set of activities is related they can be consolidated into one combined 447 // activity, such as one actor performing the same action on multiple targets, 448 // or multiple actors performing the same action on a single target. The 449 // strategy defines the rules for which activities are related. 450 type ConsolidationStrategy struct { 451 // Legacy: The individual activities are consolidated using the legacy 452 // strategy. 453 Legacy *Legacy `json:"legacy,omitempty"` 454 // None: The individual activities are not consolidated. 455 None *NoConsolidation `json:"none,omitempty"` 456 // ForceSendFields is a list of field names (e.g. "Legacy") to unconditionally 457 // include in API requests. By default, fields with empty or default values are 458 // omitted from API requests. See 459 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 460 // details. 461 ForceSendFields []string `json:"-"` 462 // NullFields is a list of field names (e.g. "Legacy") to include in API 463 // requests with the JSON null value. By default, fields with empty values are 464 // omitted from API requests. See 465 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 466 NullFields []string `json:"-"` 467 } 468 469 func (s *ConsolidationStrategy) MarshalJSON() ([]byte, error) { 470 type NoMethod ConsolidationStrategy 471 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 472 } 473 474 // Copy: An object was created by copying an existing object. 475 type Copy struct { 476 // OriginalObject: The original object. 477 OriginalObject *TargetReference `json:"originalObject,omitempty"` 478 // ForceSendFields is a list of field names (e.g. "OriginalObject") to 479 // unconditionally include in API requests. By default, fields with empty or 480 // default values are omitted from API requests. See 481 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 482 // details. 483 ForceSendFields []string `json:"-"` 484 // NullFields is a list of field names (e.g. "OriginalObject") to include in 485 // API requests with the JSON null value. By default, fields with empty values 486 // are omitted from API requests. See 487 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 488 NullFields []string `json:"-"` 489 } 490 491 func (s *Copy) MarshalJSON() ([]byte, error) { 492 type NoMethod Copy 493 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 494 } 495 496 // Create: An object was created. 497 type Create struct { 498 // Copy: If present, indicates the object was created by copying an existing 499 // Drive object. 500 Copy *Copy `json:"copy,omitempty"` 501 // New: If present, indicates the object was newly created (e.g. as a blank 502 // document), not derived from a Drive object or external object. 503 New *New1 `json:"new,omitempty"` 504 // Upload: If present, indicates the object originated externally and was 505 // uploaded to Drive. 506 Upload *Upload `json:"upload,omitempty"` 507 // ForceSendFields is a list of field names (e.g. "Copy") to unconditionally 508 // include in API requests. By default, fields with empty or default values are 509 // omitted from API requests. See 510 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 511 // details. 512 ForceSendFields []string `json:"-"` 513 // NullFields is a list of field names (e.g. "Copy") to include in API requests 514 // with the JSON null value. By default, fields with empty values are omitted 515 // from API requests. See 516 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 517 NullFields []string `json:"-"` 518 } 519 520 func (s *Create) MarshalJSON() ([]byte, error) { 521 type NoMethod Create 522 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 523 } 524 525 // DataLeakPreventionChange: A change in the object's data leak prevention 526 // status. 527 type DataLeakPreventionChange struct { 528 // Type: The type of Data Leak Prevention (DLP) change. 529 // 530 // Possible values: 531 // "TYPE_UNSPECIFIED" - An update to the DLP state that is neither FLAGGED or 532 // CLEARED. 533 // "FLAGGED" - Document has been flagged as containing sensitive content. 534 // "CLEARED" - Document is no longer flagged as containing sensitive content. 535 Type string `json:"type,omitempty"` 536 // ForceSendFields is a list of field names (e.g. "Type") 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. "Type") to include in API requests 543 // with the JSON null value. By default, fields with empty values are omitted 544 // 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 *DataLeakPreventionChange) MarshalJSON() ([]byte, error) { 550 type NoMethod DataLeakPreventionChange 551 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 552 } 553 554 // Date: Wrapper for Date Field value. 555 type Date struct { 556 // Value: Date value. 557 Value string `json:"value,omitempty"` 558 // ForceSendFields is a list of field names (e.g. "Value") to unconditionally 559 // include in API requests. By default, fields with empty or default values are 560 // omitted from API requests. See 561 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 562 // details. 563 ForceSendFields []string `json:"-"` 564 // NullFields is a list of field names (e.g. "Value") to include in API 565 // requests with the JSON null value. By default, fields with empty values are 566 // omitted from API requests. See 567 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 568 NullFields []string `json:"-"` 569 } 570 571 func (s *Date) MarshalJSON() ([]byte, error) { 572 type NoMethod Date 573 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 574 } 575 576 // Delete: An object was deleted. 577 type Delete struct { 578 // Type: The type of delete action taken. 579 // 580 // Possible values: 581 // "TYPE_UNSPECIFIED" - Deletion type is not available. 582 // "TRASH" - An object was put into the trash. 583 // "PERMANENT_DELETE" - An object was deleted permanently. 584 Type string `json:"type,omitempty"` 585 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 586 // include in API requests. By default, fields with empty or default values are 587 // omitted from API requests. See 588 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 589 // details. 590 ForceSendFields []string `json:"-"` 591 // NullFields is a list of field names (e.g. "Type") to include in API requests 592 // with the JSON null value. By default, fields with empty values are omitted 593 // from API requests. See 594 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 595 NullFields []string `json:"-"` 596 } 597 598 func (s *Delete) MarshalJSON() ([]byte, error) { 599 type NoMethod Delete 600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 601 } 602 603 // DeletedUser: A user whose account has since been deleted. 604 type DeletedUser struct { 605 } 606 607 // Domain: Information about a domain. 608 type Domain struct { 609 // LegacyId: An opaque string used to identify this domain. 610 LegacyId string `json:"legacyId,omitempty"` 611 // Name: The name of the domain, e.g. `google.com`. 612 Name string `json:"name,omitempty"` 613 // ForceSendFields is a list of field names (e.g. "LegacyId") to 614 // unconditionally include in API requests. By default, fields with empty or 615 // default values are omitted from API requests. See 616 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 617 // details. 618 ForceSendFields []string `json:"-"` 619 // NullFields is a list of field names (e.g. "LegacyId") to include in API 620 // requests with the JSON null value. By default, fields with empty values are 621 // omitted from API requests. See 622 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 623 NullFields []string `json:"-"` 624 } 625 626 func (s *Domain) MarshalJSON() ([]byte, error) { 627 type NoMethod Domain 628 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 629 } 630 631 // Drive: Information about a shared drive. 632 type Drive struct { 633 // Name: The resource name of the shared drive. The format is 634 // `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID 635 // for this resource name. 636 Name string `json:"name,omitempty"` 637 // Root: The root of this shared drive. 638 Root *DriveItem `json:"root,omitempty"` 639 // Title: The title of the shared drive. 640 Title string `json:"title,omitempty"` 641 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 642 // include in API requests. By default, fields with empty or default values are 643 // omitted from API requests. See 644 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 645 // details. 646 ForceSendFields []string `json:"-"` 647 // NullFields is a list of field names (e.g. "Name") to include in API requests 648 // with the JSON null value. By default, fields with empty values are omitted 649 // from API requests. See 650 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 651 NullFields []string `json:"-"` 652 } 653 654 func (s *Drive) MarshalJSON() ([]byte, error) { 655 type NoMethod Drive 656 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 657 } 658 659 // DriveActivity: A single Drive activity comprising one or more Actions by one 660 // or more Actors on one or more Targets. Some Action groupings occur 661 // spontaneously, such as moving an item into a shared folder triggering a 662 // permission change. Other groupings of related Actions, such as multiple 663 // Actors editing one item or moving multiple files into a new folder, are 664 // controlled by the selection of a ConsolidationStrategy in the 665 // QueryDriveActivityRequest. 666 type DriveActivity struct { 667 // Actions: Details on all actions in this activity. 668 Actions []*Action `json:"actions,omitempty"` 669 // Actors: All actor(s) responsible for the activity. 670 Actors []*Actor `json:"actors,omitempty"` 671 // PrimaryActionDetail: Key information about the primary action for this 672 // activity. This is either representative, or the most important, of all 673 // actions in the activity, according to the ConsolidationStrategy in the 674 // request. 675 PrimaryActionDetail *ActionDetail `json:"primaryActionDetail,omitempty"` 676 // Targets: All Google Drive objects this activity is about (e.g. file, folder, 677 // drive). This represents the state of the target immediately after the 678 // actions occurred. 679 Targets []*Target `json:"targets,omitempty"` 680 // TimeRange: The activity occurred over this time range. 681 TimeRange *TimeRange `json:"timeRange,omitempty"` 682 // Timestamp: The activity occurred at this specific time. 683 Timestamp string `json:"timestamp,omitempty"` 684 // ForceSendFields is a list of field names (e.g. "Actions") to unconditionally 685 // include in API requests. By default, fields with empty or default values are 686 // omitted from API requests. See 687 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 688 // details. 689 ForceSendFields []string `json:"-"` 690 // NullFields is a list of field names (e.g. "Actions") to include in API 691 // requests with the JSON null value. By default, fields with empty values are 692 // omitted from API requests. See 693 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 694 NullFields []string `json:"-"` 695 } 696 697 func (s *DriveActivity) MarshalJSON() ([]byte, error) { 698 type NoMethod DriveActivity 699 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 700 } 701 702 // DriveFile: A Drive item which is a file. 703 type DriveFile struct { 704 } 705 706 // DriveFolder: A Drive item which is a folder. 707 type DriveFolder struct { 708 // Type: The type of Drive folder. 709 // 710 // Possible values: 711 // "TYPE_UNSPECIFIED" - The folder type is unknown. 712 // "MY_DRIVE_ROOT" - The folder is the root of a user's MyDrive. 713 // "SHARED_DRIVE_ROOT" - The folder is the root of a shared drive. 714 // "STANDARD_FOLDER" - The folder is a standard, non-root, folder. 715 Type string `json:"type,omitempty"` 716 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 717 // include in API requests. By default, fields with empty or default values are 718 // omitted from API requests. See 719 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 720 // details. 721 ForceSendFields []string `json:"-"` 722 // NullFields is a list of field names (e.g. "Type") to include in API requests 723 // with the JSON null value. By default, fields with empty values are omitted 724 // from API requests. See 725 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 726 NullFields []string `json:"-"` 727 } 728 729 func (s *DriveFolder) MarshalJSON() ([]byte, error) { 730 type NoMethod DriveFolder 731 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 732 } 733 734 // DriveItem: A Drive item, such as a file or folder. 735 type DriveItem struct { 736 // DriveFile: The Drive item is a file. 737 DriveFile *DriveFile `json:"driveFile,omitempty"` 738 // DriveFolder: The Drive item is a folder. Includes information about the type 739 // of folder. 740 DriveFolder *DriveFolder `json:"driveFolder,omitempty"` 741 // File: This field is deprecated; please use the `driveFile` field instead. 742 File *File `json:"file,omitempty"` 743 // Folder: This field is deprecated; please use the `driveFolder` field 744 // instead. 745 Folder *Folder `json:"folder,omitempty"` 746 // MimeType: The MIME type of the Drive item. See 747 // https://developers.google.com/drive/v3/web/mime-types. 748 MimeType string `json:"mimeType,omitempty"` 749 // Name: The target Drive item. The format is `items/ITEM_ID`. 750 Name string `json:"name,omitempty"` 751 // Owner: Information about the owner of this Drive item. 752 Owner *Owner `json:"owner,omitempty"` 753 // Title: The title of the Drive item. 754 Title string `json:"title,omitempty"` 755 // ForceSendFields is a list of field names (e.g. "DriveFile") to 756 // unconditionally include in API requests. By default, fields with empty or 757 // default values are omitted from API requests. See 758 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 759 // details. 760 ForceSendFields []string `json:"-"` 761 // NullFields is a list of field names (e.g. "DriveFile") to include in API 762 // requests with the JSON null value. By default, fields with empty values are 763 // omitted from API requests. See 764 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 765 NullFields []string `json:"-"` 766 } 767 768 func (s *DriveItem) MarshalJSON() ([]byte, error) { 769 type NoMethod DriveItem 770 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 771 } 772 773 // DriveItemReference: A lightweight reference to a Drive item, such as a file 774 // or folder. 775 type DriveItemReference struct { 776 // DriveFile: The Drive item is a file. 777 DriveFile *DriveFile `json:"driveFile,omitempty"` 778 // DriveFolder: The Drive item is a folder. Includes information about the type 779 // of folder. 780 DriveFolder *DriveFolder `json:"driveFolder,omitempty"` 781 // File: This field is deprecated; please use the `driveFile` field instead. 782 File *File `json:"file,omitempty"` 783 // Folder: This field is deprecated; please use the `driveFolder` field 784 // instead. 785 Folder *Folder `json:"folder,omitempty"` 786 // Name: The target Drive item. The format is `items/ITEM_ID`. 787 Name string `json:"name,omitempty"` 788 // Title: The title of the Drive item. 789 Title string `json:"title,omitempty"` 790 // ForceSendFields is a list of field names (e.g. "DriveFile") to 791 // unconditionally include in API requests. By default, fields with empty or 792 // default values are omitted from API requests. See 793 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 794 // details. 795 ForceSendFields []string `json:"-"` 796 // NullFields is a list of field names (e.g. "DriveFile") to include in API 797 // requests with the JSON null value. By default, fields with empty values are 798 // omitted from API requests. See 799 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 800 NullFields []string `json:"-"` 801 } 802 803 func (s *DriveItemReference) MarshalJSON() ([]byte, error) { 804 type NoMethod DriveItemReference 805 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 806 } 807 808 // DriveReference: A lightweight reference to a shared drive. 809 type DriveReference struct { 810 // Name: The resource name of the shared drive. The format is 811 // `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID 812 // for this resource name. 813 Name string `json:"name,omitempty"` 814 // Title: The title of the shared drive. 815 Title string `json:"title,omitempty"` 816 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 817 // include in API requests. By default, fields with empty or default values are 818 // omitted from API requests. See 819 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 820 // details. 821 ForceSendFields []string `json:"-"` 822 // NullFields is a list of field names (e.g. "Name") to include in API requests 823 // with the JSON null value. By default, fields with empty values are omitted 824 // from API requests. See 825 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 826 NullFields []string `json:"-"` 827 } 828 829 func (s *DriveReference) MarshalJSON() ([]byte, error) { 830 type NoMethod DriveReference 831 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 832 } 833 834 // Edit: An empty message indicating an object was edited. 835 type Edit struct { 836 } 837 838 // FieldValue: Contains a value of a Field. 839 type FieldValue struct { 840 // Date: Date Field value. 841 Date *Date `json:"date,omitempty"` 842 // Integer: Integer Field value. 843 Integer *Integer `json:"integer,omitempty"` 844 // Selection: Selection Field value. 845 Selection *Selection `json:"selection,omitempty"` 846 // SelectionList: Selection List Field value. 847 SelectionList *SelectionList `json:"selectionList,omitempty"` 848 // Text: Text Field value. 849 Text *Text `json:"text,omitempty"` 850 // TextList: Text List Field value. 851 TextList *TextList `json:"textList,omitempty"` 852 // User: User Field value. 853 User *SingleUser `json:"user,omitempty"` 854 // UserList: User List Field value. 855 UserList *UserList `json:"userList,omitempty"` 856 // ForceSendFields is a list of field names (e.g. "Date") to unconditionally 857 // include in API requests. By default, fields with empty or default values are 858 // omitted from API requests. See 859 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 860 // details. 861 ForceSendFields []string `json:"-"` 862 // NullFields is a list of field names (e.g. "Date") to include in API requests 863 // with the JSON null value. By default, fields with empty values are omitted 864 // from API requests. See 865 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 866 NullFields []string `json:"-"` 867 } 868 869 func (s *FieldValue) MarshalJSON() ([]byte, error) { 870 type NoMethod FieldValue 871 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 872 } 873 874 // FieldValueChange: Change to a Field value. 875 type FieldValueChange struct { 876 // DisplayName: The human-readable display name for this field. 877 DisplayName string `json:"displayName,omitempty"` 878 // FieldId: The ID of this field. Field IDs are unique within a Label. 879 FieldId string `json:"fieldId,omitempty"` 880 // NewValue: The value that is now set on the field. If not present, the field 881 // was cleared. At least one of {old_value|new_value} is always set. 882 NewValue *FieldValue `json:"newValue,omitempty"` 883 // OldValue: The value that was previously set on the field. If not present, 884 // the field was newly set. At least one of {old_value|new_value} is always 885 // set. 886 OldValue *FieldValue `json:"oldValue,omitempty"` 887 // ForceSendFields is a list of field names (e.g. "DisplayName") to 888 // unconditionally include in API requests. By default, fields with empty or 889 // default values are omitted from API requests. See 890 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 891 // details. 892 ForceSendFields []string `json:"-"` 893 // NullFields is a list of field names (e.g. "DisplayName") to include in API 894 // requests with the JSON null value. By default, fields with empty values are 895 // omitted from API requests. See 896 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 897 NullFields []string `json:"-"` 898 } 899 900 func (s *FieldValueChange) MarshalJSON() ([]byte, error) { 901 type NoMethod FieldValueChange 902 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 903 } 904 905 // File: This item is deprecated; please see `DriveFile` instead. 906 type File struct { 907 } 908 909 // FileComment: A comment on a file. 910 type FileComment struct { 911 // LegacyCommentId: The comment in the discussion thread. This identifier is an 912 // opaque string compatible with the Drive API; see 913 // https://developers.google.com/drive/v3/reference/comments/get 914 LegacyCommentId string `json:"legacyCommentId,omitempty"` 915 // LegacyDiscussionId: The discussion thread to which the comment was added. 916 // This identifier is an opaque string compatible with the Drive API and 917 // references the first comment in a discussion; see 918 // https://developers.google.com/drive/v3/reference/comments/get 919 LegacyDiscussionId string `json:"legacyDiscussionId,omitempty"` 920 // LinkToDiscussion: The link to the discussion thread containing this comment, 921 // for example, `https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID`. 922 LinkToDiscussion string `json:"linkToDiscussion,omitempty"` 923 // Parent: The Drive item containing this comment. 924 Parent *DriveItem `json:"parent,omitempty"` 925 // ForceSendFields is a list of field names (e.g. "LegacyCommentId") to 926 // unconditionally include in API requests. By default, fields with empty or 927 // default values are omitted from API requests. See 928 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 929 // details. 930 ForceSendFields []string `json:"-"` 931 // NullFields is a list of field names (e.g. "LegacyCommentId") to include in 932 // API requests with the JSON null value. By default, fields with empty values 933 // are omitted from API requests. See 934 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 935 NullFields []string `json:"-"` 936 } 937 938 func (s *FileComment) MarshalJSON() ([]byte, error) { 939 type NoMethod FileComment 940 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 941 } 942 943 // Folder: This item is deprecated; please see `DriveFolder` instead. 944 type Folder struct { 945 // Type: This field is deprecated; please see `DriveFolder.type` instead. 946 // 947 // Possible values: 948 // "TYPE_UNSPECIFIED" - This item is deprecated; please see 949 // `DriveFolder.Type` instead. 950 // "MY_DRIVE_ROOT" - This item is deprecated; please see `DriveFolder.Type` 951 // instead. 952 // "TEAM_DRIVE_ROOT" - This item is deprecated; please see `DriveFolder.Type` 953 // instead. 954 // "STANDARD_FOLDER" - This item is deprecated; please see `DriveFolder.Type` 955 // instead. 956 Type string `json:"type,omitempty"` 957 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 958 // include in API requests. By default, fields with empty or default values are 959 // omitted from API requests. See 960 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 961 // details. 962 ForceSendFields []string `json:"-"` 963 // NullFields is a list of field names (e.g. "Type") to include in API requests 964 // with the JSON null value. By default, fields with empty values are omitted 965 // from API requests. See 966 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 967 NullFields []string `json:"-"` 968 } 969 970 func (s *Folder) MarshalJSON() ([]byte, error) { 971 type NoMethod Folder 972 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 973 } 974 975 // Group: Information about a group. 976 type Group struct { 977 // Email: The email address of the group. 978 Email string `json:"email,omitempty"` 979 // Title: The title of the group. 980 Title string `json:"title,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 *Group) MarshalJSON() ([]byte, error) { 995 type NoMethod Group 996 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 997 } 998 999 // Impersonation: Information about an impersonation, where an admin acts on 1000 // behalf of an end user. Information about the acting admin is not currently 1001 // available. 1002 type Impersonation struct { 1003 // ImpersonatedUser: The impersonated user. 1004 ImpersonatedUser *User `json:"impersonatedUser,omitempty"` 1005 // ForceSendFields is a list of field names (e.g. "ImpersonatedUser") to 1006 // unconditionally include in API requests. By default, fields with empty or 1007 // default values are omitted from API requests. See 1008 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1009 // details. 1010 ForceSendFields []string `json:"-"` 1011 // NullFields is a list of field names (e.g. "ImpersonatedUser") to include in 1012 // API requests with the JSON null value. By default, fields with empty values 1013 // are omitted from API requests. See 1014 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1015 NullFields []string `json:"-"` 1016 } 1017 1018 func (s *Impersonation) MarshalJSON() ([]byte, error) { 1019 type NoMethod Impersonation 1020 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1021 } 1022 1023 // Integer: Wrapper for Integer Field value. 1024 type Integer struct { 1025 // Value: Integer value. 1026 Value int64 `json:"value,omitempty,string"` 1027 // ForceSendFields is a list of field names (e.g. "Value") to unconditionally 1028 // include in API requests. By default, fields with empty or default values are 1029 // omitted from API requests. See 1030 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1031 // details. 1032 ForceSendFields []string `json:"-"` 1033 // NullFields is a list of field names (e.g. "Value") to include in API 1034 // requests with the JSON null value. By default, fields with empty values are 1035 // omitted from API requests. See 1036 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1037 NullFields []string `json:"-"` 1038 } 1039 1040 func (s *Integer) MarshalJSON() ([]byte, error) { 1041 type NoMethod Integer 1042 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1043 } 1044 1045 // KnownUser: A known user. 1046 type KnownUser struct { 1047 // IsCurrentUser: True if this is the user making the request. 1048 IsCurrentUser bool `json:"isCurrentUser,omitempty"` 1049 // PersonName: The identifier for this user that can be used with the People 1050 // API to get more information. The format is `people/ACCOUNT_ID`. See 1051 // https://developers.google.com/people/. 1052 PersonName string `json:"personName,omitempty"` 1053 // ForceSendFields is a list of field names (e.g. "IsCurrentUser") to 1054 // unconditionally include in API requests. By default, fields with empty or 1055 // default values are omitted from API requests. See 1056 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1057 // details. 1058 ForceSendFields []string `json:"-"` 1059 // NullFields is a list of field names (e.g. "IsCurrentUser") to include in API 1060 // requests with the JSON null value. By default, fields with empty values are 1061 // omitted from API requests. See 1062 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1063 NullFields []string `json:"-"` 1064 } 1065 1066 func (s *KnownUser) MarshalJSON() ([]byte, error) { 1067 type NoMethod KnownUser 1068 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1069 } 1070 1071 // Legacy: A strategy that consolidates activities using the grouping rules 1072 // from the legacy V1 Activity API. Similar actions occurring within a window 1073 // of time can be grouped across multiple targets (such as moving a set of 1074 // files at once) or multiple actors (such as several users editing the same 1075 // item). Grouping rules for this strategy are specific to each type of action. 1076 type Legacy struct { 1077 } 1078 1079 // Move: An object was moved. 1080 type Move struct { 1081 // AddedParents: The added parent object(s). 1082 AddedParents []*TargetReference `json:"addedParents,omitempty"` 1083 // RemovedParents: The removed parent object(s). 1084 RemovedParents []*TargetReference `json:"removedParents,omitempty"` 1085 // ForceSendFields is a list of field names (e.g. "AddedParents") 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. "AddedParents") to include in API 1092 // requests with the JSON null value. By default, fields with empty values are 1093 // 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 *Move) MarshalJSON() ([]byte, error) { 1099 type NoMethod Move 1100 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1101 } 1102 1103 // New1: An object was created from scratch. 1104 type New1 struct { 1105 } 1106 1107 // NoConsolidation: A strategy that does no consolidation of individual 1108 // activities. 1109 type NoConsolidation struct { 1110 } 1111 1112 // Owner: Information about the owner of a Drive item. 1113 type Owner struct { 1114 // Domain: The domain of the Drive item owner. 1115 Domain *Domain `json:"domain,omitempty"` 1116 // Drive: The drive that owns the item. 1117 Drive *DriveReference `json:"drive,omitempty"` 1118 // TeamDrive: This field is deprecated; please use the `drive` field instead. 1119 TeamDrive *TeamDriveReference `json:"teamDrive,omitempty"` 1120 // User: The user that owns the Drive item. 1121 User *User `json:"user,omitempty"` 1122 // ForceSendFields is a list of field names (e.g. "Domain") to unconditionally 1123 // include in API requests. By default, fields with empty or default values are 1124 // omitted from API requests. See 1125 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1126 // details. 1127 ForceSendFields []string `json:"-"` 1128 // NullFields is a list of field names (e.g. "Domain") to include in API 1129 // requests with the JSON null value. By default, fields with empty values are 1130 // omitted from API requests. See 1131 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1132 NullFields []string `json:"-"` 1133 } 1134 1135 func (s *Owner) MarshalJSON() ([]byte, error) { 1136 type NoMethod Owner 1137 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1138 } 1139 1140 // Permission: The permission setting of an object. 1141 type Permission struct { 1142 // AllowDiscovery: If true, the item can be discovered (e.g. in the user's 1143 // "Shared with me" collection) without needing a link to the item. 1144 AllowDiscovery bool `json:"allowDiscovery,omitempty"` 1145 // Anyone: If set, this permission applies to anyone, even logged out users. 1146 Anyone *Anyone `json:"anyone,omitempty"` 1147 // Domain: The domain to whom this permission applies. 1148 Domain *Domain `json:"domain,omitempty"` 1149 // Group: The group to whom this permission applies. 1150 Group *Group `json:"group,omitempty"` 1151 // Role: Indicates the Google Drive permissions role 1152 // (https://developers.google.com/drive/web/manage-sharing#roles). The role 1153 // determines a user's ability to read, write, and comment on items. 1154 // 1155 // Possible values: 1156 // "ROLE_UNSPECIFIED" - The role is not available. 1157 // "OWNER" - A role granting full access. 1158 // "ORGANIZER" - A role granting the ability to manage people and settings. 1159 // "FILE_ORGANIZER" - A role granting the ability to contribute and manage 1160 // content. 1161 // "EDITOR" - A role granting the ability to contribute content. This role is 1162 // sometimes also known as "writer". 1163 // "COMMENTER" - A role granting the ability to view and comment on content. 1164 // "VIEWER" - A role granting the ability to view content. This role is 1165 // sometimes also known as "reader". 1166 // "PUBLISHED_VIEWER" - A role granting the ability to view content only 1167 // after it has been published to the web. This role is sometimes also known as 1168 // "published reader". See https://support.google.com/sites/answer/6372880 for 1169 // more information. 1170 Role string `json:"role,omitempty"` 1171 // User: The user to whom this permission applies. 1172 User *User `json:"user,omitempty"` 1173 // ForceSendFields is a list of field names (e.g. "AllowDiscovery") to 1174 // unconditionally include in API requests. By default, fields with empty or 1175 // default values are omitted from API requests. See 1176 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1177 // details. 1178 ForceSendFields []string `json:"-"` 1179 // NullFields is a list of field names (e.g. "AllowDiscovery") to include in 1180 // API requests with the JSON null value. By default, fields with empty values 1181 // are omitted from API requests. See 1182 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1183 NullFields []string `json:"-"` 1184 } 1185 1186 func (s *Permission) MarshalJSON() ([]byte, error) { 1187 type NoMethod Permission 1188 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1189 } 1190 1191 // PermissionChange: A change of the permission setting on an item. 1192 type PermissionChange struct { 1193 // AddedPermissions: The set of permissions added by this change. 1194 AddedPermissions []*Permission `json:"addedPermissions,omitempty"` 1195 // RemovedPermissions: The set of permissions removed by this change. 1196 RemovedPermissions []*Permission `json:"removedPermissions,omitempty"` 1197 // ForceSendFields is a list of field names (e.g. "AddedPermissions") to 1198 // unconditionally include in API requests. By default, fields with empty or 1199 // default values are omitted from API requests. See 1200 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1201 // details. 1202 ForceSendFields []string `json:"-"` 1203 // NullFields is a list of field names (e.g. "AddedPermissions") to include in 1204 // API requests with the JSON null value. By default, fields with empty values 1205 // are omitted from API requests. See 1206 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1207 NullFields []string `json:"-"` 1208 } 1209 1210 func (s *PermissionChange) MarshalJSON() ([]byte, error) { 1211 type NoMethod PermissionChange 1212 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1213 } 1214 1215 // Post: A regular posted comment. 1216 type Post struct { 1217 // Subtype: The sub-type of this event. 1218 // 1219 // Possible values: 1220 // "SUBTYPE_UNSPECIFIED" - Subtype not available. 1221 // "ADDED" - A post was added. 1222 // "DELETED" - A post was deleted. 1223 // "REPLY_ADDED" - A reply was added. 1224 // "REPLY_DELETED" - A reply was deleted. 1225 // "RESOLVED" - A posted comment was resolved. 1226 // "REOPENED" - A posted comment was reopened. 1227 Subtype string `json:"subtype,omitempty"` 1228 // ForceSendFields is a list of field names (e.g. "Subtype") to unconditionally 1229 // include in API requests. By default, fields with empty or default values are 1230 // omitted from API requests. See 1231 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1232 // details. 1233 ForceSendFields []string `json:"-"` 1234 // NullFields is a list of field names (e.g. "Subtype") to include in API 1235 // requests with the JSON null value. By default, fields with empty values are 1236 // omitted from API requests. See 1237 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1238 NullFields []string `json:"-"` 1239 } 1240 1241 func (s *Post) MarshalJSON() ([]byte, error) { 1242 type NoMethod Post 1243 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1244 } 1245 1246 // QueryDriveActivityRequest: The request message for querying Drive activity. 1247 type QueryDriveActivityRequest struct { 1248 // AncestorName: Return activities for this Drive folder, plus all children and 1249 // descendants. The format is `items/ITEM_ID`. 1250 AncestorName string `json:"ancestorName,omitempty"` 1251 // ConsolidationStrategy: Details on how to consolidate related actions that 1252 // make up the activity. If not set, then related actions aren't consolidated. 1253 ConsolidationStrategy *ConsolidationStrategy `json:"consolidationStrategy,omitempty"` 1254 // Filter: The filtering for items returned from this query request. The format 1255 // of the filter string is a sequence of expressions, joined by an optional 1256 // "AND", where each expression is of the form "field operator value". 1257 // Supported fields: - `time`: Uses numerical operators on date values either 1258 // in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format. Examples: 1259 // - `time > 1452409200000 AND time <= 1492812924310` - `time >= 1260 // "2016-01-10T01:02:03-05:00" - `detail.action_detail_case`: Uses the "has" 1261 // operator (:) and either a singular value or a list of allowed action types 1262 // enclosed in parentheses, separated by a space. To exclude a result from the 1263 // response, prepend a hyphen (`-`) to the beginning of the filter string. 1264 // Examples: - `detail.action_detail_case:RENAME` - 1265 // `detail.action_detail_case:(CREATE RESTORE)` - 1266 // `-detail.action_detail_case:MOVE` 1267 Filter string `json:"filter,omitempty"` 1268 // ItemName: Return activities for this Drive item. The format is 1269 // `items/ITEM_ID`. 1270 ItemName string `json:"itemName,omitempty"` 1271 // PageSize: The minimum number of activities desired in the response; the 1272 // server attempts to return at least this quantity. The server may also return 1273 // fewer activities if it has a partial response ready before the request times 1274 // out. If not set, a default value is used. 1275 PageSize int64 `json:"pageSize,omitempty"` 1276 // PageToken: The token identifies which page of results to return. Set this to 1277 // the next_page_token value returned from a previous query to obtain the 1278 // following page of results. If not set, the first page of results is 1279 // returned. 1280 PageToken string `json:"pageToken,omitempty"` 1281 // ForceSendFields is a list of field names (e.g. "AncestorName") to 1282 // unconditionally include in API requests. By default, fields with empty or 1283 // default values are omitted from API requests. See 1284 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1285 // details. 1286 ForceSendFields []string `json:"-"` 1287 // NullFields is a list of field names (e.g. "AncestorName") to include in API 1288 // requests with the JSON null value. By default, fields with empty values are 1289 // omitted from API requests. See 1290 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1291 NullFields []string `json:"-"` 1292 } 1293 1294 func (s *QueryDriveActivityRequest) MarshalJSON() ([]byte, error) { 1295 type NoMethod QueryDriveActivityRequest 1296 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1297 } 1298 1299 // QueryDriveActivityResponse: Response message for querying Drive activity. 1300 type QueryDriveActivityResponse struct { 1301 // Activities: List of activity requested. 1302 Activities []*DriveActivity `json:"activities,omitempty"` 1303 // NextPageToken: Token to retrieve the next page of results, or empty if there 1304 // are no more results in the list. 1305 NextPageToken string `json:"nextPageToken,omitempty"` 1306 1307 // ServerResponse contains the HTTP response code and headers from the server. 1308 googleapi.ServerResponse `json:"-"` 1309 // ForceSendFields is a list of field names (e.g. "Activities") to 1310 // unconditionally include in API requests. By default, fields with empty or 1311 // default values are omitted from API requests. See 1312 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1313 // details. 1314 ForceSendFields []string `json:"-"` 1315 // NullFields is a list of field names (e.g. "Activities") to include in API 1316 // requests with the JSON null value. By default, fields with empty values are 1317 // omitted from API requests. See 1318 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1319 NullFields []string `json:"-"` 1320 } 1321 1322 func (s *QueryDriveActivityResponse) MarshalJSON() ([]byte, error) { 1323 type NoMethod QueryDriveActivityResponse 1324 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1325 } 1326 1327 // Rename: An object was renamed. 1328 type Rename struct { 1329 // NewTitle: The new title of the drive object. 1330 NewTitle string `json:"newTitle,omitempty"` 1331 // OldTitle: The previous title of the drive object. 1332 OldTitle string `json:"oldTitle,omitempty"` 1333 // ForceSendFields is a list of field names (e.g. "NewTitle") to 1334 // unconditionally include in API requests. By default, fields with empty or 1335 // default values are 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. "NewTitle") 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 *Rename) MarshalJSON() ([]byte, error) { 1347 type NoMethod Rename 1348 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1349 } 1350 1351 // Restore: A deleted object was restored. 1352 type Restore struct { 1353 // Type: The type of restore action taken. 1354 // 1355 // Possible values: 1356 // "TYPE_UNSPECIFIED" - The type is not available. 1357 // "UNTRASH" - An object was restored from the trash. 1358 Type string `json:"type,omitempty"` 1359 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 1360 // include in API requests. By default, fields with empty or default values are 1361 // 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. "Type") to include in API requests 1366 // with the JSON null value. By default, fields with empty values are omitted 1367 // 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 *Restore) MarshalJSON() ([]byte, error) { 1373 type NoMethod Restore 1374 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1375 } 1376 1377 // RestrictionChange: Information about restriction policy changes to a 1378 // feature. 1379 type RestrictionChange struct { 1380 // Feature: The feature which had a change in restriction policy. 1381 // 1382 // Possible values: 1383 // "FEATURE_UNSPECIFIED" - The feature which changed restriction settings was 1384 // not available. 1385 // "SHARING_OUTSIDE_DOMAIN" - When restricted, this prevents items from being 1386 // shared outside the domain. 1387 // "DIRECT_SHARING" - When restricted, this prevents direct sharing of 1388 // individual items. 1389 // "ITEM_DUPLICATION" - When restricted, this prevents actions like copy, 1390 // download, and print that might result in uncontrolled duplicates of items. 1391 // "DRIVE_FILE_STREAM" - When restricted, this prevents use of Drive File 1392 // Stream. 1393 // "FILE_ORGANIZER_CAN_SHARE_FOLDERS" - When restricted, this limits sharing 1394 // of folders to managers only. 1395 Feature string `json:"feature,omitempty"` 1396 // NewRestriction: The restriction in place after the change. 1397 // 1398 // Possible values: 1399 // "RESTRICTION_UNSPECIFIED" - The type of restriction is not available. 1400 // "UNRESTRICTED" - The feature is available without restriction. 1401 // "FULLY_RESTRICTED" - The use of this feature is fully restricted. 1402 NewRestriction string `json:"newRestriction,omitempty"` 1403 // ForceSendFields is a list of field names (e.g. "Feature") to unconditionally 1404 // include in API requests. By default, fields with empty or default values are 1405 // omitted from API requests. See 1406 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1407 // details. 1408 ForceSendFields []string `json:"-"` 1409 // NullFields is a list of field names (e.g. "Feature") to include in API 1410 // requests with the JSON null value. By default, fields with empty values are 1411 // omitted from API requests. See 1412 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1413 NullFields []string `json:"-"` 1414 } 1415 1416 func (s *RestrictionChange) MarshalJSON() ([]byte, error) { 1417 type NoMethod RestrictionChange 1418 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1419 } 1420 1421 // Selection: Wrapper for Selection Field value as combined value/display_name 1422 // pair for selected choice. 1423 type Selection struct { 1424 // DisplayName: Selection value as human-readable display string. 1425 DisplayName string `json:"displayName,omitempty"` 1426 // Value: Selection value as Field Choice ID. 1427 Value string `json:"value,omitempty"` 1428 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1429 // unconditionally include in API requests. By default, fields with empty or 1430 // default values are omitted from API requests. See 1431 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1432 // details. 1433 ForceSendFields []string `json:"-"` 1434 // NullFields is a list of field names (e.g. "DisplayName") to include in API 1435 // requests with the JSON null value. By default, fields with empty values are 1436 // omitted from API requests. See 1437 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1438 NullFields []string `json:"-"` 1439 } 1440 1441 func (s *Selection) MarshalJSON() ([]byte, error) { 1442 type NoMethod Selection 1443 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1444 } 1445 1446 // SelectionList: Wrapper for SelectionList Field value. 1447 type SelectionList struct { 1448 // Values: Selection values. 1449 Values []*Selection `json:"values,omitempty"` 1450 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 1451 // include in API requests. By default, fields with empty or default values are 1452 // omitted from API requests. See 1453 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1454 // details. 1455 ForceSendFields []string `json:"-"` 1456 // NullFields is a list of field names (e.g. "Values") to include in API 1457 // requests with the JSON null value. By default, fields with empty values are 1458 // omitted from API requests. See 1459 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1460 NullFields []string `json:"-"` 1461 } 1462 1463 func (s *SelectionList) MarshalJSON() ([]byte, error) { 1464 type NoMethod SelectionList 1465 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1466 } 1467 1468 // SettingsChange: Information about settings changes. 1469 type SettingsChange struct { 1470 // RestrictionChanges: The set of changes made to restrictions. 1471 RestrictionChanges []*RestrictionChange `json:"restrictionChanges,omitempty"` 1472 // ForceSendFields is a list of field names (e.g. "RestrictionChanges") to 1473 // unconditionally include in API requests. By default, fields with empty or 1474 // default values are omitted from API requests. See 1475 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1476 // details. 1477 ForceSendFields []string `json:"-"` 1478 // NullFields is a list of field names (e.g. "RestrictionChanges") to include 1479 // in API requests with the JSON null value. By default, fields with empty 1480 // values are omitted from API requests. See 1481 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1482 NullFields []string `json:"-"` 1483 } 1484 1485 func (s *SettingsChange) MarshalJSON() ([]byte, error) { 1486 type NoMethod SettingsChange 1487 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1488 } 1489 1490 // SingleUser: Wrapper for User Field value. 1491 type SingleUser struct { 1492 // Value: User value as email. 1493 Value string `json:"value,omitempty"` 1494 // ForceSendFields is a list of field names (e.g. "Value") to unconditionally 1495 // include in API requests. By default, fields with empty or default values are 1496 // omitted from API requests. See 1497 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1498 // details. 1499 ForceSendFields []string `json:"-"` 1500 // NullFields is a list of field names (e.g. "Value") to include in API 1501 // requests with the JSON null value. By default, fields with empty values are 1502 // omitted from API requests. See 1503 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1504 NullFields []string `json:"-"` 1505 } 1506 1507 func (s *SingleUser) MarshalJSON() ([]byte, error) { 1508 type NoMethod SingleUser 1509 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1510 } 1511 1512 // Suggestion: A suggestion. 1513 type Suggestion struct { 1514 // Subtype: The sub-type of this event. 1515 // 1516 // Possible values: 1517 // "SUBTYPE_UNSPECIFIED" - Subtype not available. 1518 // "ADDED" - A suggestion was added. 1519 // "DELETED" - A suggestion was deleted. 1520 // "REPLY_ADDED" - A suggestion reply was added. 1521 // "REPLY_DELETED" - A suggestion reply was deleted. 1522 // "ACCEPTED" - A suggestion was accepted. 1523 // "REJECTED" - A suggestion was rejected. 1524 // "ACCEPT_DELETED" - An accepted suggestion was deleted. 1525 // "REJECT_DELETED" - A rejected suggestion was deleted. 1526 Subtype string `json:"subtype,omitempty"` 1527 // ForceSendFields is a list of field names (e.g. "Subtype") to unconditionally 1528 // include in API requests. By default, fields with empty or default values are 1529 // omitted from API requests. See 1530 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1531 // details. 1532 ForceSendFields []string `json:"-"` 1533 // NullFields is a list of field names (e.g. "Subtype") to include in API 1534 // requests with the JSON null value. By default, fields with empty values are 1535 // omitted from API requests. See 1536 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1537 NullFields []string `json:"-"` 1538 } 1539 1540 func (s *Suggestion) MarshalJSON() ([]byte, error) { 1541 type NoMethod Suggestion 1542 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1543 } 1544 1545 // SystemEvent: Event triggered by system operations instead of end users. 1546 type SystemEvent struct { 1547 // Type: The type of the system event that may triggered activity. 1548 // 1549 // Possible values: 1550 // "TYPE_UNSPECIFIED" - The event type is unspecified. 1551 // "USER_DELETION" - The event is a consequence of a user account being 1552 // deleted. 1553 // "TRASH_AUTO_PURGE" - The event is due to the system automatically purging 1554 // trash. 1555 Type string `json:"type,omitempty"` 1556 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 1557 // include in API requests. By default, fields with empty or default values are 1558 // omitted from API requests. See 1559 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1560 // details. 1561 ForceSendFields []string `json:"-"` 1562 // NullFields is a list of field names (e.g. "Type") to include in API requests 1563 // with the JSON null value. By default, fields with empty values are omitted 1564 // from API requests. See 1565 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1566 NullFields []string `json:"-"` 1567 } 1568 1569 func (s *SystemEvent) MarshalJSON() ([]byte, error) { 1570 type NoMethod SystemEvent 1571 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1572 } 1573 1574 // Target: Information about the target of activity. For more information on 1575 // how activity history is shared with users, see Activity history visibility 1576 // (https://developers.google.com/drive/activity/v2#activityhistory). 1577 type Target struct { 1578 // Drive: The target is a shared drive. 1579 Drive *Drive `json:"drive,omitempty"` 1580 // DriveItem: The target is a Drive item. 1581 DriveItem *DriveItem `json:"driveItem,omitempty"` 1582 // FileComment: The target is a comment on a Drive file. 1583 FileComment *FileComment `json:"fileComment,omitempty"` 1584 // TeamDrive: This field is deprecated; please use the `drive` field instead. 1585 TeamDrive *TeamDrive `json:"teamDrive,omitempty"` 1586 // ForceSendFields is a list of field names (e.g. "Drive") to unconditionally 1587 // include in API requests. By default, fields with empty or default values are 1588 // omitted from API requests. See 1589 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1590 // details. 1591 ForceSendFields []string `json:"-"` 1592 // NullFields is a list of field names (e.g. "Drive") to include in API 1593 // requests with the JSON null value. By default, fields with empty values are 1594 // omitted from API requests. See 1595 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1596 NullFields []string `json:"-"` 1597 } 1598 1599 func (s *Target) MarshalJSON() ([]byte, error) { 1600 type NoMethod Target 1601 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1602 } 1603 1604 // TargetReference: A lightweight reference to the target of activity. 1605 type TargetReference struct { 1606 // Drive: The target is a shared drive. 1607 Drive *DriveReference `json:"drive,omitempty"` 1608 // DriveItem: The target is a Drive item. 1609 DriveItem *DriveItemReference `json:"driveItem,omitempty"` 1610 // TeamDrive: This field is deprecated; please use the `drive` field instead. 1611 TeamDrive *TeamDriveReference `json:"teamDrive,omitempty"` 1612 // ForceSendFields is a list of field names (e.g. "Drive") to unconditionally 1613 // include in API requests. By default, fields with empty or default values are 1614 // omitted from API requests. See 1615 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1616 // details. 1617 ForceSendFields []string `json:"-"` 1618 // NullFields is a list of field names (e.g. "Drive") to include in API 1619 // requests with the JSON null value. By default, fields with empty values are 1620 // omitted from API requests. See 1621 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1622 NullFields []string `json:"-"` 1623 } 1624 1625 func (s *TargetReference) MarshalJSON() ([]byte, error) { 1626 type NoMethod TargetReference 1627 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1628 } 1629 1630 // TeamDrive: This item is deprecated; please see `Drive` instead. 1631 type TeamDrive struct { 1632 // Name: This field is deprecated; please see `Drive.name` instead. 1633 Name string `json:"name,omitempty"` 1634 // Root: This field is deprecated; please see `Drive.root` instead. 1635 Root *DriveItem `json:"root,omitempty"` 1636 // Title: This field is deprecated; please see `Drive.title` instead. 1637 Title string `json:"title,omitempty"` 1638 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1639 // include in API requests. By default, fields with empty or default values are 1640 // omitted from API requests. See 1641 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1642 // details. 1643 ForceSendFields []string `json:"-"` 1644 // NullFields is a list of field names (e.g. "Name") to include in API requests 1645 // with the JSON null value. By default, fields with empty values are omitted 1646 // from API requests. See 1647 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1648 NullFields []string `json:"-"` 1649 } 1650 1651 func (s *TeamDrive) MarshalJSON() ([]byte, error) { 1652 type NoMethod TeamDrive 1653 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1654 } 1655 1656 // TeamDriveReference: This item is deprecated; please see `DriveReference` 1657 // instead. 1658 type TeamDriveReference struct { 1659 // Name: This field is deprecated; please see `DriveReference.name` instead. 1660 Name string `json:"name,omitempty"` 1661 // Title: This field is deprecated; please see `DriveReference.title` instead. 1662 Title string `json:"title,omitempty"` 1663 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1664 // include in API requests. By default, fields with empty or default values are 1665 // omitted from API requests. See 1666 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1667 // details. 1668 ForceSendFields []string `json:"-"` 1669 // NullFields is a list of field names (e.g. "Name") to include in API requests 1670 // with the JSON null value. By default, fields with empty values are omitted 1671 // from API requests. See 1672 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1673 NullFields []string `json:"-"` 1674 } 1675 1676 func (s *TeamDriveReference) MarshalJSON() ([]byte, error) { 1677 type NoMethod TeamDriveReference 1678 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1679 } 1680 1681 // Text: Wrapper for Text Field value. 1682 type Text struct { 1683 // Value: Value of Text Field. 1684 Value string `json:"value,omitempty"` 1685 // ForceSendFields is a list of field names (e.g. "Value") to unconditionally 1686 // include in API requests. By default, fields with empty or default values are 1687 // omitted from API requests. See 1688 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1689 // details. 1690 ForceSendFields []string `json:"-"` 1691 // NullFields is a list of field names (e.g. "Value") to include in API 1692 // requests with the JSON null value. By default, fields with empty values are 1693 // omitted from API requests. See 1694 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1695 NullFields []string `json:"-"` 1696 } 1697 1698 func (s *Text) MarshalJSON() ([]byte, error) { 1699 type NoMethod Text 1700 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1701 } 1702 1703 // TextList: Wrapper for Text List Field value. 1704 type TextList struct { 1705 // Values: Text values. 1706 Values []*Text `json:"values,omitempty"` 1707 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 1708 // include in API requests. By default, fields with empty or default values are 1709 // omitted from API requests. See 1710 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1711 // details. 1712 ForceSendFields []string `json:"-"` 1713 // NullFields is a list of field names (e.g. "Values") to include in API 1714 // requests with the JSON null value. By default, fields with empty values are 1715 // omitted from API requests. See 1716 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1717 NullFields []string `json:"-"` 1718 } 1719 1720 func (s *TextList) MarshalJSON() ([]byte, error) { 1721 type NoMethod TextList 1722 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1723 } 1724 1725 // TimeRange: Information about time ranges. 1726 type TimeRange struct { 1727 // EndTime: The end of the time range. 1728 EndTime string `json:"endTime,omitempty"` 1729 // StartTime: The start of the time range. 1730 StartTime string `json:"startTime,omitempty"` 1731 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 1732 // include in API requests. By default, fields with empty or default values are 1733 // omitted from API requests. See 1734 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1735 // details. 1736 ForceSendFields []string `json:"-"` 1737 // NullFields is a list of field names (e.g. "EndTime") to include in API 1738 // requests with the JSON null value. By default, fields with empty values are 1739 // omitted from API requests. See 1740 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1741 NullFields []string `json:"-"` 1742 } 1743 1744 func (s *TimeRange) MarshalJSON() ([]byte, error) { 1745 type NoMethod TimeRange 1746 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1747 } 1748 1749 // UnknownUser: A user about whom nothing is currently known. 1750 type UnknownUser struct { 1751 } 1752 1753 // Upload: An object was uploaded into Drive. 1754 type Upload struct { 1755 } 1756 1757 // User: Information about an end user. 1758 type User struct { 1759 // DeletedUser: A user whose account has since been deleted. 1760 DeletedUser *DeletedUser `json:"deletedUser,omitempty"` 1761 // KnownUser: A known user. 1762 KnownUser *KnownUser `json:"knownUser,omitempty"` 1763 // UnknownUser: A user about whom nothing is currently known. 1764 UnknownUser *UnknownUser `json:"unknownUser,omitempty"` 1765 // ForceSendFields is a list of field names (e.g. "DeletedUser") to 1766 // unconditionally include in API requests. By default, fields with empty or 1767 // default values are omitted from API requests. See 1768 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1769 // details. 1770 ForceSendFields []string `json:"-"` 1771 // NullFields is a list of field names (e.g. "DeletedUser") to include in API 1772 // requests with the JSON null value. By default, fields with empty values are 1773 // omitted from API requests. See 1774 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1775 NullFields []string `json:"-"` 1776 } 1777 1778 func (s *User) MarshalJSON() ([]byte, error) { 1779 type NoMethod User 1780 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1781 } 1782 1783 // UserList: Wrapper for UserList Field value. 1784 type UserList struct { 1785 // Values: User values. 1786 Values []*SingleUser `json:"values,omitempty"` 1787 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 1788 // include in API requests. By default, fields with empty or default values are 1789 // omitted from API requests. See 1790 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1791 // details. 1792 ForceSendFields []string `json:"-"` 1793 // NullFields is a list of field names (e.g. "Values") to include in API 1794 // requests with the JSON null value. By default, fields with empty values are 1795 // omitted from API requests. See 1796 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1797 NullFields []string `json:"-"` 1798 } 1799 1800 func (s *UserList) MarshalJSON() ([]byte, error) { 1801 type NoMethod UserList 1802 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1803 } 1804 1805 type ActivityQueryCall struct { 1806 s *Service 1807 querydriveactivityrequest *QueryDriveActivityRequest 1808 urlParams_ gensupport.URLParams 1809 ctx_ context.Context 1810 header_ http.Header 1811 } 1812 1813 // Query: Query past activity in Google Drive. 1814 func (r *ActivityService) Query(querydriveactivityrequest *QueryDriveActivityRequest) *ActivityQueryCall { 1815 c := &ActivityQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1816 c.querydriveactivityrequest = querydriveactivityrequest 1817 return c 1818 } 1819 1820 // Fields allows partial responses to be retrieved. See 1821 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 1822 // details. 1823 func (c *ActivityQueryCall) Fields(s ...googleapi.Field) *ActivityQueryCall { 1824 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1825 return c 1826 } 1827 1828 // Context sets the context to be used in this call's Do method. 1829 func (c *ActivityQueryCall) Context(ctx context.Context) *ActivityQueryCall { 1830 c.ctx_ = ctx 1831 return c 1832 } 1833 1834 // Header returns a http.Header that can be modified by the caller to add 1835 // headers to the request. 1836 func (c *ActivityQueryCall) Header() http.Header { 1837 if c.header_ == nil { 1838 c.header_ = make(http.Header) 1839 } 1840 return c.header_ 1841 } 1842 1843 func (c *ActivityQueryCall) doRequest(alt string) (*http.Response, error) { 1844 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 1845 var body io.Reader = nil 1846 body, err := googleapi.WithoutDataWrapper.JSONReader(c.querydriveactivityrequest) 1847 if err != nil { 1848 return nil, err 1849 } 1850 c.urlParams_.Set("alt", alt) 1851 c.urlParams_.Set("prettyPrint", "false") 1852 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/activity:query") 1853 urls += "?" + c.urlParams_.Encode() 1854 req, err := http.NewRequest("POST", urls, body) 1855 if err != nil { 1856 return nil, err 1857 } 1858 req.Header = reqHeaders 1859 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1860 } 1861 1862 // Do executes the "driveactivity.activity.query" call. 1863 // Any non-2xx status code is an error. Response headers are in either 1864 // *QueryDriveActivityResponse.ServerResponse.Header or (if a response was 1865 // returned at all) in error.(*googleapi.Error).Header. Use 1866 // googleapi.IsNotModified to check whether the returned error was because 1867 // http.StatusNotModified was returned. 1868 func (c *ActivityQueryCall) Do(opts ...googleapi.CallOption) (*QueryDriveActivityResponse, error) { 1869 gensupport.SetOptions(c.urlParams_, opts...) 1870 res, err := c.doRequest("json") 1871 if res != nil && res.StatusCode == http.StatusNotModified { 1872 if res.Body != nil { 1873 res.Body.Close() 1874 } 1875 return nil, gensupport.WrapError(&googleapi.Error{ 1876 Code: res.StatusCode, 1877 Header: res.Header, 1878 }) 1879 } 1880 if err != nil { 1881 return nil, err 1882 } 1883 defer googleapi.CloseBody(res) 1884 if err := googleapi.CheckResponse(res); err != nil { 1885 return nil, gensupport.WrapError(err) 1886 } 1887 ret := &QueryDriveActivityResponse{ 1888 ServerResponse: googleapi.ServerResponse{ 1889 Header: res.Header, 1890 HTTPStatusCode: res.StatusCode, 1891 }, 1892 } 1893 target := &ret 1894 if err := gensupport.DecodeResponse(target, res); err != nil { 1895 return nil, err 1896 } 1897 return ret, nil 1898 } 1899 1900 // Pages invokes f for each page of results. 1901 // A non-nil error returned from f will halt the iteration. 1902 // The provided context supersedes any context provided to the Context method. 1903 func (c *ActivityQueryCall) Pages(ctx context.Context, f func(*QueryDriveActivityResponse) error) error { 1904 c.ctx_ = ctx 1905 defer func(pt string) { c.querydriveactivityrequest.PageToken = pt }(c.querydriveactivityrequest.PageToken) 1906 for { 1907 x, err := c.Do() 1908 if err != nil { 1909 return err 1910 } 1911 if err := f(x); err != nil { 1912 return err 1913 } 1914 if x.NextPageToken == "" { 1915 return nil 1916 } 1917 c.querydriveactivityrequest.PageToken = x.NextPageToken 1918 } 1919 } 1920