-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
storagetransfer-gen.go
4738 lines (4286 loc) · 185 KB
/
storagetransfer-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2022 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package storagetransfer provides access to the Storage Transfer API.
//
// For product documentation, see: https://cloud.google.com/storage-transfer/docs
//
// Creating a client
//
// Usage example:
//
// import "google.golang.org/api/storagetransfer/v1"
// ...
// ctx := context.Background()
// storagetransferService, err := storagetransfer.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for authentication.
//
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// storagetransferService, err := storagetransfer.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// storagetransferService, err := storagetransfer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package storagetransfer // import "google.golang.org/api/storagetransfer/v1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
internal "google.golang.org/api/internal"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "storagetransfer:v1"
const apiName = "storagetransfer"
const apiVersion = "v1"
const basePath = "https://storagetransfer.googleapis.com/"
const mtlsBasePath = "https://storagetransfer.mtls.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// See, edit, configure, and delete your Google Cloud data and see the
// email address for your Google Account.
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := internaloption.WithDefaultScopes(
"https://www.googleapis.com/auth/cloud-platform",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.GoogleServiceAccounts = NewGoogleServiceAccountsService(s)
s.Projects = NewProjectsService(s)
s.TransferJobs = NewTransferJobsService(s)
s.TransferOperations = NewTransferOperationsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
GoogleServiceAccounts *GoogleServiceAccountsService
Projects *ProjectsService
TransferJobs *TransferJobsService
TransferOperations *TransferOperationsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewGoogleServiceAccountsService(s *Service) *GoogleServiceAccountsService {
rs := &GoogleServiceAccountsService{s: s}
return rs
}
type GoogleServiceAccountsService struct {
s *Service
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.AgentPools = NewProjectsAgentPoolsService(s)
return rs
}
type ProjectsService struct {
s *Service
AgentPools *ProjectsAgentPoolsService
}
func NewProjectsAgentPoolsService(s *Service) *ProjectsAgentPoolsService {
rs := &ProjectsAgentPoolsService{s: s}
return rs
}
type ProjectsAgentPoolsService struct {
s *Service
}
func NewTransferJobsService(s *Service) *TransferJobsService {
rs := &TransferJobsService{s: s}
return rs
}
type TransferJobsService struct {
s *Service
}
func NewTransferOperationsService(s *Service) *TransferOperationsService {
rs := &TransferOperationsService{s: s}
return rs
}
type TransferOperationsService struct {
s *Service
}
// AgentPool: Represents an On-Premises Agent pool.
type AgentPool struct {
// BandwidthLimit: Specifies the bandwidth limit details. If this field
// is unspecified, the default value is set as 'No Limit'.
BandwidthLimit *BandwidthLimit `json:"bandwidthLimit,omitempty"`
// DisplayName: Specifies the client-specified AgentPool description.
DisplayName string `json:"displayName,omitempty"`
// Name: Required. Specifies a unique string that identifies the agent
// pool. Format: `projects/{project_id}/agentPools/{agent_pool_id}`
Name string `json:"name,omitempty"`
// State: Output only. Specifies the state of the AgentPool.
//
// Possible values:
// "STATE_UNSPECIFIED" - Default value. This value is unused.
// "CREATING" - This is an initialization state. During this stage,
// the resources such as Pub/Sub topics are allocated for the AgentPool.
// "CREATED" - Determines that the AgentPool is created for use. At
// this state, Agents can join the AgentPool and participate in the
// transfer jobs in that pool.
// "DELETING" - Determines that the AgentPool deletion has been
// initiated, and all the resources are scheduled to be cleaned up and
// freed.
State string `json:"state,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "BandwidthLimit") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BandwidthLimit") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *AgentPool) MarshalJSON() ([]byte, error) {
type NoMethod AgentPool
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AwsAccessKey: AWS access key (see AWS Security Credentials
// (https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).
// For information on our data retention policy for user credentials,
// see User credentials
// (/storage-transfer/docs/data-retention#user-credentials).
type AwsAccessKey struct {
// AccessKeyId: Required. AWS access key ID.
AccessKeyId string `json:"accessKeyId,omitempty"`
// SecretAccessKey: Required. AWS secret access key. This field is not
// returned in RPC responses.
SecretAccessKey string `json:"secretAccessKey,omitempty"`
// ForceSendFields is a list of field names (e.g. "AccessKeyId") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AccessKeyId") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AwsAccessKey) MarshalJSON() ([]byte, error) {
type NoMethod AwsAccessKey
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AwsS3CompatibleData: An AwsS3CompatibleData resource.
type AwsS3CompatibleData struct {
// BucketName: Required. Specifies the name of the bucket.
BucketName string `json:"bucketName,omitempty"`
// Endpoint: Required. Specifies the endpoint of the storage service.
Endpoint string `json:"endpoint,omitempty"`
// Path: Specifies the root path to transfer objects. Must be an empty
// string or full path name that ends with a '/'. This field is treated
// as an object prefix. As such, it should generally not begin with a
// '/'.
Path string `json:"path,omitempty"`
// Region: Specifies the region to sign requests with. This can be left
// blank if requests should be signed with an empty region.
Region string `json:"region,omitempty"`
// S3Metadata: A S3 compatible metadata.
S3Metadata *S3CompatibleMetadata `json:"s3Metadata,omitempty"`
// ForceSendFields is a list of field names (e.g. "BucketName") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BucketName") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AwsS3CompatibleData) MarshalJSON() ([]byte, error) {
type NoMethod AwsS3CompatibleData
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AwsS3Data: An AwsS3Data resource can be a data source, but not a data
// sink. In an AwsS3Data resource, an object's name is the S3 object's
// key name.
type AwsS3Data struct {
// AwsAccessKey: Input only. AWS access key used to sign the API
// requests to the AWS S3 bucket. Permissions on the bucket must be
// granted to the access ID of the AWS access key. For information on
// our data retention policy for user credentials, see User credentials
// (/storage-transfer/docs/data-retention#user-credentials).
AwsAccessKey *AwsAccessKey `json:"awsAccessKey,omitempty"`
// BucketName: Required. S3 Bucket name (see Creating a bucket
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
BucketName string `json:"bucketName,omitempty"`
// Path: Root path to transfer objects. Must be an empty string or full
// path name that ends with a '/'. This field is treated as an object
// prefix. As such, it should generally not begin with a '/'.
Path string `json:"path,omitempty"`
// RoleArn: The Amazon Resource Name (ARN) of the role to support
// temporary credentials via `AssumeRoleWithWebIdentity`. For more
// information about ARNs, see IAM ARNs
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns).
// When a role ARN is provided, Transfer Service fetches temporary
// credentials for the session using a `AssumeRoleWithWebIdentity` call
// for the provided role using the GoogleServiceAccount for this
// project.
RoleArn string `json:"roleArn,omitempty"`
// ForceSendFields is a list of field names (e.g. "AwsAccessKey") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AwsAccessKey") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AwsS3Data) MarshalJSON() ([]byte, error) {
type NoMethod AwsS3Data
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AzureBlobStorageData: An AzureBlobStorageData resource can be a data
// source, but not a data sink. An AzureBlobStorageData resource
// represents one Azure container. The storage account determines the
// Azure endpoint
// (https://docs.microsoft.com/en-us/azure/storage/common/storage-create-storage-account#storage-account-endpoints).
// In an AzureBlobStorageData resource, a blobs's name is the Azure Blob
// Storage blob's key name
// (https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#blob-names).
type AzureBlobStorageData struct {
// AzureCredentials: Required. Input only. Credentials used to
// authenticate API requests to Azure. For information on our data
// retention policy for user credentials, see User credentials
// (/storage-transfer/docs/data-retention#user-credentials).
AzureCredentials *AzureCredentials `json:"azureCredentials,omitempty"`
// Container: Required. The container to transfer from the Azure Storage
// account.
Container string `json:"container,omitempty"`
// Path: Root path to transfer objects. Must be an empty string or full
// path name that ends with a '/'. This field is treated as an object
// prefix. As such, it should generally not begin with a '/'.
Path string `json:"path,omitempty"`
// StorageAccount: Required. The name of the Azure Storage account.
StorageAccount string `json:"storageAccount,omitempty"`
// ForceSendFields is a list of field names (e.g. "AzureCredentials") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AzureCredentials") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *AzureBlobStorageData) MarshalJSON() ([]byte, error) {
type NoMethod AzureBlobStorageData
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AzureCredentials: Azure credentials For information on our data
// retention policy for user credentials, see User credentials
// (/storage-transfer/docs/data-retention#user-credentials).
type AzureCredentials struct {
// SasToken: Required. Azure shared access signature (SAS). For more
// information about SAS, see Grant limited access to Azure Storage
// resources using shared access signatures (SAS)
// (https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
SasToken string `json:"sasToken,omitempty"`
// ForceSendFields is a list of field names (e.g. "SasToken") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "SasToken") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AzureCredentials) MarshalJSON() ([]byte, error) {
type NoMethod AzureCredentials
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BandwidthLimit: Specifies a bandwidth limit for an agent pool.
type BandwidthLimit struct {
// LimitMbps: Bandwidth rate in megabytes per second, distributed across
// all the agents in the pool.
LimitMbps int64 `json:"limitMbps,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "LimitMbps") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "LimitMbps") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BandwidthLimit) MarshalJSON() ([]byte, error) {
type NoMethod BandwidthLimit
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CancelOperationRequest: The request message for
// Operations.CancelOperation.
type CancelOperationRequest struct {
}
// Date: Represents a whole or partial calendar date, such as a
// birthday. The time of day and time zone are either specified
// elsewhere or are insignificant. The date is relative to the Gregorian
// Calendar. This can represent one of the following: * A full date,
// with non-zero year, month, and day values. * A month and day, with a
// zero year (for example, an anniversary). * A year on its own, with a
// zero month and a zero day. * A year and month, with a zero day (for
// example, a credit card expiration date). Related types: *
// google.type.TimeOfDay * google.type.DateTime *
// google.protobuf.Timestamp
type Date struct {
// Day: Day of a month. Must be from 1 to 31 and valid for the year and
// month, or 0 to specify a year by itself or a year and month where the
// day isn't significant.
Day int64 `json:"day,omitempty"`
// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year
// without a month and day.
Month int64 `json:"month,omitempty"`
// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a
// date without a year.
Year int64 `json:"year,omitempty"`
// ForceSendFields is a list of field names (e.g. "Day") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Day") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Date) MarshalJSON() ([]byte, error) {
type NoMethod Date
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Empty: A generic empty message that you can re-use to avoid defining
// duplicated empty messages in your APIs. A typical example is to use
// it as the request or the response type of an API method. For
// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
// (google.protobuf.Empty); }
type Empty struct {
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
}
// ErrorLogEntry: An entry describing an error that has occurred.
type ErrorLogEntry struct {
// ErrorDetails: A list of messages that carry the error details.
ErrorDetails []string `json:"errorDetails,omitempty"`
// Url: Required. A URL that refers to the target (a data source, a data
// sink, or an object) with which the error is associated.
Url string `json:"url,omitempty"`
// ForceSendFields is a list of field names (e.g. "ErrorDetails") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ErrorDetails") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ErrorLogEntry) MarshalJSON() ([]byte, error) {
type NoMethod ErrorLogEntry
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ErrorSummary: A summary of errors by error code, plus a count and
// sample error log entries.
type ErrorSummary struct {
// ErrorCode: Required.
//
// Possible values:
// "OK" - Not an error; returned on success HTTP Mapping: 200 OK
// "CANCELLED" - The operation was cancelled, typically by the caller.
// HTTP Mapping: 499 Client Closed Request
// "UNKNOWN" - Unknown error. For example, this error may be returned
// when a `Status` value received from another address space belongs to
// an error space that is not known in this address space. Also errors
// raised by APIs that do not return enough error information may be
// converted to this error. HTTP Mapping: 500 Internal Server Error
// "INVALID_ARGUMENT" - The client specified an invalid argument. Note
// that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT`
// indicates arguments that are problematic regardless of the state of
// the system (e.g., a malformed file name). HTTP Mapping: 400 Bad
// Request
// "DEADLINE_EXCEEDED" - The deadline expired before the operation
// could complete. For operations that change the state of the system,
// this error may be returned even if the operation has completed
// successfully. For example, a successful response from a server could
// have been delayed long enough for the deadline to expire. HTTP
// Mapping: 504 Gateway Timeout
// "NOT_FOUND" - Some requested entity (e.g., file or directory) was
// not found. Note to server developers: if a request is denied for an
// entire class of users, such as gradual feature rollout or
// undocumented allowlist, `NOT_FOUND` may be used. If a request is
// denied for some users within a class of users, such as user-based
// access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404
// Not Found
// "ALREADY_EXISTS" - The entity that a client attempted to create
// (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict
// "PERMISSION_DENIED" - The caller does not have permission to
// execute the specified operation. `PERMISSION_DENIED` must not be used
// for rejections caused by exhausting some resource (use
// `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED`
// must not be used if the caller can not be identified (use
// `UNAUTHENTICATED` instead for those errors). This error code does not
// imply the request is valid or the requested entity exists or
// satisfies other pre-conditions. HTTP Mapping: 403 Forbidden
// "UNAUTHENTICATED" - The request does not have valid authentication
// credentials for the operation. HTTP Mapping: 401 Unauthorized
// "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a
// per-user quota, or perhaps the entire file system is out of space.
// HTTP Mapping: 429 Too Many Requests
// "FAILED_PRECONDITION" - The operation was rejected because the
// system is not in a state required for the operation's execution. For
// example, the directory to be deleted is non-empty, an rmdir operation
// is applied to a non-directory, etc. Service implementors can use the
// following guidelines to decide between `FAILED_PRECONDITION`,
// `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can
// retry just the failing call. (b) Use `ABORTED` if the client should
// retry at a higher level. For example, when a client-specified
// test-and-set fails, indicating the client should restart a
// read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the
// client should not retry until the system state has been explicitly
// fixed. For example, if an "rmdir" fails because the directory is
// non-empty, `FAILED_PRECONDITION` should be returned since the client
// should not retry unless the files are deleted from the directory.
// HTTP Mapping: 400 Bad Request
// "ABORTED" - The operation was aborted, typically due to a
// concurrency issue such as a sequencer check failure or transaction
// abort. See the guidelines above for deciding between
// `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping:
// 409 Conflict
// "OUT_OF_RANGE" - The operation was attempted past the valid range.
// E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`,
// this error indicates a problem that may be fixed if the system state
// changes. For example, a 32-bit file system will generate
// `INVALID_ARGUMENT` if asked to read at an offset that is not in the
// range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to
// read from an offset past the current file size. There is a fair bit
// of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We
// recommend using `OUT_OF_RANGE` (the more specific error) when it
// applies so that callers who are iterating through a space can easily
// look for an `OUT_OF_RANGE` error to detect when they are done. HTTP
// Mapping: 400 Bad Request
// "UNIMPLEMENTED" - The operation is not implemented or is not
// supported/enabled in this service. HTTP Mapping: 501 Not Implemented
// "INTERNAL" - Internal errors. This means that some invariants
// expected by the underlying system have been broken. This error code
// is reserved for serious errors. HTTP Mapping: 500 Internal Server
// Error
// "UNAVAILABLE" - The service is currently unavailable. This is most
// likely a transient condition, which can be corrected by retrying with
// a backoff. Note that it is not always safe to retry non-idempotent
// operations. See the guidelines above for deciding between
// `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping:
// 503 Service Unavailable
// "DATA_LOSS" - Unrecoverable data loss or corruption. HTTP Mapping:
// 500 Internal Server Error
ErrorCode string `json:"errorCode,omitempty"`
// ErrorCount: Required. Count of this type of error.
ErrorCount int64 `json:"errorCount,omitempty,string"`
// ErrorLogEntries: Error samples. At most 5 error log entries are
// recorded for a given error code for a single transfer operation.
ErrorLogEntries []*ErrorLogEntry `json:"errorLogEntries,omitempty"`
// ForceSendFields is a list of field names (e.g. "ErrorCode") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ErrorCode") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ErrorSummary) MarshalJSON() ([]byte, error) {
type NoMethod ErrorSummary
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GcsData: In a GcsData resource, an object's name is the Cloud Storage
// object's name and its "last modification time" refers to the object's
// `updated` property of Cloud Storage objects, which changes when the
// content or the metadata of the object is updated.
type GcsData struct {
// BucketName: Required. Cloud Storage bucket name. Must meet Bucket
// Name Requirements (/storage/docs/naming#requirements).
BucketName string `json:"bucketName,omitempty"`
// Path: Root path to transfer objects. Must be an empty string or full
// path name that ends with a '/'. This field is treated as an object
// prefix. As such, it should generally not begin with a '/'. The root
// path value must meet Object Name Requirements
// (/storage/docs/naming#objectnames).
Path string `json:"path,omitempty"`
// ForceSendFields is a list of field names (e.g. "BucketName") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BucketName") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GcsData) MarshalJSON() ([]byte, error) {
type NoMethod GcsData
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleServiceAccount: Google service account
type GoogleServiceAccount struct {
// AccountEmail: Email address of the service account.
AccountEmail string `json:"accountEmail,omitempty"`
// SubjectId: Unique identifier for the service account.
SubjectId string `json:"subjectId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AccountEmail") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AccountEmail") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleServiceAccount) MarshalJSON() ([]byte, error) {
type NoMethod GoogleServiceAccount
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// HttpData: An HttpData resource specifies a list of objects on the web
// to be transferred over HTTP. The information of the objects to be
// transferred is contained in a file referenced by a URL. The first
// line in the file must be "TsvHttpData-1.0", which specifies the
// format of the file. Subsequent lines specify the information of the
// list of objects, one object per list entry. Each entry has the
// following tab-delimited fields: * **HTTP URL** — The location of
// the object. * **Length** — The size of the object in bytes. *
// **MD5** — The base64-encoded MD5 hash of the object. For an example
// of a valid TSV file, see Transferring data from URLs
// (https://cloud.google.com/storage-transfer/docs/create-url-list).
// When transferring data based on a URL list, keep the following in
// mind: * When an object located at `http(s)://hostname:port/` is
// transferred to a data sink, the name of the object at the data sink
// is `/`. * If the specified size of an object does not match the
// actual size of the object fetched, the object is not transferred. *
// If the specified MD5 does not match the MD5 computed from the
// transferred bytes, the object transfer fails. * Ensure that each URL
// you specify is publicly accessible. For example, in Cloud Storage you
// can [share an object publicly]
// (/storage/docs/cloud-console#_sharingdata) and get a link to it. *
// Storage Transfer Service obeys `robots.txt` rules and requires the
// source HTTP server to support `Range` requests and to return a
// `Content-Length` header in each response. * ObjectConditions have no
// effect when filtering objects to transfer.
type HttpData struct {
// ListUrl: Required. The URL that points to the file that stores the
// object list entries. This file must allow public access. Currently,
// only URLs with HTTP and HTTPS schemes are supported.
ListUrl string `json:"listUrl,omitempty"`
// ForceSendFields is a list of field names (e.g. "ListUrl") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ListUrl") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *HttpData) MarshalJSON() ([]byte, error) {
type NoMethod HttpData
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListAgentPoolsResponse: Response from ListAgentPools.
type ListAgentPoolsResponse struct {
// AgentPools: A list of agent pools.
AgentPools []*AgentPool `json:"agentPools,omitempty"`
// NextPageToken: The list next page token.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AgentPools") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AgentPools") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListAgentPoolsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListAgentPoolsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListOperationsResponse: The response message for
// Operations.ListOperations.
type ListOperationsResponse struct {
// NextPageToken: The standard List next-page token.
NextPageToken string `json:"nextPageToken,omitempty"`
// Operations: A list of operations that matches the specified filter in
// the request.
Operations []*Operation `json:"operations,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListOperationsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListTransferJobsResponse: Response from ListTransferJobs.
type ListTransferJobsResponse struct {
// NextPageToken: The list next page token.
NextPageToken string `json:"nextPageToken,omitempty"`
// TransferJobs: A list of transfer jobs.
TransferJobs []*TransferJob `json:"transferJobs,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListTransferJobsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListTransferJobsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// LoggingConfig: Specifies the logging behavior for transfer
// operations. For cloud-to-cloud transfers, logs are sent to Cloud
// Logging. See Read transfer logs
// (https://cloud.google.com/storage-transfer/docs/read-transfer-logs)
// for details. For transfers to or from a POSIX file system, logs are
// stored in the Cloud Storage bucket that is the source or sink of the
// transfer. See [Managing Transfer for on-premises jobs]
// (https://cloud.google.com/storage-transfer/docs/managing-on-prem-jobs#viewing-logs)
// for details.
type LoggingConfig struct {
// EnableOnpremGcsTransferLogs: For transfers with a PosixFilesystem
// source, this option enables the Cloud Storage transfer logs for this
// transfer.
EnableOnpremGcsTransferLogs bool `json:"enableOnpremGcsTransferLogs,omitempty"`
// LogActionStates: States in which `log_actions` are logged. If empty,
// no logs are generated. Not supported for transfers with
// PosixFilesystem data sources; use enable_onprem_gcs_transfer_logs
// instead.
//
// Possible values:
// "LOGGABLE_ACTION_STATE_UNSPECIFIED" - Default value. This value is
// unused.
// "SUCCEEDED" - `LoggableAction` completed successfully. `SUCCEEDED`
// actions are logged as INFO.
// "FAILED" - `LoggableAction` terminated in an error state. `FAILED`
// actions are logged as ERROR.
LogActionStates []string `json:"logActionStates,omitempty"`
// LogActions: Specifies the actions to be logged. If empty, no logs are
// generated. Not supported for transfers with PosixFilesystem data
// sources; use enable_onprem_gcs_transfer_logs instead.
//
// Possible values:
// "LOGGABLE_ACTION_UNSPECIFIED" - Default value. This value is
// unused.
// "FIND" - Listing objects in a bucket.
// "DELETE" - Deleting objects at the source or the destination.
// "COPY" - Copying objects to Google Cloud Storage.
LogActions []string `json:"logActions,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "EnableOnpremGcsTransferLogs") to unconditionally include in API
// requests. By default, fields with empty or default values are omitted
// from API requests. However, any non-pointer, non-interface field
// appearing in ForceSendFields will be sent to the server regardless of
// whether the field is empty or not. This may be used to include empty
// fields in Patch requests.