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 package sasportal
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
79
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 = "sasportal:v1alpha1"
95 const apiName = "sasportal"
96 const apiVersion = "v1alpha1"
97 const basePath = "https://sasportal.googleapis.com/"
98 const basePathTemplate = "https://sasportal.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://sasportal.mtls.googleapis.com/"
100
101
102 const (
103
104
105 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
106
107
108 SasportalScope = "https://www.googleapis.com/auth/sasportal"
109 )
110
111
112 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
113 scopesOption := internaloption.WithDefaultScopes(
114 "https://www.googleapis.com/auth/cloud-platform",
115 "https://www.googleapis.com/auth/sasportal",
116 )
117
118 opts = append([]option.ClientOption{scopesOption}, opts...)
119 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
120 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
121 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
122 opts = append(opts, internaloption.EnableNewAuthLibrary())
123 client, endpoint, err := htransport.NewClient(ctx, opts...)
124 if err != nil {
125 return nil, err
126 }
127 s, err := New(client)
128 if err != nil {
129 return nil, err
130 }
131 if endpoint != "" {
132 s.BasePath = endpoint
133 }
134 return s, nil
135 }
136
137
138
139
140
141
142 func New(client *http.Client) (*Service, error) {
143 if client == nil {
144 return nil, errors.New("client is nil")
145 }
146 s := &Service{client: client, BasePath: basePath}
147 s.Customers = NewCustomersService(s)
148 s.Deployments = NewDeploymentsService(s)
149 s.Installer = NewInstallerService(s)
150 s.Nodes = NewNodesService(s)
151 s.Policies = NewPoliciesService(s)
152 return s, nil
153 }
154
155 type Service struct {
156 client *http.Client
157 BasePath string
158 UserAgent string
159
160 Customers *CustomersService
161
162 Deployments *DeploymentsService
163
164 Installer *InstallerService
165
166 Nodes *NodesService
167
168 Policies *PoliciesService
169 }
170
171 func (s *Service) userAgent() string {
172 if s.UserAgent == "" {
173 return googleapi.UserAgent
174 }
175 return googleapi.UserAgent + " " + s.UserAgent
176 }
177
178 func NewCustomersService(s *Service) *CustomersService {
179 rs := &CustomersService{s: s}
180 rs.Deployments = NewCustomersDeploymentsService(s)
181 rs.Devices = NewCustomersDevicesService(s)
182 rs.Nodes = NewCustomersNodesService(s)
183 return rs
184 }
185
186 type CustomersService struct {
187 s *Service
188
189 Deployments *CustomersDeploymentsService
190
191 Devices *CustomersDevicesService
192
193 Nodes *CustomersNodesService
194 }
195
196 func NewCustomersDeploymentsService(s *Service) *CustomersDeploymentsService {
197 rs := &CustomersDeploymentsService{s: s}
198 rs.Devices = NewCustomersDeploymentsDevicesService(s)
199 return rs
200 }
201
202 type CustomersDeploymentsService struct {
203 s *Service
204
205 Devices *CustomersDeploymentsDevicesService
206 }
207
208 func NewCustomersDeploymentsDevicesService(s *Service) *CustomersDeploymentsDevicesService {
209 rs := &CustomersDeploymentsDevicesService{s: s}
210 return rs
211 }
212
213 type CustomersDeploymentsDevicesService struct {
214 s *Service
215 }
216
217 func NewCustomersDevicesService(s *Service) *CustomersDevicesService {
218 rs := &CustomersDevicesService{s: s}
219 return rs
220 }
221
222 type CustomersDevicesService struct {
223 s *Service
224 }
225
226 func NewCustomersNodesService(s *Service) *CustomersNodesService {
227 rs := &CustomersNodesService{s: s}
228 rs.Deployments = NewCustomersNodesDeploymentsService(s)
229 rs.Devices = NewCustomersNodesDevicesService(s)
230 rs.Nodes = NewCustomersNodesNodesService(s)
231 return rs
232 }
233
234 type CustomersNodesService struct {
235 s *Service
236
237 Deployments *CustomersNodesDeploymentsService
238
239 Devices *CustomersNodesDevicesService
240
241 Nodes *CustomersNodesNodesService
242 }
243
244 func NewCustomersNodesDeploymentsService(s *Service) *CustomersNodesDeploymentsService {
245 rs := &CustomersNodesDeploymentsService{s: s}
246 return rs
247 }
248
249 type CustomersNodesDeploymentsService struct {
250 s *Service
251 }
252
253 func NewCustomersNodesDevicesService(s *Service) *CustomersNodesDevicesService {
254 rs := &CustomersNodesDevicesService{s: s}
255 return rs
256 }
257
258 type CustomersNodesDevicesService struct {
259 s *Service
260 }
261
262 func NewCustomersNodesNodesService(s *Service) *CustomersNodesNodesService {
263 rs := &CustomersNodesNodesService{s: s}
264 return rs
265 }
266
267 type CustomersNodesNodesService struct {
268 s *Service
269 }
270
271 func NewDeploymentsService(s *Service) *DeploymentsService {
272 rs := &DeploymentsService{s: s}
273 rs.Devices = NewDeploymentsDevicesService(s)
274 return rs
275 }
276
277 type DeploymentsService struct {
278 s *Service
279
280 Devices *DeploymentsDevicesService
281 }
282
283 func NewDeploymentsDevicesService(s *Service) *DeploymentsDevicesService {
284 rs := &DeploymentsDevicesService{s: s}
285 return rs
286 }
287
288 type DeploymentsDevicesService struct {
289 s *Service
290 }
291
292 func NewInstallerService(s *Service) *InstallerService {
293 rs := &InstallerService{s: s}
294 return rs
295 }
296
297 type InstallerService struct {
298 s *Service
299 }
300
301 func NewNodesService(s *Service) *NodesService {
302 rs := &NodesService{s: s}
303 rs.Deployments = NewNodesDeploymentsService(s)
304 rs.Devices = NewNodesDevicesService(s)
305 rs.Nodes = NewNodesNodesService(s)
306 return rs
307 }
308
309 type NodesService struct {
310 s *Service
311
312 Deployments *NodesDeploymentsService
313
314 Devices *NodesDevicesService
315
316 Nodes *NodesNodesService
317 }
318
319 func NewNodesDeploymentsService(s *Service) *NodesDeploymentsService {
320 rs := &NodesDeploymentsService{s: s}
321 rs.Devices = NewNodesDeploymentsDevicesService(s)
322 return rs
323 }
324
325 type NodesDeploymentsService struct {
326 s *Service
327
328 Devices *NodesDeploymentsDevicesService
329 }
330
331 func NewNodesDeploymentsDevicesService(s *Service) *NodesDeploymentsDevicesService {
332 rs := &NodesDeploymentsDevicesService{s: s}
333 return rs
334 }
335
336 type NodesDeploymentsDevicesService struct {
337 s *Service
338 }
339
340 func NewNodesDevicesService(s *Service) *NodesDevicesService {
341 rs := &NodesDevicesService{s: s}
342 return rs
343 }
344
345 type NodesDevicesService struct {
346 s *Service
347 }
348
349 func NewNodesNodesService(s *Service) *NodesNodesService {
350 rs := &NodesNodesService{s: s}
351 rs.Deployments = NewNodesNodesDeploymentsService(s)
352 rs.Devices = NewNodesNodesDevicesService(s)
353 rs.Nodes = NewNodesNodesNodesService(s)
354 return rs
355 }
356
357 type NodesNodesService struct {
358 s *Service
359
360 Deployments *NodesNodesDeploymentsService
361
362 Devices *NodesNodesDevicesService
363
364 Nodes *NodesNodesNodesService
365 }
366
367 func NewNodesNodesDeploymentsService(s *Service) *NodesNodesDeploymentsService {
368 rs := &NodesNodesDeploymentsService{s: s}
369 return rs
370 }
371
372 type NodesNodesDeploymentsService struct {
373 s *Service
374 }
375
376 func NewNodesNodesDevicesService(s *Service) *NodesNodesDevicesService {
377 rs := &NodesNodesDevicesService{s: s}
378 return rs
379 }
380
381 type NodesNodesDevicesService struct {
382 s *Service
383 }
384
385 func NewNodesNodesNodesService(s *Service) *NodesNodesNodesService {
386 rs := &NodesNodesNodesService{s: s}
387 return rs
388 }
389
390 type NodesNodesNodesService struct {
391 s *Service
392 }
393
394 func NewPoliciesService(s *Service) *PoliciesService {
395 rs := &PoliciesService{s: s}
396 return rs
397 }
398
399 type PoliciesService struct {
400 s *Service
401 }
402
403
404 type SasPortalAssignment struct {
405
406
407
408
409 Members []string `json:"members,omitempty"`
410
411 Role string `json:"role,omitempty"`
412
413
414
415
416
417 ForceSendFields []string `json:"-"`
418
419
420
421
422 NullFields []string `json:"-"`
423 }
424
425 func (s *SasPortalAssignment) MarshalJSON() ([]byte, error) {
426 type NoMethod SasPortalAssignment
427 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
428 }
429
430
431 type SasPortalChannelWithScore struct {
432
433 FrequencyRange *SasPortalFrequencyRange `json:"frequencyRange,omitempty"`
434
435 Score float64 `json:"score,omitempty"`
436
437
438
439
440
441 ForceSendFields []string `json:"-"`
442
443
444
445
446 NullFields []string `json:"-"`
447 }
448
449 func (s *SasPortalChannelWithScore) MarshalJSON() ([]byte, error) {
450 type NoMethod SasPortalChannelWithScore
451 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
452 }
453
454 func (s *SasPortalChannelWithScore) UnmarshalJSON(data []byte) error {
455 type NoMethod SasPortalChannelWithScore
456 var s1 struct {
457 Score gensupport.JSONFloat64 `json:"score"`
458 *NoMethod
459 }
460 s1.NoMethod = (*NoMethod)(s)
461 if err := json.Unmarshal(data, &s1); err != nil {
462 return err
463 }
464 s.Score = float64(s1.Score)
465 return nil
466 }
467
468
469 type SasPortalCreateSignedDeviceRequest struct {
470
471
472
473 EncodedDevice string `json:"encodedDevice,omitempty"`
474
475
476 InstallerId string `json:"installerId,omitempty"`
477
478
479
480
481
482 ForceSendFields []string `json:"-"`
483
484
485
486
487 NullFields []string `json:"-"`
488 }
489
490 func (s *SasPortalCreateSignedDeviceRequest) MarshalJSON() ([]byte, error) {
491 type NoMethod SasPortalCreateSignedDeviceRequest
492 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
493 }
494
495
496 type SasPortalCustomer struct {
497
498
499 DisplayName string `json:"displayName,omitempty"`
500
501 Name string `json:"name,omitempty"`
502
503 SasUserIds []string `json:"sasUserIds,omitempty"`
504
505
506 googleapi.ServerResponse `json:"-"`
507
508
509
510
511
512 ForceSendFields []string `json:"-"`
513
514
515
516
517 NullFields []string `json:"-"`
518 }
519
520 func (s *SasPortalCustomer) MarshalJSON() ([]byte, error) {
521 type NoMethod SasPortalCustomer
522 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
523 }
524
525
526 type SasPortalDeployment struct {
527
528 DisplayName string `json:"displayName,omitempty"`
529
530
531 Frns []string `json:"frns,omitempty"`
532
533 Name string `json:"name,omitempty"`
534
535
536 SasUserIds []string `json:"sasUserIds,omitempty"`
537
538
539 googleapi.ServerResponse `json:"-"`
540
541
542
543
544
545 ForceSendFields []string `json:"-"`
546
547
548
549
550 NullFields []string `json:"-"`
551 }
552
553 func (s *SasPortalDeployment) MarshalJSON() ([]byte, error) {
554 type NoMethod SasPortalDeployment
555 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
556 }
557
558
559
560 type SasPortalDeploymentAssociation struct {
561
562 GcpProjectId string `json:"gcpProjectId,omitempty"`
563
564 UserId string `json:"userId,omitempty"`
565
566
567
568
569
570 ForceSendFields []string `json:"-"`
571
572
573
574
575 NullFields []string `json:"-"`
576 }
577
578 func (s *SasPortalDeploymentAssociation) MarshalJSON() ([]byte, error) {
579 type NoMethod SasPortalDeploymentAssociation
580 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
581 }
582
583 type SasPortalDevice struct {
584
585
586 ActiveConfig *SasPortalDeviceConfig `json:"activeConfig,omitempty"`
587
588 CurrentChannels []*SasPortalChannelWithScore `json:"currentChannels,omitempty"`
589
590
591 DeviceMetadata *SasPortalDeviceMetadata `json:"deviceMetadata,omitempty"`
592
593 DisplayName string `json:"displayName,omitempty"`
594
595
596
597 FccId string `json:"fccId,omitempty"`
598
599
600 GrantRangeAllowlists []*SasPortalFrequencyRange `json:"grantRangeAllowlists,omitempty"`
601
602 Grants []*SasPortalDeviceGrant `json:"grants,omitempty"`
603
604 Name string `json:"name,omitempty"`
605
606
607 PreloadedConfig *SasPortalDeviceConfig `json:"preloadedConfig,omitempty"`
608
609
610 SerialNumber string `json:"serialNumber,omitempty"`
611
612
613
614
615
616
617
618
619 State string `json:"state,omitempty"`
620
621
622 googleapi.ServerResponse `json:"-"`
623
624
625
626
627
628 ForceSendFields []string `json:"-"`
629
630
631
632
633 NullFields []string `json:"-"`
634 }
635
636 func (s *SasPortalDevice) MarshalJSON() ([]byte, error) {
637 type NoMethod SasPortalDevice
638 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
639 }
640
641
642 type SasPortalDeviceAirInterface struct {
643
644
645
646
647
648
649
650
651
652
653
654
655
656 RadioTechnology string `json:"radioTechnology,omitempty"`
657
658
659
660 SupportedSpec string `json:"supportedSpec,omitempty"`
661
662
663
664
665
666 ForceSendFields []string `json:"-"`
667
668
669
670
671 NullFields []string `json:"-"`
672 }
673
674 func (s *SasPortalDeviceAirInterface) MarshalJSON() ([]byte, error) {
675 type NoMethod SasPortalDeviceAirInterface
676 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
677 }
678
679
680 type SasPortalDeviceConfig struct {
681
682 AirInterface *SasPortalDeviceAirInterface `json:"airInterface,omitempty"`
683
684 CallSign string `json:"callSign,omitempty"`
685
686
687
688
689
690
691 Category string `json:"category,omitempty"`
692
693 InstallationParams *SasPortalInstallationParams `json:"installationParams,omitempty"`
694
695 IsSigned bool `json:"isSigned,omitempty"`
696
697
698
699
700
701
702 MeasurementCapabilities []string `json:"measurementCapabilities,omitempty"`
703
704 Model *SasPortalDeviceModel `json:"model,omitempty"`
705
706
707
708
709
710
711 State string `json:"state,omitempty"`
712
713 UpdateTime string `json:"updateTime,omitempty"`
714
715 UserId string `json:"userId,omitempty"`
716
717
718
719
720
721 ForceSendFields []string `json:"-"`
722
723
724
725
726 NullFields []string `json:"-"`
727 }
728
729 func (s *SasPortalDeviceConfig) MarshalJSON() ([]byte, error) {
730 type NoMethod SasPortalDeviceConfig
731 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
732 }
733
734
735
736
737 type SasPortalDeviceGrant struct {
738
739
740
741
742
743
744 ChannelType string `json:"channelType,omitempty"`
745
746 ExpireTime string `json:"expireTime,omitempty"`
747
748 FrequencyRange *SasPortalFrequencyRange `json:"frequencyRange,omitempty"`
749
750 GrantId string `json:"grantId,omitempty"`
751
752
753 LastHeartbeatTransmitExpireTime string `json:"lastHeartbeatTransmitExpireTime,omitempty"`
754
755
756
757
758 MaxEirp float64 `json:"maxEirp,omitempty"`
759
760 MoveList []*SasPortalDpaMoveList `json:"moveList,omitempty"`
761
762
763
764
765
766
767
768
769
770
771 State string `json:"state,omitempty"`
772
773 SuspensionReason []string `json:"suspensionReason,omitempty"`
774
775
776
777
778
779 ForceSendFields []string `json:"-"`
780
781
782
783
784 NullFields []string `json:"-"`
785 }
786
787 func (s *SasPortalDeviceGrant) MarshalJSON() ([]byte, error) {
788 type NoMethod SasPortalDeviceGrant
789 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
790 }
791
792 func (s *SasPortalDeviceGrant) UnmarshalJSON(data []byte) error {
793 type NoMethod SasPortalDeviceGrant
794 var s1 struct {
795 MaxEirp gensupport.JSONFloat64 `json:"maxEirp"`
796 *NoMethod
797 }
798 s1.NoMethod = (*NoMethod)(s)
799 if err := json.Unmarshal(data, &s1); err != nil {
800 return err
801 }
802 s.MaxEirp = float64(s1.MaxEirp)
803 return nil
804 }
805
806
807
808 type SasPortalDeviceMetadata struct {
809
810
811 AntennaModel string `json:"antennaModel,omitempty"`
812
813
814
815
816 CommonChannelGroup string `json:"commonChannelGroup,omitempty"`
817
818
819
820
821 InterferenceCoordinationGroup string `json:"interferenceCoordinationGroup,omitempty"`
822
823
824 NrqzValidated bool `json:"nrqzValidated,omitempty"`
825
826 NrqzValidation *SasPortalNrqzValidation `json:"nrqzValidation,omitempty"`
827
828
829
830
831
832 ForceSendFields []string `json:"-"`
833
834
835
836
837 NullFields []string `json:"-"`
838 }
839
840 func (s *SasPortalDeviceMetadata) MarshalJSON() ([]byte, error) {
841 type NoMethod SasPortalDeviceMetadata
842 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
843 }
844
845
846 type SasPortalDeviceModel struct {
847
848 FirmwareVersion string `json:"firmwareVersion,omitempty"`
849
850 HardwareVersion string `json:"hardwareVersion,omitempty"`
851
852 Name string `json:"name,omitempty"`
853
854 SoftwareVersion string `json:"softwareVersion,omitempty"`
855
856 Vendor string `json:"vendor,omitempty"`
857
858
859
860
861
862 ForceSendFields []string `json:"-"`
863
864
865
866
867 NullFields []string `json:"-"`
868 }
869
870 func (s *SasPortalDeviceModel) MarshalJSON() ([]byte, error) {
871 type NoMethod SasPortalDeviceModel
872 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
873 }
874
875
876 type SasPortalDpaMoveList struct {
877
878 DpaId string `json:"dpaId,omitempty"`
879
880 FrequencyRange *SasPortalFrequencyRange `json:"frequencyRange,omitempty"`
881
882
883
884
885
886 ForceSendFields []string `json:"-"`
887
888
889
890
891 NullFields []string `json:"-"`
892 }
893
894 func (s *SasPortalDpaMoveList) MarshalJSON() ([]byte, error) {
895 type NoMethod SasPortalDpaMoveList
896 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
897 }
898
899
900
901
902
903
904 type SasPortalEmpty struct {
905
906 googleapi.ServerResponse `json:"-"`
907 }
908
909
910
911 type SasPortalFrequencyRange struct {
912
913 HighFrequencyMhz float64 `json:"highFrequencyMhz,omitempty"`
914
915 LowFrequencyMhz float64 `json:"lowFrequencyMhz,omitempty"`
916
917
918
919
920
921 ForceSendFields []string `json:"-"`
922
923
924
925
926 NullFields []string `json:"-"`
927 }
928
929 func (s *SasPortalFrequencyRange) MarshalJSON() ([]byte, error) {
930 type NoMethod SasPortalFrequencyRange
931 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
932 }
933
934 func (s *SasPortalFrequencyRange) UnmarshalJSON(data []byte) error {
935 type NoMethod SasPortalFrequencyRange
936 var s1 struct {
937 HighFrequencyMhz gensupport.JSONFloat64 `json:"highFrequencyMhz"`
938 LowFrequencyMhz gensupport.JSONFloat64 `json:"lowFrequencyMhz"`
939 *NoMethod
940 }
941 s1.NoMethod = (*NoMethod)(s)
942 if err := json.Unmarshal(data, &s1); err != nil {
943 return err
944 }
945 s.HighFrequencyMhz = float64(s1.HighFrequencyMhz)
946 s.LowFrequencyMhz = float64(s1.LowFrequencyMhz)
947 return nil
948 }
949
950
951
952 type SasPortalGcpProjectDeployment struct {
953
954 Deployment *SasPortalDeployment `json:"deployment,omitempty"`
955
956 HasEnabledAnalytics bool `json:"hasEnabledAnalytics,omitempty"`
957
958
959
960
961
962 ForceSendFields []string `json:"-"`
963
964
965
966
967 NullFields []string `json:"-"`
968 }
969
970 func (s *SasPortalGcpProjectDeployment) MarshalJSON() ([]byte, error) {
971 type NoMethod SasPortalGcpProjectDeployment
972 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
973 }
974
975
976 type SasPortalGenerateSecretRequest struct {
977 }
978
979
980 type SasPortalGenerateSecretResponse struct {
981
982 Secret string `json:"secret,omitempty"`
983
984
985 googleapi.ServerResponse `json:"-"`
986
987
988
989
990
991 ForceSendFields []string `json:"-"`
992
993
994
995
996 NullFields []string `json:"-"`
997 }
998
999 func (s *SasPortalGenerateSecretResponse) MarshalJSON() ([]byte, error) {
1000 type NoMethod SasPortalGenerateSecretResponse
1001 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1002 }
1003
1004
1005 type SasPortalGetPolicyRequest struct {
1006
1007 Resource string `json:"resource,omitempty"`
1008
1009
1010
1011
1012
1013 ForceSendFields []string `json:"-"`
1014
1015
1016
1017
1018 NullFields []string `json:"-"`
1019 }
1020
1021 func (s *SasPortalGetPolicyRequest) MarshalJSON() ([]byte, error) {
1022 type NoMethod SasPortalGetPolicyRequest
1023 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1024 }
1025
1026
1027
1028 type SasPortalInstallationParams struct {
1029
1030
1031
1032
1033
1034 AntennaAzimuth int64 `json:"antennaAzimuth,omitempty"`
1035
1036
1037
1038
1039 AntennaBeamwidth int64 `json:"antennaBeamwidth,omitempty"`
1040
1041
1042
1043
1044 AntennaDowntilt int64 `json:"antennaDowntilt,omitempty"`
1045
1046
1047 AntennaGain int64 `json:"antennaGain,omitempty"`
1048
1049
1050
1051 AntennaModel string `json:"antennaModel,omitempty"`
1052
1053
1054 CpeCbsdIndication bool `json:"cpeCbsdIndication,omitempty"`
1055
1056
1057
1058
1059 EirpCapability int64 `json:"eirpCapability,omitempty"`
1060
1061
1062
1063
1064 Height float64 `json:"height,omitempty"`
1065
1066
1067
1068
1069
1070
1071
1072 HeightType string `json:"heightType,omitempty"`
1073
1074
1075
1076 HorizontalAccuracy float64 `json:"horizontalAccuracy,omitempty"`
1077
1078
1079 IndoorDeployment bool `json:"indoorDeployment,omitempty"`
1080
1081
1082
1083
1084 Latitude float64 `json:"latitude,omitempty"`
1085
1086
1087
1088
1089 Longitude float64 `json:"longitude,omitempty"`
1090
1091
1092
1093 VerticalAccuracy float64 `json:"verticalAccuracy,omitempty"`
1094
1095
1096
1097
1098
1099 ForceSendFields []string `json:"-"`
1100
1101
1102
1103
1104 NullFields []string `json:"-"`
1105 }
1106
1107 func (s *SasPortalInstallationParams) MarshalJSON() ([]byte, error) {
1108 type NoMethod SasPortalInstallationParams
1109 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1110 }
1111
1112 func (s *SasPortalInstallationParams) UnmarshalJSON(data []byte) error {
1113 type NoMethod SasPortalInstallationParams
1114 var s1 struct {
1115 Height gensupport.JSONFloat64 `json:"height"`
1116 HorizontalAccuracy gensupport.JSONFloat64 `json:"horizontalAccuracy"`
1117 Latitude gensupport.JSONFloat64 `json:"latitude"`
1118 Longitude gensupport.JSONFloat64 `json:"longitude"`
1119 VerticalAccuracy gensupport.JSONFloat64 `json:"verticalAccuracy"`
1120 *NoMethod
1121 }
1122 s1.NoMethod = (*NoMethod)(s)
1123 if err := json.Unmarshal(data, &s1); err != nil {
1124 return err
1125 }
1126 s.Height = float64(s1.Height)
1127 s.HorizontalAccuracy = float64(s1.HorizontalAccuracy)
1128 s.Latitude = float64(s1.Latitude)
1129 s.Longitude = float64(s1.Longitude)
1130 s.VerticalAccuracy = float64(s1.VerticalAccuracy)
1131 return nil
1132 }
1133
1134
1135 type SasPortalListCustomersResponse struct {
1136
1137 Customers []*SasPortalCustomer `json:"customers,omitempty"`
1138
1139
1140
1141 NextPageToken string `json:"nextPageToken,omitempty"`
1142
1143
1144 googleapi.ServerResponse `json:"-"`
1145
1146
1147
1148
1149
1150 ForceSendFields []string `json:"-"`
1151
1152
1153
1154
1155 NullFields []string `json:"-"`
1156 }
1157
1158 func (s *SasPortalListCustomersResponse) MarshalJSON() ([]byte, error) {
1159 type NoMethod SasPortalListCustomersResponse
1160 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1161 }
1162
1163
1164 type SasPortalListDeploymentsResponse struct {
1165
1166 Deployments []*SasPortalDeployment `json:"deployments,omitempty"`
1167
1168
1169
1170 NextPageToken string `json:"nextPageToken,omitempty"`
1171
1172
1173 googleapi.ServerResponse `json:"-"`
1174
1175
1176
1177
1178
1179 ForceSendFields []string `json:"-"`
1180
1181
1182
1183
1184 NullFields []string `json:"-"`
1185 }
1186
1187 func (s *SasPortalListDeploymentsResponse) MarshalJSON() ([]byte, error) {
1188 type NoMethod SasPortalListDeploymentsResponse
1189 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1190 }
1191
1192
1193 type SasPortalListDevicesResponse struct {
1194
1195 Devices []*SasPortalDevice `json:"devices,omitempty"`
1196
1197
1198
1199 NextPageToken string `json:"nextPageToken,omitempty"`
1200
1201
1202 googleapi.ServerResponse `json:"-"`
1203
1204
1205
1206
1207
1208 ForceSendFields []string `json:"-"`
1209
1210
1211
1212
1213 NullFields []string `json:"-"`
1214 }
1215
1216 func (s *SasPortalListDevicesResponse) MarshalJSON() ([]byte, error) {
1217 type NoMethod SasPortalListDevicesResponse
1218 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1219 }
1220
1221
1222
1223 type SasPortalListGcpProjectDeploymentsResponse struct {
1224
1225 Deployments []*SasPortalGcpProjectDeployment `json:"deployments,omitempty"`
1226
1227
1228 googleapi.ServerResponse `json:"-"`
1229
1230
1231
1232
1233
1234 ForceSendFields []string `json:"-"`
1235
1236
1237
1238
1239 NullFields []string `json:"-"`
1240 }
1241
1242 func (s *SasPortalListGcpProjectDeploymentsResponse) MarshalJSON() ([]byte, error) {
1243 type NoMethod SasPortalListGcpProjectDeploymentsResponse
1244 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1245 }
1246
1247
1248
1249
1250 type SasPortalListLegacyOrganizationsResponse struct {
1251
1252 Organizations []*SasPortalOrganization `json:"organizations,omitempty"`
1253
1254
1255 googleapi.ServerResponse `json:"-"`
1256
1257
1258
1259
1260
1261 ForceSendFields []string `json:"-"`
1262
1263
1264
1265
1266 NullFields []string `json:"-"`
1267 }
1268
1269 func (s *SasPortalListLegacyOrganizationsResponse) MarshalJSON() ([]byte, error) {
1270 type NoMethod SasPortalListLegacyOrganizationsResponse
1271 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1272 }
1273
1274
1275 type SasPortalListNodesResponse struct {
1276
1277
1278
1279 NextPageToken string `json:"nextPageToken,omitempty"`
1280
1281 Nodes []*SasPortalNode `json:"nodes,omitempty"`
1282
1283
1284 googleapi.ServerResponse `json:"-"`
1285
1286
1287
1288
1289
1290 ForceSendFields []string `json:"-"`
1291
1292
1293
1294
1295 NullFields []string `json:"-"`
1296 }
1297
1298 func (s *SasPortalListNodesResponse) MarshalJSON() ([]byte, error) {
1299 type NoMethod SasPortalListNodesResponse
1300 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1301 }
1302
1303
1304
1305 type SasPortalMigrateOrganizationMetadata struct {
1306
1307
1308
1309
1310
1311
1312
1313
1314 OperationState string `json:"operationState,omitempty"`
1315
1316
1317
1318
1319
1320 ForceSendFields []string `json:"-"`
1321
1322
1323
1324
1325 NullFields []string `json:"-"`
1326 }
1327
1328 func (s *SasPortalMigrateOrganizationMetadata) MarshalJSON() ([]byte, error) {
1329 type NoMethod SasPortalMigrateOrganizationMetadata
1330 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1331 }
1332
1333
1334
1335
1336
1337
1338 type SasPortalMigrateOrganizationRequest struct {
1339
1340 OrganizationId int64 `json:"organizationId,omitempty,string"`
1341
1342
1343
1344
1345
1346 ForceSendFields []string `json:"-"`
1347
1348
1349
1350
1351 NullFields []string `json:"-"`
1352 }
1353
1354 func (s *SasPortalMigrateOrganizationRequest) MarshalJSON() ([]byte, error) {
1355 type NoMethod SasPortalMigrateOrganizationRequest
1356 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1357 }
1358
1359
1360
1361 type SasPortalMigrateOrganizationResponse struct {
1362
1363
1364 DeploymentAssociation []*SasPortalDeploymentAssociation `json:"deploymentAssociation,omitempty"`
1365
1366
1367
1368
1369
1370 ForceSendFields []string `json:"-"`
1371
1372
1373
1374
1375 NullFields []string `json:"-"`
1376 }
1377
1378 func (s *SasPortalMigrateOrganizationResponse) MarshalJSON() ([]byte, error) {
1379 type NoMethod SasPortalMigrateOrganizationResponse
1380 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1381 }
1382
1383
1384 type SasPortalMoveDeploymentRequest struct {
1385
1386
1387 Destination string `json:"destination,omitempty"`
1388
1389
1390
1391
1392
1393 ForceSendFields []string `json:"-"`
1394
1395
1396
1397
1398 NullFields []string `json:"-"`
1399 }
1400
1401 func (s *SasPortalMoveDeploymentRequest) MarshalJSON() ([]byte, error) {
1402 type NoMethod SasPortalMoveDeploymentRequest
1403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1404 }
1405
1406
1407 type SasPortalMoveDeviceRequest struct {
1408
1409
1410 Destination string `json:"destination,omitempty"`
1411
1412
1413
1414
1415
1416 ForceSendFields []string `json:"-"`
1417
1418
1419
1420
1421 NullFields []string `json:"-"`
1422 }
1423
1424 func (s *SasPortalMoveDeviceRequest) MarshalJSON() ([]byte, error) {
1425 type NoMethod SasPortalMoveDeviceRequest
1426 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1427 }
1428
1429
1430 type SasPortalMoveNodeRequest struct {
1431
1432
1433 Destination string `json:"destination,omitempty"`
1434
1435
1436
1437
1438
1439 ForceSendFields []string `json:"-"`
1440
1441
1442
1443
1444 NullFields []string `json:"-"`
1445 }
1446
1447 func (s *SasPortalMoveNodeRequest) MarshalJSON() ([]byte, error) {
1448 type NoMethod SasPortalMoveNodeRequest
1449 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1450 }
1451
1452
1453 type SasPortalNode struct {
1454
1455 DisplayName string `json:"displayName,omitempty"`
1456
1457 Name string `json:"name,omitempty"`
1458
1459 SasUserIds []string `json:"sasUserIds,omitempty"`
1460
1461
1462 googleapi.ServerResponse `json:"-"`
1463
1464
1465
1466
1467
1468 ForceSendFields []string `json:"-"`
1469
1470
1471
1472
1473 NullFields []string `json:"-"`
1474 }
1475
1476 func (s *SasPortalNode) MarshalJSON() ([]byte, error) {
1477 type NoMethod SasPortalNode
1478 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1479 }
1480
1481
1482
1483 type SasPortalNrqzValidation struct {
1484
1485 CaseId string `json:"caseId,omitempty"`
1486
1487 CpiId string `json:"cpiId,omitempty"`
1488
1489 Latitude float64 `json:"latitude,omitempty"`
1490
1491 Longitude float64 `json:"longitude,omitempty"`
1492
1493
1494
1495
1496
1497
1498 State string `json:"state,omitempty"`
1499
1500
1501
1502
1503
1504 ForceSendFields []string `json:"-"`
1505
1506
1507
1508
1509 NullFields []string `json:"-"`
1510 }
1511
1512 func (s *SasPortalNrqzValidation) MarshalJSON() ([]byte, error) {
1513 type NoMethod SasPortalNrqzValidation
1514 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1515 }
1516
1517 func (s *SasPortalNrqzValidation) UnmarshalJSON(data []byte) error {
1518 type NoMethod SasPortalNrqzValidation
1519 var s1 struct {
1520 Latitude gensupport.JSONFloat64 `json:"latitude"`
1521 Longitude gensupport.JSONFloat64 `json:"longitude"`
1522 *NoMethod
1523 }
1524 s1.NoMethod = (*NoMethod)(s)
1525 if err := json.Unmarshal(data, &s1); err != nil {
1526 return err
1527 }
1528 s.Latitude = float64(s1.Latitude)
1529 s.Longitude = float64(s1.Longitude)
1530 return nil
1531 }
1532
1533
1534
1535 type SasPortalOperation struct {
1536
1537
1538
1539 Done bool `json:"done,omitempty"`
1540
1541 Error *SasPortalStatus `json:"error,omitempty"`
1542
1543
1544
1545
1546 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1547
1548
1549
1550 Name string `json:"name,omitempty"`
1551
1552
1553
1554
1555
1556
1557
1558 Response googleapi.RawMessage `json:"response,omitempty"`
1559
1560
1561 googleapi.ServerResponse `json:"-"`
1562
1563
1564
1565
1566
1567 ForceSendFields []string `json:"-"`
1568
1569
1570
1571
1572 NullFields []string `json:"-"`
1573 }
1574
1575 func (s *SasPortalOperation) MarshalJSON() ([]byte, error) {
1576 type NoMethod SasPortalOperation
1577 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1578 }
1579
1580
1581 type SasPortalOrganization struct {
1582
1583 DisplayName string `json:"displayName,omitempty"`
1584
1585 Id int64 `json:"id,omitempty,string"`
1586
1587
1588
1589
1590
1591 ForceSendFields []string `json:"-"`
1592
1593
1594
1595
1596 NullFields []string `json:"-"`
1597 }
1598
1599 func (s *SasPortalOrganization) MarshalJSON() ([]byte, error) {
1600 type NoMethod SasPortalOrganization
1601 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1602 }
1603
1604
1605 type SasPortalPolicy struct {
1606
1607 Assignments []*SasPortalAssignment `json:"assignments,omitempty"`
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617 Etag string `json:"etag,omitempty"`
1618
1619
1620 googleapi.ServerResponse `json:"-"`
1621
1622
1623
1624
1625
1626 ForceSendFields []string `json:"-"`
1627
1628
1629
1630
1631 NullFields []string `json:"-"`
1632 }
1633
1634 func (s *SasPortalPolicy) MarshalJSON() ([]byte, error) {
1635 type NoMethod SasPortalPolicy
1636 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1637 }
1638
1639
1640
1641
1642
1643
1644 type SasPortalProvisionDeploymentRequest struct {
1645
1646
1647
1648 NewDeploymentDisplayName string `json:"newDeploymentDisplayName,omitempty"`
1649
1650
1651
1652 NewOrganizationDisplayName string `json:"newOrganizationDisplayName,omitempty"`
1653
1654
1655 OrganizationId int64 `json:"organizationId,omitempty,string"`
1656
1657
1658
1659
1660
1661 ForceSendFields []string `json:"-"`
1662
1663
1664
1665
1666 NullFields []string `json:"-"`
1667 }
1668
1669 func (s *SasPortalProvisionDeploymentRequest) MarshalJSON() ([]byte, error) {
1670 type NoMethod SasPortalProvisionDeploymentRequest
1671 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1672 }
1673
1674
1675
1676 type SasPortalProvisionDeploymentResponse struct {
1677
1678
1679 ErrorMessage string `json:"errorMessage,omitempty"`
1680
1681
1682 googleapi.ServerResponse `json:"-"`
1683
1684
1685
1686
1687
1688 ForceSendFields []string `json:"-"`
1689
1690
1691
1692
1693 NullFields []string `json:"-"`
1694 }
1695
1696 func (s *SasPortalProvisionDeploymentResponse) MarshalJSON() ([]byte, error) {
1697 type NoMethod SasPortalProvisionDeploymentResponse
1698 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1699 }
1700
1701
1702 type SasPortalSetPolicyRequest struct {
1703
1704
1705 DisableNotification bool `json:"disableNotification,omitempty"`
1706
1707 Policy *SasPortalPolicy `json:"policy,omitempty"`
1708
1709
1710 Resource string `json:"resource,omitempty"`
1711
1712
1713
1714
1715
1716 ForceSendFields []string `json:"-"`
1717
1718
1719
1720
1721 NullFields []string `json:"-"`
1722 }
1723
1724 func (s *SasPortalSetPolicyRequest) MarshalJSON() ([]byte, error) {
1725 type NoMethod SasPortalSetPolicyRequest
1726 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1727 }
1728
1729
1730
1731 type SasPortalSetupSasAnalyticsMetadata struct {
1732 }
1733
1734
1735 type SasPortalSetupSasAnalyticsRequest struct {
1736
1737
1738 UserId string `json:"userId,omitempty"`
1739
1740
1741
1742
1743
1744 ForceSendFields []string `json:"-"`
1745
1746
1747
1748
1749 NullFields []string `json:"-"`
1750 }
1751
1752 func (s *SasPortalSetupSasAnalyticsRequest) MarshalJSON() ([]byte, error) {
1753 type NoMethod SasPortalSetupSasAnalyticsRequest
1754 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1755 }
1756
1757
1758
1759 type SasPortalSetupSasAnalyticsResponse struct {
1760 }
1761
1762
1763 type SasPortalSignDeviceRequest struct {
1764
1765
1766 Device *SasPortalDevice `json:"device,omitempty"`
1767
1768
1769
1770
1771
1772 ForceSendFields []string `json:"-"`
1773
1774
1775
1776
1777 NullFields []string `json:"-"`
1778 }
1779
1780 func (s *SasPortalSignDeviceRequest) MarshalJSON() ([]byte, error) {
1781 type NoMethod SasPortalSignDeviceRequest
1782 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1783 }
1784
1785
1786
1787
1788
1789
1790
1791 type SasPortalStatus struct {
1792
1793 Code int64 `json:"code,omitempty"`
1794
1795
1796 Details []googleapi.RawMessage `json:"details,omitempty"`
1797
1798
1799
1800 Message string `json:"message,omitempty"`
1801
1802
1803
1804
1805
1806 ForceSendFields []string `json:"-"`
1807
1808
1809
1810
1811 NullFields []string `json:"-"`
1812 }
1813
1814 func (s *SasPortalStatus) MarshalJSON() ([]byte, error) {
1815 type NoMethod SasPortalStatus
1816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1817 }
1818
1819
1820
1821 type SasPortalTestPermissionsRequest struct {
1822
1823 Permissions []string `json:"permissions,omitempty"`
1824
1825
1826 Resource string `json:"resource,omitempty"`
1827
1828
1829
1830
1831
1832 ForceSendFields []string `json:"-"`
1833
1834
1835
1836
1837 NullFields []string `json:"-"`
1838 }
1839
1840 func (s *SasPortalTestPermissionsRequest) MarshalJSON() ([]byte, error) {
1841 type NoMethod SasPortalTestPermissionsRequest
1842 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1843 }
1844
1845
1846
1847 type SasPortalTestPermissionsResponse struct {
1848
1849 Permissions []string `json:"permissions,omitempty"`
1850
1851
1852 googleapi.ServerResponse `json:"-"`
1853
1854
1855
1856
1857
1858 ForceSendFields []string `json:"-"`
1859
1860
1861
1862
1863 NullFields []string `json:"-"`
1864 }
1865
1866 func (s *SasPortalTestPermissionsResponse) MarshalJSON() ([]byte, error) {
1867 type NoMethod SasPortalTestPermissionsResponse
1868 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1869 }
1870
1871
1872 type SasPortalUpdateSignedDeviceRequest struct {
1873
1874
1875
1876 EncodedDevice string `json:"encodedDevice,omitempty"`
1877
1878
1879 InstallerId string `json:"installerId,omitempty"`
1880
1881
1882
1883
1884
1885 ForceSendFields []string `json:"-"`
1886
1887
1888
1889
1890 NullFields []string `json:"-"`
1891 }
1892
1893 func (s *SasPortalUpdateSignedDeviceRequest) MarshalJSON() ([]byte, error) {
1894 type NoMethod SasPortalUpdateSignedDeviceRequest
1895 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1896 }
1897
1898
1899 type SasPortalValidateInstallerRequest struct {
1900
1901
1902 EncodedSecret string `json:"encodedSecret,omitempty"`
1903
1904
1905 InstallerId string `json:"installerId,omitempty"`
1906
1907 Secret string `json:"secret,omitempty"`
1908
1909
1910
1911
1912
1913 ForceSendFields []string `json:"-"`
1914
1915
1916
1917
1918 NullFields []string `json:"-"`
1919 }
1920
1921 func (s *SasPortalValidateInstallerRequest) MarshalJSON() ([]byte, error) {
1922 type NoMethod SasPortalValidateInstallerRequest
1923 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1924 }
1925
1926
1927 type SasPortalValidateInstallerResponse struct {
1928
1929 googleapi.ServerResponse `json:"-"`
1930 }
1931
1932 type CustomersGetCall struct {
1933 s *Service
1934 name string
1935 urlParams_ gensupport.URLParams
1936 ifNoneMatch_ string
1937 ctx_ context.Context
1938 header_ http.Header
1939 }
1940
1941
1942
1943
1944 func (r *CustomersService) Get(name string) *CustomersGetCall {
1945 c := &CustomersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1946 c.name = name
1947 return c
1948 }
1949
1950
1951
1952
1953 func (c *CustomersGetCall) Fields(s ...googleapi.Field) *CustomersGetCall {
1954 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1955 return c
1956 }
1957
1958
1959
1960
1961 func (c *CustomersGetCall) IfNoneMatch(entityTag string) *CustomersGetCall {
1962 c.ifNoneMatch_ = entityTag
1963 return c
1964 }
1965
1966
1967 func (c *CustomersGetCall) Context(ctx context.Context) *CustomersGetCall {
1968 c.ctx_ = ctx
1969 return c
1970 }
1971
1972
1973
1974 func (c *CustomersGetCall) Header() http.Header {
1975 if c.header_ == nil {
1976 c.header_ = make(http.Header)
1977 }
1978 return c.header_
1979 }
1980
1981 func (c *CustomersGetCall) doRequest(alt string) (*http.Response, error) {
1982 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1983 if c.ifNoneMatch_ != "" {
1984 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1985 }
1986 var body io.Reader = nil
1987 c.urlParams_.Set("alt", alt)
1988 c.urlParams_.Set("prettyPrint", "false")
1989 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
1990 urls += "?" + c.urlParams_.Encode()
1991 req, err := http.NewRequest("GET", urls, body)
1992 if err != nil {
1993 return nil, err
1994 }
1995 req.Header = reqHeaders
1996 googleapi.Expand(req.URL, map[string]string{
1997 "name": c.name,
1998 })
1999 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2000 }
2001
2002
2003
2004
2005
2006
2007
2008 func (c *CustomersGetCall) Do(opts ...googleapi.CallOption) (*SasPortalCustomer, error) {
2009 gensupport.SetOptions(c.urlParams_, opts...)
2010 res, err := c.doRequest("json")
2011 if res != nil && res.StatusCode == http.StatusNotModified {
2012 if res.Body != nil {
2013 res.Body.Close()
2014 }
2015 return nil, gensupport.WrapError(&googleapi.Error{
2016 Code: res.StatusCode,
2017 Header: res.Header,
2018 })
2019 }
2020 if err != nil {
2021 return nil, err
2022 }
2023 defer googleapi.CloseBody(res)
2024 if err := googleapi.CheckResponse(res); err != nil {
2025 return nil, gensupport.WrapError(err)
2026 }
2027 ret := &SasPortalCustomer{
2028 ServerResponse: googleapi.ServerResponse{
2029 Header: res.Header,
2030 HTTPStatusCode: res.StatusCode,
2031 },
2032 }
2033 target := &ret
2034 if err := gensupport.DecodeResponse(target, res); err != nil {
2035 return nil, err
2036 }
2037 return ret, nil
2038 }
2039
2040 type CustomersListCall struct {
2041 s *Service
2042 urlParams_ gensupport.URLParams
2043 ifNoneMatch_ string
2044 ctx_ context.Context
2045 header_ http.Header
2046 }
2047
2048
2049 func (r *CustomersService) List() *CustomersListCall {
2050 c := &CustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2051 return c
2052 }
2053
2054
2055
2056 func (c *CustomersListCall) PageSize(pageSize int64) *CustomersListCall {
2057 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2058 return c
2059 }
2060
2061
2062
2063
2064 func (c *CustomersListCall) PageToken(pageToken string) *CustomersListCall {
2065 c.urlParams_.Set("pageToken", pageToken)
2066 return c
2067 }
2068
2069
2070
2071
2072 func (c *CustomersListCall) Fields(s ...googleapi.Field) *CustomersListCall {
2073 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2074 return c
2075 }
2076
2077
2078
2079
2080 func (c *CustomersListCall) IfNoneMatch(entityTag string) *CustomersListCall {
2081 c.ifNoneMatch_ = entityTag
2082 return c
2083 }
2084
2085
2086 func (c *CustomersListCall) Context(ctx context.Context) *CustomersListCall {
2087 c.ctx_ = ctx
2088 return c
2089 }
2090
2091
2092
2093 func (c *CustomersListCall) Header() http.Header {
2094 if c.header_ == nil {
2095 c.header_ = make(http.Header)
2096 }
2097 return c.header_
2098 }
2099
2100 func (c *CustomersListCall) doRequest(alt string) (*http.Response, error) {
2101 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2102 if c.ifNoneMatch_ != "" {
2103 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2104 }
2105 var body io.Reader = nil
2106 c.urlParams_.Set("alt", alt)
2107 c.urlParams_.Set("prettyPrint", "false")
2108 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/customers")
2109 urls += "?" + c.urlParams_.Encode()
2110 req, err := http.NewRequest("GET", urls, body)
2111 if err != nil {
2112 return nil, err
2113 }
2114 req.Header = reqHeaders
2115 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2116 }
2117
2118
2119
2120
2121
2122
2123
2124 func (c *CustomersListCall) Do(opts ...googleapi.CallOption) (*SasPortalListCustomersResponse, error) {
2125 gensupport.SetOptions(c.urlParams_, opts...)
2126 res, err := c.doRequest("json")
2127 if res != nil && res.StatusCode == http.StatusNotModified {
2128 if res.Body != nil {
2129 res.Body.Close()
2130 }
2131 return nil, gensupport.WrapError(&googleapi.Error{
2132 Code: res.StatusCode,
2133 Header: res.Header,
2134 })
2135 }
2136 if err != nil {
2137 return nil, err
2138 }
2139 defer googleapi.CloseBody(res)
2140 if err := googleapi.CheckResponse(res); err != nil {
2141 return nil, gensupport.WrapError(err)
2142 }
2143 ret := &SasPortalListCustomersResponse{
2144 ServerResponse: googleapi.ServerResponse{
2145 Header: res.Header,
2146 HTTPStatusCode: res.StatusCode,
2147 },
2148 }
2149 target := &ret
2150 if err := gensupport.DecodeResponse(target, res); err != nil {
2151 return nil, err
2152 }
2153 return ret, nil
2154 }
2155
2156
2157
2158
2159 func (c *CustomersListCall) Pages(ctx context.Context, f func(*SasPortalListCustomersResponse) error) error {
2160 c.ctx_ = ctx
2161 defer c.PageToken(c.urlParams_.Get("pageToken"))
2162 for {
2163 x, err := c.Do()
2164 if err != nil {
2165 return err
2166 }
2167 if err := f(x); err != nil {
2168 return err
2169 }
2170 if x.NextPageToken == "" {
2171 return nil
2172 }
2173 c.PageToken(x.NextPageToken)
2174 }
2175 }
2176
2177 type CustomersListGcpProjectDeploymentsCall struct {
2178 s *Service
2179 urlParams_ gensupport.URLParams
2180 ifNoneMatch_ string
2181 ctx_ context.Context
2182 header_ http.Header
2183 }
2184
2185
2186
2187 func (r *CustomersService) ListGcpProjectDeployments() *CustomersListGcpProjectDeploymentsCall {
2188 c := &CustomersListGcpProjectDeploymentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2189 return c
2190 }
2191
2192
2193
2194
2195 func (c *CustomersListGcpProjectDeploymentsCall) Fields(s ...googleapi.Field) *CustomersListGcpProjectDeploymentsCall {
2196 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2197 return c
2198 }
2199
2200
2201
2202
2203 func (c *CustomersListGcpProjectDeploymentsCall) IfNoneMatch(entityTag string) *CustomersListGcpProjectDeploymentsCall {
2204 c.ifNoneMatch_ = entityTag
2205 return c
2206 }
2207
2208
2209 func (c *CustomersListGcpProjectDeploymentsCall) Context(ctx context.Context) *CustomersListGcpProjectDeploymentsCall {
2210 c.ctx_ = ctx
2211 return c
2212 }
2213
2214
2215
2216 func (c *CustomersListGcpProjectDeploymentsCall) Header() http.Header {
2217 if c.header_ == nil {
2218 c.header_ = make(http.Header)
2219 }
2220 return c.header_
2221 }
2222
2223 func (c *CustomersListGcpProjectDeploymentsCall) doRequest(alt string) (*http.Response, error) {
2224 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2225 if c.ifNoneMatch_ != "" {
2226 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2227 }
2228 var body io.Reader = nil
2229 c.urlParams_.Set("alt", alt)
2230 c.urlParams_.Set("prettyPrint", "false")
2231 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/customers:listGcpProjectDeployments")
2232 urls += "?" + c.urlParams_.Encode()
2233 req, err := http.NewRequest("GET", urls, body)
2234 if err != nil {
2235 return nil, err
2236 }
2237 req.Header = reqHeaders
2238 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2239 }
2240
2241
2242
2243
2244
2245
2246
2247 func (c *CustomersListGcpProjectDeploymentsCall) Do(opts ...googleapi.CallOption) (*SasPortalListGcpProjectDeploymentsResponse, error) {
2248 gensupport.SetOptions(c.urlParams_, opts...)
2249 res, err := c.doRequest("json")
2250 if res != nil && res.StatusCode == http.StatusNotModified {
2251 if res.Body != nil {
2252 res.Body.Close()
2253 }
2254 return nil, gensupport.WrapError(&googleapi.Error{
2255 Code: res.StatusCode,
2256 Header: res.Header,
2257 })
2258 }
2259 if err != nil {
2260 return nil, err
2261 }
2262 defer googleapi.CloseBody(res)
2263 if err := googleapi.CheckResponse(res); err != nil {
2264 return nil, gensupport.WrapError(err)
2265 }
2266 ret := &SasPortalListGcpProjectDeploymentsResponse{
2267 ServerResponse: googleapi.ServerResponse{
2268 Header: res.Header,
2269 HTTPStatusCode: res.StatusCode,
2270 },
2271 }
2272 target := &ret
2273 if err := gensupport.DecodeResponse(target, res); err != nil {
2274 return nil, err
2275 }
2276 return ret, nil
2277 }
2278
2279 type CustomersListLegacyOrganizationsCall struct {
2280 s *Service
2281 urlParams_ gensupport.URLParams
2282 ifNoneMatch_ string
2283 ctx_ context.Context
2284 header_ http.Header
2285 }
2286
2287
2288 func (r *CustomersService) ListLegacyOrganizations() *CustomersListLegacyOrganizationsCall {
2289 c := &CustomersListLegacyOrganizationsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2290 return c
2291 }
2292
2293
2294
2295
2296 func (c *CustomersListLegacyOrganizationsCall) Fields(s ...googleapi.Field) *CustomersListLegacyOrganizationsCall {
2297 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2298 return c
2299 }
2300
2301
2302
2303
2304 func (c *CustomersListLegacyOrganizationsCall) IfNoneMatch(entityTag string) *CustomersListLegacyOrganizationsCall {
2305 c.ifNoneMatch_ = entityTag
2306 return c
2307 }
2308
2309
2310 func (c *CustomersListLegacyOrganizationsCall) Context(ctx context.Context) *CustomersListLegacyOrganizationsCall {
2311 c.ctx_ = ctx
2312 return c
2313 }
2314
2315
2316
2317 func (c *CustomersListLegacyOrganizationsCall) Header() http.Header {
2318 if c.header_ == nil {
2319 c.header_ = make(http.Header)
2320 }
2321 return c.header_
2322 }
2323
2324 func (c *CustomersListLegacyOrganizationsCall) doRequest(alt string) (*http.Response, error) {
2325 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2326 if c.ifNoneMatch_ != "" {
2327 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2328 }
2329 var body io.Reader = nil
2330 c.urlParams_.Set("alt", alt)
2331 c.urlParams_.Set("prettyPrint", "false")
2332 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/customers:listLegacyOrganizations")
2333 urls += "?" + c.urlParams_.Encode()
2334 req, err := http.NewRequest("GET", urls, body)
2335 if err != nil {
2336 return nil, err
2337 }
2338 req.Header = reqHeaders
2339 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2340 }
2341
2342
2343
2344
2345
2346
2347
2348 func (c *CustomersListLegacyOrganizationsCall) Do(opts ...googleapi.CallOption) (*SasPortalListLegacyOrganizationsResponse, error) {
2349 gensupport.SetOptions(c.urlParams_, opts...)
2350 res, err := c.doRequest("json")
2351 if res != nil && res.StatusCode == http.StatusNotModified {
2352 if res.Body != nil {
2353 res.Body.Close()
2354 }
2355 return nil, gensupport.WrapError(&googleapi.Error{
2356 Code: res.StatusCode,
2357 Header: res.Header,
2358 })
2359 }
2360 if err != nil {
2361 return nil, err
2362 }
2363 defer googleapi.CloseBody(res)
2364 if err := googleapi.CheckResponse(res); err != nil {
2365 return nil, gensupport.WrapError(err)
2366 }
2367 ret := &SasPortalListLegacyOrganizationsResponse{
2368 ServerResponse: googleapi.ServerResponse{
2369 Header: res.Header,
2370 HTTPStatusCode: res.StatusCode,
2371 },
2372 }
2373 target := &ret
2374 if err := gensupport.DecodeResponse(target, res); err != nil {
2375 return nil, err
2376 }
2377 return ret, nil
2378 }
2379
2380 type CustomersMigrateOrganizationCall struct {
2381 s *Service
2382 sasportalmigrateorganizationrequest *SasPortalMigrateOrganizationRequest
2383 urlParams_ gensupport.URLParams
2384 ctx_ context.Context
2385 header_ http.Header
2386 }
2387
2388
2389
2390
2391
2392 func (r *CustomersService) MigrateOrganization(sasportalmigrateorganizationrequest *SasPortalMigrateOrganizationRequest) *CustomersMigrateOrganizationCall {
2393 c := &CustomersMigrateOrganizationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2394 c.sasportalmigrateorganizationrequest = sasportalmigrateorganizationrequest
2395 return c
2396 }
2397
2398
2399
2400
2401 func (c *CustomersMigrateOrganizationCall) Fields(s ...googleapi.Field) *CustomersMigrateOrganizationCall {
2402 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2403 return c
2404 }
2405
2406
2407 func (c *CustomersMigrateOrganizationCall) Context(ctx context.Context) *CustomersMigrateOrganizationCall {
2408 c.ctx_ = ctx
2409 return c
2410 }
2411
2412
2413
2414 func (c *CustomersMigrateOrganizationCall) Header() http.Header {
2415 if c.header_ == nil {
2416 c.header_ = make(http.Header)
2417 }
2418 return c.header_
2419 }
2420
2421 func (c *CustomersMigrateOrganizationCall) doRequest(alt string) (*http.Response, error) {
2422 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2423 var body io.Reader = nil
2424 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalmigrateorganizationrequest)
2425 if err != nil {
2426 return nil, err
2427 }
2428 c.urlParams_.Set("alt", alt)
2429 c.urlParams_.Set("prettyPrint", "false")
2430 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/customers:migrateOrganization")
2431 urls += "?" + c.urlParams_.Encode()
2432 req, err := http.NewRequest("POST", urls, body)
2433 if err != nil {
2434 return nil, err
2435 }
2436 req.Header = reqHeaders
2437 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2438 }
2439
2440
2441
2442
2443
2444
2445
2446 func (c *CustomersMigrateOrganizationCall) Do(opts ...googleapi.CallOption) (*SasPortalOperation, error) {
2447 gensupport.SetOptions(c.urlParams_, opts...)
2448 res, err := c.doRequest("json")
2449 if res != nil && res.StatusCode == http.StatusNotModified {
2450 if res.Body != nil {
2451 res.Body.Close()
2452 }
2453 return nil, gensupport.WrapError(&googleapi.Error{
2454 Code: res.StatusCode,
2455 Header: res.Header,
2456 })
2457 }
2458 if err != nil {
2459 return nil, err
2460 }
2461 defer googleapi.CloseBody(res)
2462 if err := googleapi.CheckResponse(res); err != nil {
2463 return nil, gensupport.WrapError(err)
2464 }
2465 ret := &SasPortalOperation{
2466 ServerResponse: googleapi.ServerResponse{
2467 Header: res.Header,
2468 HTTPStatusCode: res.StatusCode,
2469 },
2470 }
2471 target := &ret
2472 if err := gensupport.DecodeResponse(target, res); err != nil {
2473 return nil, err
2474 }
2475 return ret, nil
2476 }
2477
2478 type CustomersPatchCall struct {
2479 s *Service
2480 name string
2481 sasportalcustomer *SasPortalCustomer
2482 urlParams_ gensupport.URLParams
2483 ctx_ context.Context
2484 header_ http.Header
2485 }
2486
2487
2488
2489
2490 func (r *CustomersService) Patch(name string, sasportalcustomer *SasPortalCustomer) *CustomersPatchCall {
2491 c := &CustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2492 c.name = name
2493 c.sasportalcustomer = sasportalcustomer
2494 return c
2495 }
2496
2497
2498 func (c *CustomersPatchCall) UpdateMask(updateMask string) *CustomersPatchCall {
2499 c.urlParams_.Set("updateMask", updateMask)
2500 return c
2501 }
2502
2503
2504
2505
2506 func (c *CustomersPatchCall) Fields(s ...googleapi.Field) *CustomersPatchCall {
2507 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2508 return c
2509 }
2510
2511
2512 func (c *CustomersPatchCall) Context(ctx context.Context) *CustomersPatchCall {
2513 c.ctx_ = ctx
2514 return c
2515 }
2516
2517
2518
2519 func (c *CustomersPatchCall) Header() http.Header {
2520 if c.header_ == nil {
2521 c.header_ = make(http.Header)
2522 }
2523 return c.header_
2524 }
2525
2526 func (c *CustomersPatchCall) doRequest(alt string) (*http.Response, error) {
2527 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2528 var body io.Reader = nil
2529 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalcustomer)
2530 if err != nil {
2531 return nil, err
2532 }
2533 c.urlParams_.Set("alt", alt)
2534 c.urlParams_.Set("prettyPrint", "false")
2535 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2536 urls += "?" + c.urlParams_.Encode()
2537 req, err := http.NewRequest("PATCH", urls, body)
2538 if err != nil {
2539 return nil, err
2540 }
2541 req.Header = reqHeaders
2542 googleapi.Expand(req.URL, map[string]string{
2543 "name": c.name,
2544 })
2545 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2546 }
2547
2548
2549
2550
2551
2552
2553
2554 func (c *CustomersPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalCustomer, error) {
2555 gensupport.SetOptions(c.urlParams_, opts...)
2556 res, err := c.doRequest("json")
2557 if res != nil && res.StatusCode == http.StatusNotModified {
2558 if res.Body != nil {
2559 res.Body.Close()
2560 }
2561 return nil, gensupport.WrapError(&googleapi.Error{
2562 Code: res.StatusCode,
2563 Header: res.Header,
2564 })
2565 }
2566 if err != nil {
2567 return nil, err
2568 }
2569 defer googleapi.CloseBody(res)
2570 if err := googleapi.CheckResponse(res); err != nil {
2571 return nil, gensupport.WrapError(err)
2572 }
2573 ret := &SasPortalCustomer{
2574 ServerResponse: googleapi.ServerResponse{
2575 Header: res.Header,
2576 HTTPStatusCode: res.StatusCode,
2577 },
2578 }
2579 target := &ret
2580 if err := gensupport.DecodeResponse(target, res); err != nil {
2581 return nil, err
2582 }
2583 return ret, nil
2584 }
2585
2586 type CustomersProvisionDeploymentCall struct {
2587 s *Service
2588 sasportalprovisiondeploymentrequest *SasPortalProvisionDeploymentRequest
2589 urlParams_ gensupport.URLParams
2590 ctx_ context.Context
2591 header_ http.Header
2592 }
2593
2594
2595
2596 func (r *CustomersService) ProvisionDeployment(sasportalprovisiondeploymentrequest *SasPortalProvisionDeploymentRequest) *CustomersProvisionDeploymentCall {
2597 c := &CustomersProvisionDeploymentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2598 c.sasportalprovisiondeploymentrequest = sasportalprovisiondeploymentrequest
2599 return c
2600 }
2601
2602
2603
2604
2605 func (c *CustomersProvisionDeploymentCall) Fields(s ...googleapi.Field) *CustomersProvisionDeploymentCall {
2606 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2607 return c
2608 }
2609
2610
2611 func (c *CustomersProvisionDeploymentCall) Context(ctx context.Context) *CustomersProvisionDeploymentCall {
2612 c.ctx_ = ctx
2613 return c
2614 }
2615
2616
2617
2618 func (c *CustomersProvisionDeploymentCall) Header() http.Header {
2619 if c.header_ == nil {
2620 c.header_ = make(http.Header)
2621 }
2622 return c.header_
2623 }
2624
2625 func (c *CustomersProvisionDeploymentCall) doRequest(alt string) (*http.Response, error) {
2626 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2627 var body io.Reader = nil
2628 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalprovisiondeploymentrequest)
2629 if err != nil {
2630 return nil, err
2631 }
2632 c.urlParams_.Set("alt", alt)
2633 c.urlParams_.Set("prettyPrint", "false")
2634 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/customers:provisionDeployment")
2635 urls += "?" + c.urlParams_.Encode()
2636 req, err := http.NewRequest("POST", urls, body)
2637 if err != nil {
2638 return nil, err
2639 }
2640 req.Header = reqHeaders
2641 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2642 }
2643
2644
2645
2646
2647
2648
2649
2650 func (c *CustomersProvisionDeploymentCall) Do(opts ...googleapi.CallOption) (*SasPortalProvisionDeploymentResponse, error) {
2651 gensupport.SetOptions(c.urlParams_, opts...)
2652 res, err := c.doRequest("json")
2653 if res != nil && res.StatusCode == http.StatusNotModified {
2654 if res.Body != nil {
2655 res.Body.Close()
2656 }
2657 return nil, gensupport.WrapError(&googleapi.Error{
2658 Code: res.StatusCode,
2659 Header: res.Header,
2660 })
2661 }
2662 if err != nil {
2663 return nil, err
2664 }
2665 defer googleapi.CloseBody(res)
2666 if err := googleapi.CheckResponse(res); err != nil {
2667 return nil, gensupport.WrapError(err)
2668 }
2669 ret := &SasPortalProvisionDeploymentResponse{
2670 ServerResponse: googleapi.ServerResponse{
2671 Header: res.Header,
2672 HTTPStatusCode: res.StatusCode,
2673 },
2674 }
2675 target := &ret
2676 if err := gensupport.DecodeResponse(target, res); err != nil {
2677 return nil, err
2678 }
2679 return ret, nil
2680 }
2681
2682 type CustomersSetupSasAnalyticsCall struct {
2683 s *Service
2684 sasportalsetupsasanalyticsrequest *SasPortalSetupSasAnalyticsRequest
2685 urlParams_ gensupport.URLParams
2686 ctx_ context.Context
2687 header_ http.Header
2688 }
2689
2690
2691
2692
2693
2694 func (r *CustomersService) SetupSasAnalytics(sasportalsetupsasanalyticsrequest *SasPortalSetupSasAnalyticsRequest) *CustomersSetupSasAnalyticsCall {
2695 c := &CustomersSetupSasAnalyticsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2696 c.sasportalsetupsasanalyticsrequest = sasportalsetupsasanalyticsrequest
2697 return c
2698 }
2699
2700
2701
2702
2703 func (c *CustomersSetupSasAnalyticsCall) Fields(s ...googleapi.Field) *CustomersSetupSasAnalyticsCall {
2704 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2705 return c
2706 }
2707
2708
2709 func (c *CustomersSetupSasAnalyticsCall) Context(ctx context.Context) *CustomersSetupSasAnalyticsCall {
2710 c.ctx_ = ctx
2711 return c
2712 }
2713
2714
2715
2716 func (c *CustomersSetupSasAnalyticsCall) Header() http.Header {
2717 if c.header_ == nil {
2718 c.header_ = make(http.Header)
2719 }
2720 return c.header_
2721 }
2722
2723 func (c *CustomersSetupSasAnalyticsCall) doRequest(alt string) (*http.Response, error) {
2724 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2725 var body io.Reader = nil
2726 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalsetupsasanalyticsrequest)
2727 if err != nil {
2728 return nil, err
2729 }
2730 c.urlParams_.Set("alt", alt)
2731 c.urlParams_.Set("prettyPrint", "false")
2732 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/customers:setupSasAnalytics")
2733 urls += "?" + c.urlParams_.Encode()
2734 req, err := http.NewRequest("POST", urls, body)
2735 if err != nil {
2736 return nil, err
2737 }
2738 req.Header = reqHeaders
2739 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2740 }
2741
2742
2743
2744
2745
2746
2747
2748 func (c *CustomersSetupSasAnalyticsCall) Do(opts ...googleapi.CallOption) (*SasPortalOperation, error) {
2749 gensupport.SetOptions(c.urlParams_, opts...)
2750 res, err := c.doRequest("json")
2751 if res != nil && res.StatusCode == http.StatusNotModified {
2752 if res.Body != nil {
2753 res.Body.Close()
2754 }
2755 return nil, gensupport.WrapError(&googleapi.Error{
2756 Code: res.StatusCode,
2757 Header: res.Header,
2758 })
2759 }
2760 if err != nil {
2761 return nil, err
2762 }
2763 defer googleapi.CloseBody(res)
2764 if err := googleapi.CheckResponse(res); err != nil {
2765 return nil, gensupport.WrapError(err)
2766 }
2767 ret := &SasPortalOperation{
2768 ServerResponse: googleapi.ServerResponse{
2769 Header: res.Header,
2770 HTTPStatusCode: res.StatusCode,
2771 },
2772 }
2773 target := &ret
2774 if err := gensupport.DecodeResponse(target, res); err != nil {
2775 return nil, err
2776 }
2777 return ret, nil
2778 }
2779
2780 type CustomersDeploymentsCreateCall struct {
2781 s *Service
2782 parent string
2783 sasportaldeployment *SasPortalDeployment
2784 urlParams_ gensupport.URLParams
2785 ctx_ context.Context
2786 header_ http.Header
2787 }
2788
2789
2790
2791
2792 func (r *CustomersDeploymentsService) Create(parent string, sasportaldeployment *SasPortalDeployment) *CustomersDeploymentsCreateCall {
2793 c := &CustomersDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2794 c.parent = parent
2795 c.sasportaldeployment = sasportaldeployment
2796 return c
2797 }
2798
2799
2800
2801
2802 func (c *CustomersDeploymentsCreateCall) Fields(s ...googleapi.Field) *CustomersDeploymentsCreateCall {
2803 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2804 return c
2805 }
2806
2807
2808 func (c *CustomersDeploymentsCreateCall) Context(ctx context.Context) *CustomersDeploymentsCreateCall {
2809 c.ctx_ = ctx
2810 return c
2811 }
2812
2813
2814
2815 func (c *CustomersDeploymentsCreateCall) Header() http.Header {
2816 if c.header_ == nil {
2817 c.header_ = make(http.Header)
2818 }
2819 return c.header_
2820 }
2821
2822 func (c *CustomersDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) {
2823 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2824 var body io.Reader = nil
2825 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldeployment)
2826 if err != nil {
2827 return nil, err
2828 }
2829 c.urlParams_.Set("alt", alt)
2830 c.urlParams_.Set("prettyPrint", "false")
2831 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/deployments")
2832 urls += "?" + c.urlParams_.Encode()
2833 req, err := http.NewRequest("POST", urls, body)
2834 if err != nil {
2835 return nil, err
2836 }
2837 req.Header = reqHeaders
2838 googleapi.Expand(req.URL, map[string]string{
2839 "parent": c.parent,
2840 })
2841 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2842 }
2843
2844
2845
2846
2847
2848
2849
2850 func (c *CustomersDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDeployment, error) {
2851 gensupport.SetOptions(c.urlParams_, opts...)
2852 res, err := c.doRequest("json")
2853 if res != nil && res.StatusCode == http.StatusNotModified {
2854 if res.Body != nil {
2855 res.Body.Close()
2856 }
2857 return nil, gensupport.WrapError(&googleapi.Error{
2858 Code: res.StatusCode,
2859 Header: res.Header,
2860 })
2861 }
2862 if err != nil {
2863 return nil, err
2864 }
2865 defer googleapi.CloseBody(res)
2866 if err := googleapi.CheckResponse(res); err != nil {
2867 return nil, gensupport.WrapError(err)
2868 }
2869 ret := &SasPortalDeployment{
2870 ServerResponse: googleapi.ServerResponse{
2871 Header: res.Header,
2872 HTTPStatusCode: res.StatusCode,
2873 },
2874 }
2875 target := &ret
2876 if err := gensupport.DecodeResponse(target, res); err != nil {
2877 return nil, err
2878 }
2879 return ret, nil
2880 }
2881
2882 type CustomersDeploymentsDeleteCall struct {
2883 s *Service
2884 name string
2885 urlParams_ gensupport.URLParams
2886 ctx_ context.Context
2887 header_ http.Header
2888 }
2889
2890
2891
2892
2893 func (r *CustomersDeploymentsService) Delete(name string) *CustomersDeploymentsDeleteCall {
2894 c := &CustomersDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2895 c.name = name
2896 return c
2897 }
2898
2899
2900
2901
2902 func (c *CustomersDeploymentsDeleteCall) Fields(s ...googleapi.Field) *CustomersDeploymentsDeleteCall {
2903 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2904 return c
2905 }
2906
2907
2908 func (c *CustomersDeploymentsDeleteCall) Context(ctx context.Context) *CustomersDeploymentsDeleteCall {
2909 c.ctx_ = ctx
2910 return c
2911 }
2912
2913
2914
2915 func (c *CustomersDeploymentsDeleteCall) Header() http.Header {
2916 if c.header_ == nil {
2917 c.header_ = make(http.Header)
2918 }
2919 return c.header_
2920 }
2921
2922 func (c *CustomersDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
2923 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2924 var body io.Reader = nil
2925 c.urlParams_.Set("alt", alt)
2926 c.urlParams_.Set("prettyPrint", "false")
2927 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2928 urls += "?" + c.urlParams_.Encode()
2929 req, err := http.NewRequest("DELETE", urls, body)
2930 if err != nil {
2931 return nil, err
2932 }
2933 req.Header = reqHeaders
2934 googleapi.Expand(req.URL, map[string]string{
2935 "name": c.name,
2936 })
2937 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2938 }
2939
2940
2941
2942
2943
2944
2945 func (c *CustomersDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty, error) {
2946 gensupport.SetOptions(c.urlParams_, opts...)
2947 res, err := c.doRequest("json")
2948 if res != nil && res.StatusCode == http.StatusNotModified {
2949 if res.Body != nil {
2950 res.Body.Close()
2951 }
2952 return nil, gensupport.WrapError(&googleapi.Error{
2953 Code: res.StatusCode,
2954 Header: res.Header,
2955 })
2956 }
2957 if err != nil {
2958 return nil, err
2959 }
2960 defer googleapi.CloseBody(res)
2961 if err := googleapi.CheckResponse(res); err != nil {
2962 return nil, gensupport.WrapError(err)
2963 }
2964 ret := &SasPortalEmpty{
2965 ServerResponse: googleapi.ServerResponse{
2966 Header: res.Header,
2967 HTTPStatusCode: res.StatusCode,
2968 },
2969 }
2970 target := &ret
2971 if err := gensupport.DecodeResponse(target, res); err != nil {
2972 return nil, err
2973 }
2974 return ret, nil
2975 }
2976
2977 type CustomersDeploymentsGetCall struct {
2978 s *Service
2979 name string
2980 urlParams_ gensupport.URLParams
2981 ifNoneMatch_ string
2982 ctx_ context.Context
2983 header_ http.Header
2984 }
2985
2986
2987
2988
2989 func (r *CustomersDeploymentsService) Get(name string) *CustomersDeploymentsGetCall {
2990 c := &CustomersDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2991 c.name = name
2992 return c
2993 }
2994
2995
2996
2997
2998 func (c *CustomersDeploymentsGetCall) Fields(s ...googleapi.Field) *CustomersDeploymentsGetCall {
2999 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3000 return c
3001 }
3002
3003
3004
3005
3006 func (c *CustomersDeploymentsGetCall) IfNoneMatch(entityTag string) *CustomersDeploymentsGetCall {
3007 c.ifNoneMatch_ = entityTag
3008 return c
3009 }
3010
3011
3012 func (c *CustomersDeploymentsGetCall) Context(ctx context.Context) *CustomersDeploymentsGetCall {
3013 c.ctx_ = ctx
3014 return c
3015 }
3016
3017
3018
3019 func (c *CustomersDeploymentsGetCall) Header() http.Header {
3020 if c.header_ == nil {
3021 c.header_ = make(http.Header)
3022 }
3023 return c.header_
3024 }
3025
3026 func (c *CustomersDeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
3027 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3028 if c.ifNoneMatch_ != "" {
3029 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3030 }
3031 var body io.Reader = nil
3032 c.urlParams_.Set("alt", alt)
3033 c.urlParams_.Set("prettyPrint", "false")
3034 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3035 urls += "?" + c.urlParams_.Encode()
3036 req, err := http.NewRequest("GET", urls, body)
3037 if err != nil {
3038 return nil, err
3039 }
3040 req.Header = reqHeaders
3041 googleapi.Expand(req.URL, map[string]string{
3042 "name": c.name,
3043 })
3044 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3045 }
3046
3047
3048
3049
3050
3051
3052
3053 func (c *CustomersDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDeployment, error) {
3054 gensupport.SetOptions(c.urlParams_, opts...)
3055 res, err := c.doRequest("json")
3056 if res != nil && res.StatusCode == http.StatusNotModified {
3057 if res.Body != nil {
3058 res.Body.Close()
3059 }
3060 return nil, gensupport.WrapError(&googleapi.Error{
3061 Code: res.StatusCode,
3062 Header: res.Header,
3063 })
3064 }
3065 if err != nil {
3066 return nil, err
3067 }
3068 defer googleapi.CloseBody(res)
3069 if err := googleapi.CheckResponse(res); err != nil {
3070 return nil, gensupport.WrapError(err)
3071 }
3072 ret := &SasPortalDeployment{
3073 ServerResponse: googleapi.ServerResponse{
3074 Header: res.Header,
3075 HTTPStatusCode: res.StatusCode,
3076 },
3077 }
3078 target := &ret
3079 if err := gensupport.DecodeResponse(target, res); err != nil {
3080 return nil, err
3081 }
3082 return ret, nil
3083 }
3084
3085 type CustomersDeploymentsListCall struct {
3086 s *Service
3087 parent string
3088 urlParams_ gensupport.URLParams
3089 ifNoneMatch_ string
3090 ctx_ context.Context
3091 header_ http.Header
3092 }
3093
3094
3095
3096
3097
3098 func (r *CustomersDeploymentsService) List(parent string) *CustomersDeploymentsListCall {
3099 c := &CustomersDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3100 c.parent = parent
3101 return c
3102 }
3103
3104
3105
3106
3107
3108 func (c *CustomersDeploymentsListCall) Filter(filter string) *CustomersDeploymentsListCall {
3109 c.urlParams_.Set("filter", filter)
3110 return c
3111 }
3112
3113
3114
3115 func (c *CustomersDeploymentsListCall) PageSize(pageSize int64) *CustomersDeploymentsListCall {
3116 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3117 return c
3118 }
3119
3120
3121
3122
3123 func (c *CustomersDeploymentsListCall) PageToken(pageToken string) *CustomersDeploymentsListCall {
3124 c.urlParams_.Set("pageToken", pageToken)
3125 return c
3126 }
3127
3128
3129
3130
3131 func (c *CustomersDeploymentsListCall) Fields(s ...googleapi.Field) *CustomersDeploymentsListCall {
3132 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3133 return c
3134 }
3135
3136
3137
3138
3139 func (c *CustomersDeploymentsListCall) IfNoneMatch(entityTag string) *CustomersDeploymentsListCall {
3140 c.ifNoneMatch_ = entityTag
3141 return c
3142 }
3143
3144
3145 func (c *CustomersDeploymentsListCall) Context(ctx context.Context) *CustomersDeploymentsListCall {
3146 c.ctx_ = ctx
3147 return c
3148 }
3149
3150
3151
3152 func (c *CustomersDeploymentsListCall) Header() http.Header {
3153 if c.header_ == nil {
3154 c.header_ = make(http.Header)
3155 }
3156 return c.header_
3157 }
3158
3159 func (c *CustomersDeploymentsListCall) doRequest(alt string) (*http.Response, error) {
3160 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3161 if c.ifNoneMatch_ != "" {
3162 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3163 }
3164 var body io.Reader = nil
3165 c.urlParams_.Set("alt", alt)
3166 c.urlParams_.Set("prettyPrint", "false")
3167 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/deployments")
3168 urls += "?" + c.urlParams_.Encode()
3169 req, err := http.NewRequest("GET", urls, body)
3170 if err != nil {
3171 return nil, err
3172 }
3173 req.Header = reqHeaders
3174 googleapi.Expand(req.URL, map[string]string{
3175 "parent": c.parent,
3176 })
3177 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3178 }
3179
3180
3181
3182
3183
3184
3185
3186 func (c *CustomersDeploymentsListCall) Do(opts ...googleapi.CallOption) (*SasPortalListDeploymentsResponse, error) {
3187 gensupport.SetOptions(c.urlParams_, opts...)
3188 res, err := c.doRequest("json")
3189 if res != nil && res.StatusCode == http.StatusNotModified {
3190 if res.Body != nil {
3191 res.Body.Close()
3192 }
3193 return nil, gensupport.WrapError(&googleapi.Error{
3194 Code: res.StatusCode,
3195 Header: res.Header,
3196 })
3197 }
3198 if err != nil {
3199 return nil, err
3200 }
3201 defer googleapi.CloseBody(res)
3202 if err := googleapi.CheckResponse(res); err != nil {
3203 return nil, gensupport.WrapError(err)
3204 }
3205 ret := &SasPortalListDeploymentsResponse{
3206 ServerResponse: googleapi.ServerResponse{
3207 Header: res.Header,
3208 HTTPStatusCode: res.StatusCode,
3209 },
3210 }
3211 target := &ret
3212 if err := gensupport.DecodeResponse(target, res); err != nil {
3213 return nil, err
3214 }
3215 return ret, nil
3216 }
3217
3218
3219
3220
3221 func (c *CustomersDeploymentsListCall) Pages(ctx context.Context, f func(*SasPortalListDeploymentsResponse) error) error {
3222 c.ctx_ = ctx
3223 defer c.PageToken(c.urlParams_.Get("pageToken"))
3224 for {
3225 x, err := c.Do()
3226 if err != nil {
3227 return err
3228 }
3229 if err := f(x); err != nil {
3230 return err
3231 }
3232 if x.NextPageToken == "" {
3233 return nil
3234 }
3235 c.PageToken(x.NextPageToken)
3236 }
3237 }
3238
3239 type CustomersDeploymentsMoveCall struct {
3240 s *Service
3241 name string
3242 sasportalmovedeploymentrequest *SasPortalMoveDeploymentRequest
3243 urlParams_ gensupport.URLParams
3244 ctx_ context.Context
3245 header_ http.Header
3246 }
3247
3248
3249
3250
3251 func (r *CustomersDeploymentsService) Move(name string, sasportalmovedeploymentrequest *SasPortalMoveDeploymentRequest) *CustomersDeploymentsMoveCall {
3252 c := &CustomersDeploymentsMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3253 c.name = name
3254 c.sasportalmovedeploymentrequest = sasportalmovedeploymentrequest
3255 return c
3256 }
3257
3258
3259
3260
3261 func (c *CustomersDeploymentsMoveCall) Fields(s ...googleapi.Field) *CustomersDeploymentsMoveCall {
3262 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3263 return c
3264 }
3265
3266
3267 func (c *CustomersDeploymentsMoveCall) Context(ctx context.Context) *CustomersDeploymentsMoveCall {
3268 c.ctx_ = ctx
3269 return c
3270 }
3271
3272
3273
3274 func (c *CustomersDeploymentsMoveCall) Header() http.Header {
3275 if c.header_ == nil {
3276 c.header_ = make(http.Header)
3277 }
3278 return c.header_
3279 }
3280
3281 func (c *CustomersDeploymentsMoveCall) doRequest(alt string) (*http.Response, error) {
3282 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3283 var body io.Reader = nil
3284 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalmovedeploymentrequest)
3285 if err != nil {
3286 return nil, err
3287 }
3288 c.urlParams_.Set("alt", alt)
3289 c.urlParams_.Set("prettyPrint", "false")
3290 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:move")
3291 urls += "?" + c.urlParams_.Encode()
3292 req, err := http.NewRequest("POST", urls, body)
3293 if err != nil {
3294 return nil, err
3295 }
3296 req.Header = reqHeaders
3297 googleapi.Expand(req.URL, map[string]string{
3298 "name": c.name,
3299 })
3300 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3301 }
3302
3303
3304
3305
3306
3307
3308
3309 func (c *CustomersDeploymentsMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOperation, error) {
3310 gensupport.SetOptions(c.urlParams_, opts...)
3311 res, err := c.doRequest("json")
3312 if res != nil && res.StatusCode == http.StatusNotModified {
3313 if res.Body != nil {
3314 res.Body.Close()
3315 }
3316 return nil, gensupport.WrapError(&googleapi.Error{
3317 Code: res.StatusCode,
3318 Header: res.Header,
3319 })
3320 }
3321 if err != nil {
3322 return nil, err
3323 }
3324 defer googleapi.CloseBody(res)
3325 if err := googleapi.CheckResponse(res); err != nil {
3326 return nil, gensupport.WrapError(err)
3327 }
3328 ret := &SasPortalOperation{
3329 ServerResponse: googleapi.ServerResponse{
3330 Header: res.Header,
3331 HTTPStatusCode: res.StatusCode,
3332 },
3333 }
3334 target := &ret
3335 if err := gensupport.DecodeResponse(target, res); err != nil {
3336 return nil, err
3337 }
3338 return ret, nil
3339 }
3340
3341 type CustomersDeploymentsPatchCall struct {
3342 s *Service
3343 name string
3344 sasportaldeployment *SasPortalDeployment
3345 urlParams_ gensupport.URLParams
3346 ctx_ context.Context
3347 header_ http.Header
3348 }
3349
3350
3351
3352
3353 func (r *CustomersDeploymentsService) Patch(name string, sasportaldeployment *SasPortalDeployment) *CustomersDeploymentsPatchCall {
3354 c := &CustomersDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3355 c.name = name
3356 c.sasportaldeployment = sasportaldeployment
3357 return c
3358 }
3359
3360
3361 func (c *CustomersDeploymentsPatchCall) UpdateMask(updateMask string) *CustomersDeploymentsPatchCall {
3362 c.urlParams_.Set("updateMask", updateMask)
3363 return c
3364 }
3365
3366
3367
3368
3369 func (c *CustomersDeploymentsPatchCall) Fields(s ...googleapi.Field) *CustomersDeploymentsPatchCall {
3370 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3371 return c
3372 }
3373
3374
3375 func (c *CustomersDeploymentsPatchCall) Context(ctx context.Context) *CustomersDeploymentsPatchCall {
3376 c.ctx_ = ctx
3377 return c
3378 }
3379
3380
3381
3382 func (c *CustomersDeploymentsPatchCall) Header() http.Header {
3383 if c.header_ == nil {
3384 c.header_ = make(http.Header)
3385 }
3386 return c.header_
3387 }
3388
3389 func (c *CustomersDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
3390 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3391 var body io.Reader = nil
3392 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldeployment)
3393 if err != nil {
3394 return nil, err
3395 }
3396 c.urlParams_.Set("alt", alt)
3397 c.urlParams_.Set("prettyPrint", "false")
3398 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3399 urls += "?" + c.urlParams_.Encode()
3400 req, err := http.NewRequest("PATCH", urls, body)
3401 if err != nil {
3402 return nil, err
3403 }
3404 req.Header = reqHeaders
3405 googleapi.Expand(req.URL, map[string]string{
3406 "name": c.name,
3407 })
3408 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3409 }
3410
3411
3412
3413
3414
3415
3416
3417 func (c *CustomersDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalDeployment, error) {
3418 gensupport.SetOptions(c.urlParams_, opts...)
3419 res, err := c.doRequest("json")
3420 if res != nil && res.StatusCode == http.StatusNotModified {
3421 if res.Body != nil {
3422 res.Body.Close()
3423 }
3424 return nil, gensupport.WrapError(&googleapi.Error{
3425 Code: res.StatusCode,
3426 Header: res.Header,
3427 })
3428 }
3429 if err != nil {
3430 return nil, err
3431 }
3432 defer googleapi.CloseBody(res)
3433 if err := googleapi.CheckResponse(res); err != nil {
3434 return nil, gensupport.WrapError(err)
3435 }
3436 ret := &SasPortalDeployment{
3437 ServerResponse: googleapi.ServerResponse{
3438 Header: res.Header,
3439 HTTPStatusCode: res.StatusCode,
3440 },
3441 }
3442 target := &ret
3443 if err := gensupport.DecodeResponse(target, res); err != nil {
3444 return nil, err
3445 }
3446 return ret, nil
3447 }
3448
3449 type CustomersDeploymentsDevicesCreateCall struct {
3450 s *Service
3451 parent string
3452 sasportaldevice *SasPortalDevice
3453 urlParams_ gensupport.URLParams
3454 ctx_ context.Context
3455 header_ http.Header
3456 }
3457
3458
3459
3460
3461 func (r *CustomersDeploymentsDevicesService) Create(parent string, sasportaldevice *SasPortalDevice) *CustomersDeploymentsDevicesCreateCall {
3462 c := &CustomersDeploymentsDevicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3463 c.parent = parent
3464 c.sasportaldevice = sasportaldevice
3465 return c
3466 }
3467
3468
3469
3470
3471 func (c *CustomersDeploymentsDevicesCreateCall) Fields(s ...googleapi.Field) *CustomersDeploymentsDevicesCreateCall {
3472 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3473 return c
3474 }
3475
3476
3477 func (c *CustomersDeploymentsDevicesCreateCall) Context(ctx context.Context) *CustomersDeploymentsDevicesCreateCall {
3478 c.ctx_ = ctx
3479 return c
3480 }
3481
3482
3483
3484 func (c *CustomersDeploymentsDevicesCreateCall) Header() http.Header {
3485 if c.header_ == nil {
3486 c.header_ = make(http.Header)
3487 }
3488 return c.header_
3489 }
3490
3491 func (c *CustomersDeploymentsDevicesCreateCall) doRequest(alt string) (*http.Response, error) {
3492 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3493 var body io.Reader = nil
3494 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldevice)
3495 if err != nil {
3496 return nil, err
3497 }
3498 c.urlParams_.Set("alt", alt)
3499 c.urlParams_.Set("prettyPrint", "false")
3500 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
3501 urls += "?" + c.urlParams_.Encode()
3502 req, err := http.NewRequest("POST", urls, body)
3503 if err != nil {
3504 return nil, err
3505 }
3506 req.Header = reqHeaders
3507 googleapi.Expand(req.URL, map[string]string{
3508 "parent": c.parent,
3509 })
3510 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3511 }
3512
3513
3514
3515
3516
3517
3518
3519 func (c *CustomersDeploymentsDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
3520 gensupport.SetOptions(c.urlParams_, opts...)
3521 res, err := c.doRequest("json")
3522 if res != nil && res.StatusCode == http.StatusNotModified {
3523 if res.Body != nil {
3524 res.Body.Close()
3525 }
3526 return nil, gensupport.WrapError(&googleapi.Error{
3527 Code: res.StatusCode,
3528 Header: res.Header,
3529 })
3530 }
3531 if err != nil {
3532 return nil, err
3533 }
3534 defer googleapi.CloseBody(res)
3535 if err := googleapi.CheckResponse(res); err != nil {
3536 return nil, gensupport.WrapError(err)
3537 }
3538 ret := &SasPortalDevice{
3539 ServerResponse: googleapi.ServerResponse{
3540 Header: res.Header,
3541 HTTPStatusCode: res.StatusCode,
3542 },
3543 }
3544 target := &ret
3545 if err := gensupport.DecodeResponse(target, res); err != nil {
3546 return nil, err
3547 }
3548 return ret, nil
3549 }
3550
3551 type CustomersDeploymentsDevicesCreateSignedCall struct {
3552 s *Service
3553 parent string
3554 sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest
3555 urlParams_ gensupport.URLParams
3556 ctx_ context.Context
3557 header_ http.Header
3558 }
3559
3560
3561
3562
3563 func (r *CustomersDeploymentsDevicesService) CreateSigned(parent string, sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest) *CustomersDeploymentsDevicesCreateSignedCall {
3564 c := &CustomersDeploymentsDevicesCreateSignedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3565 c.parent = parent
3566 c.sasportalcreatesigneddevicerequest = sasportalcreatesigneddevicerequest
3567 return c
3568 }
3569
3570
3571
3572
3573 func (c *CustomersDeploymentsDevicesCreateSignedCall) Fields(s ...googleapi.Field) *CustomersDeploymentsDevicesCreateSignedCall {
3574 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3575 return c
3576 }
3577
3578
3579 func (c *CustomersDeploymentsDevicesCreateSignedCall) Context(ctx context.Context) *CustomersDeploymentsDevicesCreateSignedCall {
3580 c.ctx_ = ctx
3581 return c
3582 }
3583
3584
3585
3586 func (c *CustomersDeploymentsDevicesCreateSignedCall) Header() http.Header {
3587 if c.header_ == nil {
3588 c.header_ = make(http.Header)
3589 }
3590 return c.header_
3591 }
3592
3593 func (c *CustomersDeploymentsDevicesCreateSignedCall) doRequest(alt string) (*http.Response, error) {
3594 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3595 var body io.Reader = nil
3596 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalcreatesigneddevicerequest)
3597 if err != nil {
3598 return nil, err
3599 }
3600 c.urlParams_.Set("alt", alt)
3601 c.urlParams_.Set("prettyPrint", "false")
3602 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices:createSigned")
3603 urls += "?" + c.urlParams_.Encode()
3604 req, err := http.NewRequest("POST", urls, body)
3605 if err != nil {
3606 return nil, err
3607 }
3608 req.Header = reqHeaders
3609 googleapi.Expand(req.URL, map[string]string{
3610 "parent": c.parent,
3611 })
3612 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3613 }
3614
3615
3616
3617
3618
3619
3620
3621 func (c *CustomersDeploymentsDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
3622 gensupport.SetOptions(c.urlParams_, opts...)
3623 res, err := c.doRequest("json")
3624 if res != nil && res.StatusCode == http.StatusNotModified {
3625 if res.Body != nil {
3626 res.Body.Close()
3627 }
3628 return nil, gensupport.WrapError(&googleapi.Error{
3629 Code: res.StatusCode,
3630 Header: res.Header,
3631 })
3632 }
3633 if err != nil {
3634 return nil, err
3635 }
3636 defer googleapi.CloseBody(res)
3637 if err := googleapi.CheckResponse(res); err != nil {
3638 return nil, gensupport.WrapError(err)
3639 }
3640 ret := &SasPortalDevice{
3641 ServerResponse: googleapi.ServerResponse{
3642 Header: res.Header,
3643 HTTPStatusCode: res.StatusCode,
3644 },
3645 }
3646 target := &ret
3647 if err := gensupport.DecodeResponse(target, res); err != nil {
3648 return nil, err
3649 }
3650 return ret, nil
3651 }
3652
3653 type CustomersDeploymentsDevicesListCall struct {
3654 s *Service
3655 parent string
3656 urlParams_ gensupport.URLParams
3657 ifNoneMatch_ string
3658 ctx_ context.Context
3659 header_ http.Header
3660 }
3661
3662
3663
3664
3665 func (r *CustomersDeploymentsDevicesService) List(parent string) *CustomersDeploymentsDevicesListCall {
3666 c := &CustomersDeploymentsDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3667 c.parent = parent
3668 return c
3669 }
3670
3671
3672
3673
3674
3675 func (c *CustomersDeploymentsDevicesListCall) Filter(filter string) *CustomersDeploymentsDevicesListCall {
3676 c.urlParams_.Set("filter", filter)
3677 return c
3678 }
3679
3680
3681
3682
3683 func (c *CustomersDeploymentsDevicesListCall) PageSize(pageSize int64) *CustomersDeploymentsDevicesListCall {
3684 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3685 return c
3686 }
3687
3688
3689
3690
3691 func (c *CustomersDeploymentsDevicesListCall) PageToken(pageToken string) *CustomersDeploymentsDevicesListCall {
3692 c.urlParams_.Set("pageToken", pageToken)
3693 return c
3694 }
3695
3696
3697
3698
3699 func (c *CustomersDeploymentsDevicesListCall) Fields(s ...googleapi.Field) *CustomersDeploymentsDevicesListCall {
3700 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3701 return c
3702 }
3703
3704
3705
3706
3707 func (c *CustomersDeploymentsDevicesListCall) IfNoneMatch(entityTag string) *CustomersDeploymentsDevicesListCall {
3708 c.ifNoneMatch_ = entityTag
3709 return c
3710 }
3711
3712
3713 func (c *CustomersDeploymentsDevicesListCall) Context(ctx context.Context) *CustomersDeploymentsDevicesListCall {
3714 c.ctx_ = ctx
3715 return c
3716 }
3717
3718
3719
3720 func (c *CustomersDeploymentsDevicesListCall) Header() http.Header {
3721 if c.header_ == nil {
3722 c.header_ = make(http.Header)
3723 }
3724 return c.header_
3725 }
3726
3727 func (c *CustomersDeploymentsDevicesListCall) doRequest(alt string) (*http.Response, error) {
3728 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3729 if c.ifNoneMatch_ != "" {
3730 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3731 }
3732 var body io.Reader = nil
3733 c.urlParams_.Set("alt", alt)
3734 c.urlParams_.Set("prettyPrint", "false")
3735 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
3736 urls += "?" + c.urlParams_.Encode()
3737 req, err := http.NewRequest("GET", urls, body)
3738 if err != nil {
3739 return nil, err
3740 }
3741 req.Header = reqHeaders
3742 googleapi.Expand(req.URL, map[string]string{
3743 "parent": c.parent,
3744 })
3745 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3746 }
3747
3748
3749
3750
3751
3752
3753
3754 func (c *CustomersDeploymentsDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListDevicesResponse, error) {
3755 gensupport.SetOptions(c.urlParams_, opts...)
3756 res, err := c.doRequest("json")
3757 if res != nil && res.StatusCode == http.StatusNotModified {
3758 if res.Body != nil {
3759 res.Body.Close()
3760 }
3761 return nil, gensupport.WrapError(&googleapi.Error{
3762 Code: res.StatusCode,
3763 Header: res.Header,
3764 })
3765 }
3766 if err != nil {
3767 return nil, err
3768 }
3769 defer googleapi.CloseBody(res)
3770 if err := googleapi.CheckResponse(res); err != nil {
3771 return nil, gensupport.WrapError(err)
3772 }
3773 ret := &SasPortalListDevicesResponse{
3774 ServerResponse: googleapi.ServerResponse{
3775 Header: res.Header,
3776 HTTPStatusCode: res.StatusCode,
3777 },
3778 }
3779 target := &ret
3780 if err := gensupport.DecodeResponse(target, res); err != nil {
3781 return nil, err
3782 }
3783 return ret, nil
3784 }
3785
3786
3787
3788
3789 func (c *CustomersDeploymentsDevicesListCall) Pages(ctx context.Context, f func(*SasPortalListDevicesResponse) error) error {
3790 c.ctx_ = ctx
3791 defer c.PageToken(c.urlParams_.Get("pageToken"))
3792 for {
3793 x, err := c.Do()
3794 if err != nil {
3795 return err
3796 }
3797 if err := f(x); err != nil {
3798 return err
3799 }
3800 if x.NextPageToken == "" {
3801 return nil
3802 }
3803 c.PageToken(x.NextPageToken)
3804 }
3805 }
3806
3807 type CustomersDevicesCreateCall struct {
3808 s *Service
3809 parent string
3810 sasportaldevice *SasPortalDevice
3811 urlParams_ gensupport.URLParams
3812 ctx_ context.Context
3813 header_ http.Header
3814 }
3815
3816
3817
3818
3819 func (r *CustomersDevicesService) Create(parent string, sasportaldevice *SasPortalDevice) *CustomersDevicesCreateCall {
3820 c := &CustomersDevicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3821 c.parent = parent
3822 c.sasportaldevice = sasportaldevice
3823 return c
3824 }
3825
3826
3827
3828
3829 func (c *CustomersDevicesCreateCall) Fields(s ...googleapi.Field) *CustomersDevicesCreateCall {
3830 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3831 return c
3832 }
3833
3834
3835 func (c *CustomersDevicesCreateCall) Context(ctx context.Context) *CustomersDevicesCreateCall {
3836 c.ctx_ = ctx
3837 return c
3838 }
3839
3840
3841
3842 func (c *CustomersDevicesCreateCall) Header() http.Header {
3843 if c.header_ == nil {
3844 c.header_ = make(http.Header)
3845 }
3846 return c.header_
3847 }
3848
3849 func (c *CustomersDevicesCreateCall) doRequest(alt string) (*http.Response, error) {
3850 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3851 var body io.Reader = nil
3852 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldevice)
3853 if err != nil {
3854 return nil, err
3855 }
3856 c.urlParams_.Set("alt", alt)
3857 c.urlParams_.Set("prettyPrint", "false")
3858 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
3859 urls += "?" + c.urlParams_.Encode()
3860 req, err := http.NewRequest("POST", urls, body)
3861 if err != nil {
3862 return nil, err
3863 }
3864 req.Header = reqHeaders
3865 googleapi.Expand(req.URL, map[string]string{
3866 "parent": c.parent,
3867 })
3868 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3869 }
3870
3871
3872
3873
3874
3875
3876
3877 func (c *CustomersDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
3878 gensupport.SetOptions(c.urlParams_, opts...)
3879 res, err := c.doRequest("json")
3880 if res != nil && res.StatusCode == http.StatusNotModified {
3881 if res.Body != nil {
3882 res.Body.Close()
3883 }
3884 return nil, gensupport.WrapError(&googleapi.Error{
3885 Code: res.StatusCode,
3886 Header: res.Header,
3887 })
3888 }
3889 if err != nil {
3890 return nil, err
3891 }
3892 defer googleapi.CloseBody(res)
3893 if err := googleapi.CheckResponse(res); err != nil {
3894 return nil, gensupport.WrapError(err)
3895 }
3896 ret := &SasPortalDevice{
3897 ServerResponse: googleapi.ServerResponse{
3898 Header: res.Header,
3899 HTTPStatusCode: res.StatusCode,
3900 },
3901 }
3902 target := &ret
3903 if err := gensupport.DecodeResponse(target, res); err != nil {
3904 return nil, err
3905 }
3906 return ret, nil
3907 }
3908
3909 type CustomersDevicesCreateSignedCall struct {
3910 s *Service
3911 parent string
3912 sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest
3913 urlParams_ gensupport.URLParams
3914 ctx_ context.Context
3915 header_ http.Header
3916 }
3917
3918
3919
3920
3921 func (r *CustomersDevicesService) CreateSigned(parent string, sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest) *CustomersDevicesCreateSignedCall {
3922 c := &CustomersDevicesCreateSignedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3923 c.parent = parent
3924 c.sasportalcreatesigneddevicerequest = sasportalcreatesigneddevicerequest
3925 return c
3926 }
3927
3928
3929
3930
3931 func (c *CustomersDevicesCreateSignedCall) Fields(s ...googleapi.Field) *CustomersDevicesCreateSignedCall {
3932 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3933 return c
3934 }
3935
3936
3937 func (c *CustomersDevicesCreateSignedCall) Context(ctx context.Context) *CustomersDevicesCreateSignedCall {
3938 c.ctx_ = ctx
3939 return c
3940 }
3941
3942
3943
3944 func (c *CustomersDevicesCreateSignedCall) Header() http.Header {
3945 if c.header_ == nil {
3946 c.header_ = make(http.Header)
3947 }
3948 return c.header_
3949 }
3950
3951 func (c *CustomersDevicesCreateSignedCall) doRequest(alt string) (*http.Response, error) {
3952 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3953 var body io.Reader = nil
3954 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalcreatesigneddevicerequest)
3955 if err != nil {
3956 return nil, err
3957 }
3958 c.urlParams_.Set("alt", alt)
3959 c.urlParams_.Set("prettyPrint", "false")
3960 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices:createSigned")
3961 urls += "?" + c.urlParams_.Encode()
3962 req, err := http.NewRequest("POST", urls, body)
3963 if err != nil {
3964 return nil, err
3965 }
3966 req.Header = reqHeaders
3967 googleapi.Expand(req.URL, map[string]string{
3968 "parent": c.parent,
3969 })
3970 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3971 }
3972
3973
3974
3975
3976
3977
3978
3979 func (c *CustomersDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
3980 gensupport.SetOptions(c.urlParams_, opts...)
3981 res, err := c.doRequest("json")
3982 if res != nil && res.StatusCode == http.StatusNotModified {
3983 if res.Body != nil {
3984 res.Body.Close()
3985 }
3986 return nil, gensupport.WrapError(&googleapi.Error{
3987 Code: res.StatusCode,
3988 Header: res.Header,
3989 })
3990 }
3991 if err != nil {
3992 return nil, err
3993 }
3994 defer googleapi.CloseBody(res)
3995 if err := googleapi.CheckResponse(res); err != nil {
3996 return nil, gensupport.WrapError(err)
3997 }
3998 ret := &SasPortalDevice{
3999 ServerResponse: googleapi.ServerResponse{
4000 Header: res.Header,
4001 HTTPStatusCode: res.StatusCode,
4002 },
4003 }
4004 target := &ret
4005 if err := gensupport.DecodeResponse(target, res); err != nil {
4006 return nil, err
4007 }
4008 return ret, nil
4009 }
4010
4011 type CustomersDevicesDeleteCall struct {
4012 s *Service
4013 name string
4014 urlParams_ gensupport.URLParams
4015 ctx_ context.Context
4016 header_ http.Header
4017 }
4018
4019
4020
4021
4022 func (r *CustomersDevicesService) Delete(name string) *CustomersDevicesDeleteCall {
4023 c := &CustomersDevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4024 c.name = name
4025 return c
4026 }
4027
4028
4029
4030
4031 func (c *CustomersDevicesDeleteCall) Fields(s ...googleapi.Field) *CustomersDevicesDeleteCall {
4032 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4033 return c
4034 }
4035
4036
4037 func (c *CustomersDevicesDeleteCall) Context(ctx context.Context) *CustomersDevicesDeleteCall {
4038 c.ctx_ = ctx
4039 return c
4040 }
4041
4042
4043
4044 func (c *CustomersDevicesDeleteCall) Header() http.Header {
4045 if c.header_ == nil {
4046 c.header_ = make(http.Header)
4047 }
4048 return c.header_
4049 }
4050
4051 func (c *CustomersDevicesDeleteCall) doRequest(alt string) (*http.Response, error) {
4052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4053 var body io.Reader = nil
4054 c.urlParams_.Set("alt", alt)
4055 c.urlParams_.Set("prettyPrint", "false")
4056 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4057 urls += "?" + c.urlParams_.Encode()
4058 req, err := http.NewRequest("DELETE", urls, body)
4059 if err != nil {
4060 return nil, err
4061 }
4062 req.Header = reqHeaders
4063 googleapi.Expand(req.URL, map[string]string{
4064 "name": c.name,
4065 })
4066 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4067 }
4068
4069
4070
4071
4072
4073
4074 func (c *CustomersDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty, error) {
4075 gensupport.SetOptions(c.urlParams_, opts...)
4076 res, err := c.doRequest("json")
4077 if res != nil && res.StatusCode == http.StatusNotModified {
4078 if res.Body != nil {
4079 res.Body.Close()
4080 }
4081 return nil, gensupport.WrapError(&googleapi.Error{
4082 Code: res.StatusCode,
4083 Header: res.Header,
4084 })
4085 }
4086 if err != nil {
4087 return nil, err
4088 }
4089 defer googleapi.CloseBody(res)
4090 if err := googleapi.CheckResponse(res); err != nil {
4091 return nil, gensupport.WrapError(err)
4092 }
4093 ret := &SasPortalEmpty{
4094 ServerResponse: googleapi.ServerResponse{
4095 Header: res.Header,
4096 HTTPStatusCode: res.StatusCode,
4097 },
4098 }
4099 target := &ret
4100 if err := gensupport.DecodeResponse(target, res); err != nil {
4101 return nil, err
4102 }
4103 return ret, nil
4104 }
4105
4106 type CustomersDevicesGetCall struct {
4107 s *Service
4108 name string
4109 urlParams_ gensupport.URLParams
4110 ifNoneMatch_ string
4111 ctx_ context.Context
4112 header_ http.Header
4113 }
4114
4115
4116
4117
4118 func (r *CustomersDevicesService) Get(name string) *CustomersDevicesGetCall {
4119 c := &CustomersDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4120 c.name = name
4121 return c
4122 }
4123
4124
4125
4126
4127 func (c *CustomersDevicesGetCall) Fields(s ...googleapi.Field) *CustomersDevicesGetCall {
4128 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4129 return c
4130 }
4131
4132
4133
4134
4135 func (c *CustomersDevicesGetCall) IfNoneMatch(entityTag string) *CustomersDevicesGetCall {
4136 c.ifNoneMatch_ = entityTag
4137 return c
4138 }
4139
4140
4141 func (c *CustomersDevicesGetCall) Context(ctx context.Context) *CustomersDevicesGetCall {
4142 c.ctx_ = ctx
4143 return c
4144 }
4145
4146
4147
4148 func (c *CustomersDevicesGetCall) Header() http.Header {
4149 if c.header_ == nil {
4150 c.header_ = make(http.Header)
4151 }
4152 return c.header_
4153 }
4154
4155 func (c *CustomersDevicesGetCall) doRequest(alt string) (*http.Response, error) {
4156 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4157 if c.ifNoneMatch_ != "" {
4158 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4159 }
4160 var body io.Reader = nil
4161 c.urlParams_.Set("alt", alt)
4162 c.urlParams_.Set("prettyPrint", "false")
4163 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4164 urls += "?" + c.urlParams_.Encode()
4165 req, err := http.NewRequest("GET", urls, body)
4166 if err != nil {
4167 return nil, err
4168 }
4169 req.Header = reqHeaders
4170 googleapi.Expand(req.URL, map[string]string{
4171 "name": c.name,
4172 })
4173 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4174 }
4175
4176
4177
4178
4179
4180
4181
4182 func (c *CustomersDevicesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
4183 gensupport.SetOptions(c.urlParams_, opts...)
4184 res, err := c.doRequest("json")
4185 if res != nil && res.StatusCode == http.StatusNotModified {
4186 if res.Body != nil {
4187 res.Body.Close()
4188 }
4189 return nil, gensupport.WrapError(&googleapi.Error{
4190 Code: res.StatusCode,
4191 Header: res.Header,
4192 })
4193 }
4194 if err != nil {
4195 return nil, err
4196 }
4197 defer googleapi.CloseBody(res)
4198 if err := googleapi.CheckResponse(res); err != nil {
4199 return nil, gensupport.WrapError(err)
4200 }
4201 ret := &SasPortalDevice{
4202 ServerResponse: googleapi.ServerResponse{
4203 Header: res.Header,
4204 HTTPStatusCode: res.StatusCode,
4205 },
4206 }
4207 target := &ret
4208 if err := gensupport.DecodeResponse(target, res); err != nil {
4209 return nil, err
4210 }
4211 return ret, nil
4212 }
4213
4214 type CustomersDevicesListCall struct {
4215 s *Service
4216 parent string
4217 urlParams_ gensupport.URLParams
4218 ifNoneMatch_ string
4219 ctx_ context.Context
4220 header_ http.Header
4221 }
4222
4223
4224
4225
4226 func (r *CustomersDevicesService) List(parent string) *CustomersDevicesListCall {
4227 c := &CustomersDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4228 c.parent = parent
4229 return c
4230 }
4231
4232
4233
4234
4235
4236 func (c *CustomersDevicesListCall) Filter(filter string) *CustomersDevicesListCall {
4237 c.urlParams_.Set("filter", filter)
4238 return c
4239 }
4240
4241
4242
4243
4244 func (c *CustomersDevicesListCall) PageSize(pageSize int64) *CustomersDevicesListCall {
4245 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4246 return c
4247 }
4248
4249
4250
4251
4252 func (c *CustomersDevicesListCall) PageToken(pageToken string) *CustomersDevicesListCall {
4253 c.urlParams_.Set("pageToken", pageToken)
4254 return c
4255 }
4256
4257
4258
4259
4260 func (c *CustomersDevicesListCall) Fields(s ...googleapi.Field) *CustomersDevicesListCall {
4261 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4262 return c
4263 }
4264
4265
4266
4267
4268 func (c *CustomersDevicesListCall) IfNoneMatch(entityTag string) *CustomersDevicesListCall {
4269 c.ifNoneMatch_ = entityTag
4270 return c
4271 }
4272
4273
4274 func (c *CustomersDevicesListCall) Context(ctx context.Context) *CustomersDevicesListCall {
4275 c.ctx_ = ctx
4276 return c
4277 }
4278
4279
4280
4281 func (c *CustomersDevicesListCall) Header() http.Header {
4282 if c.header_ == nil {
4283 c.header_ = make(http.Header)
4284 }
4285 return c.header_
4286 }
4287
4288 func (c *CustomersDevicesListCall) doRequest(alt string) (*http.Response, error) {
4289 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4290 if c.ifNoneMatch_ != "" {
4291 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4292 }
4293 var body io.Reader = nil
4294 c.urlParams_.Set("alt", alt)
4295 c.urlParams_.Set("prettyPrint", "false")
4296 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
4297 urls += "?" + c.urlParams_.Encode()
4298 req, err := http.NewRequest("GET", urls, body)
4299 if err != nil {
4300 return nil, err
4301 }
4302 req.Header = reqHeaders
4303 googleapi.Expand(req.URL, map[string]string{
4304 "parent": c.parent,
4305 })
4306 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4307 }
4308
4309
4310
4311
4312
4313
4314
4315 func (c *CustomersDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListDevicesResponse, error) {
4316 gensupport.SetOptions(c.urlParams_, opts...)
4317 res, err := c.doRequest("json")
4318 if res != nil && res.StatusCode == http.StatusNotModified {
4319 if res.Body != nil {
4320 res.Body.Close()
4321 }
4322 return nil, gensupport.WrapError(&googleapi.Error{
4323 Code: res.StatusCode,
4324 Header: res.Header,
4325 })
4326 }
4327 if err != nil {
4328 return nil, err
4329 }
4330 defer googleapi.CloseBody(res)
4331 if err := googleapi.CheckResponse(res); err != nil {
4332 return nil, gensupport.WrapError(err)
4333 }
4334 ret := &SasPortalListDevicesResponse{
4335 ServerResponse: googleapi.ServerResponse{
4336 Header: res.Header,
4337 HTTPStatusCode: res.StatusCode,
4338 },
4339 }
4340 target := &ret
4341 if err := gensupport.DecodeResponse(target, res); err != nil {
4342 return nil, err
4343 }
4344 return ret, nil
4345 }
4346
4347
4348
4349
4350 func (c *CustomersDevicesListCall) Pages(ctx context.Context, f func(*SasPortalListDevicesResponse) error) error {
4351 c.ctx_ = ctx
4352 defer c.PageToken(c.urlParams_.Get("pageToken"))
4353 for {
4354 x, err := c.Do()
4355 if err != nil {
4356 return err
4357 }
4358 if err := f(x); err != nil {
4359 return err
4360 }
4361 if x.NextPageToken == "" {
4362 return nil
4363 }
4364 c.PageToken(x.NextPageToken)
4365 }
4366 }
4367
4368 type CustomersDevicesMoveCall struct {
4369 s *Service
4370 name string
4371 sasportalmovedevicerequest *SasPortalMoveDeviceRequest
4372 urlParams_ gensupport.URLParams
4373 ctx_ context.Context
4374 header_ http.Header
4375 }
4376
4377
4378
4379
4380 func (r *CustomersDevicesService) Move(name string, sasportalmovedevicerequest *SasPortalMoveDeviceRequest) *CustomersDevicesMoveCall {
4381 c := &CustomersDevicesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4382 c.name = name
4383 c.sasportalmovedevicerequest = sasportalmovedevicerequest
4384 return c
4385 }
4386
4387
4388
4389
4390 func (c *CustomersDevicesMoveCall) Fields(s ...googleapi.Field) *CustomersDevicesMoveCall {
4391 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4392 return c
4393 }
4394
4395
4396 func (c *CustomersDevicesMoveCall) Context(ctx context.Context) *CustomersDevicesMoveCall {
4397 c.ctx_ = ctx
4398 return c
4399 }
4400
4401
4402
4403 func (c *CustomersDevicesMoveCall) Header() http.Header {
4404 if c.header_ == nil {
4405 c.header_ = make(http.Header)
4406 }
4407 return c.header_
4408 }
4409
4410 func (c *CustomersDevicesMoveCall) doRequest(alt string) (*http.Response, error) {
4411 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4412 var body io.Reader = nil
4413 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalmovedevicerequest)
4414 if err != nil {
4415 return nil, err
4416 }
4417 c.urlParams_.Set("alt", alt)
4418 c.urlParams_.Set("prettyPrint", "false")
4419 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:move")
4420 urls += "?" + c.urlParams_.Encode()
4421 req, err := http.NewRequest("POST", urls, body)
4422 if err != nil {
4423 return nil, err
4424 }
4425 req.Header = reqHeaders
4426 googleapi.Expand(req.URL, map[string]string{
4427 "name": c.name,
4428 })
4429 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4430 }
4431
4432
4433
4434
4435
4436
4437
4438 func (c *CustomersDevicesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOperation, error) {
4439 gensupport.SetOptions(c.urlParams_, opts...)
4440 res, err := c.doRequest("json")
4441 if res != nil && res.StatusCode == http.StatusNotModified {
4442 if res.Body != nil {
4443 res.Body.Close()
4444 }
4445 return nil, gensupport.WrapError(&googleapi.Error{
4446 Code: res.StatusCode,
4447 Header: res.Header,
4448 })
4449 }
4450 if err != nil {
4451 return nil, err
4452 }
4453 defer googleapi.CloseBody(res)
4454 if err := googleapi.CheckResponse(res); err != nil {
4455 return nil, gensupport.WrapError(err)
4456 }
4457 ret := &SasPortalOperation{
4458 ServerResponse: googleapi.ServerResponse{
4459 Header: res.Header,
4460 HTTPStatusCode: res.StatusCode,
4461 },
4462 }
4463 target := &ret
4464 if err := gensupport.DecodeResponse(target, res); err != nil {
4465 return nil, err
4466 }
4467 return ret, nil
4468 }
4469
4470 type CustomersDevicesPatchCall struct {
4471 s *Service
4472 name string
4473 sasportaldevice *SasPortalDevice
4474 urlParams_ gensupport.URLParams
4475 ctx_ context.Context
4476 header_ http.Header
4477 }
4478
4479
4480
4481
4482 func (r *CustomersDevicesService) Patch(name string, sasportaldevice *SasPortalDevice) *CustomersDevicesPatchCall {
4483 c := &CustomersDevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4484 c.name = name
4485 c.sasportaldevice = sasportaldevice
4486 return c
4487 }
4488
4489
4490 func (c *CustomersDevicesPatchCall) UpdateMask(updateMask string) *CustomersDevicesPatchCall {
4491 c.urlParams_.Set("updateMask", updateMask)
4492 return c
4493 }
4494
4495
4496
4497
4498 func (c *CustomersDevicesPatchCall) Fields(s ...googleapi.Field) *CustomersDevicesPatchCall {
4499 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4500 return c
4501 }
4502
4503
4504 func (c *CustomersDevicesPatchCall) Context(ctx context.Context) *CustomersDevicesPatchCall {
4505 c.ctx_ = ctx
4506 return c
4507 }
4508
4509
4510
4511 func (c *CustomersDevicesPatchCall) Header() http.Header {
4512 if c.header_ == nil {
4513 c.header_ = make(http.Header)
4514 }
4515 return c.header_
4516 }
4517
4518 func (c *CustomersDevicesPatchCall) doRequest(alt string) (*http.Response, error) {
4519 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4520 var body io.Reader = nil
4521 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldevice)
4522 if err != nil {
4523 return nil, err
4524 }
4525 c.urlParams_.Set("alt", alt)
4526 c.urlParams_.Set("prettyPrint", "false")
4527 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4528 urls += "?" + c.urlParams_.Encode()
4529 req, err := http.NewRequest("PATCH", urls, body)
4530 if err != nil {
4531 return nil, err
4532 }
4533 req.Header = reqHeaders
4534 googleapi.Expand(req.URL, map[string]string{
4535 "name": c.name,
4536 })
4537 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4538 }
4539
4540
4541
4542
4543
4544
4545
4546 func (c *CustomersDevicesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
4547 gensupport.SetOptions(c.urlParams_, opts...)
4548 res, err := c.doRequest("json")
4549 if res != nil && res.StatusCode == http.StatusNotModified {
4550 if res.Body != nil {
4551 res.Body.Close()
4552 }
4553 return nil, gensupport.WrapError(&googleapi.Error{
4554 Code: res.StatusCode,
4555 Header: res.Header,
4556 })
4557 }
4558 if err != nil {
4559 return nil, err
4560 }
4561 defer googleapi.CloseBody(res)
4562 if err := googleapi.CheckResponse(res); err != nil {
4563 return nil, gensupport.WrapError(err)
4564 }
4565 ret := &SasPortalDevice{
4566 ServerResponse: googleapi.ServerResponse{
4567 Header: res.Header,
4568 HTTPStatusCode: res.StatusCode,
4569 },
4570 }
4571 target := &ret
4572 if err := gensupport.DecodeResponse(target, res); err != nil {
4573 return nil, err
4574 }
4575 return ret, nil
4576 }
4577
4578 type CustomersDevicesSignDeviceCall struct {
4579 s *Service
4580 name string
4581 sasportalsigndevicerequest *SasPortalSignDeviceRequest
4582 urlParams_ gensupport.URLParams
4583 ctx_ context.Context
4584 header_ http.Header
4585 }
4586
4587
4588
4589
4590 func (r *CustomersDevicesService) SignDevice(name string, sasportalsigndevicerequest *SasPortalSignDeviceRequest) *CustomersDevicesSignDeviceCall {
4591 c := &CustomersDevicesSignDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4592 c.name = name
4593 c.sasportalsigndevicerequest = sasportalsigndevicerequest
4594 return c
4595 }
4596
4597
4598
4599
4600 func (c *CustomersDevicesSignDeviceCall) Fields(s ...googleapi.Field) *CustomersDevicesSignDeviceCall {
4601 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4602 return c
4603 }
4604
4605
4606 func (c *CustomersDevicesSignDeviceCall) Context(ctx context.Context) *CustomersDevicesSignDeviceCall {
4607 c.ctx_ = ctx
4608 return c
4609 }
4610
4611
4612
4613 func (c *CustomersDevicesSignDeviceCall) Header() http.Header {
4614 if c.header_ == nil {
4615 c.header_ = make(http.Header)
4616 }
4617 return c.header_
4618 }
4619
4620 func (c *CustomersDevicesSignDeviceCall) doRequest(alt string) (*http.Response, error) {
4621 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4622 var body io.Reader = nil
4623 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalsigndevicerequest)
4624 if err != nil {
4625 return nil, err
4626 }
4627 c.urlParams_.Set("alt", alt)
4628 c.urlParams_.Set("prettyPrint", "false")
4629 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:signDevice")
4630 urls += "?" + c.urlParams_.Encode()
4631 req, err := http.NewRequest("POST", urls, body)
4632 if err != nil {
4633 return nil, err
4634 }
4635 req.Header = reqHeaders
4636 googleapi.Expand(req.URL, map[string]string{
4637 "name": c.name,
4638 })
4639 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4640 }
4641
4642
4643
4644
4645
4646
4647 func (c *CustomersDevicesSignDeviceCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty, error) {
4648 gensupport.SetOptions(c.urlParams_, opts...)
4649 res, err := c.doRequest("json")
4650 if res != nil && res.StatusCode == http.StatusNotModified {
4651 if res.Body != nil {
4652 res.Body.Close()
4653 }
4654 return nil, gensupport.WrapError(&googleapi.Error{
4655 Code: res.StatusCode,
4656 Header: res.Header,
4657 })
4658 }
4659 if err != nil {
4660 return nil, err
4661 }
4662 defer googleapi.CloseBody(res)
4663 if err := googleapi.CheckResponse(res); err != nil {
4664 return nil, gensupport.WrapError(err)
4665 }
4666 ret := &SasPortalEmpty{
4667 ServerResponse: googleapi.ServerResponse{
4668 Header: res.Header,
4669 HTTPStatusCode: res.StatusCode,
4670 },
4671 }
4672 target := &ret
4673 if err := gensupport.DecodeResponse(target, res); err != nil {
4674 return nil, err
4675 }
4676 return ret, nil
4677 }
4678
4679 type CustomersDevicesUpdateSignedCall struct {
4680 s *Service
4681 name string
4682 sasportalupdatesigneddevicerequest *SasPortalUpdateSignedDeviceRequest
4683 urlParams_ gensupport.URLParams
4684 ctx_ context.Context
4685 header_ http.Header
4686 }
4687
4688
4689
4690
4691 func (r *CustomersDevicesService) UpdateSigned(name string, sasportalupdatesigneddevicerequest *SasPortalUpdateSignedDeviceRequest) *CustomersDevicesUpdateSignedCall {
4692 c := &CustomersDevicesUpdateSignedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4693 c.name = name
4694 c.sasportalupdatesigneddevicerequest = sasportalupdatesigneddevicerequest
4695 return c
4696 }
4697
4698
4699
4700
4701 func (c *CustomersDevicesUpdateSignedCall) Fields(s ...googleapi.Field) *CustomersDevicesUpdateSignedCall {
4702 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4703 return c
4704 }
4705
4706
4707 func (c *CustomersDevicesUpdateSignedCall) Context(ctx context.Context) *CustomersDevicesUpdateSignedCall {
4708 c.ctx_ = ctx
4709 return c
4710 }
4711
4712
4713
4714 func (c *CustomersDevicesUpdateSignedCall) Header() http.Header {
4715 if c.header_ == nil {
4716 c.header_ = make(http.Header)
4717 }
4718 return c.header_
4719 }
4720
4721 func (c *CustomersDevicesUpdateSignedCall) doRequest(alt string) (*http.Response, error) {
4722 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4723 var body io.Reader = nil
4724 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalupdatesigneddevicerequest)
4725 if err != nil {
4726 return nil, err
4727 }
4728 c.urlParams_.Set("alt", alt)
4729 c.urlParams_.Set("prettyPrint", "false")
4730 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:updateSigned")
4731 urls += "?" + c.urlParams_.Encode()
4732 req, err := http.NewRequest("PATCH", urls, body)
4733 if err != nil {
4734 return nil, err
4735 }
4736 req.Header = reqHeaders
4737 googleapi.Expand(req.URL, map[string]string{
4738 "name": c.name,
4739 })
4740 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4741 }
4742
4743
4744
4745
4746
4747
4748
4749 func (c *CustomersDevicesUpdateSignedCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
4750 gensupport.SetOptions(c.urlParams_, opts...)
4751 res, err := c.doRequest("json")
4752 if res != nil && res.StatusCode == http.StatusNotModified {
4753 if res.Body != nil {
4754 res.Body.Close()
4755 }
4756 return nil, gensupport.WrapError(&googleapi.Error{
4757 Code: res.StatusCode,
4758 Header: res.Header,
4759 })
4760 }
4761 if err != nil {
4762 return nil, err
4763 }
4764 defer googleapi.CloseBody(res)
4765 if err := googleapi.CheckResponse(res); err != nil {
4766 return nil, gensupport.WrapError(err)
4767 }
4768 ret := &SasPortalDevice{
4769 ServerResponse: googleapi.ServerResponse{
4770 Header: res.Header,
4771 HTTPStatusCode: res.StatusCode,
4772 },
4773 }
4774 target := &ret
4775 if err := gensupport.DecodeResponse(target, res); err != nil {
4776 return nil, err
4777 }
4778 return ret, nil
4779 }
4780
4781 type CustomersNodesCreateCall struct {
4782 s *Service
4783 parent string
4784 sasportalnode *SasPortalNode
4785 urlParams_ gensupport.URLParams
4786 ctx_ context.Context
4787 header_ http.Header
4788 }
4789
4790
4791
4792
4793 func (r *CustomersNodesService) Create(parent string, sasportalnode *SasPortalNode) *CustomersNodesCreateCall {
4794 c := &CustomersNodesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4795 c.parent = parent
4796 c.sasportalnode = sasportalnode
4797 return c
4798 }
4799
4800
4801
4802
4803 func (c *CustomersNodesCreateCall) Fields(s ...googleapi.Field) *CustomersNodesCreateCall {
4804 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4805 return c
4806 }
4807
4808
4809 func (c *CustomersNodesCreateCall) Context(ctx context.Context) *CustomersNodesCreateCall {
4810 c.ctx_ = ctx
4811 return c
4812 }
4813
4814
4815
4816 func (c *CustomersNodesCreateCall) Header() http.Header {
4817 if c.header_ == nil {
4818 c.header_ = make(http.Header)
4819 }
4820 return c.header_
4821 }
4822
4823 func (c *CustomersNodesCreateCall) doRequest(alt string) (*http.Response, error) {
4824 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4825 var body io.Reader = nil
4826 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalnode)
4827 if err != nil {
4828 return nil, err
4829 }
4830 c.urlParams_.Set("alt", alt)
4831 c.urlParams_.Set("prettyPrint", "false")
4832 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/nodes")
4833 urls += "?" + c.urlParams_.Encode()
4834 req, err := http.NewRequest("POST", urls, body)
4835 if err != nil {
4836 return nil, err
4837 }
4838 req.Header = reqHeaders
4839 googleapi.Expand(req.URL, map[string]string{
4840 "parent": c.parent,
4841 })
4842 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4843 }
4844
4845
4846
4847
4848
4849
4850 func (c *CustomersNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) {
4851 gensupport.SetOptions(c.urlParams_, opts...)
4852 res, err := c.doRequest("json")
4853 if res != nil && res.StatusCode == http.StatusNotModified {
4854 if res.Body != nil {
4855 res.Body.Close()
4856 }
4857 return nil, gensupport.WrapError(&googleapi.Error{
4858 Code: res.StatusCode,
4859 Header: res.Header,
4860 })
4861 }
4862 if err != nil {
4863 return nil, err
4864 }
4865 defer googleapi.CloseBody(res)
4866 if err := googleapi.CheckResponse(res); err != nil {
4867 return nil, gensupport.WrapError(err)
4868 }
4869 ret := &SasPortalNode{
4870 ServerResponse: googleapi.ServerResponse{
4871 Header: res.Header,
4872 HTTPStatusCode: res.StatusCode,
4873 },
4874 }
4875 target := &ret
4876 if err := gensupport.DecodeResponse(target, res); err != nil {
4877 return nil, err
4878 }
4879 return ret, nil
4880 }
4881
4882 type CustomersNodesDeleteCall struct {
4883 s *Service
4884 name string
4885 urlParams_ gensupport.URLParams
4886 ctx_ context.Context
4887 header_ http.Header
4888 }
4889
4890
4891
4892
4893 func (r *CustomersNodesService) Delete(name string) *CustomersNodesDeleteCall {
4894 c := &CustomersNodesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4895 c.name = name
4896 return c
4897 }
4898
4899
4900
4901
4902 func (c *CustomersNodesDeleteCall) Fields(s ...googleapi.Field) *CustomersNodesDeleteCall {
4903 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4904 return c
4905 }
4906
4907
4908 func (c *CustomersNodesDeleteCall) Context(ctx context.Context) *CustomersNodesDeleteCall {
4909 c.ctx_ = ctx
4910 return c
4911 }
4912
4913
4914
4915 func (c *CustomersNodesDeleteCall) Header() http.Header {
4916 if c.header_ == nil {
4917 c.header_ = make(http.Header)
4918 }
4919 return c.header_
4920 }
4921
4922 func (c *CustomersNodesDeleteCall) doRequest(alt string) (*http.Response, error) {
4923 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4924 var body io.Reader = nil
4925 c.urlParams_.Set("alt", alt)
4926 c.urlParams_.Set("prettyPrint", "false")
4927 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4928 urls += "?" + c.urlParams_.Encode()
4929 req, err := http.NewRequest("DELETE", urls, body)
4930 if err != nil {
4931 return nil, err
4932 }
4933 req.Header = reqHeaders
4934 googleapi.Expand(req.URL, map[string]string{
4935 "name": c.name,
4936 })
4937 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4938 }
4939
4940
4941
4942
4943
4944
4945 func (c *CustomersNodesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty, error) {
4946 gensupport.SetOptions(c.urlParams_, opts...)
4947 res, err := c.doRequest("json")
4948 if res != nil && res.StatusCode == http.StatusNotModified {
4949 if res.Body != nil {
4950 res.Body.Close()
4951 }
4952 return nil, gensupport.WrapError(&googleapi.Error{
4953 Code: res.StatusCode,
4954 Header: res.Header,
4955 })
4956 }
4957 if err != nil {
4958 return nil, err
4959 }
4960 defer googleapi.CloseBody(res)
4961 if err := googleapi.CheckResponse(res); err != nil {
4962 return nil, gensupport.WrapError(err)
4963 }
4964 ret := &SasPortalEmpty{
4965 ServerResponse: googleapi.ServerResponse{
4966 Header: res.Header,
4967 HTTPStatusCode: res.StatusCode,
4968 },
4969 }
4970 target := &ret
4971 if err := gensupport.DecodeResponse(target, res); err != nil {
4972 return nil, err
4973 }
4974 return ret, nil
4975 }
4976
4977 type CustomersNodesGetCall struct {
4978 s *Service
4979 name string
4980 urlParams_ gensupport.URLParams
4981 ifNoneMatch_ string
4982 ctx_ context.Context
4983 header_ http.Header
4984 }
4985
4986
4987
4988
4989 func (r *CustomersNodesService) Get(name string) *CustomersNodesGetCall {
4990 c := &CustomersNodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4991 c.name = name
4992 return c
4993 }
4994
4995
4996
4997
4998 func (c *CustomersNodesGetCall) Fields(s ...googleapi.Field) *CustomersNodesGetCall {
4999 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5000 return c
5001 }
5002
5003
5004
5005
5006 func (c *CustomersNodesGetCall) IfNoneMatch(entityTag string) *CustomersNodesGetCall {
5007 c.ifNoneMatch_ = entityTag
5008 return c
5009 }
5010
5011
5012 func (c *CustomersNodesGetCall) Context(ctx context.Context) *CustomersNodesGetCall {
5013 c.ctx_ = ctx
5014 return c
5015 }
5016
5017
5018
5019 func (c *CustomersNodesGetCall) Header() http.Header {
5020 if c.header_ == nil {
5021 c.header_ = make(http.Header)
5022 }
5023 return c.header_
5024 }
5025
5026 func (c *CustomersNodesGetCall) doRequest(alt string) (*http.Response, error) {
5027 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5028 if c.ifNoneMatch_ != "" {
5029 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5030 }
5031 var body io.Reader = nil
5032 c.urlParams_.Set("alt", alt)
5033 c.urlParams_.Set("prettyPrint", "false")
5034 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
5035 urls += "?" + c.urlParams_.Encode()
5036 req, err := http.NewRequest("GET", urls, body)
5037 if err != nil {
5038 return nil, err
5039 }
5040 req.Header = reqHeaders
5041 googleapi.Expand(req.URL, map[string]string{
5042 "name": c.name,
5043 })
5044 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5045 }
5046
5047
5048
5049
5050
5051
5052 func (c *CustomersNodesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) {
5053 gensupport.SetOptions(c.urlParams_, opts...)
5054 res, err := c.doRequest("json")
5055 if res != nil && res.StatusCode == http.StatusNotModified {
5056 if res.Body != nil {
5057 res.Body.Close()
5058 }
5059 return nil, gensupport.WrapError(&googleapi.Error{
5060 Code: res.StatusCode,
5061 Header: res.Header,
5062 })
5063 }
5064 if err != nil {
5065 return nil, err
5066 }
5067 defer googleapi.CloseBody(res)
5068 if err := googleapi.CheckResponse(res); err != nil {
5069 return nil, gensupport.WrapError(err)
5070 }
5071 ret := &SasPortalNode{
5072 ServerResponse: googleapi.ServerResponse{
5073 Header: res.Header,
5074 HTTPStatusCode: res.StatusCode,
5075 },
5076 }
5077 target := &ret
5078 if err := gensupport.DecodeResponse(target, res); err != nil {
5079 return nil, err
5080 }
5081 return ret, nil
5082 }
5083
5084 type CustomersNodesListCall struct {
5085 s *Service
5086 parent string
5087 urlParams_ gensupport.URLParams
5088 ifNoneMatch_ string
5089 ctx_ context.Context
5090 header_ http.Header
5091 }
5092
5093
5094
5095
5096 func (r *CustomersNodesService) List(parent string) *CustomersNodesListCall {
5097 c := &CustomersNodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5098 c.parent = parent
5099 return c
5100 }
5101
5102
5103
5104
5105
5106 func (c *CustomersNodesListCall) Filter(filter string) *CustomersNodesListCall {
5107 c.urlParams_.Set("filter", filter)
5108 return c
5109 }
5110
5111
5112
5113 func (c *CustomersNodesListCall) PageSize(pageSize int64) *CustomersNodesListCall {
5114 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5115 return c
5116 }
5117
5118
5119
5120
5121 func (c *CustomersNodesListCall) PageToken(pageToken string) *CustomersNodesListCall {
5122 c.urlParams_.Set("pageToken", pageToken)
5123 return c
5124 }
5125
5126
5127
5128
5129 func (c *CustomersNodesListCall) Fields(s ...googleapi.Field) *CustomersNodesListCall {
5130 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5131 return c
5132 }
5133
5134
5135
5136
5137 func (c *CustomersNodesListCall) IfNoneMatch(entityTag string) *CustomersNodesListCall {
5138 c.ifNoneMatch_ = entityTag
5139 return c
5140 }
5141
5142
5143 func (c *CustomersNodesListCall) Context(ctx context.Context) *CustomersNodesListCall {
5144 c.ctx_ = ctx
5145 return c
5146 }
5147
5148
5149
5150 func (c *CustomersNodesListCall) Header() http.Header {
5151 if c.header_ == nil {
5152 c.header_ = make(http.Header)
5153 }
5154 return c.header_
5155 }
5156
5157 func (c *CustomersNodesListCall) doRequest(alt string) (*http.Response, error) {
5158 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5159 if c.ifNoneMatch_ != "" {
5160 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5161 }
5162 var body io.Reader = nil
5163 c.urlParams_.Set("alt", alt)
5164 c.urlParams_.Set("prettyPrint", "false")
5165 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/nodes")
5166 urls += "?" + c.urlParams_.Encode()
5167 req, err := http.NewRequest("GET", urls, body)
5168 if err != nil {
5169 return nil, err
5170 }
5171 req.Header = reqHeaders
5172 googleapi.Expand(req.URL, map[string]string{
5173 "parent": c.parent,
5174 })
5175 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5176 }
5177
5178
5179
5180
5181
5182
5183
5184 func (c *CustomersNodesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListNodesResponse, error) {
5185 gensupport.SetOptions(c.urlParams_, opts...)
5186 res, err := c.doRequest("json")
5187 if res != nil && res.StatusCode == http.StatusNotModified {
5188 if res.Body != nil {
5189 res.Body.Close()
5190 }
5191 return nil, gensupport.WrapError(&googleapi.Error{
5192 Code: res.StatusCode,
5193 Header: res.Header,
5194 })
5195 }
5196 if err != nil {
5197 return nil, err
5198 }
5199 defer googleapi.CloseBody(res)
5200 if err := googleapi.CheckResponse(res); err != nil {
5201 return nil, gensupport.WrapError(err)
5202 }
5203 ret := &SasPortalListNodesResponse{
5204 ServerResponse: googleapi.ServerResponse{
5205 Header: res.Header,
5206 HTTPStatusCode: res.StatusCode,
5207 },
5208 }
5209 target := &ret
5210 if err := gensupport.DecodeResponse(target, res); err != nil {
5211 return nil, err
5212 }
5213 return ret, nil
5214 }
5215
5216
5217
5218
5219 func (c *CustomersNodesListCall) Pages(ctx context.Context, f func(*SasPortalListNodesResponse) error) error {
5220 c.ctx_ = ctx
5221 defer c.PageToken(c.urlParams_.Get("pageToken"))
5222 for {
5223 x, err := c.Do()
5224 if err != nil {
5225 return err
5226 }
5227 if err := f(x); err != nil {
5228 return err
5229 }
5230 if x.NextPageToken == "" {
5231 return nil
5232 }
5233 c.PageToken(x.NextPageToken)
5234 }
5235 }
5236
5237 type CustomersNodesMoveCall struct {
5238 s *Service
5239 name string
5240 sasportalmovenoderequest *SasPortalMoveNodeRequest
5241 urlParams_ gensupport.URLParams
5242 ctx_ context.Context
5243 header_ http.Header
5244 }
5245
5246
5247
5248
5249 func (r *CustomersNodesService) Move(name string, sasportalmovenoderequest *SasPortalMoveNodeRequest) *CustomersNodesMoveCall {
5250 c := &CustomersNodesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5251 c.name = name
5252 c.sasportalmovenoderequest = sasportalmovenoderequest
5253 return c
5254 }
5255
5256
5257
5258
5259 func (c *CustomersNodesMoveCall) Fields(s ...googleapi.Field) *CustomersNodesMoveCall {
5260 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5261 return c
5262 }
5263
5264
5265 func (c *CustomersNodesMoveCall) Context(ctx context.Context) *CustomersNodesMoveCall {
5266 c.ctx_ = ctx
5267 return c
5268 }
5269
5270
5271
5272 func (c *CustomersNodesMoveCall) Header() http.Header {
5273 if c.header_ == nil {
5274 c.header_ = make(http.Header)
5275 }
5276 return c.header_
5277 }
5278
5279 func (c *CustomersNodesMoveCall) doRequest(alt string) (*http.Response, error) {
5280 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5281 var body io.Reader = nil
5282 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalmovenoderequest)
5283 if err != nil {
5284 return nil, err
5285 }
5286 c.urlParams_.Set("alt", alt)
5287 c.urlParams_.Set("prettyPrint", "false")
5288 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:move")
5289 urls += "?" + c.urlParams_.Encode()
5290 req, err := http.NewRequest("POST", urls, body)
5291 if err != nil {
5292 return nil, err
5293 }
5294 req.Header = reqHeaders
5295 googleapi.Expand(req.URL, map[string]string{
5296 "name": c.name,
5297 })
5298 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5299 }
5300
5301
5302
5303
5304
5305
5306
5307 func (c *CustomersNodesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOperation, error) {
5308 gensupport.SetOptions(c.urlParams_, opts...)
5309 res, err := c.doRequest("json")
5310 if res != nil && res.StatusCode == http.StatusNotModified {
5311 if res.Body != nil {
5312 res.Body.Close()
5313 }
5314 return nil, gensupport.WrapError(&googleapi.Error{
5315 Code: res.StatusCode,
5316 Header: res.Header,
5317 })
5318 }
5319 if err != nil {
5320 return nil, err
5321 }
5322 defer googleapi.CloseBody(res)
5323 if err := googleapi.CheckResponse(res); err != nil {
5324 return nil, gensupport.WrapError(err)
5325 }
5326 ret := &SasPortalOperation{
5327 ServerResponse: googleapi.ServerResponse{
5328 Header: res.Header,
5329 HTTPStatusCode: res.StatusCode,
5330 },
5331 }
5332 target := &ret
5333 if err := gensupport.DecodeResponse(target, res); err != nil {
5334 return nil, err
5335 }
5336 return ret, nil
5337 }
5338
5339 type CustomersNodesPatchCall struct {
5340 s *Service
5341 name string
5342 sasportalnode *SasPortalNode
5343 urlParams_ gensupport.URLParams
5344 ctx_ context.Context
5345 header_ http.Header
5346 }
5347
5348
5349
5350
5351 func (r *CustomersNodesService) Patch(name string, sasportalnode *SasPortalNode) *CustomersNodesPatchCall {
5352 c := &CustomersNodesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5353 c.name = name
5354 c.sasportalnode = sasportalnode
5355 return c
5356 }
5357
5358
5359 func (c *CustomersNodesPatchCall) UpdateMask(updateMask string) *CustomersNodesPatchCall {
5360 c.urlParams_.Set("updateMask", updateMask)
5361 return c
5362 }
5363
5364
5365
5366
5367 func (c *CustomersNodesPatchCall) Fields(s ...googleapi.Field) *CustomersNodesPatchCall {
5368 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5369 return c
5370 }
5371
5372
5373 func (c *CustomersNodesPatchCall) Context(ctx context.Context) *CustomersNodesPatchCall {
5374 c.ctx_ = ctx
5375 return c
5376 }
5377
5378
5379
5380 func (c *CustomersNodesPatchCall) Header() http.Header {
5381 if c.header_ == nil {
5382 c.header_ = make(http.Header)
5383 }
5384 return c.header_
5385 }
5386
5387 func (c *CustomersNodesPatchCall) doRequest(alt string) (*http.Response, error) {
5388 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5389 var body io.Reader = nil
5390 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalnode)
5391 if err != nil {
5392 return nil, err
5393 }
5394 c.urlParams_.Set("alt", alt)
5395 c.urlParams_.Set("prettyPrint", "false")
5396 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
5397 urls += "?" + c.urlParams_.Encode()
5398 req, err := http.NewRequest("PATCH", urls, body)
5399 if err != nil {
5400 return nil, err
5401 }
5402 req.Header = reqHeaders
5403 googleapi.Expand(req.URL, map[string]string{
5404 "name": c.name,
5405 })
5406 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5407 }
5408
5409
5410
5411
5412
5413
5414 func (c *CustomersNodesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) {
5415 gensupport.SetOptions(c.urlParams_, opts...)
5416 res, err := c.doRequest("json")
5417 if res != nil && res.StatusCode == http.StatusNotModified {
5418 if res.Body != nil {
5419 res.Body.Close()
5420 }
5421 return nil, gensupport.WrapError(&googleapi.Error{
5422 Code: res.StatusCode,
5423 Header: res.Header,
5424 })
5425 }
5426 if err != nil {
5427 return nil, err
5428 }
5429 defer googleapi.CloseBody(res)
5430 if err := googleapi.CheckResponse(res); err != nil {
5431 return nil, gensupport.WrapError(err)
5432 }
5433 ret := &SasPortalNode{
5434 ServerResponse: googleapi.ServerResponse{
5435 Header: res.Header,
5436 HTTPStatusCode: res.StatusCode,
5437 },
5438 }
5439 target := &ret
5440 if err := gensupport.DecodeResponse(target, res); err != nil {
5441 return nil, err
5442 }
5443 return ret, nil
5444 }
5445
5446 type CustomersNodesDeploymentsCreateCall struct {
5447 s *Service
5448 parent string
5449 sasportaldeployment *SasPortalDeployment
5450 urlParams_ gensupport.URLParams
5451 ctx_ context.Context
5452 header_ http.Header
5453 }
5454
5455
5456
5457
5458 func (r *CustomersNodesDeploymentsService) Create(parent string, sasportaldeployment *SasPortalDeployment) *CustomersNodesDeploymentsCreateCall {
5459 c := &CustomersNodesDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5460 c.parent = parent
5461 c.sasportaldeployment = sasportaldeployment
5462 return c
5463 }
5464
5465
5466
5467
5468 func (c *CustomersNodesDeploymentsCreateCall) Fields(s ...googleapi.Field) *CustomersNodesDeploymentsCreateCall {
5469 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5470 return c
5471 }
5472
5473
5474 func (c *CustomersNodesDeploymentsCreateCall) Context(ctx context.Context) *CustomersNodesDeploymentsCreateCall {
5475 c.ctx_ = ctx
5476 return c
5477 }
5478
5479
5480
5481 func (c *CustomersNodesDeploymentsCreateCall) Header() http.Header {
5482 if c.header_ == nil {
5483 c.header_ = make(http.Header)
5484 }
5485 return c.header_
5486 }
5487
5488 func (c *CustomersNodesDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) {
5489 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5490 var body io.Reader = nil
5491 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldeployment)
5492 if err != nil {
5493 return nil, err
5494 }
5495 c.urlParams_.Set("alt", alt)
5496 c.urlParams_.Set("prettyPrint", "false")
5497 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/deployments")
5498 urls += "?" + c.urlParams_.Encode()
5499 req, err := http.NewRequest("POST", urls, body)
5500 if err != nil {
5501 return nil, err
5502 }
5503 req.Header = reqHeaders
5504 googleapi.Expand(req.URL, map[string]string{
5505 "parent": c.parent,
5506 })
5507 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5508 }
5509
5510
5511
5512
5513
5514
5515
5516 func (c *CustomersNodesDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDeployment, error) {
5517 gensupport.SetOptions(c.urlParams_, opts...)
5518 res, err := c.doRequest("json")
5519 if res != nil && res.StatusCode == http.StatusNotModified {
5520 if res.Body != nil {
5521 res.Body.Close()
5522 }
5523 return nil, gensupport.WrapError(&googleapi.Error{
5524 Code: res.StatusCode,
5525 Header: res.Header,
5526 })
5527 }
5528 if err != nil {
5529 return nil, err
5530 }
5531 defer googleapi.CloseBody(res)
5532 if err := googleapi.CheckResponse(res); err != nil {
5533 return nil, gensupport.WrapError(err)
5534 }
5535 ret := &SasPortalDeployment{
5536 ServerResponse: googleapi.ServerResponse{
5537 Header: res.Header,
5538 HTTPStatusCode: res.StatusCode,
5539 },
5540 }
5541 target := &ret
5542 if err := gensupport.DecodeResponse(target, res); err != nil {
5543 return nil, err
5544 }
5545 return ret, nil
5546 }
5547
5548 type CustomersNodesDeploymentsListCall struct {
5549 s *Service
5550 parent string
5551 urlParams_ gensupport.URLParams
5552 ifNoneMatch_ string
5553 ctx_ context.Context
5554 header_ http.Header
5555 }
5556
5557
5558
5559
5560
5561 func (r *CustomersNodesDeploymentsService) List(parent string) *CustomersNodesDeploymentsListCall {
5562 c := &CustomersNodesDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5563 c.parent = parent
5564 return c
5565 }
5566
5567
5568
5569
5570
5571 func (c *CustomersNodesDeploymentsListCall) Filter(filter string) *CustomersNodesDeploymentsListCall {
5572 c.urlParams_.Set("filter", filter)
5573 return c
5574 }
5575
5576
5577
5578 func (c *CustomersNodesDeploymentsListCall) PageSize(pageSize int64) *CustomersNodesDeploymentsListCall {
5579 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5580 return c
5581 }
5582
5583
5584
5585
5586 func (c *CustomersNodesDeploymentsListCall) PageToken(pageToken string) *CustomersNodesDeploymentsListCall {
5587 c.urlParams_.Set("pageToken", pageToken)
5588 return c
5589 }
5590
5591
5592
5593
5594 func (c *CustomersNodesDeploymentsListCall) Fields(s ...googleapi.Field) *CustomersNodesDeploymentsListCall {
5595 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5596 return c
5597 }
5598
5599
5600
5601
5602 func (c *CustomersNodesDeploymentsListCall) IfNoneMatch(entityTag string) *CustomersNodesDeploymentsListCall {
5603 c.ifNoneMatch_ = entityTag
5604 return c
5605 }
5606
5607
5608 func (c *CustomersNodesDeploymentsListCall) Context(ctx context.Context) *CustomersNodesDeploymentsListCall {
5609 c.ctx_ = ctx
5610 return c
5611 }
5612
5613
5614
5615 func (c *CustomersNodesDeploymentsListCall) Header() http.Header {
5616 if c.header_ == nil {
5617 c.header_ = make(http.Header)
5618 }
5619 return c.header_
5620 }
5621
5622 func (c *CustomersNodesDeploymentsListCall) doRequest(alt string) (*http.Response, error) {
5623 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5624 if c.ifNoneMatch_ != "" {
5625 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5626 }
5627 var body io.Reader = nil
5628 c.urlParams_.Set("alt", alt)
5629 c.urlParams_.Set("prettyPrint", "false")
5630 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/deployments")
5631 urls += "?" + c.urlParams_.Encode()
5632 req, err := http.NewRequest("GET", urls, body)
5633 if err != nil {
5634 return nil, err
5635 }
5636 req.Header = reqHeaders
5637 googleapi.Expand(req.URL, map[string]string{
5638 "parent": c.parent,
5639 })
5640 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5641 }
5642
5643
5644
5645
5646
5647
5648
5649 func (c *CustomersNodesDeploymentsListCall) Do(opts ...googleapi.CallOption) (*SasPortalListDeploymentsResponse, error) {
5650 gensupport.SetOptions(c.urlParams_, opts...)
5651 res, err := c.doRequest("json")
5652 if res != nil && res.StatusCode == http.StatusNotModified {
5653 if res.Body != nil {
5654 res.Body.Close()
5655 }
5656 return nil, gensupport.WrapError(&googleapi.Error{
5657 Code: res.StatusCode,
5658 Header: res.Header,
5659 })
5660 }
5661 if err != nil {
5662 return nil, err
5663 }
5664 defer googleapi.CloseBody(res)
5665 if err := googleapi.CheckResponse(res); err != nil {
5666 return nil, gensupport.WrapError(err)
5667 }
5668 ret := &SasPortalListDeploymentsResponse{
5669 ServerResponse: googleapi.ServerResponse{
5670 Header: res.Header,
5671 HTTPStatusCode: res.StatusCode,
5672 },
5673 }
5674 target := &ret
5675 if err := gensupport.DecodeResponse(target, res); err != nil {
5676 return nil, err
5677 }
5678 return ret, nil
5679 }
5680
5681
5682
5683
5684 func (c *CustomersNodesDeploymentsListCall) Pages(ctx context.Context, f func(*SasPortalListDeploymentsResponse) error) error {
5685 c.ctx_ = ctx
5686 defer c.PageToken(c.urlParams_.Get("pageToken"))
5687 for {
5688 x, err := c.Do()
5689 if err != nil {
5690 return err
5691 }
5692 if err := f(x); err != nil {
5693 return err
5694 }
5695 if x.NextPageToken == "" {
5696 return nil
5697 }
5698 c.PageToken(x.NextPageToken)
5699 }
5700 }
5701
5702 type CustomersNodesDevicesCreateCall struct {
5703 s *Service
5704 parent string
5705 sasportaldevice *SasPortalDevice
5706 urlParams_ gensupport.URLParams
5707 ctx_ context.Context
5708 header_ http.Header
5709 }
5710
5711
5712
5713
5714 func (r *CustomersNodesDevicesService) Create(parent string, sasportaldevice *SasPortalDevice) *CustomersNodesDevicesCreateCall {
5715 c := &CustomersNodesDevicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5716 c.parent = parent
5717 c.sasportaldevice = sasportaldevice
5718 return c
5719 }
5720
5721
5722
5723
5724 func (c *CustomersNodesDevicesCreateCall) Fields(s ...googleapi.Field) *CustomersNodesDevicesCreateCall {
5725 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5726 return c
5727 }
5728
5729
5730 func (c *CustomersNodesDevicesCreateCall) Context(ctx context.Context) *CustomersNodesDevicesCreateCall {
5731 c.ctx_ = ctx
5732 return c
5733 }
5734
5735
5736
5737 func (c *CustomersNodesDevicesCreateCall) Header() http.Header {
5738 if c.header_ == nil {
5739 c.header_ = make(http.Header)
5740 }
5741 return c.header_
5742 }
5743
5744 func (c *CustomersNodesDevicesCreateCall) doRequest(alt string) (*http.Response, error) {
5745 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5746 var body io.Reader = nil
5747 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldevice)
5748 if err != nil {
5749 return nil, err
5750 }
5751 c.urlParams_.Set("alt", alt)
5752 c.urlParams_.Set("prettyPrint", "false")
5753 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
5754 urls += "?" + c.urlParams_.Encode()
5755 req, err := http.NewRequest("POST", urls, body)
5756 if err != nil {
5757 return nil, err
5758 }
5759 req.Header = reqHeaders
5760 googleapi.Expand(req.URL, map[string]string{
5761 "parent": c.parent,
5762 })
5763 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5764 }
5765
5766
5767
5768
5769
5770
5771
5772 func (c *CustomersNodesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
5773 gensupport.SetOptions(c.urlParams_, opts...)
5774 res, err := c.doRequest("json")
5775 if res != nil && res.StatusCode == http.StatusNotModified {
5776 if res.Body != nil {
5777 res.Body.Close()
5778 }
5779 return nil, gensupport.WrapError(&googleapi.Error{
5780 Code: res.StatusCode,
5781 Header: res.Header,
5782 })
5783 }
5784 if err != nil {
5785 return nil, err
5786 }
5787 defer googleapi.CloseBody(res)
5788 if err := googleapi.CheckResponse(res); err != nil {
5789 return nil, gensupport.WrapError(err)
5790 }
5791 ret := &SasPortalDevice{
5792 ServerResponse: googleapi.ServerResponse{
5793 Header: res.Header,
5794 HTTPStatusCode: res.StatusCode,
5795 },
5796 }
5797 target := &ret
5798 if err := gensupport.DecodeResponse(target, res); err != nil {
5799 return nil, err
5800 }
5801 return ret, nil
5802 }
5803
5804 type CustomersNodesDevicesCreateSignedCall struct {
5805 s *Service
5806 parent string
5807 sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest
5808 urlParams_ gensupport.URLParams
5809 ctx_ context.Context
5810 header_ http.Header
5811 }
5812
5813
5814
5815
5816 func (r *CustomersNodesDevicesService) CreateSigned(parent string, sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest) *CustomersNodesDevicesCreateSignedCall {
5817 c := &CustomersNodesDevicesCreateSignedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5818 c.parent = parent
5819 c.sasportalcreatesigneddevicerequest = sasportalcreatesigneddevicerequest
5820 return c
5821 }
5822
5823
5824
5825
5826 func (c *CustomersNodesDevicesCreateSignedCall) Fields(s ...googleapi.Field) *CustomersNodesDevicesCreateSignedCall {
5827 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5828 return c
5829 }
5830
5831
5832 func (c *CustomersNodesDevicesCreateSignedCall) Context(ctx context.Context) *CustomersNodesDevicesCreateSignedCall {
5833 c.ctx_ = ctx
5834 return c
5835 }
5836
5837
5838
5839 func (c *CustomersNodesDevicesCreateSignedCall) Header() http.Header {
5840 if c.header_ == nil {
5841 c.header_ = make(http.Header)
5842 }
5843 return c.header_
5844 }
5845
5846 func (c *CustomersNodesDevicesCreateSignedCall) doRequest(alt string) (*http.Response, error) {
5847 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5848 var body io.Reader = nil
5849 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalcreatesigneddevicerequest)
5850 if err != nil {
5851 return nil, err
5852 }
5853 c.urlParams_.Set("alt", alt)
5854 c.urlParams_.Set("prettyPrint", "false")
5855 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices:createSigned")
5856 urls += "?" + c.urlParams_.Encode()
5857 req, err := http.NewRequest("POST", urls, body)
5858 if err != nil {
5859 return nil, err
5860 }
5861 req.Header = reqHeaders
5862 googleapi.Expand(req.URL, map[string]string{
5863 "parent": c.parent,
5864 })
5865 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5866 }
5867
5868
5869
5870
5871
5872
5873
5874 func (c *CustomersNodesDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
5875 gensupport.SetOptions(c.urlParams_, opts...)
5876 res, err := c.doRequest("json")
5877 if res != nil && res.StatusCode == http.StatusNotModified {
5878 if res.Body != nil {
5879 res.Body.Close()
5880 }
5881 return nil, gensupport.WrapError(&googleapi.Error{
5882 Code: res.StatusCode,
5883 Header: res.Header,
5884 })
5885 }
5886 if err != nil {
5887 return nil, err
5888 }
5889 defer googleapi.CloseBody(res)
5890 if err := googleapi.CheckResponse(res); err != nil {
5891 return nil, gensupport.WrapError(err)
5892 }
5893 ret := &SasPortalDevice{
5894 ServerResponse: googleapi.ServerResponse{
5895 Header: res.Header,
5896 HTTPStatusCode: res.StatusCode,
5897 },
5898 }
5899 target := &ret
5900 if err := gensupport.DecodeResponse(target, res); err != nil {
5901 return nil, err
5902 }
5903 return ret, nil
5904 }
5905
5906 type CustomersNodesDevicesListCall struct {
5907 s *Service
5908 parent string
5909 urlParams_ gensupport.URLParams
5910 ifNoneMatch_ string
5911 ctx_ context.Context
5912 header_ http.Header
5913 }
5914
5915
5916
5917
5918 func (r *CustomersNodesDevicesService) List(parent string) *CustomersNodesDevicesListCall {
5919 c := &CustomersNodesDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5920 c.parent = parent
5921 return c
5922 }
5923
5924
5925
5926
5927
5928 func (c *CustomersNodesDevicesListCall) Filter(filter string) *CustomersNodesDevicesListCall {
5929 c.urlParams_.Set("filter", filter)
5930 return c
5931 }
5932
5933
5934
5935
5936 func (c *CustomersNodesDevicesListCall) PageSize(pageSize int64) *CustomersNodesDevicesListCall {
5937 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5938 return c
5939 }
5940
5941
5942
5943
5944 func (c *CustomersNodesDevicesListCall) PageToken(pageToken string) *CustomersNodesDevicesListCall {
5945 c.urlParams_.Set("pageToken", pageToken)
5946 return c
5947 }
5948
5949
5950
5951
5952 func (c *CustomersNodesDevicesListCall) Fields(s ...googleapi.Field) *CustomersNodesDevicesListCall {
5953 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5954 return c
5955 }
5956
5957
5958
5959
5960 func (c *CustomersNodesDevicesListCall) IfNoneMatch(entityTag string) *CustomersNodesDevicesListCall {
5961 c.ifNoneMatch_ = entityTag
5962 return c
5963 }
5964
5965
5966 func (c *CustomersNodesDevicesListCall) Context(ctx context.Context) *CustomersNodesDevicesListCall {
5967 c.ctx_ = ctx
5968 return c
5969 }
5970
5971
5972
5973 func (c *CustomersNodesDevicesListCall) Header() http.Header {
5974 if c.header_ == nil {
5975 c.header_ = make(http.Header)
5976 }
5977 return c.header_
5978 }
5979
5980 func (c *CustomersNodesDevicesListCall) doRequest(alt string) (*http.Response, error) {
5981 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5982 if c.ifNoneMatch_ != "" {
5983 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5984 }
5985 var body io.Reader = nil
5986 c.urlParams_.Set("alt", alt)
5987 c.urlParams_.Set("prettyPrint", "false")
5988 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
5989 urls += "?" + c.urlParams_.Encode()
5990 req, err := http.NewRequest("GET", urls, body)
5991 if err != nil {
5992 return nil, err
5993 }
5994 req.Header = reqHeaders
5995 googleapi.Expand(req.URL, map[string]string{
5996 "parent": c.parent,
5997 })
5998 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5999 }
6000
6001
6002
6003
6004
6005
6006
6007 func (c *CustomersNodesDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListDevicesResponse, error) {
6008 gensupport.SetOptions(c.urlParams_, opts...)
6009 res, err := c.doRequest("json")
6010 if res != nil && res.StatusCode == http.StatusNotModified {
6011 if res.Body != nil {
6012 res.Body.Close()
6013 }
6014 return nil, gensupport.WrapError(&googleapi.Error{
6015 Code: res.StatusCode,
6016 Header: res.Header,
6017 })
6018 }
6019 if err != nil {
6020 return nil, err
6021 }
6022 defer googleapi.CloseBody(res)
6023 if err := googleapi.CheckResponse(res); err != nil {
6024 return nil, gensupport.WrapError(err)
6025 }
6026 ret := &SasPortalListDevicesResponse{
6027 ServerResponse: googleapi.ServerResponse{
6028 Header: res.Header,
6029 HTTPStatusCode: res.StatusCode,
6030 },
6031 }
6032 target := &ret
6033 if err := gensupport.DecodeResponse(target, res); err != nil {
6034 return nil, err
6035 }
6036 return ret, nil
6037 }
6038
6039
6040
6041
6042 func (c *CustomersNodesDevicesListCall) Pages(ctx context.Context, f func(*SasPortalListDevicesResponse) error) error {
6043 c.ctx_ = ctx
6044 defer c.PageToken(c.urlParams_.Get("pageToken"))
6045 for {
6046 x, err := c.Do()
6047 if err != nil {
6048 return err
6049 }
6050 if err := f(x); err != nil {
6051 return err
6052 }
6053 if x.NextPageToken == "" {
6054 return nil
6055 }
6056 c.PageToken(x.NextPageToken)
6057 }
6058 }
6059
6060 type CustomersNodesNodesCreateCall struct {
6061 s *Service
6062 parent string
6063 sasportalnode *SasPortalNode
6064 urlParams_ gensupport.URLParams
6065 ctx_ context.Context
6066 header_ http.Header
6067 }
6068
6069
6070
6071
6072 func (r *CustomersNodesNodesService) Create(parent string, sasportalnode *SasPortalNode) *CustomersNodesNodesCreateCall {
6073 c := &CustomersNodesNodesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6074 c.parent = parent
6075 c.sasportalnode = sasportalnode
6076 return c
6077 }
6078
6079
6080
6081
6082 func (c *CustomersNodesNodesCreateCall) Fields(s ...googleapi.Field) *CustomersNodesNodesCreateCall {
6083 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6084 return c
6085 }
6086
6087
6088 func (c *CustomersNodesNodesCreateCall) Context(ctx context.Context) *CustomersNodesNodesCreateCall {
6089 c.ctx_ = ctx
6090 return c
6091 }
6092
6093
6094
6095 func (c *CustomersNodesNodesCreateCall) Header() http.Header {
6096 if c.header_ == nil {
6097 c.header_ = make(http.Header)
6098 }
6099 return c.header_
6100 }
6101
6102 func (c *CustomersNodesNodesCreateCall) doRequest(alt string) (*http.Response, error) {
6103 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6104 var body io.Reader = nil
6105 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalnode)
6106 if err != nil {
6107 return nil, err
6108 }
6109 c.urlParams_.Set("alt", alt)
6110 c.urlParams_.Set("prettyPrint", "false")
6111 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/nodes")
6112 urls += "?" + c.urlParams_.Encode()
6113 req, err := http.NewRequest("POST", urls, body)
6114 if err != nil {
6115 return nil, err
6116 }
6117 req.Header = reqHeaders
6118 googleapi.Expand(req.URL, map[string]string{
6119 "parent": c.parent,
6120 })
6121 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6122 }
6123
6124
6125
6126
6127
6128
6129 func (c *CustomersNodesNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) {
6130 gensupport.SetOptions(c.urlParams_, opts...)
6131 res, err := c.doRequest("json")
6132 if res != nil && res.StatusCode == http.StatusNotModified {
6133 if res.Body != nil {
6134 res.Body.Close()
6135 }
6136 return nil, gensupport.WrapError(&googleapi.Error{
6137 Code: res.StatusCode,
6138 Header: res.Header,
6139 })
6140 }
6141 if err != nil {
6142 return nil, err
6143 }
6144 defer googleapi.CloseBody(res)
6145 if err := googleapi.CheckResponse(res); err != nil {
6146 return nil, gensupport.WrapError(err)
6147 }
6148 ret := &SasPortalNode{
6149 ServerResponse: googleapi.ServerResponse{
6150 Header: res.Header,
6151 HTTPStatusCode: res.StatusCode,
6152 },
6153 }
6154 target := &ret
6155 if err := gensupport.DecodeResponse(target, res); err != nil {
6156 return nil, err
6157 }
6158 return ret, nil
6159 }
6160
6161 type CustomersNodesNodesListCall struct {
6162 s *Service
6163 parent string
6164 urlParams_ gensupport.URLParams
6165 ifNoneMatch_ string
6166 ctx_ context.Context
6167 header_ http.Header
6168 }
6169
6170
6171
6172
6173 func (r *CustomersNodesNodesService) List(parent string) *CustomersNodesNodesListCall {
6174 c := &CustomersNodesNodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6175 c.parent = parent
6176 return c
6177 }
6178
6179
6180
6181
6182
6183 func (c *CustomersNodesNodesListCall) Filter(filter string) *CustomersNodesNodesListCall {
6184 c.urlParams_.Set("filter", filter)
6185 return c
6186 }
6187
6188
6189
6190 func (c *CustomersNodesNodesListCall) PageSize(pageSize int64) *CustomersNodesNodesListCall {
6191 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6192 return c
6193 }
6194
6195
6196
6197
6198 func (c *CustomersNodesNodesListCall) PageToken(pageToken string) *CustomersNodesNodesListCall {
6199 c.urlParams_.Set("pageToken", pageToken)
6200 return c
6201 }
6202
6203
6204
6205
6206 func (c *CustomersNodesNodesListCall) Fields(s ...googleapi.Field) *CustomersNodesNodesListCall {
6207 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6208 return c
6209 }
6210
6211
6212
6213
6214 func (c *CustomersNodesNodesListCall) IfNoneMatch(entityTag string) *CustomersNodesNodesListCall {
6215 c.ifNoneMatch_ = entityTag
6216 return c
6217 }
6218
6219
6220 func (c *CustomersNodesNodesListCall) Context(ctx context.Context) *CustomersNodesNodesListCall {
6221 c.ctx_ = ctx
6222 return c
6223 }
6224
6225
6226
6227 func (c *CustomersNodesNodesListCall) Header() http.Header {
6228 if c.header_ == nil {
6229 c.header_ = make(http.Header)
6230 }
6231 return c.header_
6232 }
6233
6234 func (c *CustomersNodesNodesListCall) doRequest(alt string) (*http.Response, error) {
6235 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6236 if c.ifNoneMatch_ != "" {
6237 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6238 }
6239 var body io.Reader = nil
6240 c.urlParams_.Set("alt", alt)
6241 c.urlParams_.Set("prettyPrint", "false")
6242 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/nodes")
6243 urls += "?" + c.urlParams_.Encode()
6244 req, err := http.NewRequest("GET", urls, body)
6245 if err != nil {
6246 return nil, err
6247 }
6248 req.Header = reqHeaders
6249 googleapi.Expand(req.URL, map[string]string{
6250 "parent": c.parent,
6251 })
6252 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6253 }
6254
6255
6256
6257
6258
6259
6260
6261 func (c *CustomersNodesNodesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListNodesResponse, error) {
6262 gensupport.SetOptions(c.urlParams_, opts...)
6263 res, err := c.doRequest("json")
6264 if res != nil && res.StatusCode == http.StatusNotModified {
6265 if res.Body != nil {
6266 res.Body.Close()
6267 }
6268 return nil, gensupport.WrapError(&googleapi.Error{
6269 Code: res.StatusCode,
6270 Header: res.Header,
6271 })
6272 }
6273 if err != nil {
6274 return nil, err
6275 }
6276 defer googleapi.CloseBody(res)
6277 if err := googleapi.CheckResponse(res); err != nil {
6278 return nil, gensupport.WrapError(err)
6279 }
6280 ret := &SasPortalListNodesResponse{
6281 ServerResponse: googleapi.ServerResponse{
6282 Header: res.Header,
6283 HTTPStatusCode: res.StatusCode,
6284 },
6285 }
6286 target := &ret
6287 if err := gensupport.DecodeResponse(target, res); err != nil {
6288 return nil, err
6289 }
6290 return ret, nil
6291 }
6292
6293
6294
6295
6296 func (c *CustomersNodesNodesListCall) Pages(ctx context.Context, f func(*SasPortalListNodesResponse) error) error {
6297 c.ctx_ = ctx
6298 defer c.PageToken(c.urlParams_.Get("pageToken"))
6299 for {
6300 x, err := c.Do()
6301 if err != nil {
6302 return err
6303 }
6304 if err := f(x); err != nil {
6305 return err
6306 }
6307 if x.NextPageToken == "" {
6308 return nil
6309 }
6310 c.PageToken(x.NextPageToken)
6311 }
6312 }
6313
6314 type DeploymentsGetCall struct {
6315 s *Service
6316 name string
6317 urlParams_ gensupport.URLParams
6318 ifNoneMatch_ string
6319 ctx_ context.Context
6320 header_ http.Header
6321 }
6322
6323
6324
6325
6326 func (r *DeploymentsService) Get(name string) *DeploymentsGetCall {
6327 c := &DeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6328 c.name = name
6329 return c
6330 }
6331
6332
6333
6334
6335 func (c *DeploymentsGetCall) Fields(s ...googleapi.Field) *DeploymentsGetCall {
6336 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6337 return c
6338 }
6339
6340
6341
6342
6343 func (c *DeploymentsGetCall) IfNoneMatch(entityTag string) *DeploymentsGetCall {
6344 c.ifNoneMatch_ = entityTag
6345 return c
6346 }
6347
6348
6349 func (c *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall {
6350 c.ctx_ = ctx
6351 return c
6352 }
6353
6354
6355
6356 func (c *DeploymentsGetCall) Header() http.Header {
6357 if c.header_ == nil {
6358 c.header_ = make(http.Header)
6359 }
6360 return c.header_
6361 }
6362
6363 func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
6364 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6365 if c.ifNoneMatch_ != "" {
6366 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6367 }
6368 var body io.Reader = nil
6369 c.urlParams_.Set("alt", alt)
6370 c.urlParams_.Set("prettyPrint", "false")
6371 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
6372 urls += "?" + c.urlParams_.Encode()
6373 req, err := http.NewRequest("GET", urls, body)
6374 if err != nil {
6375 return nil, err
6376 }
6377 req.Header = reqHeaders
6378 googleapi.Expand(req.URL, map[string]string{
6379 "name": c.name,
6380 })
6381 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6382 }
6383
6384
6385
6386
6387
6388
6389
6390 func (c *DeploymentsGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDeployment, error) {
6391 gensupport.SetOptions(c.urlParams_, opts...)
6392 res, err := c.doRequest("json")
6393 if res != nil && res.StatusCode == http.StatusNotModified {
6394 if res.Body != nil {
6395 res.Body.Close()
6396 }
6397 return nil, gensupport.WrapError(&googleapi.Error{
6398 Code: res.StatusCode,
6399 Header: res.Header,
6400 })
6401 }
6402 if err != nil {
6403 return nil, err
6404 }
6405 defer googleapi.CloseBody(res)
6406 if err := googleapi.CheckResponse(res); err != nil {
6407 return nil, gensupport.WrapError(err)
6408 }
6409 ret := &SasPortalDeployment{
6410 ServerResponse: googleapi.ServerResponse{
6411 Header: res.Header,
6412 HTTPStatusCode: res.StatusCode,
6413 },
6414 }
6415 target := &ret
6416 if err := gensupport.DecodeResponse(target, res); err != nil {
6417 return nil, err
6418 }
6419 return ret, nil
6420 }
6421
6422 type DeploymentsDevicesDeleteCall struct {
6423 s *Service
6424 name string
6425 urlParams_ gensupport.URLParams
6426 ctx_ context.Context
6427 header_ http.Header
6428 }
6429
6430
6431
6432
6433 func (r *DeploymentsDevicesService) Delete(name string) *DeploymentsDevicesDeleteCall {
6434 c := &DeploymentsDevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6435 c.name = name
6436 return c
6437 }
6438
6439
6440
6441
6442 func (c *DeploymentsDevicesDeleteCall) Fields(s ...googleapi.Field) *DeploymentsDevicesDeleteCall {
6443 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6444 return c
6445 }
6446
6447
6448 func (c *DeploymentsDevicesDeleteCall) Context(ctx context.Context) *DeploymentsDevicesDeleteCall {
6449 c.ctx_ = ctx
6450 return c
6451 }
6452
6453
6454
6455 func (c *DeploymentsDevicesDeleteCall) Header() http.Header {
6456 if c.header_ == nil {
6457 c.header_ = make(http.Header)
6458 }
6459 return c.header_
6460 }
6461
6462 func (c *DeploymentsDevicesDeleteCall) doRequest(alt string) (*http.Response, error) {
6463 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6464 var body io.Reader = nil
6465 c.urlParams_.Set("alt", alt)
6466 c.urlParams_.Set("prettyPrint", "false")
6467 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
6468 urls += "?" + c.urlParams_.Encode()
6469 req, err := http.NewRequest("DELETE", urls, body)
6470 if err != nil {
6471 return nil, err
6472 }
6473 req.Header = reqHeaders
6474 googleapi.Expand(req.URL, map[string]string{
6475 "name": c.name,
6476 })
6477 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6478 }
6479
6480
6481
6482
6483
6484
6485 func (c *DeploymentsDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty, error) {
6486 gensupport.SetOptions(c.urlParams_, opts...)
6487 res, err := c.doRequest("json")
6488 if res != nil && res.StatusCode == http.StatusNotModified {
6489 if res.Body != nil {
6490 res.Body.Close()
6491 }
6492 return nil, gensupport.WrapError(&googleapi.Error{
6493 Code: res.StatusCode,
6494 Header: res.Header,
6495 })
6496 }
6497 if err != nil {
6498 return nil, err
6499 }
6500 defer googleapi.CloseBody(res)
6501 if err := googleapi.CheckResponse(res); err != nil {
6502 return nil, gensupport.WrapError(err)
6503 }
6504 ret := &SasPortalEmpty{
6505 ServerResponse: googleapi.ServerResponse{
6506 Header: res.Header,
6507 HTTPStatusCode: res.StatusCode,
6508 },
6509 }
6510 target := &ret
6511 if err := gensupport.DecodeResponse(target, res); err != nil {
6512 return nil, err
6513 }
6514 return ret, nil
6515 }
6516
6517 type DeploymentsDevicesGetCall struct {
6518 s *Service
6519 name string
6520 urlParams_ gensupport.URLParams
6521 ifNoneMatch_ string
6522 ctx_ context.Context
6523 header_ http.Header
6524 }
6525
6526
6527
6528
6529 func (r *DeploymentsDevicesService) Get(name string) *DeploymentsDevicesGetCall {
6530 c := &DeploymentsDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6531 c.name = name
6532 return c
6533 }
6534
6535
6536
6537
6538 func (c *DeploymentsDevicesGetCall) Fields(s ...googleapi.Field) *DeploymentsDevicesGetCall {
6539 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6540 return c
6541 }
6542
6543
6544
6545
6546 func (c *DeploymentsDevicesGetCall) IfNoneMatch(entityTag string) *DeploymentsDevicesGetCall {
6547 c.ifNoneMatch_ = entityTag
6548 return c
6549 }
6550
6551
6552 func (c *DeploymentsDevicesGetCall) Context(ctx context.Context) *DeploymentsDevicesGetCall {
6553 c.ctx_ = ctx
6554 return c
6555 }
6556
6557
6558
6559 func (c *DeploymentsDevicesGetCall) Header() http.Header {
6560 if c.header_ == nil {
6561 c.header_ = make(http.Header)
6562 }
6563 return c.header_
6564 }
6565
6566 func (c *DeploymentsDevicesGetCall) doRequest(alt string) (*http.Response, error) {
6567 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6568 if c.ifNoneMatch_ != "" {
6569 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6570 }
6571 var body io.Reader = nil
6572 c.urlParams_.Set("alt", alt)
6573 c.urlParams_.Set("prettyPrint", "false")
6574 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
6575 urls += "?" + c.urlParams_.Encode()
6576 req, err := http.NewRequest("GET", urls, body)
6577 if err != nil {
6578 return nil, err
6579 }
6580 req.Header = reqHeaders
6581 googleapi.Expand(req.URL, map[string]string{
6582 "name": c.name,
6583 })
6584 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6585 }
6586
6587
6588
6589
6590
6591
6592
6593 func (c *DeploymentsDevicesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
6594 gensupport.SetOptions(c.urlParams_, opts...)
6595 res, err := c.doRequest("json")
6596 if res != nil && res.StatusCode == http.StatusNotModified {
6597 if res.Body != nil {
6598 res.Body.Close()
6599 }
6600 return nil, gensupport.WrapError(&googleapi.Error{
6601 Code: res.StatusCode,
6602 Header: res.Header,
6603 })
6604 }
6605 if err != nil {
6606 return nil, err
6607 }
6608 defer googleapi.CloseBody(res)
6609 if err := googleapi.CheckResponse(res); err != nil {
6610 return nil, gensupport.WrapError(err)
6611 }
6612 ret := &SasPortalDevice{
6613 ServerResponse: googleapi.ServerResponse{
6614 Header: res.Header,
6615 HTTPStatusCode: res.StatusCode,
6616 },
6617 }
6618 target := &ret
6619 if err := gensupport.DecodeResponse(target, res); err != nil {
6620 return nil, err
6621 }
6622 return ret, nil
6623 }
6624
6625 type DeploymentsDevicesMoveCall struct {
6626 s *Service
6627 name string
6628 sasportalmovedevicerequest *SasPortalMoveDeviceRequest
6629 urlParams_ gensupport.URLParams
6630 ctx_ context.Context
6631 header_ http.Header
6632 }
6633
6634
6635
6636
6637 func (r *DeploymentsDevicesService) Move(name string, sasportalmovedevicerequest *SasPortalMoveDeviceRequest) *DeploymentsDevicesMoveCall {
6638 c := &DeploymentsDevicesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6639 c.name = name
6640 c.sasportalmovedevicerequest = sasportalmovedevicerequest
6641 return c
6642 }
6643
6644
6645
6646
6647 func (c *DeploymentsDevicesMoveCall) Fields(s ...googleapi.Field) *DeploymentsDevicesMoveCall {
6648 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6649 return c
6650 }
6651
6652
6653 func (c *DeploymentsDevicesMoveCall) Context(ctx context.Context) *DeploymentsDevicesMoveCall {
6654 c.ctx_ = ctx
6655 return c
6656 }
6657
6658
6659
6660 func (c *DeploymentsDevicesMoveCall) Header() http.Header {
6661 if c.header_ == nil {
6662 c.header_ = make(http.Header)
6663 }
6664 return c.header_
6665 }
6666
6667 func (c *DeploymentsDevicesMoveCall) doRequest(alt string) (*http.Response, error) {
6668 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6669 var body io.Reader = nil
6670 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalmovedevicerequest)
6671 if err != nil {
6672 return nil, err
6673 }
6674 c.urlParams_.Set("alt", alt)
6675 c.urlParams_.Set("prettyPrint", "false")
6676 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:move")
6677 urls += "?" + c.urlParams_.Encode()
6678 req, err := http.NewRequest("POST", urls, body)
6679 if err != nil {
6680 return nil, err
6681 }
6682 req.Header = reqHeaders
6683 googleapi.Expand(req.URL, map[string]string{
6684 "name": c.name,
6685 })
6686 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6687 }
6688
6689
6690
6691
6692
6693
6694
6695 func (c *DeploymentsDevicesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOperation, error) {
6696 gensupport.SetOptions(c.urlParams_, opts...)
6697 res, err := c.doRequest("json")
6698 if res != nil && res.StatusCode == http.StatusNotModified {
6699 if res.Body != nil {
6700 res.Body.Close()
6701 }
6702 return nil, gensupport.WrapError(&googleapi.Error{
6703 Code: res.StatusCode,
6704 Header: res.Header,
6705 })
6706 }
6707 if err != nil {
6708 return nil, err
6709 }
6710 defer googleapi.CloseBody(res)
6711 if err := googleapi.CheckResponse(res); err != nil {
6712 return nil, gensupport.WrapError(err)
6713 }
6714 ret := &SasPortalOperation{
6715 ServerResponse: googleapi.ServerResponse{
6716 Header: res.Header,
6717 HTTPStatusCode: res.StatusCode,
6718 },
6719 }
6720 target := &ret
6721 if err := gensupport.DecodeResponse(target, res); err != nil {
6722 return nil, err
6723 }
6724 return ret, nil
6725 }
6726
6727 type DeploymentsDevicesPatchCall struct {
6728 s *Service
6729 name string
6730 sasportaldevice *SasPortalDevice
6731 urlParams_ gensupport.URLParams
6732 ctx_ context.Context
6733 header_ http.Header
6734 }
6735
6736
6737
6738
6739 func (r *DeploymentsDevicesService) Patch(name string, sasportaldevice *SasPortalDevice) *DeploymentsDevicesPatchCall {
6740 c := &DeploymentsDevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6741 c.name = name
6742 c.sasportaldevice = sasportaldevice
6743 return c
6744 }
6745
6746
6747 func (c *DeploymentsDevicesPatchCall) UpdateMask(updateMask string) *DeploymentsDevicesPatchCall {
6748 c.urlParams_.Set("updateMask", updateMask)
6749 return c
6750 }
6751
6752
6753
6754
6755 func (c *DeploymentsDevicesPatchCall) Fields(s ...googleapi.Field) *DeploymentsDevicesPatchCall {
6756 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6757 return c
6758 }
6759
6760
6761 func (c *DeploymentsDevicesPatchCall) Context(ctx context.Context) *DeploymentsDevicesPatchCall {
6762 c.ctx_ = ctx
6763 return c
6764 }
6765
6766
6767
6768 func (c *DeploymentsDevicesPatchCall) Header() http.Header {
6769 if c.header_ == nil {
6770 c.header_ = make(http.Header)
6771 }
6772 return c.header_
6773 }
6774
6775 func (c *DeploymentsDevicesPatchCall) doRequest(alt string) (*http.Response, error) {
6776 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6777 var body io.Reader = nil
6778 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldevice)
6779 if err != nil {
6780 return nil, err
6781 }
6782 c.urlParams_.Set("alt", alt)
6783 c.urlParams_.Set("prettyPrint", "false")
6784 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
6785 urls += "?" + c.urlParams_.Encode()
6786 req, err := http.NewRequest("PATCH", urls, body)
6787 if err != nil {
6788 return nil, err
6789 }
6790 req.Header = reqHeaders
6791 googleapi.Expand(req.URL, map[string]string{
6792 "name": c.name,
6793 })
6794 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6795 }
6796
6797
6798
6799
6800
6801
6802
6803 func (c *DeploymentsDevicesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
6804 gensupport.SetOptions(c.urlParams_, opts...)
6805 res, err := c.doRequest("json")
6806 if res != nil && res.StatusCode == http.StatusNotModified {
6807 if res.Body != nil {
6808 res.Body.Close()
6809 }
6810 return nil, gensupport.WrapError(&googleapi.Error{
6811 Code: res.StatusCode,
6812 Header: res.Header,
6813 })
6814 }
6815 if err != nil {
6816 return nil, err
6817 }
6818 defer googleapi.CloseBody(res)
6819 if err := googleapi.CheckResponse(res); err != nil {
6820 return nil, gensupport.WrapError(err)
6821 }
6822 ret := &SasPortalDevice{
6823 ServerResponse: googleapi.ServerResponse{
6824 Header: res.Header,
6825 HTTPStatusCode: res.StatusCode,
6826 },
6827 }
6828 target := &ret
6829 if err := gensupport.DecodeResponse(target, res); err != nil {
6830 return nil, err
6831 }
6832 return ret, nil
6833 }
6834
6835 type DeploymentsDevicesSignDeviceCall struct {
6836 s *Service
6837 name string
6838 sasportalsigndevicerequest *SasPortalSignDeviceRequest
6839 urlParams_ gensupport.URLParams
6840 ctx_ context.Context
6841 header_ http.Header
6842 }
6843
6844
6845
6846
6847 func (r *DeploymentsDevicesService) SignDevice(name string, sasportalsigndevicerequest *SasPortalSignDeviceRequest) *DeploymentsDevicesSignDeviceCall {
6848 c := &DeploymentsDevicesSignDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6849 c.name = name
6850 c.sasportalsigndevicerequest = sasportalsigndevicerequest
6851 return c
6852 }
6853
6854
6855
6856
6857 func (c *DeploymentsDevicesSignDeviceCall) Fields(s ...googleapi.Field) *DeploymentsDevicesSignDeviceCall {
6858 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6859 return c
6860 }
6861
6862
6863 func (c *DeploymentsDevicesSignDeviceCall) Context(ctx context.Context) *DeploymentsDevicesSignDeviceCall {
6864 c.ctx_ = ctx
6865 return c
6866 }
6867
6868
6869
6870 func (c *DeploymentsDevicesSignDeviceCall) Header() http.Header {
6871 if c.header_ == nil {
6872 c.header_ = make(http.Header)
6873 }
6874 return c.header_
6875 }
6876
6877 func (c *DeploymentsDevicesSignDeviceCall) doRequest(alt string) (*http.Response, error) {
6878 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6879 var body io.Reader = nil
6880 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalsigndevicerequest)
6881 if err != nil {
6882 return nil, err
6883 }
6884 c.urlParams_.Set("alt", alt)
6885 c.urlParams_.Set("prettyPrint", "false")
6886 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:signDevice")
6887 urls += "?" + c.urlParams_.Encode()
6888 req, err := http.NewRequest("POST", urls, body)
6889 if err != nil {
6890 return nil, err
6891 }
6892 req.Header = reqHeaders
6893 googleapi.Expand(req.URL, map[string]string{
6894 "name": c.name,
6895 })
6896 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6897 }
6898
6899
6900
6901
6902
6903
6904 func (c *DeploymentsDevicesSignDeviceCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty, error) {
6905 gensupport.SetOptions(c.urlParams_, opts...)
6906 res, err := c.doRequest("json")
6907 if res != nil && res.StatusCode == http.StatusNotModified {
6908 if res.Body != nil {
6909 res.Body.Close()
6910 }
6911 return nil, gensupport.WrapError(&googleapi.Error{
6912 Code: res.StatusCode,
6913 Header: res.Header,
6914 })
6915 }
6916 if err != nil {
6917 return nil, err
6918 }
6919 defer googleapi.CloseBody(res)
6920 if err := googleapi.CheckResponse(res); err != nil {
6921 return nil, gensupport.WrapError(err)
6922 }
6923 ret := &SasPortalEmpty{
6924 ServerResponse: googleapi.ServerResponse{
6925 Header: res.Header,
6926 HTTPStatusCode: res.StatusCode,
6927 },
6928 }
6929 target := &ret
6930 if err := gensupport.DecodeResponse(target, res); err != nil {
6931 return nil, err
6932 }
6933 return ret, nil
6934 }
6935
6936 type DeploymentsDevicesUpdateSignedCall struct {
6937 s *Service
6938 name string
6939 sasportalupdatesigneddevicerequest *SasPortalUpdateSignedDeviceRequest
6940 urlParams_ gensupport.URLParams
6941 ctx_ context.Context
6942 header_ http.Header
6943 }
6944
6945
6946
6947
6948 func (r *DeploymentsDevicesService) UpdateSigned(name string, sasportalupdatesigneddevicerequest *SasPortalUpdateSignedDeviceRequest) *DeploymentsDevicesUpdateSignedCall {
6949 c := &DeploymentsDevicesUpdateSignedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6950 c.name = name
6951 c.sasportalupdatesigneddevicerequest = sasportalupdatesigneddevicerequest
6952 return c
6953 }
6954
6955
6956
6957
6958 func (c *DeploymentsDevicesUpdateSignedCall) Fields(s ...googleapi.Field) *DeploymentsDevicesUpdateSignedCall {
6959 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6960 return c
6961 }
6962
6963
6964 func (c *DeploymentsDevicesUpdateSignedCall) Context(ctx context.Context) *DeploymentsDevicesUpdateSignedCall {
6965 c.ctx_ = ctx
6966 return c
6967 }
6968
6969
6970
6971 func (c *DeploymentsDevicesUpdateSignedCall) Header() http.Header {
6972 if c.header_ == nil {
6973 c.header_ = make(http.Header)
6974 }
6975 return c.header_
6976 }
6977
6978 func (c *DeploymentsDevicesUpdateSignedCall) doRequest(alt string) (*http.Response, error) {
6979 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6980 var body io.Reader = nil
6981 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalupdatesigneddevicerequest)
6982 if err != nil {
6983 return nil, err
6984 }
6985 c.urlParams_.Set("alt", alt)
6986 c.urlParams_.Set("prettyPrint", "false")
6987 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:updateSigned")
6988 urls += "?" + c.urlParams_.Encode()
6989 req, err := http.NewRequest("PATCH", urls, body)
6990 if err != nil {
6991 return nil, err
6992 }
6993 req.Header = reqHeaders
6994 googleapi.Expand(req.URL, map[string]string{
6995 "name": c.name,
6996 })
6997 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6998 }
6999
7000
7001
7002
7003
7004
7005
7006 func (c *DeploymentsDevicesUpdateSignedCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
7007 gensupport.SetOptions(c.urlParams_, opts...)
7008 res, err := c.doRequest("json")
7009 if res != nil && res.StatusCode == http.StatusNotModified {
7010 if res.Body != nil {
7011 res.Body.Close()
7012 }
7013 return nil, gensupport.WrapError(&googleapi.Error{
7014 Code: res.StatusCode,
7015 Header: res.Header,
7016 })
7017 }
7018 if err != nil {
7019 return nil, err
7020 }
7021 defer googleapi.CloseBody(res)
7022 if err := googleapi.CheckResponse(res); err != nil {
7023 return nil, gensupport.WrapError(err)
7024 }
7025 ret := &SasPortalDevice{
7026 ServerResponse: googleapi.ServerResponse{
7027 Header: res.Header,
7028 HTTPStatusCode: res.StatusCode,
7029 },
7030 }
7031 target := &ret
7032 if err := gensupport.DecodeResponse(target, res); err != nil {
7033 return nil, err
7034 }
7035 return ret, nil
7036 }
7037
7038 type InstallerGenerateSecretCall struct {
7039 s *Service
7040 sasportalgeneratesecretrequest *SasPortalGenerateSecretRequest
7041 urlParams_ gensupport.URLParams
7042 ctx_ context.Context
7043 header_ http.Header
7044 }
7045
7046
7047 func (r *InstallerService) GenerateSecret(sasportalgeneratesecretrequest *SasPortalGenerateSecretRequest) *InstallerGenerateSecretCall {
7048 c := &InstallerGenerateSecretCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7049 c.sasportalgeneratesecretrequest = sasportalgeneratesecretrequest
7050 return c
7051 }
7052
7053
7054
7055
7056 func (c *InstallerGenerateSecretCall) Fields(s ...googleapi.Field) *InstallerGenerateSecretCall {
7057 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7058 return c
7059 }
7060
7061
7062 func (c *InstallerGenerateSecretCall) Context(ctx context.Context) *InstallerGenerateSecretCall {
7063 c.ctx_ = ctx
7064 return c
7065 }
7066
7067
7068
7069 func (c *InstallerGenerateSecretCall) Header() http.Header {
7070 if c.header_ == nil {
7071 c.header_ = make(http.Header)
7072 }
7073 return c.header_
7074 }
7075
7076 func (c *InstallerGenerateSecretCall) doRequest(alt string) (*http.Response, error) {
7077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7078 var body io.Reader = nil
7079 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalgeneratesecretrequest)
7080 if err != nil {
7081 return nil, err
7082 }
7083 c.urlParams_.Set("alt", alt)
7084 c.urlParams_.Set("prettyPrint", "false")
7085 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/installer:generateSecret")
7086 urls += "?" + c.urlParams_.Encode()
7087 req, err := http.NewRequest("POST", urls, body)
7088 if err != nil {
7089 return nil, err
7090 }
7091 req.Header = reqHeaders
7092 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7093 }
7094
7095
7096
7097
7098
7099
7100
7101 func (c *InstallerGenerateSecretCall) Do(opts ...googleapi.CallOption) (*SasPortalGenerateSecretResponse, error) {
7102 gensupport.SetOptions(c.urlParams_, opts...)
7103 res, err := c.doRequest("json")
7104 if res != nil && res.StatusCode == http.StatusNotModified {
7105 if res.Body != nil {
7106 res.Body.Close()
7107 }
7108 return nil, gensupport.WrapError(&googleapi.Error{
7109 Code: res.StatusCode,
7110 Header: res.Header,
7111 })
7112 }
7113 if err != nil {
7114 return nil, err
7115 }
7116 defer googleapi.CloseBody(res)
7117 if err := googleapi.CheckResponse(res); err != nil {
7118 return nil, gensupport.WrapError(err)
7119 }
7120 ret := &SasPortalGenerateSecretResponse{
7121 ServerResponse: googleapi.ServerResponse{
7122 Header: res.Header,
7123 HTTPStatusCode: res.StatusCode,
7124 },
7125 }
7126 target := &ret
7127 if err := gensupport.DecodeResponse(target, res); err != nil {
7128 return nil, err
7129 }
7130 return ret, nil
7131 }
7132
7133 type InstallerValidateCall struct {
7134 s *Service
7135 sasportalvalidateinstallerrequest *SasPortalValidateInstallerRequest
7136 urlParams_ gensupport.URLParams
7137 ctx_ context.Context
7138 header_ http.Header
7139 }
7140
7141
7142
7143 func (r *InstallerService) Validate(sasportalvalidateinstallerrequest *SasPortalValidateInstallerRequest) *InstallerValidateCall {
7144 c := &InstallerValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7145 c.sasportalvalidateinstallerrequest = sasportalvalidateinstallerrequest
7146 return c
7147 }
7148
7149
7150
7151
7152 func (c *InstallerValidateCall) Fields(s ...googleapi.Field) *InstallerValidateCall {
7153 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7154 return c
7155 }
7156
7157
7158 func (c *InstallerValidateCall) Context(ctx context.Context) *InstallerValidateCall {
7159 c.ctx_ = ctx
7160 return c
7161 }
7162
7163
7164
7165 func (c *InstallerValidateCall) Header() http.Header {
7166 if c.header_ == nil {
7167 c.header_ = make(http.Header)
7168 }
7169 return c.header_
7170 }
7171
7172 func (c *InstallerValidateCall) doRequest(alt string) (*http.Response, error) {
7173 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7174 var body io.Reader = nil
7175 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalvalidateinstallerrequest)
7176 if err != nil {
7177 return nil, err
7178 }
7179 c.urlParams_.Set("alt", alt)
7180 c.urlParams_.Set("prettyPrint", "false")
7181 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/installer:validate")
7182 urls += "?" + c.urlParams_.Encode()
7183 req, err := http.NewRequest("POST", urls, body)
7184 if err != nil {
7185 return nil, err
7186 }
7187 req.Header = reqHeaders
7188 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7189 }
7190
7191
7192
7193
7194
7195
7196
7197 func (c *InstallerValidateCall) Do(opts ...googleapi.CallOption) (*SasPortalValidateInstallerResponse, error) {
7198 gensupport.SetOptions(c.urlParams_, opts...)
7199 res, err := c.doRequest("json")
7200 if res != nil && res.StatusCode == http.StatusNotModified {
7201 if res.Body != nil {
7202 res.Body.Close()
7203 }
7204 return nil, gensupport.WrapError(&googleapi.Error{
7205 Code: res.StatusCode,
7206 Header: res.Header,
7207 })
7208 }
7209 if err != nil {
7210 return nil, err
7211 }
7212 defer googleapi.CloseBody(res)
7213 if err := googleapi.CheckResponse(res); err != nil {
7214 return nil, gensupport.WrapError(err)
7215 }
7216 ret := &SasPortalValidateInstallerResponse{
7217 ServerResponse: googleapi.ServerResponse{
7218 Header: res.Header,
7219 HTTPStatusCode: res.StatusCode,
7220 },
7221 }
7222 target := &ret
7223 if err := gensupport.DecodeResponse(target, res); err != nil {
7224 return nil, err
7225 }
7226 return ret, nil
7227 }
7228
7229 type NodesGetCall struct {
7230 s *Service
7231 name string
7232 urlParams_ gensupport.URLParams
7233 ifNoneMatch_ string
7234 ctx_ context.Context
7235 header_ http.Header
7236 }
7237
7238
7239
7240
7241 func (r *NodesService) Get(name string) *NodesGetCall {
7242 c := &NodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7243 c.name = name
7244 return c
7245 }
7246
7247
7248
7249
7250 func (c *NodesGetCall) Fields(s ...googleapi.Field) *NodesGetCall {
7251 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7252 return c
7253 }
7254
7255
7256
7257
7258 func (c *NodesGetCall) IfNoneMatch(entityTag string) *NodesGetCall {
7259 c.ifNoneMatch_ = entityTag
7260 return c
7261 }
7262
7263
7264 func (c *NodesGetCall) Context(ctx context.Context) *NodesGetCall {
7265 c.ctx_ = ctx
7266 return c
7267 }
7268
7269
7270
7271 func (c *NodesGetCall) Header() http.Header {
7272 if c.header_ == nil {
7273 c.header_ = make(http.Header)
7274 }
7275 return c.header_
7276 }
7277
7278 func (c *NodesGetCall) doRequest(alt string) (*http.Response, error) {
7279 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7280 if c.ifNoneMatch_ != "" {
7281 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7282 }
7283 var body io.Reader = nil
7284 c.urlParams_.Set("alt", alt)
7285 c.urlParams_.Set("prettyPrint", "false")
7286 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
7287 urls += "?" + c.urlParams_.Encode()
7288 req, err := http.NewRequest("GET", urls, body)
7289 if err != nil {
7290 return nil, err
7291 }
7292 req.Header = reqHeaders
7293 googleapi.Expand(req.URL, map[string]string{
7294 "name": c.name,
7295 })
7296 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7297 }
7298
7299
7300
7301
7302
7303
7304 func (c *NodesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) {
7305 gensupport.SetOptions(c.urlParams_, opts...)
7306 res, err := c.doRequest("json")
7307 if res != nil && res.StatusCode == http.StatusNotModified {
7308 if res.Body != nil {
7309 res.Body.Close()
7310 }
7311 return nil, gensupport.WrapError(&googleapi.Error{
7312 Code: res.StatusCode,
7313 Header: res.Header,
7314 })
7315 }
7316 if err != nil {
7317 return nil, err
7318 }
7319 defer googleapi.CloseBody(res)
7320 if err := googleapi.CheckResponse(res); err != nil {
7321 return nil, gensupport.WrapError(err)
7322 }
7323 ret := &SasPortalNode{
7324 ServerResponse: googleapi.ServerResponse{
7325 Header: res.Header,
7326 HTTPStatusCode: res.StatusCode,
7327 },
7328 }
7329 target := &ret
7330 if err := gensupport.DecodeResponse(target, res); err != nil {
7331 return nil, err
7332 }
7333 return ret, nil
7334 }
7335
7336 type NodesDeploymentsDeleteCall struct {
7337 s *Service
7338 name string
7339 urlParams_ gensupport.URLParams
7340 ctx_ context.Context
7341 header_ http.Header
7342 }
7343
7344
7345
7346
7347 func (r *NodesDeploymentsService) Delete(name string) *NodesDeploymentsDeleteCall {
7348 c := &NodesDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7349 c.name = name
7350 return c
7351 }
7352
7353
7354
7355
7356 func (c *NodesDeploymentsDeleteCall) Fields(s ...googleapi.Field) *NodesDeploymentsDeleteCall {
7357 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7358 return c
7359 }
7360
7361
7362 func (c *NodesDeploymentsDeleteCall) Context(ctx context.Context) *NodesDeploymentsDeleteCall {
7363 c.ctx_ = ctx
7364 return c
7365 }
7366
7367
7368
7369 func (c *NodesDeploymentsDeleteCall) Header() http.Header {
7370 if c.header_ == nil {
7371 c.header_ = make(http.Header)
7372 }
7373 return c.header_
7374 }
7375
7376 func (c *NodesDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
7377 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7378 var body io.Reader = nil
7379 c.urlParams_.Set("alt", alt)
7380 c.urlParams_.Set("prettyPrint", "false")
7381 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
7382 urls += "?" + c.urlParams_.Encode()
7383 req, err := http.NewRequest("DELETE", urls, body)
7384 if err != nil {
7385 return nil, err
7386 }
7387 req.Header = reqHeaders
7388 googleapi.Expand(req.URL, map[string]string{
7389 "name": c.name,
7390 })
7391 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7392 }
7393
7394
7395
7396
7397
7398
7399 func (c *NodesDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty, error) {
7400 gensupport.SetOptions(c.urlParams_, opts...)
7401 res, err := c.doRequest("json")
7402 if res != nil && res.StatusCode == http.StatusNotModified {
7403 if res.Body != nil {
7404 res.Body.Close()
7405 }
7406 return nil, gensupport.WrapError(&googleapi.Error{
7407 Code: res.StatusCode,
7408 Header: res.Header,
7409 })
7410 }
7411 if err != nil {
7412 return nil, err
7413 }
7414 defer googleapi.CloseBody(res)
7415 if err := googleapi.CheckResponse(res); err != nil {
7416 return nil, gensupport.WrapError(err)
7417 }
7418 ret := &SasPortalEmpty{
7419 ServerResponse: googleapi.ServerResponse{
7420 Header: res.Header,
7421 HTTPStatusCode: res.StatusCode,
7422 },
7423 }
7424 target := &ret
7425 if err := gensupport.DecodeResponse(target, res); err != nil {
7426 return nil, err
7427 }
7428 return ret, nil
7429 }
7430
7431 type NodesDeploymentsGetCall struct {
7432 s *Service
7433 name string
7434 urlParams_ gensupport.URLParams
7435 ifNoneMatch_ string
7436 ctx_ context.Context
7437 header_ http.Header
7438 }
7439
7440
7441
7442
7443 func (r *NodesDeploymentsService) Get(name string) *NodesDeploymentsGetCall {
7444 c := &NodesDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7445 c.name = name
7446 return c
7447 }
7448
7449
7450
7451
7452 func (c *NodesDeploymentsGetCall) Fields(s ...googleapi.Field) *NodesDeploymentsGetCall {
7453 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7454 return c
7455 }
7456
7457
7458
7459
7460 func (c *NodesDeploymentsGetCall) IfNoneMatch(entityTag string) *NodesDeploymentsGetCall {
7461 c.ifNoneMatch_ = entityTag
7462 return c
7463 }
7464
7465
7466 func (c *NodesDeploymentsGetCall) Context(ctx context.Context) *NodesDeploymentsGetCall {
7467 c.ctx_ = ctx
7468 return c
7469 }
7470
7471
7472
7473 func (c *NodesDeploymentsGetCall) Header() http.Header {
7474 if c.header_ == nil {
7475 c.header_ = make(http.Header)
7476 }
7477 return c.header_
7478 }
7479
7480 func (c *NodesDeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
7481 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7482 if c.ifNoneMatch_ != "" {
7483 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7484 }
7485 var body io.Reader = nil
7486 c.urlParams_.Set("alt", alt)
7487 c.urlParams_.Set("prettyPrint", "false")
7488 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
7489 urls += "?" + c.urlParams_.Encode()
7490 req, err := http.NewRequest("GET", urls, body)
7491 if err != nil {
7492 return nil, err
7493 }
7494 req.Header = reqHeaders
7495 googleapi.Expand(req.URL, map[string]string{
7496 "name": c.name,
7497 })
7498 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7499 }
7500
7501
7502
7503
7504
7505
7506
7507 func (c *NodesDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDeployment, error) {
7508 gensupport.SetOptions(c.urlParams_, opts...)
7509 res, err := c.doRequest("json")
7510 if res != nil && res.StatusCode == http.StatusNotModified {
7511 if res.Body != nil {
7512 res.Body.Close()
7513 }
7514 return nil, gensupport.WrapError(&googleapi.Error{
7515 Code: res.StatusCode,
7516 Header: res.Header,
7517 })
7518 }
7519 if err != nil {
7520 return nil, err
7521 }
7522 defer googleapi.CloseBody(res)
7523 if err := googleapi.CheckResponse(res); err != nil {
7524 return nil, gensupport.WrapError(err)
7525 }
7526 ret := &SasPortalDeployment{
7527 ServerResponse: googleapi.ServerResponse{
7528 Header: res.Header,
7529 HTTPStatusCode: res.StatusCode,
7530 },
7531 }
7532 target := &ret
7533 if err := gensupport.DecodeResponse(target, res); err != nil {
7534 return nil, err
7535 }
7536 return ret, nil
7537 }
7538
7539 type NodesDeploymentsListCall struct {
7540 s *Service
7541 parent string
7542 urlParams_ gensupport.URLParams
7543 ifNoneMatch_ string
7544 ctx_ context.Context
7545 header_ http.Header
7546 }
7547
7548
7549
7550
7551
7552 func (r *NodesDeploymentsService) List(parent string) *NodesDeploymentsListCall {
7553 c := &NodesDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7554 c.parent = parent
7555 return c
7556 }
7557
7558
7559
7560
7561
7562 func (c *NodesDeploymentsListCall) Filter(filter string) *NodesDeploymentsListCall {
7563 c.urlParams_.Set("filter", filter)
7564 return c
7565 }
7566
7567
7568
7569 func (c *NodesDeploymentsListCall) PageSize(pageSize int64) *NodesDeploymentsListCall {
7570 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7571 return c
7572 }
7573
7574
7575
7576
7577 func (c *NodesDeploymentsListCall) PageToken(pageToken string) *NodesDeploymentsListCall {
7578 c.urlParams_.Set("pageToken", pageToken)
7579 return c
7580 }
7581
7582
7583
7584
7585 func (c *NodesDeploymentsListCall) Fields(s ...googleapi.Field) *NodesDeploymentsListCall {
7586 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7587 return c
7588 }
7589
7590
7591
7592
7593 func (c *NodesDeploymentsListCall) IfNoneMatch(entityTag string) *NodesDeploymentsListCall {
7594 c.ifNoneMatch_ = entityTag
7595 return c
7596 }
7597
7598
7599 func (c *NodesDeploymentsListCall) Context(ctx context.Context) *NodesDeploymentsListCall {
7600 c.ctx_ = ctx
7601 return c
7602 }
7603
7604
7605
7606 func (c *NodesDeploymentsListCall) Header() http.Header {
7607 if c.header_ == nil {
7608 c.header_ = make(http.Header)
7609 }
7610 return c.header_
7611 }
7612
7613 func (c *NodesDeploymentsListCall) doRequest(alt string) (*http.Response, error) {
7614 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7615 if c.ifNoneMatch_ != "" {
7616 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7617 }
7618 var body io.Reader = nil
7619 c.urlParams_.Set("alt", alt)
7620 c.urlParams_.Set("prettyPrint", "false")
7621 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/deployments")
7622 urls += "?" + c.urlParams_.Encode()
7623 req, err := http.NewRequest("GET", urls, body)
7624 if err != nil {
7625 return nil, err
7626 }
7627 req.Header = reqHeaders
7628 googleapi.Expand(req.URL, map[string]string{
7629 "parent": c.parent,
7630 })
7631 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7632 }
7633
7634
7635
7636
7637
7638
7639
7640 func (c *NodesDeploymentsListCall) Do(opts ...googleapi.CallOption) (*SasPortalListDeploymentsResponse, error) {
7641 gensupport.SetOptions(c.urlParams_, opts...)
7642 res, err := c.doRequest("json")
7643 if res != nil && res.StatusCode == http.StatusNotModified {
7644 if res.Body != nil {
7645 res.Body.Close()
7646 }
7647 return nil, gensupport.WrapError(&googleapi.Error{
7648 Code: res.StatusCode,
7649 Header: res.Header,
7650 })
7651 }
7652 if err != nil {
7653 return nil, err
7654 }
7655 defer googleapi.CloseBody(res)
7656 if err := googleapi.CheckResponse(res); err != nil {
7657 return nil, gensupport.WrapError(err)
7658 }
7659 ret := &SasPortalListDeploymentsResponse{
7660 ServerResponse: googleapi.ServerResponse{
7661 Header: res.Header,
7662 HTTPStatusCode: res.StatusCode,
7663 },
7664 }
7665 target := &ret
7666 if err := gensupport.DecodeResponse(target, res); err != nil {
7667 return nil, err
7668 }
7669 return ret, nil
7670 }
7671
7672
7673
7674
7675 func (c *NodesDeploymentsListCall) Pages(ctx context.Context, f func(*SasPortalListDeploymentsResponse) error) error {
7676 c.ctx_ = ctx
7677 defer c.PageToken(c.urlParams_.Get("pageToken"))
7678 for {
7679 x, err := c.Do()
7680 if err != nil {
7681 return err
7682 }
7683 if err := f(x); err != nil {
7684 return err
7685 }
7686 if x.NextPageToken == "" {
7687 return nil
7688 }
7689 c.PageToken(x.NextPageToken)
7690 }
7691 }
7692
7693 type NodesDeploymentsMoveCall struct {
7694 s *Service
7695 name string
7696 sasportalmovedeploymentrequest *SasPortalMoveDeploymentRequest
7697 urlParams_ gensupport.URLParams
7698 ctx_ context.Context
7699 header_ http.Header
7700 }
7701
7702
7703
7704
7705 func (r *NodesDeploymentsService) Move(name string, sasportalmovedeploymentrequest *SasPortalMoveDeploymentRequest) *NodesDeploymentsMoveCall {
7706 c := &NodesDeploymentsMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7707 c.name = name
7708 c.sasportalmovedeploymentrequest = sasportalmovedeploymentrequest
7709 return c
7710 }
7711
7712
7713
7714
7715 func (c *NodesDeploymentsMoveCall) Fields(s ...googleapi.Field) *NodesDeploymentsMoveCall {
7716 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7717 return c
7718 }
7719
7720
7721 func (c *NodesDeploymentsMoveCall) Context(ctx context.Context) *NodesDeploymentsMoveCall {
7722 c.ctx_ = ctx
7723 return c
7724 }
7725
7726
7727
7728 func (c *NodesDeploymentsMoveCall) Header() http.Header {
7729 if c.header_ == nil {
7730 c.header_ = make(http.Header)
7731 }
7732 return c.header_
7733 }
7734
7735 func (c *NodesDeploymentsMoveCall) doRequest(alt string) (*http.Response, error) {
7736 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7737 var body io.Reader = nil
7738 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalmovedeploymentrequest)
7739 if err != nil {
7740 return nil, err
7741 }
7742 c.urlParams_.Set("alt", alt)
7743 c.urlParams_.Set("prettyPrint", "false")
7744 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:move")
7745 urls += "?" + c.urlParams_.Encode()
7746 req, err := http.NewRequest("POST", urls, body)
7747 if err != nil {
7748 return nil, err
7749 }
7750 req.Header = reqHeaders
7751 googleapi.Expand(req.URL, map[string]string{
7752 "name": c.name,
7753 })
7754 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7755 }
7756
7757
7758
7759
7760
7761
7762
7763 func (c *NodesDeploymentsMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOperation, error) {
7764 gensupport.SetOptions(c.urlParams_, opts...)
7765 res, err := c.doRequest("json")
7766 if res != nil && res.StatusCode == http.StatusNotModified {
7767 if res.Body != nil {
7768 res.Body.Close()
7769 }
7770 return nil, gensupport.WrapError(&googleapi.Error{
7771 Code: res.StatusCode,
7772 Header: res.Header,
7773 })
7774 }
7775 if err != nil {
7776 return nil, err
7777 }
7778 defer googleapi.CloseBody(res)
7779 if err := googleapi.CheckResponse(res); err != nil {
7780 return nil, gensupport.WrapError(err)
7781 }
7782 ret := &SasPortalOperation{
7783 ServerResponse: googleapi.ServerResponse{
7784 Header: res.Header,
7785 HTTPStatusCode: res.StatusCode,
7786 },
7787 }
7788 target := &ret
7789 if err := gensupport.DecodeResponse(target, res); err != nil {
7790 return nil, err
7791 }
7792 return ret, nil
7793 }
7794
7795 type NodesDeploymentsPatchCall struct {
7796 s *Service
7797 name string
7798 sasportaldeployment *SasPortalDeployment
7799 urlParams_ gensupport.URLParams
7800 ctx_ context.Context
7801 header_ http.Header
7802 }
7803
7804
7805
7806
7807 func (r *NodesDeploymentsService) Patch(name string, sasportaldeployment *SasPortalDeployment) *NodesDeploymentsPatchCall {
7808 c := &NodesDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7809 c.name = name
7810 c.sasportaldeployment = sasportaldeployment
7811 return c
7812 }
7813
7814
7815 func (c *NodesDeploymentsPatchCall) UpdateMask(updateMask string) *NodesDeploymentsPatchCall {
7816 c.urlParams_.Set("updateMask", updateMask)
7817 return c
7818 }
7819
7820
7821
7822
7823 func (c *NodesDeploymentsPatchCall) Fields(s ...googleapi.Field) *NodesDeploymentsPatchCall {
7824 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7825 return c
7826 }
7827
7828
7829 func (c *NodesDeploymentsPatchCall) Context(ctx context.Context) *NodesDeploymentsPatchCall {
7830 c.ctx_ = ctx
7831 return c
7832 }
7833
7834
7835
7836 func (c *NodesDeploymentsPatchCall) Header() http.Header {
7837 if c.header_ == nil {
7838 c.header_ = make(http.Header)
7839 }
7840 return c.header_
7841 }
7842
7843 func (c *NodesDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
7844 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7845 var body io.Reader = nil
7846 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldeployment)
7847 if err != nil {
7848 return nil, err
7849 }
7850 c.urlParams_.Set("alt", alt)
7851 c.urlParams_.Set("prettyPrint", "false")
7852 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
7853 urls += "?" + c.urlParams_.Encode()
7854 req, err := http.NewRequest("PATCH", urls, body)
7855 if err != nil {
7856 return nil, err
7857 }
7858 req.Header = reqHeaders
7859 googleapi.Expand(req.URL, map[string]string{
7860 "name": c.name,
7861 })
7862 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7863 }
7864
7865
7866
7867
7868
7869
7870
7871 func (c *NodesDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalDeployment, error) {
7872 gensupport.SetOptions(c.urlParams_, opts...)
7873 res, err := c.doRequest("json")
7874 if res != nil && res.StatusCode == http.StatusNotModified {
7875 if res.Body != nil {
7876 res.Body.Close()
7877 }
7878 return nil, gensupport.WrapError(&googleapi.Error{
7879 Code: res.StatusCode,
7880 Header: res.Header,
7881 })
7882 }
7883 if err != nil {
7884 return nil, err
7885 }
7886 defer googleapi.CloseBody(res)
7887 if err := googleapi.CheckResponse(res); err != nil {
7888 return nil, gensupport.WrapError(err)
7889 }
7890 ret := &SasPortalDeployment{
7891 ServerResponse: googleapi.ServerResponse{
7892 Header: res.Header,
7893 HTTPStatusCode: res.StatusCode,
7894 },
7895 }
7896 target := &ret
7897 if err := gensupport.DecodeResponse(target, res); err != nil {
7898 return nil, err
7899 }
7900 return ret, nil
7901 }
7902
7903 type NodesDeploymentsDevicesCreateCall struct {
7904 s *Service
7905 parent string
7906 sasportaldevice *SasPortalDevice
7907 urlParams_ gensupport.URLParams
7908 ctx_ context.Context
7909 header_ http.Header
7910 }
7911
7912
7913
7914
7915 func (r *NodesDeploymentsDevicesService) Create(parent string, sasportaldevice *SasPortalDevice) *NodesDeploymentsDevicesCreateCall {
7916 c := &NodesDeploymentsDevicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7917 c.parent = parent
7918 c.sasportaldevice = sasportaldevice
7919 return c
7920 }
7921
7922
7923
7924
7925 func (c *NodesDeploymentsDevicesCreateCall) Fields(s ...googleapi.Field) *NodesDeploymentsDevicesCreateCall {
7926 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7927 return c
7928 }
7929
7930
7931 func (c *NodesDeploymentsDevicesCreateCall) Context(ctx context.Context) *NodesDeploymentsDevicesCreateCall {
7932 c.ctx_ = ctx
7933 return c
7934 }
7935
7936
7937
7938 func (c *NodesDeploymentsDevicesCreateCall) Header() http.Header {
7939 if c.header_ == nil {
7940 c.header_ = make(http.Header)
7941 }
7942 return c.header_
7943 }
7944
7945 func (c *NodesDeploymentsDevicesCreateCall) doRequest(alt string) (*http.Response, error) {
7946 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7947 var body io.Reader = nil
7948 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldevice)
7949 if err != nil {
7950 return nil, err
7951 }
7952 c.urlParams_.Set("alt", alt)
7953 c.urlParams_.Set("prettyPrint", "false")
7954 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
7955 urls += "?" + c.urlParams_.Encode()
7956 req, err := http.NewRequest("POST", urls, body)
7957 if err != nil {
7958 return nil, err
7959 }
7960 req.Header = reqHeaders
7961 googleapi.Expand(req.URL, map[string]string{
7962 "parent": c.parent,
7963 })
7964 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7965 }
7966
7967
7968
7969
7970
7971
7972
7973 func (c *NodesDeploymentsDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
7974 gensupport.SetOptions(c.urlParams_, opts...)
7975 res, err := c.doRequest("json")
7976 if res != nil && res.StatusCode == http.StatusNotModified {
7977 if res.Body != nil {
7978 res.Body.Close()
7979 }
7980 return nil, gensupport.WrapError(&googleapi.Error{
7981 Code: res.StatusCode,
7982 Header: res.Header,
7983 })
7984 }
7985 if err != nil {
7986 return nil, err
7987 }
7988 defer googleapi.CloseBody(res)
7989 if err := googleapi.CheckResponse(res); err != nil {
7990 return nil, gensupport.WrapError(err)
7991 }
7992 ret := &SasPortalDevice{
7993 ServerResponse: googleapi.ServerResponse{
7994 Header: res.Header,
7995 HTTPStatusCode: res.StatusCode,
7996 },
7997 }
7998 target := &ret
7999 if err := gensupport.DecodeResponse(target, res); err != nil {
8000 return nil, err
8001 }
8002 return ret, nil
8003 }
8004
8005 type NodesDeploymentsDevicesCreateSignedCall struct {
8006 s *Service
8007 parent string
8008 sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest
8009 urlParams_ gensupport.URLParams
8010 ctx_ context.Context
8011 header_ http.Header
8012 }
8013
8014
8015
8016
8017 func (r *NodesDeploymentsDevicesService) CreateSigned(parent string, sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest) *NodesDeploymentsDevicesCreateSignedCall {
8018 c := &NodesDeploymentsDevicesCreateSignedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8019 c.parent = parent
8020 c.sasportalcreatesigneddevicerequest = sasportalcreatesigneddevicerequest
8021 return c
8022 }
8023
8024
8025
8026
8027 func (c *NodesDeploymentsDevicesCreateSignedCall) Fields(s ...googleapi.Field) *NodesDeploymentsDevicesCreateSignedCall {
8028 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8029 return c
8030 }
8031
8032
8033 func (c *NodesDeploymentsDevicesCreateSignedCall) Context(ctx context.Context) *NodesDeploymentsDevicesCreateSignedCall {
8034 c.ctx_ = ctx
8035 return c
8036 }
8037
8038
8039
8040 func (c *NodesDeploymentsDevicesCreateSignedCall) Header() http.Header {
8041 if c.header_ == nil {
8042 c.header_ = make(http.Header)
8043 }
8044 return c.header_
8045 }
8046
8047 func (c *NodesDeploymentsDevicesCreateSignedCall) doRequest(alt string) (*http.Response, error) {
8048 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8049 var body io.Reader = nil
8050 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalcreatesigneddevicerequest)
8051 if err != nil {
8052 return nil, err
8053 }
8054 c.urlParams_.Set("alt", alt)
8055 c.urlParams_.Set("prettyPrint", "false")
8056 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices:createSigned")
8057 urls += "?" + c.urlParams_.Encode()
8058 req, err := http.NewRequest("POST", urls, body)
8059 if err != nil {
8060 return nil, err
8061 }
8062 req.Header = reqHeaders
8063 googleapi.Expand(req.URL, map[string]string{
8064 "parent": c.parent,
8065 })
8066 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8067 }
8068
8069
8070
8071
8072
8073
8074
8075 func (c *NodesDeploymentsDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
8076 gensupport.SetOptions(c.urlParams_, opts...)
8077 res, err := c.doRequest("json")
8078 if res != nil && res.StatusCode == http.StatusNotModified {
8079 if res.Body != nil {
8080 res.Body.Close()
8081 }
8082 return nil, gensupport.WrapError(&googleapi.Error{
8083 Code: res.StatusCode,
8084 Header: res.Header,
8085 })
8086 }
8087 if err != nil {
8088 return nil, err
8089 }
8090 defer googleapi.CloseBody(res)
8091 if err := googleapi.CheckResponse(res); err != nil {
8092 return nil, gensupport.WrapError(err)
8093 }
8094 ret := &SasPortalDevice{
8095 ServerResponse: googleapi.ServerResponse{
8096 Header: res.Header,
8097 HTTPStatusCode: res.StatusCode,
8098 },
8099 }
8100 target := &ret
8101 if err := gensupport.DecodeResponse(target, res); err != nil {
8102 return nil, err
8103 }
8104 return ret, nil
8105 }
8106
8107 type NodesDeploymentsDevicesListCall struct {
8108 s *Service
8109 parent string
8110 urlParams_ gensupport.URLParams
8111 ifNoneMatch_ string
8112 ctx_ context.Context
8113 header_ http.Header
8114 }
8115
8116
8117
8118
8119 func (r *NodesDeploymentsDevicesService) List(parent string) *NodesDeploymentsDevicesListCall {
8120 c := &NodesDeploymentsDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8121 c.parent = parent
8122 return c
8123 }
8124
8125
8126
8127
8128
8129 func (c *NodesDeploymentsDevicesListCall) Filter(filter string) *NodesDeploymentsDevicesListCall {
8130 c.urlParams_.Set("filter", filter)
8131 return c
8132 }
8133
8134
8135
8136
8137 func (c *NodesDeploymentsDevicesListCall) PageSize(pageSize int64) *NodesDeploymentsDevicesListCall {
8138 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8139 return c
8140 }
8141
8142
8143
8144
8145 func (c *NodesDeploymentsDevicesListCall) PageToken(pageToken string) *NodesDeploymentsDevicesListCall {
8146 c.urlParams_.Set("pageToken", pageToken)
8147 return c
8148 }
8149
8150
8151
8152
8153 func (c *NodesDeploymentsDevicesListCall) Fields(s ...googleapi.Field) *NodesDeploymentsDevicesListCall {
8154 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8155 return c
8156 }
8157
8158
8159
8160
8161 func (c *NodesDeploymentsDevicesListCall) IfNoneMatch(entityTag string) *NodesDeploymentsDevicesListCall {
8162 c.ifNoneMatch_ = entityTag
8163 return c
8164 }
8165
8166
8167 func (c *NodesDeploymentsDevicesListCall) Context(ctx context.Context) *NodesDeploymentsDevicesListCall {
8168 c.ctx_ = ctx
8169 return c
8170 }
8171
8172
8173
8174 func (c *NodesDeploymentsDevicesListCall) Header() http.Header {
8175 if c.header_ == nil {
8176 c.header_ = make(http.Header)
8177 }
8178 return c.header_
8179 }
8180
8181 func (c *NodesDeploymentsDevicesListCall) doRequest(alt string) (*http.Response, error) {
8182 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8183 if c.ifNoneMatch_ != "" {
8184 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8185 }
8186 var body io.Reader = nil
8187 c.urlParams_.Set("alt", alt)
8188 c.urlParams_.Set("prettyPrint", "false")
8189 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
8190 urls += "?" + c.urlParams_.Encode()
8191 req, err := http.NewRequest("GET", urls, body)
8192 if err != nil {
8193 return nil, err
8194 }
8195 req.Header = reqHeaders
8196 googleapi.Expand(req.URL, map[string]string{
8197 "parent": c.parent,
8198 })
8199 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8200 }
8201
8202
8203
8204
8205
8206
8207
8208 func (c *NodesDeploymentsDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListDevicesResponse, error) {
8209 gensupport.SetOptions(c.urlParams_, opts...)
8210 res, err := c.doRequest("json")
8211 if res != nil && res.StatusCode == http.StatusNotModified {
8212 if res.Body != nil {
8213 res.Body.Close()
8214 }
8215 return nil, gensupport.WrapError(&googleapi.Error{
8216 Code: res.StatusCode,
8217 Header: res.Header,
8218 })
8219 }
8220 if err != nil {
8221 return nil, err
8222 }
8223 defer googleapi.CloseBody(res)
8224 if err := googleapi.CheckResponse(res); err != nil {
8225 return nil, gensupport.WrapError(err)
8226 }
8227 ret := &SasPortalListDevicesResponse{
8228 ServerResponse: googleapi.ServerResponse{
8229 Header: res.Header,
8230 HTTPStatusCode: res.StatusCode,
8231 },
8232 }
8233 target := &ret
8234 if err := gensupport.DecodeResponse(target, res); err != nil {
8235 return nil, err
8236 }
8237 return ret, nil
8238 }
8239
8240
8241
8242
8243 func (c *NodesDeploymentsDevicesListCall) Pages(ctx context.Context, f func(*SasPortalListDevicesResponse) error) error {
8244 c.ctx_ = ctx
8245 defer c.PageToken(c.urlParams_.Get("pageToken"))
8246 for {
8247 x, err := c.Do()
8248 if err != nil {
8249 return err
8250 }
8251 if err := f(x); err != nil {
8252 return err
8253 }
8254 if x.NextPageToken == "" {
8255 return nil
8256 }
8257 c.PageToken(x.NextPageToken)
8258 }
8259 }
8260
8261 type NodesDevicesCreateCall struct {
8262 s *Service
8263 parent string
8264 sasportaldevice *SasPortalDevice
8265 urlParams_ gensupport.URLParams
8266 ctx_ context.Context
8267 header_ http.Header
8268 }
8269
8270
8271
8272
8273 func (r *NodesDevicesService) Create(parent string, sasportaldevice *SasPortalDevice) *NodesDevicesCreateCall {
8274 c := &NodesDevicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8275 c.parent = parent
8276 c.sasportaldevice = sasportaldevice
8277 return c
8278 }
8279
8280
8281
8282
8283 func (c *NodesDevicesCreateCall) Fields(s ...googleapi.Field) *NodesDevicesCreateCall {
8284 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8285 return c
8286 }
8287
8288
8289 func (c *NodesDevicesCreateCall) Context(ctx context.Context) *NodesDevicesCreateCall {
8290 c.ctx_ = ctx
8291 return c
8292 }
8293
8294
8295
8296 func (c *NodesDevicesCreateCall) Header() http.Header {
8297 if c.header_ == nil {
8298 c.header_ = make(http.Header)
8299 }
8300 return c.header_
8301 }
8302
8303 func (c *NodesDevicesCreateCall) doRequest(alt string) (*http.Response, error) {
8304 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8305 var body io.Reader = nil
8306 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldevice)
8307 if err != nil {
8308 return nil, err
8309 }
8310 c.urlParams_.Set("alt", alt)
8311 c.urlParams_.Set("prettyPrint", "false")
8312 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
8313 urls += "?" + c.urlParams_.Encode()
8314 req, err := http.NewRequest("POST", urls, body)
8315 if err != nil {
8316 return nil, err
8317 }
8318 req.Header = reqHeaders
8319 googleapi.Expand(req.URL, map[string]string{
8320 "parent": c.parent,
8321 })
8322 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8323 }
8324
8325
8326
8327
8328
8329
8330
8331 func (c *NodesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
8332 gensupport.SetOptions(c.urlParams_, opts...)
8333 res, err := c.doRequest("json")
8334 if res != nil && res.StatusCode == http.StatusNotModified {
8335 if res.Body != nil {
8336 res.Body.Close()
8337 }
8338 return nil, gensupport.WrapError(&googleapi.Error{
8339 Code: res.StatusCode,
8340 Header: res.Header,
8341 })
8342 }
8343 if err != nil {
8344 return nil, err
8345 }
8346 defer googleapi.CloseBody(res)
8347 if err := googleapi.CheckResponse(res); err != nil {
8348 return nil, gensupport.WrapError(err)
8349 }
8350 ret := &SasPortalDevice{
8351 ServerResponse: googleapi.ServerResponse{
8352 Header: res.Header,
8353 HTTPStatusCode: res.StatusCode,
8354 },
8355 }
8356 target := &ret
8357 if err := gensupport.DecodeResponse(target, res); err != nil {
8358 return nil, err
8359 }
8360 return ret, nil
8361 }
8362
8363 type NodesDevicesCreateSignedCall struct {
8364 s *Service
8365 parent string
8366 sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest
8367 urlParams_ gensupport.URLParams
8368 ctx_ context.Context
8369 header_ http.Header
8370 }
8371
8372
8373
8374
8375 func (r *NodesDevicesService) CreateSigned(parent string, sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest) *NodesDevicesCreateSignedCall {
8376 c := &NodesDevicesCreateSignedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8377 c.parent = parent
8378 c.sasportalcreatesigneddevicerequest = sasportalcreatesigneddevicerequest
8379 return c
8380 }
8381
8382
8383
8384
8385 func (c *NodesDevicesCreateSignedCall) Fields(s ...googleapi.Field) *NodesDevicesCreateSignedCall {
8386 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8387 return c
8388 }
8389
8390
8391 func (c *NodesDevicesCreateSignedCall) Context(ctx context.Context) *NodesDevicesCreateSignedCall {
8392 c.ctx_ = ctx
8393 return c
8394 }
8395
8396
8397
8398 func (c *NodesDevicesCreateSignedCall) Header() http.Header {
8399 if c.header_ == nil {
8400 c.header_ = make(http.Header)
8401 }
8402 return c.header_
8403 }
8404
8405 func (c *NodesDevicesCreateSignedCall) doRequest(alt string) (*http.Response, error) {
8406 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8407 var body io.Reader = nil
8408 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalcreatesigneddevicerequest)
8409 if err != nil {
8410 return nil, err
8411 }
8412 c.urlParams_.Set("alt", alt)
8413 c.urlParams_.Set("prettyPrint", "false")
8414 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices:createSigned")
8415 urls += "?" + c.urlParams_.Encode()
8416 req, err := http.NewRequest("POST", urls, body)
8417 if err != nil {
8418 return nil, err
8419 }
8420 req.Header = reqHeaders
8421 googleapi.Expand(req.URL, map[string]string{
8422 "parent": c.parent,
8423 })
8424 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8425 }
8426
8427
8428
8429
8430
8431
8432
8433 func (c *NodesDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
8434 gensupport.SetOptions(c.urlParams_, opts...)
8435 res, err := c.doRequest("json")
8436 if res != nil && res.StatusCode == http.StatusNotModified {
8437 if res.Body != nil {
8438 res.Body.Close()
8439 }
8440 return nil, gensupport.WrapError(&googleapi.Error{
8441 Code: res.StatusCode,
8442 Header: res.Header,
8443 })
8444 }
8445 if err != nil {
8446 return nil, err
8447 }
8448 defer googleapi.CloseBody(res)
8449 if err := googleapi.CheckResponse(res); err != nil {
8450 return nil, gensupport.WrapError(err)
8451 }
8452 ret := &SasPortalDevice{
8453 ServerResponse: googleapi.ServerResponse{
8454 Header: res.Header,
8455 HTTPStatusCode: res.StatusCode,
8456 },
8457 }
8458 target := &ret
8459 if err := gensupport.DecodeResponse(target, res); err != nil {
8460 return nil, err
8461 }
8462 return ret, nil
8463 }
8464
8465 type NodesDevicesDeleteCall struct {
8466 s *Service
8467 name string
8468 urlParams_ gensupport.URLParams
8469 ctx_ context.Context
8470 header_ http.Header
8471 }
8472
8473
8474
8475
8476 func (r *NodesDevicesService) Delete(name string) *NodesDevicesDeleteCall {
8477 c := &NodesDevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8478 c.name = name
8479 return c
8480 }
8481
8482
8483
8484
8485 func (c *NodesDevicesDeleteCall) Fields(s ...googleapi.Field) *NodesDevicesDeleteCall {
8486 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8487 return c
8488 }
8489
8490
8491 func (c *NodesDevicesDeleteCall) Context(ctx context.Context) *NodesDevicesDeleteCall {
8492 c.ctx_ = ctx
8493 return c
8494 }
8495
8496
8497
8498 func (c *NodesDevicesDeleteCall) Header() http.Header {
8499 if c.header_ == nil {
8500 c.header_ = make(http.Header)
8501 }
8502 return c.header_
8503 }
8504
8505 func (c *NodesDevicesDeleteCall) doRequest(alt string) (*http.Response, error) {
8506 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8507 var body io.Reader = nil
8508 c.urlParams_.Set("alt", alt)
8509 c.urlParams_.Set("prettyPrint", "false")
8510 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
8511 urls += "?" + c.urlParams_.Encode()
8512 req, err := http.NewRequest("DELETE", urls, body)
8513 if err != nil {
8514 return nil, err
8515 }
8516 req.Header = reqHeaders
8517 googleapi.Expand(req.URL, map[string]string{
8518 "name": c.name,
8519 })
8520 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8521 }
8522
8523
8524
8525
8526
8527
8528 func (c *NodesDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty, error) {
8529 gensupport.SetOptions(c.urlParams_, opts...)
8530 res, err := c.doRequest("json")
8531 if res != nil && res.StatusCode == http.StatusNotModified {
8532 if res.Body != nil {
8533 res.Body.Close()
8534 }
8535 return nil, gensupport.WrapError(&googleapi.Error{
8536 Code: res.StatusCode,
8537 Header: res.Header,
8538 })
8539 }
8540 if err != nil {
8541 return nil, err
8542 }
8543 defer googleapi.CloseBody(res)
8544 if err := googleapi.CheckResponse(res); err != nil {
8545 return nil, gensupport.WrapError(err)
8546 }
8547 ret := &SasPortalEmpty{
8548 ServerResponse: googleapi.ServerResponse{
8549 Header: res.Header,
8550 HTTPStatusCode: res.StatusCode,
8551 },
8552 }
8553 target := &ret
8554 if err := gensupport.DecodeResponse(target, res); err != nil {
8555 return nil, err
8556 }
8557 return ret, nil
8558 }
8559
8560 type NodesDevicesGetCall struct {
8561 s *Service
8562 name string
8563 urlParams_ gensupport.URLParams
8564 ifNoneMatch_ string
8565 ctx_ context.Context
8566 header_ http.Header
8567 }
8568
8569
8570
8571
8572 func (r *NodesDevicesService) Get(name string) *NodesDevicesGetCall {
8573 c := &NodesDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8574 c.name = name
8575 return c
8576 }
8577
8578
8579
8580
8581 func (c *NodesDevicesGetCall) Fields(s ...googleapi.Field) *NodesDevicesGetCall {
8582 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8583 return c
8584 }
8585
8586
8587
8588
8589 func (c *NodesDevicesGetCall) IfNoneMatch(entityTag string) *NodesDevicesGetCall {
8590 c.ifNoneMatch_ = entityTag
8591 return c
8592 }
8593
8594
8595 func (c *NodesDevicesGetCall) Context(ctx context.Context) *NodesDevicesGetCall {
8596 c.ctx_ = ctx
8597 return c
8598 }
8599
8600
8601
8602 func (c *NodesDevicesGetCall) Header() http.Header {
8603 if c.header_ == nil {
8604 c.header_ = make(http.Header)
8605 }
8606 return c.header_
8607 }
8608
8609 func (c *NodesDevicesGetCall) doRequest(alt string) (*http.Response, error) {
8610 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8611 if c.ifNoneMatch_ != "" {
8612 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8613 }
8614 var body io.Reader = nil
8615 c.urlParams_.Set("alt", alt)
8616 c.urlParams_.Set("prettyPrint", "false")
8617 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
8618 urls += "?" + c.urlParams_.Encode()
8619 req, err := http.NewRequest("GET", urls, body)
8620 if err != nil {
8621 return nil, err
8622 }
8623 req.Header = reqHeaders
8624 googleapi.Expand(req.URL, map[string]string{
8625 "name": c.name,
8626 })
8627 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8628 }
8629
8630
8631
8632
8633
8634
8635
8636 func (c *NodesDevicesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
8637 gensupport.SetOptions(c.urlParams_, opts...)
8638 res, err := c.doRequest("json")
8639 if res != nil && res.StatusCode == http.StatusNotModified {
8640 if res.Body != nil {
8641 res.Body.Close()
8642 }
8643 return nil, gensupport.WrapError(&googleapi.Error{
8644 Code: res.StatusCode,
8645 Header: res.Header,
8646 })
8647 }
8648 if err != nil {
8649 return nil, err
8650 }
8651 defer googleapi.CloseBody(res)
8652 if err := googleapi.CheckResponse(res); err != nil {
8653 return nil, gensupport.WrapError(err)
8654 }
8655 ret := &SasPortalDevice{
8656 ServerResponse: googleapi.ServerResponse{
8657 Header: res.Header,
8658 HTTPStatusCode: res.StatusCode,
8659 },
8660 }
8661 target := &ret
8662 if err := gensupport.DecodeResponse(target, res); err != nil {
8663 return nil, err
8664 }
8665 return ret, nil
8666 }
8667
8668 type NodesDevicesListCall struct {
8669 s *Service
8670 parent string
8671 urlParams_ gensupport.URLParams
8672 ifNoneMatch_ string
8673 ctx_ context.Context
8674 header_ http.Header
8675 }
8676
8677
8678
8679
8680 func (r *NodesDevicesService) List(parent string) *NodesDevicesListCall {
8681 c := &NodesDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8682 c.parent = parent
8683 return c
8684 }
8685
8686
8687
8688
8689
8690 func (c *NodesDevicesListCall) Filter(filter string) *NodesDevicesListCall {
8691 c.urlParams_.Set("filter", filter)
8692 return c
8693 }
8694
8695
8696
8697
8698 func (c *NodesDevicesListCall) PageSize(pageSize int64) *NodesDevicesListCall {
8699 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8700 return c
8701 }
8702
8703
8704
8705
8706 func (c *NodesDevicesListCall) PageToken(pageToken string) *NodesDevicesListCall {
8707 c.urlParams_.Set("pageToken", pageToken)
8708 return c
8709 }
8710
8711
8712
8713
8714 func (c *NodesDevicesListCall) Fields(s ...googleapi.Field) *NodesDevicesListCall {
8715 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8716 return c
8717 }
8718
8719
8720
8721
8722 func (c *NodesDevicesListCall) IfNoneMatch(entityTag string) *NodesDevicesListCall {
8723 c.ifNoneMatch_ = entityTag
8724 return c
8725 }
8726
8727
8728 func (c *NodesDevicesListCall) Context(ctx context.Context) *NodesDevicesListCall {
8729 c.ctx_ = ctx
8730 return c
8731 }
8732
8733
8734
8735 func (c *NodesDevicesListCall) Header() http.Header {
8736 if c.header_ == nil {
8737 c.header_ = make(http.Header)
8738 }
8739 return c.header_
8740 }
8741
8742 func (c *NodesDevicesListCall) doRequest(alt string) (*http.Response, error) {
8743 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8744 if c.ifNoneMatch_ != "" {
8745 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8746 }
8747 var body io.Reader = nil
8748 c.urlParams_.Set("alt", alt)
8749 c.urlParams_.Set("prettyPrint", "false")
8750 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
8751 urls += "?" + c.urlParams_.Encode()
8752 req, err := http.NewRequest("GET", urls, body)
8753 if err != nil {
8754 return nil, err
8755 }
8756 req.Header = reqHeaders
8757 googleapi.Expand(req.URL, map[string]string{
8758 "parent": c.parent,
8759 })
8760 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8761 }
8762
8763
8764
8765
8766
8767
8768
8769 func (c *NodesDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListDevicesResponse, error) {
8770 gensupport.SetOptions(c.urlParams_, opts...)
8771 res, err := c.doRequest("json")
8772 if res != nil && res.StatusCode == http.StatusNotModified {
8773 if res.Body != nil {
8774 res.Body.Close()
8775 }
8776 return nil, gensupport.WrapError(&googleapi.Error{
8777 Code: res.StatusCode,
8778 Header: res.Header,
8779 })
8780 }
8781 if err != nil {
8782 return nil, err
8783 }
8784 defer googleapi.CloseBody(res)
8785 if err := googleapi.CheckResponse(res); err != nil {
8786 return nil, gensupport.WrapError(err)
8787 }
8788 ret := &SasPortalListDevicesResponse{
8789 ServerResponse: googleapi.ServerResponse{
8790 Header: res.Header,
8791 HTTPStatusCode: res.StatusCode,
8792 },
8793 }
8794 target := &ret
8795 if err := gensupport.DecodeResponse(target, res); err != nil {
8796 return nil, err
8797 }
8798 return ret, nil
8799 }
8800
8801
8802
8803
8804 func (c *NodesDevicesListCall) Pages(ctx context.Context, f func(*SasPortalListDevicesResponse) error) error {
8805 c.ctx_ = ctx
8806 defer c.PageToken(c.urlParams_.Get("pageToken"))
8807 for {
8808 x, err := c.Do()
8809 if err != nil {
8810 return err
8811 }
8812 if err := f(x); err != nil {
8813 return err
8814 }
8815 if x.NextPageToken == "" {
8816 return nil
8817 }
8818 c.PageToken(x.NextPageToken)
8819 }
8820 }
8821
8822 type NodesDevicesMoveCall struct {
8823 s *Service
8824 name string
8825 sasportalmovedevicerequest *SasPortalMoveDeviceRequest
8826 urlParams_ gensupport.URLParams
8827 ctx_ context.Context
8828 header_ http.Header
8829 }
8830
8831
8832
8833
8834 func (r *NodesDevicesService) Move(name string, sasportalmovedevicerequest *SasPortalMoveDeviceRequest) *NodesDevicesMoveCall {
8835 c := &NodesDevicesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8836 c.name = name
8837 c.sasportalmovedevicerequest = sasportalmovedevicerequest
8838 return c
8839 }
8840
8841
8842
8843
8844 func (c *NodesDevicesMoveCall) Fields(s ...googleapi.Field) *NodesDevicesMoveCall {
8845 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8846 return c
8847 }
8848
8849
8850 func (c *NodesDevicesMoveCall) Context(ctx context.Context) *NodesDevicesMoveCall {
8851 c.ctx_ = ctx
8852 return c
8853 }
8854
8855
8856
8857 func (c *NodesDevicesMoveCall) Header() http.Header {
8858 if c.header_ == nil {
8859 c.header_ = make(http.Header)
8860 }
8861 return c.header_
8862 }
8863
8864 func (c *NodesDevicesMoveCall) doRequest(alt string) (*http.Response, error) {
8865 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8866 var body io.Reader = nil
8867 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalmovedevicerequest)
8868 if err != nil {
8869 return nil, err
8870 }
8871 c.urlParams_.Set("alt", alt)
8872 c.urlParams_.Set("prettyPrint", "false")
8873 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:move")
8874 urls += "?" + c.urlParams_.Encode()
8875 req, err := http.NewRequest("POST", urls, body)
8876 if err != nil {
8877 return nil, err
8878 }
8879 req.Header = reqHeaders
8880 googleapi.Expand(req.URL, map[string]string{
8881 "name": c.name,
8882 })
8883 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8884 }
8885
8886
8887
8888
8889
8890
8891
8892 func (c *NodesDevicesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOperation, error) {
8893 gensupport.SetOptions(c.urlParams_, opts...)
8894 res, err := c.doRequest("json")
8895 if res != nil && res.StatusCode == http.StatusNotModified {
8896 if res.Body != nil {
8897 res.Body.Close()
8898 }
8899 return nil, gensupport.WrapError(&googleapi.Error{
8900 Code: res.StatusCode,
8901 Header: res.Header,
8902 })
8903 }
8904 if err != nil {
8905 return nil, err
8906 }
8907 defer googleapi.CloseBody(res)
8908 if err := googleapi.CheckResponse(res); err != nil {
8909 return nil, gensupport.WrapError(err)
8910 }
8911 ret := &SasPortalOperation{
8912 ServerResponse: googleapi.ServerResponse{
8913 Header: res.Header,
8914 HTTPStatusCode: res.StatusCode,
8915 },
8916 }
8917 target := &ret
8918 if err := gensupport.DecodeResponse(target, res); err != nil {
8919 return nil, err
8920 }
8921 return ret, nil
8922 }
8923
8924 type NodesDevicesPatchCall struct {
8925 s *Service
8926 name string
8927 sasportaldevice *SasPortalDevice
8928 urlParams_ gensupport.URLParams
8929 ctx_ context.Context
8930 header_ http.Header
8931 }
8932
8933
8934
8935
8936 func (r *NodesDevicesService) Patch(name string, sasportaldevice *SasPortalDevice) *NodesDevicesPatchCall {
8937 c := &NodesDevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8938 c.name = name
8939 c.sasportaldevice = sasportaldevice
8940 return c
8941 }
8942
8943
8944 func (c *NodesDevicesPatchCall) UpdateMask(updateMask string) *NodesDevicesPatchCall {
8945 c.urlParams_.Set("updateMask", updateMask)
8946 return c
8947 }
8948
8949
8950
8951
8952 func (c *NodesDevicesPatchCall) Fields(s ...googleapi.Field) *NodesDevicesPatchCall {
8953 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8954 return c
8955 }
8956
8957
8958 func (c *NodesDevicesPatchCall) Context(ctx context.Context) *NodesDevicesPatchCall {
8959 c.ctx_ = ctx
8960 return c
8961 }
8962
8963
8964
8965 func (c *NodesDevicesPatchCall) Header() http.Header {
8966 if c.header_ == nil {
8967 c.header_ = make(http.Header)
8968 }
8969 return c.header_
8970 }
8971
8972 func (c *NodesDevicesPatchCall) doRequest(alt string) (*http.Response, error) {
8973 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8974 var body io.Reader = nil
8975 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldevice)
8976 if err != nil {
8977 return nil, err
8978 }
8979 c.urlParams_.Set("alt", alt)
8980 c.urlParams_.Set("prettyPrint", "false")
8981 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
8982 urls += "?" + c.urlParams_.Encode()
8983 req, err := http.NewRequest("PATCH", urls, body)
8984 if err != nil {
8985 return nil, err
8986 }
8987 req.Header = reqHeaders
8988 googleapi.Expand(req.URL, map[string]string{
8989 "name": c.name,
8990 })
8991 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8992 }
8993
8994
8995
8996
8997
8998
8999
9000 func (c *NodesDevicesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
9001 gensupport.SetOptions(c.urlParams_, opts...)
9002 res, err := c.doRequest("json")
9003 if res != nil && res.StatusCode == http.StatusNotModified {
9004 if res.Body != nil {
9005 res.Body.Close()
9006 }
9007 return nil, gensupport.WrapError(&googleapi.Error{
9008 Code: res.StatusCode,
9009 Header: res.Header,
9010 })
9011 }
9012 if err != nil {
9013 return nil, err
9014 }
9015 defer googleapi.CloseBody(res)
9016 if err := googleapi.CheckResponse(res); err != nil {
9017 return nil, gensupport.WrapError(err)
9018 }
9019 ret := &SasPortalDevice{
9020 ServerResponse: googleapi.ServerResponse{
9021 Header: res.Header,
9022 HTTPStatusCode: res.StatusCode,
9023 },
9024 }
9025 target := &ret
9026 if err := gensupport.DecodeResponse(target, res); err != nil {
9027 return nil, err
9028 }
9029 return ret, nil
9030 }
9031
9032 type NodesDevicesSignDeviceCall struct {
9033 s *Service
9034 name string
9035 sasportalsigndevicerequest *SasPortalSignDeviceRequest
9036 urlParams_ gensupport.URLParams
9037 ctx_ context.Context
9038 header_ http.Header
9039 }
9040
9041
9042
9043
9044 func (r *NodesDevicesService) SignDevice(name string, sasportalsigndevicerequest *SasPortalSignDeviceRequest) *NodesDevicesSignDeviceCall {
9045 c := &NodesDevicesSignDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9046 c.name = name
9047 c.sasportalsigndevicerequest = sasportalsigndevicerequest
9048 return c
9049 }
9050
9051
9052
9053
9054 func (c *NodesDevicesSignDeviceCall) Fields(s ...googleapi.Field) *NodesDevicesSignDeviceCall {
9055 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9056 return c
9057 }
9058
9059
9060 func (c *NodesDevicesSignDeviceCall) Context(ctx context.Context) *NodesDevicesSignDeviceCall {
9061 c.ctx_ = ctx
9062 return c
9063 }
9064
9065
9066
9067 func (c *NodesDevicesSignDeviceCall) Header() http.Header {
9068 if c.header_ == nil {
9069 c.header_ = make(http.Header)
9070 }
9071 return c.header_
9072 }
9073
9074 func (c *NodesDevicesSignDeviceCall) doRequest(alt string) (*http.Response, error) {
9075 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9076 var body io.Reader = nil
9077 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalsigndevicerequest)
9078 if err != nil {
9079 return nil, err
9080 }
9081 c.urlParams_.Set("alt", alt)
9082 c.urlParams_.Set("prettyPrint", "false")
9083 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:signDevice")
9084 urls += "?" + c.urlParams_.Encode()
9085 req, err := http.NewRequest("POST", urls, body)
9086 if err != nil {
9087 return nil, err
9088 }
9089 req.Header = reqHeaders
9090 googleapi.Expand(req.URL, map[string]string{
9091 "name": c.name,
9092 })
9093 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9094 }
9095
9096
9097
9098
9099
9100
9101 func (c *NodesDevicesSignDeviceCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty, error) {
9102 gensupport.SetOptions(c.urlParams_, opts...)
9103 res, err := c.doRequest("json")
9104 if res != nil && res.StatusCode == http.StatusNotModified {
9105 if res.Body != nil {
9106 res.Body.Close()
9107 }
9108 return nil, gensupport.WrapError(&googleapi.Error{
9109 Code: res.StatusCode,
9110 Header: res.Header,
9111 })
9112 }
9113 if err != nil {
9114 return nil, err
9115 }
9116 defer googleapi.CloseBody(res)
9117 if err := googleapi.CheckResponse(res); err != nil {
9118 return nil, gensupport.WrapError(err)
9119 }
9120 ret := &SasPortalEmpty{
9121 ServerResponse: googleapi.ServerResponse{
9122 Header: res.Header,
9123 HTTPStatusCode: res.StatusCode,
9124 },
9125 }
9126 target := &ret
9127 if err := gensupport.DecodeResponse(target, res); err != nil {
9128 return nil, err
9129 }
9130 return ret, nil
9131 }
9132
9133 type NodesDevicesUpdateSignedCall struct {
9134 s *Service
9135 name string
9136 sasportalupdatesigneddevicerequest *SasPortalUpdateSignedDeviceRequest
9137 urlParams_ gensupport.URLParams
9138 ctx_ context.Context
9139 header_ http.Header
9140 }
9141
9142
9143
9144
9145 func (r *NodesDevicesService) UpdateSigned(name string, sasportalupdatesigneddevicerequest *SasPortalUpdateSignedDeviceRequest) *NodesDevicesUpdateSignedCall {
9146 c := &NodesDevicesUpdateSignedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9147 c.name = name
9148 c.sasportalupdatesigneddevicerequest = sasportalupdatesigneddevicerequest
9149 return c
9150 }
9151
9152
9153
9154
9155 func (c *NodesDevicesUpdateSignedCall) Fields(s ...googleapi.Field) *NodesDevicesUpdateSignedCall {
9156 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9157 return c
9158 }
9159
9160
9161 func (c *NodesDevicesUpdateSignedCall) Context(ctx context.Context) *NodesDevicesUpdateSignedCall {
9162 c.ctx_ = ctx
9163 return c
9164 }
9165
9166
9167
9168 func (c *NodesDevicesUpdateSignedCall) Header() http.Header {
9169 if c.header_ == nil {
9170 c.header_ = make(http.Header)
9171 }
9172 return c.header_
9173 }
9174
9175 func (c *NodesDevicesUpdateSignedCall) doRequest(alt string) (*http.Response, error) {
9176 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9177 var body io.Reader = nil
9178 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalupdatesigneddevicerequest)
9179 if err != nil {
9180 return nil, err
9181 }
9182 c.urlParams_.Set("alt", alt)
9183 c.urlParams_.Set("prettyPrint", "false")
9184 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:updateSigned")
9185 urls += "?" + c.urlParams_.Encode()
9186 req, err := http.NewRequest("PATCH", urls, body)
9187 if err != nil {
9188 return nil, err
9189 }
9190 req.Header = reqHeaders
9191 googleapi.Expand(req.URL, map[string]string{
9192 "name": c.name,
9193 })
9194 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9195 }
9196
9197
9198
9199
9200
9201
9202
9203 func (c *NodesDevicesUpdateSignedCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
9204 gensupport.SetOptions(c.urlParams_, opts...)
9205 res, err := c.doRequest("json")
9206 if res != nil && res.StatusCode == http.StatusNotModified {
9207 if res.Body != nil {
9208 res.Body.Close()
9209 }
9210 return nil, gensupport.WrapError(&googleapi.Error{
9211 Code: res.StatusCode,
9212 Header: res.Header,
9213 })
9214 }
9215 if err != nil {
9216 return nil, err
9217 }
9218 defer googleapi.CloseBody(res)
9219 if err := googleapi.CheckResponse(res); err != nil {
9220 return nil, gensupport.WrapError(err)
9221 }
9222 ret := &SasPortalDevice{
9223 ServerResponse: googleapi.ServerResponse{
9224 Header: res.Header,
9225 HTTPStatusCode: res.StatusCode,
9226 },
9227 }
9228 target := &ret
9229 if err := gensupport.DecodeResponse(target, res); err != nil {
9230 return nil, err
9231 }
9232 return ret, nil
9233 }
9234
9235 type NodesNodesCreateCall struct {
9236 s *Service
9237 parent string
9238 sasportalnode *SasPortalNode
9239 urlParams_ gensupport.URLParams
9240 ctx_ context.Context
9241 header_ http.Header
9242 }
9243
9244
9245
9246
9247 func (r *NodesNodesService) Create(parent string, sasportalnode *SasPortalNode) *NodesNodesCreateCall {
9248 c := &NodesNodesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9249 c.parent = parent
9250 c.sasportalnode = sasportalnode
9251 return c
9252 }
9253
9254
9255
9256
9257 func (c *NodesNodesCreateCall) Fields(s ...googleapi.Field) *NodesNodesCreateCall {
9258 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9259 return c
9260 }
9261
9262
9263 func (c *NodesNodesCreateCall) Context(ctx context.Context) *NodesNodesCreateCall {
9264 c.ctx_ = ctx
9265 return c
9266 }
9267
9268
9269
9270 func (c *NodesNodesCreateCall) Header() http.Header {
9271 if c.header_ == nil {
9272 c.header_ = make(http.Header)
9273 }
9274 return c.header_
9275 }
9276
9277 func (c *NodesNodesCreateCall) doRequest(alt string) (*http.Response, error) {
9278 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9279 var body io.Reader = nil
9280 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalnode)
9281 if err != nil {
9282 return nil, err
9283 }
9284 c.urlParams_.Set("alt", alt)
9285 c.urlParams_.Set("prettyPrint", "false")
9286 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/nodes")
9287 urls += "?" + c.urlParams_.Encode()
9288 req, err := http.NewRequest("POST", urls, body)
9289 if err != nil {
9290 return nil, err
9291 }
9292 req.Header = reqHeaders
9293 googleapi.Expand(req.URL, map[string]string{
9294 "parent": c.parent,
9295 })
9296 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9297 }
9298
9299
9300
9301
9302
9303
9304 func (c *NodesNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) {
9305 gensupport.SetOptions(c.urlParams_, opts...)
9306 res, err := c.doRequest("json")
9307 if res != nil && res.StatusCode == http.StatusNotModified {
9308 if res.Body != nil {
9309 res.Body.Close()
9310 }
9311 return nil, gensupport.WrapError(&googleapi.Error{
9312 Code: res.StatusCode,
9313 Header: res.Header,
9314 })
9315 }
9316 if err != nil {
9317 return nil, err
9318 }
9319 defer googleapi.CloseBody(res)
9320 if err := googleapi.CheckResponse(res); err != nil {
9321 return nil, gensupport.WrapError(err)
9322 }
9323 ret := &SasPortalNode{
9324 ServerResponse: googleapi.ServerResponse{
9325 Header: res.Header,
9326 HTTPStatusCode: res.StatusCode,
9327 },
9328 }
9329 target := &ret
9330 if err := gensupport.DecodeResponse(target, res); err != nil {
9331 return nil, err
9332 }
9333 return ret, nil
9334 }
9335
9336 type NodesNodesDeleteCall struct {
9337 s *Service
9338 name string
9339 urlParams_ gensupport.URLParams
9340 ctx_ context.Context
9341 header_ http.Header
9342 }
9343
9344
9345
9346
9347 func (r *NodesNodesService) Delete(name string) *NodesNodesDeleteCall {
9348 c := &NodesNodesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9349 c.name = name
9350 return c
9351 }
9352
9353
9354
9355
9356 func (c *NodesNodesDeleteCall) Fields(s ...googleapi.Field) *NodesNodesDeleteCall {
9357 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9358 return c
9359 }
9360
9361
9362 func (c *NodesNodesDeleteCall) Context(ctx context.Context) *NodesNodesDeleteCall {
9363 c.ctx_ = ctx
9364 return c
9365 }
9366
9367
9368
9369 func (c *NodesNodesDeleteCall) Header() http.Header {
9370 if c.header_ == nil {
9371 c.header_ = make(http.Header)
9372 }
9373 return c.header_
9374 }
9375
9376 func (c *NodesNodesDeleteCall) doRequest(alt string) (*http.Response, error) {
9377 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9378 var body io.Reader = nil
9379 c.urlParams_.Set("alt", alt)
9380 c.urlParams_.Set("prettyPrint", "false")
9381 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
9382 urls += "?" + c.urlParams_.Encode()
9383 req, err := http.NewRequest("DELETE", urls, body)
9384 if err != nil {
9385 return nil, err
9386 }
9387 req.Header = reqHeaders
9388 googleapi.Expand(req.URL, map[string]string{
9389 "name": c.name,
9390 })
9391 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9392 }
9393
9394
9395
9396
9397
9398
9399 func (c *NodesNodesDeleteCall) Do(opts ...googleapi.CallOption) (*SasPortalEmpty, error) {
9400 gensupport.SetOptions(c.urlParams_, opts...)
9401 res, err := c.doRequest("json")
9402 if res != nil && res.StatusCode == http.StatusNotModified {
9403 if res.Body != nil {
9404 res.Body.Close()
9405 }
9406 return nil, gensupport.WrapError(&googleapi.Error{
9407 Code: res.StatusCode,
9408 Header: res.Header,
9409 })
9410 }
9411 if err != nil {
9412 return nil, err
9413 }
9414 defer googleapi.CloseBody(res)
9415 if err := googleapi.CheckResponse(res); err != nil {
9416 return nil, gensupport.WrapError(err)
9417 }
9418 ret := &SasPortalEmpty{
9419 ServerResponse: googleapi.ServerResponse{
9420 Header: res.Header,
9421 HTTPStatusCode: res.StatusCode,
9422 },
9423 }
9424 target := &ret
9425 if err := gensupport.DecodeResponse(target, res); err != nil {
9426 return nil, err
9427 }
9428 return ret, nil
9429 }
9430
9431 type NodesNodesGetCall struct {
9432 s *Service
9433 name string
9434 urlParams_ gensupport.URLParams
9435 ifNoneMatch_ string
9436 ctx_ context.Context
9437 header_ http.Header
9438 }
9439
9440
9441
9442
9443 func (r *NodesNodesService) Get(name string) *NodesNodesGetCall {
9444 c := &NodesNodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9445 c.name = name
9446 return c
9447 }
9448
9449
9450
9451
9452 func (c *NodesNodesGetCall) Fields(s ...googleapi.Field) *NodesNodesGetCall {
9453 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9454 return c
9455 }
9456
9457
9458
9459
9460 func (c *NodesNodesGetCall) IfNoneMatch(entityTag string) *NodesNodesGetCall {
9461 c.ifNoneMatch_ = entityTag
9462 return c
9463 }
9464
9465
9466 func (c *NodesNodesGetCall) Context(ctx context.Context) *NodesNodesGetCall {
9467 c.ctx_ = ctx
9468 return c
9469 }
9470
9471
9472
9473 func (c *NodesNodesGetCall) Header() http.Header {
9474 if c.header_ == nil {
9475 c.header_ = make(http.Header)
9476 }
9477 return c.header_
9478 }
9479
9480 func (c *NodesNodesGetCall) doRequest(alt string) (*http.Response, error) {
9481 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9482 if c.ifNoneMatch_ != "" {
9483 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9484 }
9485 var body io.Reader = nil
9486 c.urlParams_.Set("alt", alt)
9487 c.urlParams_.Set("prettyPrint", "false")
9488 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
9489 urls += "?" + c.urlParams_.Encode()
9490 req, err := http.NewRequest("GET", urls, body)
9491 if err != nil {
9492 return nil, err
9493 }
9494 req.Header = reqHeaders
9495 googleapi.Expand(req.URL, map[string]string{
9496 "name": c.name,
9497 })
9498 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9499 }
9500
9501
9502
9503
9504
9505
9506 func (c *NodesNodesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) {
9507 gensupport.SetOptions(c.urlParams_, opts...)
9508 res, err := c.doRequest("json")
9509 if res != nil && res.StatusCode == http.StatusNotModified {
9510 if res.Body != nil {
9511 res.Body.Close()
9512 }
9513 return nil, gensupport.WrapError(&googleapi.Error{
9514 Code: res.StatusCode,
9515 Header: res.Header,
9516 })
9517 }
9518 if err != nil {
9519 return nil, err
9520 }
9521 defer googleapi.CloseBody(res)
9522 if err := googleapi.CheckResponse(res); err != nil {
9523 return nil, gensupport.WrapError(err)
9524 }
9525 ret := &SasPortalNode{
9526 ServerResponse: googleapi.ServerResponse{
9527 Header: res.Header,
9528 HTTPStatusCode: res.StatusCode,
9529 },
9530 }
9531 target := &ret
9532 if err := gensupport.DecodeResponse(target, res); err != nil {
9533 return nil, err
9534 }
9535 return ret, nil
9536 }
9537
9538 type NodesNodesListCall struct {
9539 s *Service
9540 parent string
9541 urlParams_ gensupport.URLParams
9542 ifNoneMatch_ string
9543 ctx_ context.Context
9544 header_ http.Header
9545 }
9546
9547
9548
9549
9550 func (r *NodesNodesService) List(parent string) *NodesNodesListCall {
9551 c := &NodesNodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9552 c.parent = parent
9553 return c
9554 }
9555
9556
9557
9558
9559
9560 func (c *NodesNodesListCall) Filter(filter string) *NodesNodesListCall {
9561 c.urlParams_.Set("filter", filter)
9562 return c
9563 }
9564
9565
9566
9567 func (c *NodesNodesListCall) PageSize(pageSize int64) *NodesNodesListCall {
9568 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9569 return c
9570 }
9571
9572
9573
9574
9575 func (c *NodesNodesListCall) PageToken(pageToken string) *NodesNodesListCall {
9576 c.urlParams_.Set("pageToken", pageToken)
9577 return c
9578 }
9579
9580
9581
9582
9583 func (c *NodesNodesListCall) Fields(s ...googleapi.Field) *NodesNodesListCall {
9584 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9585 return c
9586 }
9587
9588
9589
9590
9591 func (c *NodesNodesListCall) IfNoneMatch(entityTag string) *NodesNodesListCall {
9592 c.ifNoneMatch_ = entityTag
9593 return c
9594 }
9595
9596
9597 func (c *NodesNodesListCall) Context(ctx context.Context) *NodesNodesListCall {
9598 c.ctx_ = ctx
9599 return c
9600 }
9601
9602
9603
9604 func (c *NodesNodesListCall) Header() http.Header {
9605 if c.header_ == nil {
9606 c.header_ = make(http.Header)
9607 }
9608 return c.header_
9609 }
9610
9611 func (c *NodesNodesListCall) doRequest(alt string) (*http.Response, error) {
9612 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9613 if c.ifNoneMatch_ != "" {
9614 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9615 }
9616 var body io.Reader = nil
9617 c.urlParams_.Set("alt", alt)
9618 c.urlParams_.Set("prettyPrint", "false")
9619 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/nodes")
9620 urls += "?" + c.urlParams_.Encode()
9621 req, err := http.NewRequest("GET", urls, body)
9622 if err != nil {
9623 return nil, err
9624 }
9625 req.Header = reqHeaders
9626 googleapi.Expand(req.URL, map[string]string{
9627 "parent": c.parent,
9628 })
9629 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9630 }
9631
9632
9633
9634
9635
9636
9637
9638 func (c *NodesNodesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListNodesResponse, error) {
9639 gensupport.SetOptions(c.urlParams_, opts...)
9640 res, err := c.doRequest("json")
9641 if res != nil && res.StatusCode == http.StatusNotModified {
9642 if res.Body != nil {
9643 res.Body.Close()
9644 }
9645 return nil, gensupport.WrapError(&googleapi.Error{
9646 Code: res.StatusCode,
9647 Header: res.Header,
9648 })
9649 }
9650 if err != nil {
9651 return nil, err
9652 }
9653 defer googleapi.CloseBody(res)
9654 if err := googleapi.CheckResponse(res); err != nil {
9655 return nil, gensupport.WrapError(err)
9656 }
9657 ret := &SasPortalListNodesResponse{
9658 ServerResponse: googleapi.ServerResponse{
9659 Header: res.Header,
9660 HTTPStatusCode: res.StatusCode,
9661 },
9662 }
9663 target := &ret
9664 if err := gensupport.DecodeResponse(target, res); err != nil {
9665 return nil, err
9666 }
9667 return ret, nil
9668 }
9669
9670
9671
9672
9673 func (c *NodesNodesListCall) Pages(ctx context.Context, f func(*SasPortalListNodesResponse) error) error {
9674 c.ctx_ = ctx
9675 defer c.PageToken(c.urlParams_.Get("pageToken"))
9676 for {
9677 x, err := c.Do()
9678 if err != nil {
9679 return err
9680 }
9681 if err := f(x); err != nil {
9682 return err
9683 }
9684 if x.NextPageToken == "" {
9685 return nil
9686 }
9687 c.PageToken(x.NextPageToken)
9688 }
9689 }
9690
9691 type NodesNodesMoveCall struct {
9692 s *Service
9693 name string
9694 sasportalmovenoderequest *SasPortalMoveNodeRequest
9695 urlParams_ gensupport.URLParams
9696 ctx_ context.Context
9697 header_ http.Header
9698 }
9699
9700
9701
9702
9703 func (r *NodesNodesService) Move(name string, sasportalmovenoderequest *SasPortalMoveNodeRequest) *NodesNodesMoveCall {
9704 c := &NodesNodesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9705 c.name = name
9706 c.sasportalmovenoderequest = sasportalmovenoderequest
9707 return c
9708 }
9709
9710
9711
9712
9713 func (c *NodesNodesMoveCall) Fields(s ...googleapi.Field) *NodesNodesMoveCall {
9714 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9715 return c
9716 }
9717
9718
9719 func (c *NodesNodesMoveCall) Context(ctx context.Context) *NodesNodesMoveCall {
9720 c.ctx_ = ctx
9721 return c
9722 }
9723
9724
9725
9726 func (c *NodesNodesMoveCall) Header() http.Header {
9727 if c.header_ == nil {
9728 c.header_ = make(http.Header)
9729 }
9730 return c.header_
9731 }
9732
9733 func (c *NodesNodesMoveCall) doRequest(alt string) (*http.Response, error) {
9734 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9735 var body io.Reader = nil
9736 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalmovenoderequest)
9737 if err != nil {
9738 return nil, err
9739 }
9740 c.urlParams_.Set("alt", alt)
9741 c.urlParams_.Set("prettyPrint", "false")
9742 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:move")
9743 urls += "?" + c.urlParams_.Encode()
9744 req, err := http.NewRequest("POST", urls, body)
9745 if err != nil {
9746 return nil, err
9747 }
9748 req.Header = reqHeaders
9749 googleapi.Expand(req.URL, map[string]string{
9750 "name": c.name,
9751 })
9752 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9753 }
9754
9755
9756
9757
9758
9759
9760
9761 func (c *NodesNodesMoveCall) Do(opts ...googleapi.CallOption) (*SasPortalOperation, error) {
9762 gensupport.SetOptions(c.urlParams_, opts...)
9763 res, err := c.doRequest("json")
9764 if res != nil && res.StatusCode == http.StatusNotModified {
9765 if res.Body != nil {
9766 res.Body.Close()
9767 }
9768 return nil, gensupport.WrapError(&googleapi.Error{
9769 Code: res.StatusCode,
9770 Header: res.Header,
9771 })
9772 }
9773 if err != nil {
9774 return nil, err
9775 }
9776 defer googleapi.CloseBody(res)
9777 if err := googleapi.CheckResponse(res); err != nil {
9778 return nil, gensupport.WrapError(err)
9779 }
9780 ret := &SasPortalOperation{
9781 ServerResponse: googleapi.ServerResponse{
9782 Header: res.Header,
9783 HTTPStatusCode: res.StatusCode,
9784 },
9785 }
9786 target := &ret
9787 if err := gensupport.DecodeResponse(target, res); err != nil {
9788 return nil, err
9789 }
9790 return ret, nil
9791 }
9792
9793 type NodesNodesPatchCall struct {
9794 s *Service
9795 name string
9796 sasportalnode *SasPortalNode
9797 urlParams_ gensupport.URLParams
9798 ctx_ context.Context
9799 header_ http.Header
9800 }
9801
9802
9803
9804
9805 func (r *NodesNodesService) Patch(name string, sasportalnode *SasPortalNode) *NodesNodesPatchCall {
9806 c := &NodesNodesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9807 c.name = name
9808 c.sasportalnode = sasportalnode
9809 return c
9810 }
9811
9812
9813 func (c *NodesNodesPatchCall) UpdateMask(updateMask string) *NodesNodesPatchCall {
9814 c.urlParams_.Set("updateMask", updateMask)
9815 return c
9816 }
9817
9818
9819
9820
9821 func (c *NodesNodesPatchCall) Fields(s ...googleapi.Field) *NodesNodesPatchCall {
9822 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9823 return c
9824 }
9825
9826
9827 func (c *NodesNodesPatchCall) Context(ctx context.Context) *NodesNodesPatchCall {
9828 c.ctx_ = ctx
9829 return c
9830 }
9831
9832
9833
9834 func (c *NodesNodesPatchCall) Header() http.Header {
9835 if c.header_ == nil {
9836 c.header_ = make(http.Header)
9837 }
9838 return c.header_
9839 }
9840
9841 func (c *NodesNodesPatchCall) doRequest(alt string) (*http.Response, error) {
9842 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9843 var body io.Reader = nil
9844 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalnode)
9845 if err != nil {
9846 return nil, err
9847 }
9848 c.urlParams_.Set("alt", alt)
9849 c.urlParams_.Set("prettyPrint", "false")
9850 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
9851 urls += "?" + c.urlParams_.Encode()
9852 req, err := http.NewRequest("PATCH", urls, body)
9853 if err != nil {
9854 return nil, err
9855 }
9856 req.Header = reqHeaders
9857 googleapi.Expand(req.URL, map[string]string{
9858 "name": c.name,
9859 })
9860 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9861 }
9862
9863
9864
9865
9866
9867
9868 func (c *NodesNodesPatchCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) {
9869 gensupport.SetOptions(c.urlParams_, opts...)
9870 res, err := c.doRequest("json")
9871 if res != nil && res.StatusCode == http.StatusNotModified {
9872 if res.Body != nil {
9873 res.Body.Close()
9874 }
9875 return nil, gensupport.WrapError(&googleapi.Error{
9876 Code: res.StatusCode,
9877 Header: res.Header,
9878 })
9879 }
9880 if err != nil {
9881 return nil, err
9882 }
9883 defer googleapi.CloseBody(res)
9884 if err := googleapi.CheckResponse(res); err != nil {
9885 return nil, gensupport.WrapError(err)
9886 }
9887 ret := &SasPortalNode{
9888 ServerResponse: googleapi.ServerResponse{
9889 Header: res.Header,
9890 HTTPStatusCode: res.StatusCode,
9891 },
9892 }
9893 target := &ret
9894 if err := gensupport.DecodeResponse(target, res); err != nil {
9895 return nil, err
9896 }
9897 return ret, nil
9898 }
9899
9900 type NodesNodesDeploymentsCreateCall struct {
9901 s *Service
9902 parent string
9903 sasportaldeployment *SasPortalDeployment
9904 urlParams_ gensupport.URLParams
9905 ctx_ context.Context
9906 header_ http.Header
9907 }
9908
9909
9910
9911
9912 func (r *NodesNodesDeploymentsService) Create(parent string, sasportaldeployment *SasPortalDeployment) *NodesNodesDeploymentsCreateCall {
9913 c := &NodesNodesDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9914 c.parent = parent
9915 c.sasportaldeployment = sasportaldeployment
9916 return c
9917 }
9918
9919
9920
9921
9922 func (c *NodesNodesDeploymentsCreateCall) Fields(s ...googleapi.Field) *NodesNodesDeploymentsCreateCall {
9923 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9924 return c
9925 }
9926
9927
9928 func (c *NodesNodesDeploymentsCreateCall) Context(ctx context.Context) *NodesNodesDeploymentsCreateCall {
9929 c.ctx_ = ctx
9930 return c
9931 }
9932
9933
9934
9935 func (c *NodesNodesDeploymentsCreateCall) Header() http.Header {
9936 if c.header_ == nil {
9937 c.header_ = make(http.Header)
9938 }
9939 return c.header_
9940 }
9941
9942 func (c *NodesNodesDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) {
9943 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9944 var body io.Reader = nil
9945 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldeployment)
9946 if err != nil {
9947 return nil, err
9948 }
9949 c.urlParams_.Set("alt", alt)
9950 c.urlParams_.Set("prettyPrint", "false")
9951 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/deployments")
9952 urls += "?" + c.urlParams_.Encode()
9953 req, err := http.NewRequest("POST", urls, body)
9954 if err != nil {
9955 return nil, err
9956 }
9957 req.Header = reqHeaders
9958 googleapi.Expand(req.URL, map[string]string{
9959 "parent": c.parent,
9960 })
9961 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9962 }
9963
9964
9965
9966
9967
9968
9969
9970 func (c *NodesNodesDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDeployment, error) {
9971 gensupport.SetOptions(c.urlParams_, opts...)
9972 res, err := c.doRequest("json")
9973 if res != nil && res.StatusCode == http.StatusNotModified {
9974 if res.Body != nil {
9975 res.Body.Close()
9976 }
9977 return nil, gensupport.WrapError(&googleapi.Error{
9978 Code: res.StatusCode,
9979 Header: res.Header,
9980 })
9981 }
9982 if err != nil {
9983 return nil, err
9984 }
9985 defer googleapi.CloseBody(res)
9986 if err := googleapi.CheckResponse(res); err != nil {
9987 return nil, gensupport.WrapError(err)
9988 }
9989 ret := &SasPortalDeployment{
9990 ServerResponse: googleapi.ServerResponse{
9991 Header: res.Header,
9992 HTTPStatusCode: res.StatusCode,
9993 },
9994 }
9995 target := &ret
9996 if err := gensupport.DecodeResponse(target, res); err != nil {
9997 return nil, err
9998 }
9999 return ret, nil
10000 }
10001
10002 type NodesNodesDeploymentsListCall struct {
10003 s *Service
10004 parent string
10005 urlParams_ gensupport.URLParams
10006 ifNoneMatch_ string
10007 ctx_ context.Context
10008 header_ http.Header
10009 }
10010
10011
10012
10013
10014
10015 func (r *NodesNodesDeploymentsService) List(parent string) *NodesNodesDeploymentsListCall {
10016 c := &NodesNodesDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10017 c.parent = parent
10018 return c
10019 }
10020
10021
10022
10023
10024
10025 func (c *NodesNodesDeploymentsListCall) Filter(filter string) *NodesNodesDeploymentsListCall {
10026 c.urlParams_.Set("filter", filter)
10027 return c
10028 }
10029
10030
10031
10032 func (c *NodesNodesDeploymentsListCall) PageSize(pageSize int64) *NodesNodesDeploymentsListCall {
10033 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10034 return c
10035 }
10036
10037
10038
10039
10040 func (c *NodesNodesDeploymentsListCall) PageToken(pageToken string) *NodesNodesDeploymentsListCall {
10041 c.urlParams_.Set("pageToken", pageToken)
10042 return c
10043 }
10044
10045
10046
10047
10048 func (c *NodesNodesDeploymentsListCall) Fields(s ...googleapi.Field) *NodesNodesDeploymentsListCall {
10049 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10050 return c
10051 }
10052
10053
10054
10055
10056 func (c *NodesNodesDeploymentsListCall) IfNoneMatch(entityTag string) *NodesNodesDeploymentsListCall {
10057 c.ifNoneMatch_ = entityTag
10058 return c
10059 }
10060
10061
10062 func (c *NodesNodesDeploymentsListCall) Context(ctx context.Context) *NodesNodesDeploymentsListCall {
10063 c.ctx_ = ctx
10064 return c
10065 }
10066
10067
10068
10069 func (c *NodesNodesDeploymentsListCall) Header() http.Header {
10070 if c.header_ == nil {
10071 c.header_ = make(http.Header)
10072 }
10073 return c.header_
10074 }
10075
10076 func (c *NodesNodesDeploymentsListCall) doRequest(alt string) (*http.Response, error) {
10077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10078 if c.ifNoneMatch_ != "" {
10079 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10080 }
10081 var body io.Reader = nil
10082 c.urlParams_.Set("alt", alt)
10083 c.urlParams_.Set("prettyPrint", "false")
10084 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/deployments")
10085 urls += "?" + c.urlParams_.Encode()
10086 req, err := http.NewRequest("GET", urls, body)
10087 if err != nil {
10088 return nil, err
10089 }
10090 req.Header = reqHeaders
10091 googleapi.Expand(req.URL, map[string]string{
10092 "parent": c.parent,
10093 })
10094 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10095 }
10096
10097
10098
10099
10100
10101
10102
10103 func (c *NodesNodesDeploymentsListCall) Do(opts ...googleapi.CallOption) (*SasPortalListDeploymentsResponse, error) {
10104 gensupport.SetOptions(c.urlParams_, opts...)
10105 res, err := c.doRequest("json")
10106 if res != nil && res.StatusCode == http.StatusNotModified {
10107 if res.Body != nil {
10108 res.Body.Close()
10109 }
10110 return nil, gensupport.WrapError(&googleapi.Error{
10111 Code: res.StatusCode,
10112 Header: res.Header,
10113 })
10114 }
10115 if err != nil {
10116 return nil, err
10117 }
10118 defer googleapi.CloseBody(res)
10119 if err := googleapi.CheckResponse(res); err != nil {
10120 return nil, gensupport.WrapError(err)
10121 }
10122 ret := &SasPortalListDeploymentsResponse{
10123 ServerResponse: googleapi.ServerResponse{
10124 Header: res.Header,
10125 HTTPStatusCode: res.StatusCode,
10126 },
10127 }
10128 target := &ret
10129 if err := gensupport.DecodeResponse(target, res); err != nil {
10130 return nil, err
10131 }
10132 return ret, nil
10133 }
10134
10135
10136
10137
10138 func (c *NodesNodesDeploymentsListCall) Pages(ctx context.Context, f func(*SasPortalListDeploymentsResponse) error) error {
10139 c.ctx_ = ctx
10140 defer c.PageToken(c.urlParams_.Get("pageToken"))
10141 for {
10142 x, err := c.Do()
10143 if err != nil {
10144 return err
10145 }
10146 if err := f(x); err != nil {
10147 return err
10148 }
10149 if x.NextPageToken == "" {
10150 return nil
10151 }
10152 c.PageToken(x.NextPageToken)
10153 }
10154 }
10155
10156 type NodesNodesDevicesCreateCall struct {
10157 s *Service
10158 parent string
10159 sasportaldevice *SasPortalDevice
10160 urlParams_ gensupport.URLParams
10161 ctx_ context.Context
10162 header_ http.Header
10163 }
10164
10165
10166
10167
10168 func (r *NodesNodesDevicesService) Create(parent string, sasportaldevice *SasPortalDevice) *NodesNodesDevicesCreateCall {
10169 c := &NodesNodesDevicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10170 c.parent = parent
10171 c.sasportaldevice = sasportaldevice
10172 return c
10173 }
10174
10175
10176
10177
10178 func (c *NodesNodesDevicesCreateCall) Fields(s ...googleapi.Field) *NodesNodesDevicesCreateCall {
10179 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10180 return c
10181 }
10182
10183
10184 func (c *NodesNodesDevicesCreateCall) Context(ctx context.Context) *NodesNodesDevicesCreateCall {
10185 c.ctx_ = ctx
10186 return c
10187 }
10188
10189
10190
10191 func (c *NodesNodesDevicesCreateCall) Header() http.Header {
10192 if c.header_ == nil {
10193 c.header_ = make(http.Header)
10194 }
10195 return c.header_
10196 }
10197
10198 func (c *NodesNodesDevicesCreateCall) doRequest(alt string) (*http.Response, error) {
10199 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10200 var body io.Reader = nil
10201 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaldevice)
10202 if err != nil {
10203 return nil, err
10204 }
10205 c.urlParams_.Set("alt", alt)
10206 c.urlParams_.Set("prettyPrint", "false")
10207 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
10208 urls += "?" + c.urlParams_.Encode()
10209 req, err := http.NewRequest("POST", urls, body)
10210 if err != nil {
10211 return nil, err
10212 }
10213 req.Header = reqHeaders
10214 googleapi.Expand(req.URL, map[string]string{
10215 "parent": c.parent,
10216 })
10217 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10218 }
10219
10220
10221
10222
10223
10224
10225
10226 func (c *NodesNodesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
10227 gensupport.SetOptions(c.urlParams_, opts...)
10228 res, err := c.doRequest("json")
10229 if res != nil && res.StatusCode == http.StatusNotModified {
10230 if res.Body != nil {
10231 res.Body.Close()
10232 }
10233 return nil, gensupport.WrapError(&googleapi.Error{
10234 Code: res.StatusCode,
10235 Header: res.Header,
10236 })
10237 }
10238 if err != nil {
10239 return nil, err
10240 }
10241 defer googleapi.CloseBody(res)
10242 if err := googleapi.CheckResponse(res); err != nil {
10243 return nil, gensupport.WrapError(err)
10244 }
10245 ret := &SasPortalDevice{
10246 ServerResponse: googleapi.ServerResponse{
10247 Header: res.Header,
10248 HTTPStatusCode: res.StatusCode,
10249 },
10250 }
10251 target := &ret
10252 if err := gensupport.DecodeResponse(target, res); err != nil {
10253 return nil, err
10254 }
10255 return ret, nil
10256 }
10257
10258 type NodesNodesDevicesCreateSignedCall struct {
10259 s *Service
10260 parent string
10261 sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest
10262 urlParams_ gensupport.URLParams
10263 ctx_ context.Context
10264 header_ http.Header
10265 }
10266
10267
10268
10269
10270 func (r *NodesNodesDevicesService) CreateSigned(parent string, sasportalcreatesigneddevicerequest *SasPortalCreateSignedDeviceRequest) *NodesNodesDevicesCreateSignedCall {
10271 c := &NodesNodesDevicesCreateSignedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10272 c.parent = parent
10273 c.sasportalcreatesigneddevicerequest = sasportalcreatesigneddevicerequest
10274 return c
10275 }
10276
10277
10278
10279
10280 func (c *NodesNodesDevicesCreateSignedCall) Fields(s ...googleapi.Field) *NodesNodesDevicesCreateSignedCall {
10281 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10282 return c
10283 }
10284
10285
10286 func (c *NodesNodesDevicesCreateSignedCall) Context(ctx context.Context) *NodesNodesDevicesCreateSignedCall {
10287 c.ctx_ = ctx
10288 return c
10289 }
10290
10291
10292
10293 func (c *NodesNodesDevicesCreateSignedCall) Header() http.Header {
10294 if c.header_ == nil {
10295 c.header_ = make(http.Header)
10296 }
10297 return c.header_
10298 }
10299
10300 func (c *NodesNodesDevicesCreateSignedCall) doRequest(alt string) (*http.Response, error) {
10301 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10302 var body io.Reader = nil
10303 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalcreatesigneddevicerequest)
10304 if err != nil {
10305 return nil, err
10306 }
10307 c.urlParams_.Set("alt", alt)
10308 c.urlParams_.Set("prettyPrint", "false")
10309 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices:createSigned")
10310 urls += "?" + c.urlParams_.Encode()
10311 req, err := http.NewRequest("POST", urls, body)
10312 if err != nil {
10313 return nil, err
10314 }
10315 req.Header = reqHeaders
10316 googleapi.Expand(req.URL, map[string]string{
10317 "parent": c.parent,
10318 })
10319 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10320 }
10321
10322
10323
10324
10325
10326
10327
10328 func (c *NodesNodesDevicesCreateSignedCall) Do(opts ...googleapi.CallOption) (*SasPortalDevice, error) {
10329 gensupport.SetOptions(c.urlParams_, opts...)
10330 res, err := c.doRequest("json")
10331 if res != nil && res.StatusCode == http.StatusNotModified {
10332 if res.Body != nil {
10333 res.Body.Close()
10334 }
10335 return nil, gensupport.WrapError(&googleapi.Error{
10336 Code: res.StatusCode,
10337 Header: res.Header,
10338 })
10339 }
10340 if err != nil {
10341 return nil, err
10342 }
10343 defer googleapi.CloseBody(res)
10344 if err := googleapi.CheckResponse(res); err != nil {
10345 return nil, gensupport.WrapError(err)
10346 }
10347 ret := &SasPortalDevice{
10348 ServerResponse: googleapi.ServerResponse{
10349 Header: res.Header,
10350 HTTPStatusCode: res.StatusCode,
10351 },
10352 }
10353 target := &ret
10354 if err := gensupport.DecodeResponse(target, res); err != nil {
10355 return nil, err
10356 }
10357 return ret, nil
10358 }
10359
10360 type NodesNodesDevicesListCall struct {
10361 s *Service
10362 parent string
10363 urlParams_ gensupport.URLParams
10364 ifNoneMatch_ string
10365 ctx_ context.Context
10366 header_ http.Header
10367 }
10368
10369
10370
10371
10372 func (r *NodesNodesDevicesService) List(parent string) *NodesNodesDevicesListCall {
10373 c := &NodesNodesDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10374 c.parent = parent
10375 return c
10376 }
10377
10378
10379
10380
10381
10382 func (c *NodesNodesDevicesListCall) Filter(filter string) *NodesNodesDevicesListCall {
10383 c.urlParams_.Set("filter", filter)
10384 return c
10385 }
10386
10387
10388
10389
10390 func (c *NodesNodesDevicesListCall) PageSize(pageSize int64) *NodesNodesDevicesListCall {
10391 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10392 return c
10393 }
10394
10395
10396
10397
10398 func (c *NodesNodesDevicesListCall) PageToken(pageToken string) *NodesNodesDevicesListCall {
10399 c.urlParams_.Set("pageToken", pageToken)
10400 return c
10401 }
10402
10403
10404
10405
10406 func (c *NodesNodesDevicesListCall) Fields(s ...googleapi.Field) *NodesNodesDevicesListCall {
10407 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10408 return c
10409 }
10410
10411
10412
10413
10414 func (c *NodesNodesDevicesListCall) IfNoneMatch(entityTag string) *NodesNodesDevicesListCall {
10415 c.ifNoneMatch_ = entityTag
10416 return c
10417 }
10418
10419
10420 func (c *NodesNodesDevicesListCall) Context(ctx context.Context) *NodesNodesDevicesListCall {
10421 c.ctx_ = ctx
10422 return c
10423 }
10424
10425
10426
10427 func (c *NodesNodesDevicesListCall) Header() http.Header {
10428 if c.header_ == nil {
10429 c.header_ = make(http.Header)
10430 }
10431 return c.header_
10432 }
10433
10434 func (c *NodesNodesDevicesListCall) doRequest(alt string) (*http.Response, error) {
10435 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10436 if c.ifNoneMatch_ != "" {
10437 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10438 }
10439 var body io.Reader = nil
10440 c.urlParams_.Set("alt", alt)
10441 c.urlParams_.Set("prettyPrint", "false")
10442 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/devices")
10443 urls += "?" + c.urlParams_.Encode()
10444 req, err := http.NewRequest("GET", urls, body)
10445 if err != nil {
10446 return nil, err
10447 }
10448 req.Header = reqHeaders
10449 googleapi.Expand(req.URL, map[string]string{
10450 "parent": c.parent,
10451 })
10452 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10453 }
10454
10455
10456
10457
10458
10459
10460
10461 func (c *NodesNodesDevicesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListDevicesResponse, error) {
10462 gensupport.SetOptions(c.urlParams_, opts...)
10463 res, err := c.doRequest("json")
10464 if res != nil && res.StatusCode == http.StatusNotModified {
10465 if res.Body != nil {
10466 res.Body.Close()
10467 }
10468 return nil, gensupport.WrapError(&googleapi.Error{
10469 Code: res.StatusCode,
10470 Header: res.Header,
10471 })
10472 }
10473 if err != nil {
10474 return nil, err
10475 }
10476 defer googleapi.CloseBody(res)
10477 if err := googleapi.CheckResponse(res); err != nil {
10478 return nil, gensupport.WrapError(err)
10479 }
10480 ret := &SasPortalListDevicesResponse{
10481 ServerResponse: googleapi.ServerResponse{
10482 Header: res.Header,
10483 HTTPStatusCode: res.StatusCode,
10484 },
10485 }
10486 target := &ret
10487 if err := gensupport.DecodeResponse(target, res); err != nil {
10488 return nil, err
10489 }
10490 return ret, nil
10491 }
10492
10493
10494
10495
10496 func (c *NodesNodesDevicesListCall) Pages(ctx context.Context, f func(*SasPortalListDevicesResponse) error) error {
10497 c.ctx_ = ctx
10498 defer c.PageToken(c.urlParams_.Get("pageToken"))
10499 for {
10500 x, err := c.Do()
10501 if err != nil {
10502 return err
10503 }
10504 if err := f(x); err != nil {
10505 return err
10506 }
10507 if x.NextPageToken == "" {
10508 return nil
10509 }
10510 c.PageToken(x.NextPageToken)
10511 }
10512 }
10513
10514 type NodesNodesNodesCreateCall struct {
10515 s *Service
10516 parent string
10517 sasportalnode *SasPortalNode
10518 urlParams_ gensupport.URLParams
10519 ctx_ context.Context
10520 header_ http.Header
10521 }
10522
10523
10524
10525
10526 func (r *NodesNodesNodesService) Create(parent string, sasportalnode *SasPortalNode) *NodesNodesNodesCreateCall {
10527 c := &NodesNodesNodesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10528 c.parent = parent
10529 c.sasportalnode = sasportalnode
10530 return c
10531 }
10532
10533
10534
10535
10536 func (c *NodesNodesNodesCreateCall) Fields(s ...googleapi.Field) *NodesNodesNodesCreateCall {
10537 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10538 return c
10539 }
10540
10541
10542 func (c *NodesNodesNodesCreateCall) Context(ctx context.Context) *NodesNodesNodesCreateCall {
10543 c.ctx_ = ctx
10544 return c
10545 }
10546
10547
10548
10549 func (c *NodesNodesNodesCreateCall) Header() http.Header {
10550 if c.header_ == nil {
10551 c.header_ = make(http.Header)
10552 }
10553 return c.header_
10554 }
10555
10556 func (c *NodesNodesNodesCreateCall) doRequest(alt string) (*http.Response, error) {
10557 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10558 var body io.Reader = nil
10559 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalnode)
10560 if err != nil {
10561 return nil, err
10562 }
10563 c.urlParams_.Set("alt", alt)
10564 c.urlParams_.Set("prettyPrint", "false")
10565 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/nodes")
10566 urls += "?" + c.urlParams_.Encode()
10567 req, err := http.NewRequest("POST", urls, body)
10568 if err != nil {
10569 return nil, err
10570 }
10571 req.Header = reqHeaders
10572 googleapi.Expand(req.URL, map[string]string{
10573 "parent": c.parent,
10574 })
10575 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10576 }
10577
10578
10579
10580
10581
10582
10583 func (c *NodesNodesNodesCreateCall) Do(opts ...googleapi.CallOption) (*SasPortalNode, error) {
10584 gensupport.SetOptions(c.urlParams_, opts...)
10585 res, err := c.doRequest("json")
10586 if res != nil && res.StatusCode == http.StatusNotModified {
10587 if res.Body != nil {
10588 res.Body.Close()
10589 }
10590 return nil, gensupport.WrapError(&googleapi.Error{
10591 Code: res.StatusCode,
10592 Header: res.Header,
10593 })
10594 }
10595 if err != nil {
10596 return nil, err
10597 }
10598 defer googleapi.CloseBody(res)
10599 if err := googleapi.CheckResponse(res); err != nil {
10600 return nil, gensupport.WrapError(err)
10601 }
10602 ret := &SasPortalNode{
10603 ServerResponse: googleapi.ServerResponse{
10604 Header: res.Header,
10605 HTTPStatusCode: res.StatusCode,
10606 },
10607 }
10608 target := &ret
10609 if err := gensupport.DecodeResponse(target, res); err != nil {
10610 return nil, err
10611 }
10612 return ret, nil
10613 }
10614
10615 type NodesNodesNodesListCall struct {
10616 s *Service
10617 parent string
10618 urlParams_ gensupport.URLParams
10619 ifNoneMatch_ string
10620 ctx_ context.Context
10621 header_ http.Header
10622 }
10623
10624
10625
10626
10627 func (r *NodesNodesNodesService) List(parent string) *NodesNodesNodesListCall {
10628 c := &NodesNodesNodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10629 c.parent = parent
10630 return c
10631 }
10632
10633
10634
10635
10636
10637 func (c *NodesNodesNodesListCall) Filter(filter string) *NodesNodesNodesListCall {
10638 c.urlParams_.Set("filter", filter)
10639 return c
10640 }
10641
10642
10643
10644 func (c *NodesNodesNodesListCall) PageSize(pageSize int64) *NodesNodesNodesListCall {
10645 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10646 return c
10647 }
10648
10649
10650
10651
10652 func (c *NodesNodesNodesListCall) PageToken(pageToken string) *NodesNodesNodesListCall {
10653 c.urlParams_.Set("pageToken", pageToken)
10654 return c
10655 }
10656
10657
10658
10659
10660 func (c *NodesNodesNodesListCall) Fields(s ...googleapi.Field) *NodesNodesNodesListCall {
10661 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10662 return c
10663 }
10664
10665
10666
10667
10668 func (c *NodesNodesNodesListCall) IfNoneMatch(entityTag string) *NodesNodesNodesListCall {
10669 c.ifNoneMatch_ = entityTag
10670 return c
10671 }
10672
10673
10674 func (c *NodesNodesNodesListCall) Context(ctx context.Context) *NodesNodesNodesListCall {
10675 c.ctx_ = ctx
10676 return c
10677 }
10678
10679
10680
10681 func (c *NodesNodesNodesListCall) Header() http.Header {
10682 if c.header_ == nil {
10683 c.header_ = make(http.Header)
10684 }
10685 return c.header_
10686 }
10687
10688 func (c *NodesNodesNodesListCall) doRequest(alt string) (*http.Response, error) {
10689 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10690 if c.ifNoneMatch_ != "" {
10691 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10692 }
10693 var body io.Reader = nil
10694 c.urlParams_.Set("alt", alt)
10695 c.urlParams_.Set("prettyPrint", "false")
10696 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/nodes")
10697 urls += "?" + c.urlParams_.Encode()
10698 req, err := http.NewRequest("GET", urls, body)
10699 if err != nil {
10700 return nil, err
10701 }
10702 req.Header = reqHeaders
10703 googleapi.Expand(req.URL, map[string]string{
10704 "parent": c.parent,
10705 })
10706 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10707 }
10708
10709
10710
10711
10712
10713
10714
10715 func (c *NodesNodesNodesListCall) Do(opts ...googleapi.CallOption) (*SasPortalListNodesResponse, error) {
10716 gensupport.SetOptions(c.urlParams_, opts...)
10717 res, err := c.doRequest("json")
10718 if res != nil && res.StatusCode == http.StatusNotModified {
10719 if res.Body != nil {
10720 res.Body.Close()
10721 }
10722 return nil, gensupport.WrapError(&googleapi.Error{
10723 Code: res.StatusCode,
10724 Header: res.Header,
10725 })
10726 }
10727 if err != nil {
10728 return nil, err
10729 }
10730 defer googleapi.CloseBody(res)
10731 if err := googleapi.CheckResponse(res); err != nil {
10732 return nil, gensupport.WrapError(err)
10733 }
10734 ret := &SasPortalListNodesResponse{
10735 ServerResponse: googleapi.ServerResponse{
10736 Header: res.Header,
10737 HTTPStatusCode: res.StatusCode,
10738 },
10739 }
10740 target := &ret
10741 if err := gensupport.DecodeResponse(target, res); err != nil {
10742 return nil, err
10743 }
10744 return ret, nil
10745 }
10746
10747
10748
10749
10750 func (c *NodesNodesNodesListCall) Pages(ctx context.Context, f func(*SasPortalListNodesResponse) error) error {
10751 c.ctx_ = ctx
10752 defer c.PageToken(c.urlParams_.Get("pageToken"))
10753 for {
10754 x, err := c.Do()
10755 if err != nil {
10756 return err
10757 }
10758 if err := f(x); err != nil {
10759 return err
10760 }
10761 if x.NextPageToken == "" {
10762 return nil
10763 }
10764 c.PageToken(x.NextPageToken)
10765 }
10766 }
10767
10768 type PoliciesGetCall struct {
10769 s *Service
10770 sasportalgetpolicyrequest *SasPortalGetPolicyRequest
10771 urlParams_ gensupport.URLParams
10772 ctx_ context.Context
10773 header_ http.Header
10774 }
10775
10776
10777
10778 func (r *PoliciesService) Get(sasportalgetpolicyrequest *SasPortalGetPolicyRequest) *PoliciesGetCall {
10779 c := &PoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10780 c.sasportalgetpolicyrequest = sasportalgetpolicyrequest
10781 return c
10782 }
10783
10784
10785
10786
10787 func (c *PoliciesGetCall) Fields(s ...googleapi.Field) *PoliciesGetCall {
10788 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10789 return c
10790 }
10791
10792
10793 func (c *PoliciesGetCall) Context(ctx context.Context) *PoliciesGetCall {
10794 c.ctx_ = ctx
10795 return c
10796 }
10797
10798
10799
10800 func (c *PoliciesGetCall) Header() http.Header {
10801 if c.header_ == nil {
10802 c.header_ = make(http.Header)
10803 }
10804 return c.header_
10805 }
10806
10807 func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) {
10808 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10809 var body io.Reader = nil
10810 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalgetpolicyrequest)
10811 if err != nil {
10812 return nil, err
10813 }
10814 c.urlParams_.Set("alt", alt)
10815 c.urlParams_.Set("prettyPrint", "false")
10816 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/policies:get")
10817 urls += "?" + c.urlParams_.Encode()
10818 req, err := http.NewRequest("POST", urls, body)
10819 if err != nil {
10820 return nil, err
10821 }
10822 req.Header = reqHeaders
10823 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10824 }
10825
10826
10827
10828
10829
10830
10831
10832 func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*SasPortalPolicy, error) {
10833 gensupport.SetOptions(c.urlParams_, opts...)
10834 res, err := c.doRequest("json")
10835 if res != nil && res.StatusCode == http.StatusNotModified {
10836 if res.Body != nil {
10837 res.Body.Close()
10838 }
10839 return nil, gensupport.WrapError(&googleapi.Error{
10840 Code: res.StatusCode,
10841 Header: res.Header,
10842 })
10843 }
10844 if err != nil {
10845 return nil, err
10846 }
10847 defer googleapi.CloseBody(res)
10848 if err := googleapi.CheckResponse(res); err != nil {
10849 return nil, gensupport.WrapError(err)
10850 }
10851 ret := &SasPortalPolicy{
10852 ServerResponse: googleapi.ServerResponse{
10853 Header: res.Header,
10854 HTTPStatusCode: res.StatusCode,
10855 },
10856 }
10857 target := &ret
10858 if err := gensupport.DecodeResponse(target, res); err != nil {
10859 return nil, err
10860 }
10861 return ret, nil
10862 }
10863
10864 type PoliciesSetCall struct {
10865 s *Service
10866 sasportalsetpolicyrequest *SasPortalSetPolicyRequest
10867 urlParams_ gensupport.URLParams
10868 ctx_ context.Context
10869 header_ http.Header
10870 }
10871
10872
10873
10874 func (r *PoliciesService) Set(sasportalsetpolicyrequest *SasPortalSetPolicyRequest) *PoliciesSetCall {
10875 c := &PoliciesSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10876 c.sasportalsetpolicyrequest = sasportalsetpolicyrequest
10877 return c
10878 }
10879
10880
10881
10882
10883 func (c *PoliciesSetCall) Fields(s ...googleapi.Field) *PoliciesSetCall {
10884 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10885 return c
10886 }
10887
10888
10889 func (c *PoliciesSetCall) Context(ctx context.Context) *PoliciesSetCall {
10890 c.ctx_ = ctx
10891 return c
10892 }
10893
10894
10895
10896 func (c *PoliciesSetCall) Header() http.Header {
10897 if c.header_ == nil {
10898 c.header_ = make(http.Header)
10899 }
10900 return c.header_
10901 }
10902
10903 func (c *PoliciesSetCall) doRequest(alt string) (*http.Response, error) {
10904 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10905 var body io.Reader = nil
10906 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalsetpolicyrequest)
10907 if err != nil {
10908 return nil, err
10909 }
10910 c.urlParams_.Set("alt", alt)
10911 c.urlParams_.Set("prettyPrint", "false")
10912 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/policies:set")
10913 urls += "?" + c.urlParams_.Encode()
10914 req, err := http.NewRequest("POST", urls, body)
10915 if err != nil {
10916 return nil, err
10917 }
10918 req.Header = reqHeaders
10919 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10920 }
10921
10922
10923
10924
10925
10926
10927
10928 func (c *PoliciesSetCall) Do(opts ...googleapi.CallOption) (*SasPortalPolicy, error) {
10929 gensupport.SetOptions(c.urlParams_, opts...)
10930 res, err := c.doRequest("json")
10931 if res != nil && res.StatusCode == http.StatusNotModified {
10932 if res.Body != nil {
10933 res.Body.Close()
10934 }
10935 return nil, gensupport.WrapError(&googleapi.Error{
10936 Code: res.StatusCode,
10937 Header: res.Header,
10938 })
10939 }
10940 if err != nil {
10941 return nil, err
10942 }
10943 defer googleapi.CloseBody(res)
10944 if err := googleapi.CheckResponse(res); err != nil {
10945 return nil, gensupport.WrapError(err)
10946 }
10947 ret := &SasPortalPolicy{
10948 ServerResponse: googleapi.ServerResponse{
10949 Header: res.Header,
10950 HTTPStatusCode: res.StatusCode,
10951 },
10952 }
10953 target := &ret
10954 if err := gensupport.DecodeResponse(target, res); err != nil {
10955 return nil, err
10956 }
10957 return ret, nil
10958 }
10959
10960 type PoliciesTestCall struct {
10961 s *Service
10962 sasportaltestpermissionsrequest *SasPortalTestPermissionsRequest
10963 urlParams_ gensupport.URLParams
10964 ctx_ context.Context
10965 header_ http.Header
10966 }
10967
10968
10969 func (r *PoliciesService) Test(sasportaltestpermissionsrequest *SasPortalTestPermissionsRequest) *PoliciesTestCall {
10970 c := &PoliciesTestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10971 c.sasportaltestpermissionsrequest = sasportaltestpermissionsrequest
10972 return c
10973 }
10974
10975
10976
10977
10978 func (c *PoliciesTestCall) Fields(s ...googleapi.Field) *PoliciesTestCall {
10979 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10980 return c
10981 }
10982
10983
10984 func (c *PoliciesTestCall) Context(ctx context.Context) *PoliciesTestCall {
10985 c.ctx_ = ctx
10986 return c
10987 }
10988
10989
10990
10991 func (c *PoliciesTestCall) Header() http.Header {
10992 if c.header_ == nil {
10993 c.header_ = make(http.Header)
10994 }
10995 return c.header_
10996 }
10997
10998 func (c *PoliciesTestCall) doRequest(alt string) (*http.Response, error) {
10999 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11000 var body io.Reader = nil
11001 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportaltestpermissionsrequest)
11002 if err != nil {
11003 return nil, err
11004 }
11005 c.urlParams_.Set("alt", alt)
11006 c.urlParams_.Set("prettyPrint", "false")
11007 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/policies:test")
11008 urls += "?" + c.urlParams_.Encode()
11009 req, err := http.NewRequest("POST", urls, body)
11010 if err != nil {
11011 return nil, err
11012 }
11013 req.Header = reqHeaders
11014 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11015 }
11016
11017
11018
11019
11020
11021
11022
11023 func (c *PoliciesTestCall) Do(opts ...googleapi.CallOption) (*SasPortalTestPermissionsResponse, error) {
11024 gensupport.SetOptions(c.urlParams_, opts...)
11025 res, err := c.doRequest("json")
11026 if res != nil && res.StatusCode == http.StatusNotModified {
11027 if res.Body != nil {
11028 res.Body.Close()
11029 }
11030 return nil, gensupport.WrapError(&googleapi.Error{
11031 Code: res.StatusCode,
11032 Header: res.Header,
11033 })
11034 }
11035 if err != nil {
11036 return nil, err
11037 }
11038 defer googleapi.CloseBody(res)
11039 if err := googleapi.CheckResponse(res); err != nil {
11040 return nil, gensupport.WrapError(err)
11041 }
11042 ret := &SasPortalTestPermissionsResponse{
11043 ServerResponse: googleapi.ServerResponse{
11044 Header: res.Header,
11045 HTTPStatusCode: res.StatusCode,
11046 },
11047 }
11048 target := &ret
11049 if err := gensupport.DecodeResponse(target, res); err != nil {
11050 return nil, err
11051 }
11052 return ret, nil
11053 }
11054
View as plain text