-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
migrationcenter-gen.go
7790 lines (6947 loc) · 294 KB
/
migrationcenter-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 2023 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 migrationcenter provides access to the Migration Center API.
//
// For product documentation, see: https://cloud.google.com/migration-center
//
// # Creating a client
//
// Usage example:
//
// import "google.golang.org/api/migrationcenter/v1alpha1"
// ...
// ctx := context.Background()
// migrationcenterService, err := migrationcenter.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:
//
// migrationcenterService, err := migrationcenter.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, ...)
// migrationcenterService, err := migrationcenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package migrationcenter // import "google.golang.org/api/migrationcenter/v1alpha1"
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 = "migrationcenter:v1alpha1"
const apiName = "migrationcenter"
const apiVersion = "v1alpha1"
const basePath = "https://migrationcenter.googleapis.com/"
const mtlsBasePath = "https://migrationcenter.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.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Locations = NewProjectsLocationsService(s)
return rs
}
type ProjectsService struct {
s *Service
Locations *ProjectsLocationsService
}
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
rs := &ProjectsLocationsService{s: s}
rs.Assets = NewProjectsLocationsAssetsService(s)
rs.ImportJobs = NewProjectsLocationsImportJobsService(s)
rs.Operations = NewProjectsLocationsOperationsService(s)
rs.Sources = NewProjectsLocationsSourcesService(s)
return rs
}
type ProjectsLocationsService struct {
s *Service
Assets *ProjectsLocationsAssetsService
ImportJobs *ProjectsLocationsImportJobsService
Operations *ProjectsLocationsOperationsService
Sources *ProjectsLocationsSourcesService
}
func NewProjectsLocationsAssetsService(s *Service) *ProjectsLocationsAssetsService {
rs := &ProjectsLocationsAssetsService{s: s}
return rs
}
type ProjectsLocationsAssetsService struct {
s *Service
}
func NewProjectsLocationsImportJobsService(s *Service) *ProjectsLocationsImportJobsService {
rs := &ProjectsLocationsImportJobsService{s: s}
return rs
}
type ProjectsLocationsImportJobsService struct {
s *Service
}
func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
rs := &ProjectsLocationsOperationsService{s: s}
return rs
}
type ProjectsLocationsOperationsService struct {
s *Service
}
func NewProjectsLocationsSourcesService(s *Service) *ProjectsLocationsSourcesService {
rs := &ProjectsLocationsSourcesService{s: s}
return rs
}
type ProjectsLocationsSourcesService struct {
s *Service
}
// AggregateAssetsValuesRequest: A request to aggregate one or more
// values.
type AggregateAssetsValuesRequest struct {
// Aggregations: Array of aggregations to perform. Up to 25 aggregations
// can be defined.
Aggregations []*Aggregation `json:"aggregations,omitempty"`
// Filter: The aggregation will be performed on assets that match the
// provided filter.
Filter string `json:"filter,omitempty"`
// ForceSendFields is a list of field names (e.g. "Aggregations") 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. "Aggregations") 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 *AggregateAssetsValuesRequest) MarshalJSON() ([]byte, error) {
type NoMethod AggregateAssetsValuesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AggregateAssetsValuesResponse: A response to a request to aggregated
// assets values.
type AggregateAssetsValuesResponse struct {
// Results: The aggregation results.
Results []*AggregationResult `json:"results,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Results") 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. "Results") 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 *AggregateAssetsValuesResponse) MarshalJSON() ([]byte, error) {
type NoMethod AggregateAssetsValuesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Aggregation: Message describing an aggregation. The message includes
// the aggregation type, parameters, and the field on which to perform
// the aggregation.
type Aggregation struct {
// Count: Count the number of matching objects.
Count *AggregationCount `json:"count,omitempty"`
// Field: The name of the field on which to aggregate.
Field string `json:"field,omitempty"`
// Frequency: Creates a frequency distribution of all field values.
Frequency *AggregationFrequency `json:"frequency,omitempty"`
// Histogram: Creates a bucketed histogram of field values.
Histogram *AggregationHistogram `json:"histogram,omitempty"`
// Sum: Sum over a numeric field.
Sum *AggregationSum `json:"sum,omitempty"`
// ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *Aggregation) MarshalJSON() ([]byte, error) {
type NoMethod Aggregation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AggregationCount: Object count.
type AggregationCount struct {
}
// AggregationFrequency: Frequency distribution of all field values.
type AggregationFrequency struct {
}
// AggregationHistogram: Histogram of bucketed assets counts by field
// value.
type AggregationHistogram struct {
// LowerBounds: Lower bounds of buckets. The response will contain `n+1`
// buckets for `n` bounds. The first bucket will count all assets for
// which the field value is smaller than the first bound. Subsequent
// buckets will count assets for which the field value is greater or
// equal to a lower bound and smaller than the next one. The last bucket
// will count assets for which the field value is greater or equal to
// the final lower bound. You can define up to 20 lower bounds.
LowerBounds []float64 `json:"lowerBounds,omitempty"`
// ForceSendFields is a list of field names (e.g. "LowerBounds") 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. "LowerBounds") 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 *AggregationHistogram) MarshalJSON() ([]byte, error) {
type NoMethod AggregationHistogram
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AggregationResult: Message describing a result of an aggregation.
type AggregationResult struct {
Count *AggregationResultCount `json:"count,omitempty"`
Field string `json:"field,omitempty"`
Frequency *AggregationResultFrequency `json:"frequency,omitempty"`
Histogram *AggregationResultHistogram `json:"histogram,omitempty"`
Sum *AggregationResultSum `json:"sum,omitempty"`
// ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *AggregationResult) MarshalJSON() ([]byte, error) {
type NoMethod AggregationResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AggregationResultCount: The result of a count aggregation.
type AggregationResultCount struct {
Value int64 `json:"value,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Value") 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. "Value") 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 *AggregationResultCount) MarshalJSON() ([]byte, error) {
type NoMethod AggregationResultCount
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AggregationResultFrequency: The result of a frequency distribution
// aggregation.
type AggregationResultFrequency struct {
Values map[string]string `json:"values,omitempty"`
// ForceSendFields is a list of field names (e.g. "Values") 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. "Values") 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 *AggregationResultFrequency) MarshalJSON() ([]byte, error) {
type NoMethod AggregationResultFrequency
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AggregationResultHistogram: The result of a bucketed histogram
// aggregation.
type AggregationResultHistogram struct {
// Buckets: Buckets in the histogram. There will be `n+1` buckets
// matching `n` lower bounds in the request. The first bucket will be
// from -infinity to the first bound. Subsequent buckets will be between
// one bound and the next. The final bucket will be from the final bound
// to infinity.
Buckets []*AggregationResultHistogramBucket `json:"buckets,omitempty"`
// ForceSendFields is a list of field names (e.g. "Buckets") 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. "Buckets") 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 *AggregationResultHistogram) MarshalJSON() ([]byte, error) {
type NoMethod AggregationResultHistogram
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AggregationResultHistogramBucket: A histogram bucket with a lower and
// upper bound, and a count of items with a field value between those
// bounds. The lower bound is inclusive and the upper bound is
// exclusive. Lower bound may be -infinity and upper bound may be
// infinity.
type AggregationResultHistogramBucket struct {
// Count: Count of items in the bucket.
Count int64 `json:"count,omitempty,string"`
// LowerBound: Lower bound - inclusive.
LowerBound float64 `json:"lowerBound,omitempty"`
// UpperBound: Upper bound - exclusive.
UpperBound float64 `json:"upperBound,omitempty"`
// ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 *AggregationResultHistogramBucket) MarshalJSON() ([]byte, error) {
type NoMethod AggregationResultHistogramBucket
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *AggregationResultHistogramBucket) UnmarshalJSON(data []byte) error {
type NoMethod AggregationResultHistogramBucket
var s1 struct {
LowerBound gensupport.JSONFloat64 `json:"lowerBound"`
UpperBound gensupport.JSONFloat64 `json:"upperBound"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.LowerBound = float64(s1.LowerBound)
s.UpperBound = float64(s1.UpperBound)
return nil
}
// AggregationResultSum: The result of a sum aggregation.
type AggregationResultSum struct {
Value float64 `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "Value") 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. "Value") 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 *AggregationResultSum) MarshalJSON() ([]byte, error) {
type NoMethod AggregationResultSum
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *AggregationResultSum) UnmarshalJSON(data []byte) error {
type NoMethod AggregationResultSum
var s1 struct {
Value gensupport.JSONFloat64 `json:"value"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Value = float64(s1.Value)
return nil
}
// AggregationSum: Sum of field values.
type AggregationSum struct {
}
// Asset: An asset represents a resource in your environment. Asset
// types include virtual machines and databases.
type Asset struct {
// Attributes: Generic asset attributes.
Attributes map[string]string `json:"attributes,omitempty"`
// CreateTime: Output only. The timestamp when the asset was created.
CreateTime string `json:"createTime,omitempty"`
// Labels: Labels as key value pairs.
Labels map[string]string `json:"labels,omitempty"`
// Name: Output only. The full name of the asset.
Name string `json:"name,omitempty"`
// Sources: Output only. The list of sources contributing to the asset.
Sources []string `json:"sources,omitempty"`
// UpdateTime: Output only. The timestamp when the asset was last
// updated.
UpdateTime string `json:"updateTime,omitempty"`
// VirtualMachineDetails: Output only. Asset information specific for
// virtual machines.
VirtualMachineDetails *VirtualMachineDetails `json:"virtualMachineDetails,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Attributes") 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. "Attributes") 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 *Asset) MarshalJSON() ([]byte, error) {
type NoMethod Asset
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AssetFrame: Contains data reported from an inventory source on an
// asset.
type AssetFrame struct {
// Attributes: Generic asset attributes.
Attributes map[string]string `json:"attributes,omitempty"`
// Labels: Labels as key value pairs.
Labels map[string]string `json:"labels,omitempty"`
// PerformanceSamples: Asset performance data samples.
PerformanceSamples []*PerformanceSample `json:"performanceSamples,omitempty"`
// ReportTime: The time the data was reported.
ReportTime string `json:"reportTime,omitempty"`
// TraceToken: Optional. Trace token is optionally provided to assist
// with debugging and traceability.
TraceToken string `json:"traceToken,omitempty"`
// VirtualMachineDetails: Asset information specific for virtual
// machines.
VirtualMachineDetails *VirtualMachineDetails `json:"virtualMachineDetails,omitempty"`
// ForceSendFields is a list of field names (e.g. "Attributes") 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. "Attributes") 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 *AssetFrame) MarshalJSON() ([]byte, error) {
type NoMethod AssetFrame
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BiosDetails: Details about the bios.
type BiosDetails struct {
// BiosManufacturer: Bios manufacturer.
BiosManufacturer string `json:"biosManufacturer,omitempty"`
// BiosName: Bios name.
BiosName string `json:"biosName,omitempty"`
// BiosReleaseDate: Bios release date.
BiosReleaseDate string `json:"biosReleaseDate,omitempty"`
// BiosVersion: Bios version.
BiosVersion string `json:"biosVersion,omitempty"`
// SmbiosUuid: SMBios UUID.
SmbiosUuid string `json:"smbiosUuid,omitempty"`
// ForceSendFields is a list of field names (e.g. "BiosManufacturer") 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. "BiosManufacturer") 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 *BiosDetails) MarshalJSON() ([]byte, error) {
type NoMethod BiosDetails
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CancelOperationRequest: The request message for
// Operations.CancelOperation.
type CancelOperationRequest struct {
}
// CpuUsageSample: CPU usage sample.
type CpuUsageSample struct {
// UtilizedPercentage: Percentage of total CPU capacity utilized. Must
// be in the interval [0, 100]. On most systems can be calculated using
// 100 - idle percentage.
UtilizedPercentage float64 `json:"utilizedPercentage,omitempty"`
// ForceSendFields is a list of field names (e.g. "UtilizedPercentage")
// 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. "UtilizedPercentage") 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 *CpuUsageSample) MarshalJSON() ([]byte, error) {
type NoMethod CpuUsageSample
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *CpuUsageSample) UnmarshalJSON(data []byte) error {
type NoMethod CpuUsageSample
var s1 struct {
UtilizedPercentage gensupport.JSONFloat64 `json:"utilizedPercentage"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.UtilizedPercentage = float64(s1.UtilizedPercentage)
return nil
}
// 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)
}
// DateTime: Represents civil time (or occasionally physical time). This
// type can represent a civil time in one of a few possible ways: * When
// utc_offset is set and time_zone is unset: a civil time on a calendar
// day with a particular offset from UTC. * When time_zone is set and
// utc_offset is unset: a civil time on a calendar day in a particular
// time zone. * When neither time_zone nor utc_offset is set: a civil
// time on a calendar day in local time. The date is relative to the
// Proleptic Gregorian Calendar. If year, month, or day are 0, the
// DateTime is considered not to have a specific year, month, or day
// respectively. This type may also be used to represent a physical time
// if all the date and time fields are set and either case of the
// `time_offset` oneof is set. Consider using `Timestamp` message for
// physical time instead. If your use case also would like to store the
// user's timezone, that can be done in another field. This type is more
// flexible than some applications may want. Make sure to document and
// validate your application's limitations.
type DateTime struct {
// Day: Optional. Day of month. Must be from 1 to 31 and valid for the
// year and month, or 0 if specifying a datetime without a day.
Day int64 `json:"day,omitempty"`
// Hours: Optional. Hours of day in 24 hour format. Should be from 0 to
// 23, defaults to 0 (midnight). An API may choose to allow the value
// "24:00:00" for scenarios like business closing time.
Hours int64 `json:"hours,omitempty"`
// Minutes: Optional. Minutes of hour of day. Must be from 0 to 59,
// defaults to 0.
Minutes int64 `json:"minutes,omitempty"`
// Month: Optional. Month of year. Must be from 1 to 12, or 0 if
// specifying a datetime without a month.
Month int64 `json:"month,omitempty"`
// Nanos: Optional. Fractions of seconds in nanoseconds. Must be from 0
// to 999,999,999, defaults to 0.
Nanos int64 `json:"nanos,omitempty"`
// Seconds: Optional. Seconds of minutes of the time. Must normally be
// from 0 to 59, defaults to 0. An API may allow the value 60 if it
// allows leap-seconds.
Seconds int64 `json:"seconds,omitempty"`
// TimeZone: Time zone.
TimeZone *TimeZone `json:"timeZone,omitempty"`
// UtcOffset: UTC offset. Must be whole seconds, between -18 hours and
// +18 hours. For example, a UTC offset of -4:00 would be represented as
// { seconds: -14400 }.
UtcOffset string `json:"utcOffset,omitempty"`
// Year: Optional. Year of date. Must be from 1 to 9999, or 0 if
// specifying a datetime 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 *DateTime) MarshalJSON() ([]byte, error) {
type NoMethod DateTime
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DiskEntry: Single disk entry.
type DiskEntry struct {
// DiskLabel: Disk label.
DiskLabel string `json:"diskLabel,omitempty"`
// DiskLabelType: Disk label type (e.g. BIOS/GPT)
DiskLabelType string `json:"diskLabelType,omitempty"`
// HwAddress: Disk hardware address (e.g. 0:1 for SCSI).
HwAddress string `json:"hwAddress,omitempty"`
// InterfaceType: Disks interface type (e.g. SATA/SCSI)
InterfaceType string `json:"interfaceType,omitempty"`
// Partitions: Partition layout.
Partitions *DiskPartitionList `json:"partitions,omitempty"`
// Status: Disk status (e.g. online).
Status string `json:"status,omitempty"`
// TotalCapacityBytes: Disk Capacity (required).
TotalCapacityBytes int64 `json:"totalCapacityBytes,omitempty,string"`
// TotalFreeBytes: Disk Free Space.
TotalFreeBytes int64 `json:"totalFreeBytes,omitempty,string"`
// VmwareConfig: Optional. Optional disk VMware details.
VmwareConfig *VmwareDiskConfig `json:"vmwareConfig,omitempty"`
// ForceSendFields is a list of field names (e.g. "DiskLabel") 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. "DiskLabel") 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 *DiskEntry) MarshalJSON() ([]byte, error) {
type NoMethod DiskEntry
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DiskEntryList: VM disks.
type DiskEntryList struct {
// Entries: Disk entries.
Entries []*DiskEntry `json:"entries,omitempty"`
// ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DiskEntryList) MarshalJSON() ([]byte, error) {
type NoMethod DiskEntryList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DiskPartition: Disk Partition details.
type DiskPartition struct {
// CapacityBytes: Partition capacity.
CapacityBytes int64 `json:"capacityBytes,omitempty,string"`
// FileSystem: Partition file system.
FileSystem string `json:"fileSystem,omitempty"`
// FreeBytes: Partition free space.
FreeBytes int64 `json:"freeBytes,omitempty,string"`
// MountPoint: Mount pount (Linux/Windows) or drive letter (Windows).
MountPoint string `json:"mountPoint,omitempty"`
// SubPartitions: Sub-partitions.
SubPartitions *DiskPartitionList `json:"subPartitions,omitempty"`
// Type: Partition type (e.g. BIOS boot).
Type string `json:"type,omitempty"`
// Uuid: Partition UUID.
Uuid string `json:"uuid,omitempty"`