influxdb-client-apis 1.14.0.pre.2302 → 1.15.0.pre.2653

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/lib/influxdb-client-apis.rb +7 -2
  3. data/lib/influxdb2/apis/generated/api/authorizations_api.rb +11 -15
  4. data/lib/influxdb2/apis/generated/api/buckets_api.rb +14 -12
  5. data/lib/influxdb2/apis/generated/api/labels_api.rb +2 -3
  6. data/lib/influxdb2/apis/generated/api/organizations_api.rb +20 -21
  7. data/lib/influxdb2/apis/generated/api/users_api.rb +116 -2568
  8. data/lib/influxdb2/apis/generated/api_client.rb +2 -3
  9. data/lib/influxdb2/apis/generated/api_error.rb +2 -3
  10. data/lib/influxdb2/apis/generated/configuration.rb +5 -6
  11. data/lib/influxdb2/apis/generated/models/authorization.rb +25 -7
  12. data/lib/influxdb2/apis/generated/models/authorization_all_of.rb +21 -7
  13. data/lib/influxdb2/apis/generated/models/authorization_all_of_links.rb +5 -6
  14. data/lib/influxdb2/apis/generated/models/authorization_post_request.rb +325 -0
  15. data/lib/influxdb2/apis/generated/models/authorization_update_request.rb +5 -6
  16. data/lib/influxdb2/apis/generated/models/authorizations.rb +5 -6
  17. data/lib/influxdb2/apis/generated/models/bucket.rb +14 -6
  18. data/lib/influxdb2/apis/generated/models/bucket_links.rb +5 -6
  19. data/lib/influxdb2/apis/generated/models/buckets.rb +5 -6
  20. data/lib/influxdb2/apis/generated/models/label.rb +5 -6
  21. data/lib/influxdb2/apis/generated/models/label_create_request.rb +5 -6
  22. data/lib/influxdb2/apis/generated/models/label_mapping.rb +5 -6
  23. data/lib/influxdb2/apis/generated/models/label_response.rb +5 -6
  24. data/lib/influxdb2/apis/generated/models/label_update.rb +5 -6
  25. data/lib/influxdb2/apis/generated/models/labels_response.rb +5 -6
  26. data/lib/influxdb2/apis/generated/models/links.rb +5 -6
  27. data/lib/influxdb2/apis/generated/models/organization.rb +5 -6
  28. data/lib/influxdb2/apis/generated/models/organization_links.rb +5 -6
  29. data/lib/influxdb2/apis/generated/models/organizations.rb +5 -6
  30. data/lib/influxdb2/apis/generated/models/password_reset_body.rb +214 -0
  31. data/lib/influxdb2/apis/generated/models/patch_organization_request.rb +220 -0
  32. data/lib/influxdb2/apis/generated/models/permission.rb +5 -6
  33. data/lib/influxdb2/apis/generated/models/post_bucket_request.rb +14 -6
  34. data/lib/influxdb2/apis/generated/models/post_organization_request.rb +223 -0
  35. data/lib/influxdb2/apis/generated/models/resource.rb +8 -9
  36. data/lib/influxdb2/apis/generated/models/resource_member.rb +7 -8
  37. data/lib/influxdb2/apis/generated/models/resource_member_all_of.rb +5 -6
  38. data/lib/influxdb2/apis/generated/models/resource_members.rb +6 -7
  39. data/lib/influxdb2/apis/generated/models/{user_links.rb → resource_members_links.rb} +8 -9
  40. data/lib/influxdb2/apis/generated/models/resource_owner.rb +7 -8
  41. data/lib/influxdb2/apis/generated/models/resource_owner_all_of.rb +5 -6
  42. data/lib/influxdb2/apis/generated/models/resource_owners.rb +6 -7
  43. data/lib/influxdb2/apis/generated/models/retention_rule.rb +5 -6
  44. data/lib/influxdb2/apis/generated/models/user.rb +6 -16
  45. data/lib/influxdb2/apis/generated/models/user_response.rb +287 -0
  46. data/lib/influxdb2/apis/generated/models/{users_links.rb → user_response_links.rb} +8 -9
  47. data/lib/influxdb2/apis/generated/models/users.rb +6 -7
  48. data/test/influxdb2/authorizations_api_test.rb +3 -3
  49. data/test/influxdb2/organizations_api_test.rb +3 -3
  50. metadata +11 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27e33aeee5515b325526e51c37e6bb499a9f592b093b7d3d727f6db16a5f178f
4
- data.tar.gz: 8dc95d024de13d19de35ed7f15fe6a991ef68815c23b5c5a3f3fbda332850b1b
3
+ metadata.gz: a4ba7c20019a3fb80de82e6bc23f136cd57b0d17a57eb0dd5e77b11e86856da3
4
+ data.tar.gz: 7329b390536a6b21c21dafe8a136793d021c3a2a6e602ffce832809ba0148d29
5
5
  SHA512:
6
- metadata.gz: b4951b25c84a6ac8914eb09a16b06ee46920e904dfd45cf76d8de16bb4f9835dca89609fa325b76046f79f256958ac0c0f536ce8d06a07cf6e2b01964fad309c
7
- data.tar.gz: 8e13e64f34ab212a11ab5629e6337c0f4a9d587ab0b8f800c8cd20c96ae47373c08295ce599433aa38493d7481ca06d7e672e0ae888a40fbfffe67526179e798
6
+ metadata.gz: ba7347f90d274d13400fa7e14228bbcddbabd4de284657228127fbd884c8a33dbd55ae20fcb601ec7194a4de81f3e3cb04d7e83068c1e8f0fca621a2ecaa9f11
7
+ data.tar.gz: 7205dfda56937fd2b1ec5fd79ecebd4775c47826965b4720eba0a9bb3bb6f1a557515b8c75a798fd701cc5e24a73d20ff0f3254aba0ff41d3e20e79eda987ac4
@@ -33,6 +33,7 @@ require 'influxdb2/apis/generated/models/authorization_all_of'
33
33
  require 'influxdb2/apis/generated/models/authorization_all_of_links'
34
34
  require 'influxdb2/apis/generated/models/authorization_update_request'
35
35
  require 'influxdb2/apis/generated/models/authorizations'
36
+ require 'influxdb2/apis/generated/models/authorization_post_request'
36
37
  require 'influxdb2/apis/generated/models/bucket'
37
38
  require 'influxdb2/apis/generated/models/bucket_links'
38
39
  require 'influxdb2/apis/generated/models/buckets'
@@ -46,20 +47,24 @@ require 'influxdb2/apis/generated/models/links'
46
47
  require 'influxdb2/apis/generated/models/organization'
47
48
  require 'influxdb2/apis/generated/models/organization_links'
48
49
  require 'influxdb2/apis/generated/models/organizations'
50
+ require 'influxdb2/apis/generated/models/post_organization_request'
51
+ require 'influxdb2/apis/generated/models/patch_organization_request'
52
+ require 'influxdb2/apis/generated/models/password_reset_body'
49
53
  require 'influxdb2/apis/generated/models/permission'
50
54
  require 'influxdb2/apis/generated/models/post_bucket_request'
51
55
  require 'influxdb2/apis/generated/models/resource'
52
56
  require 'influxdb2/apis/generated/models/resource_member'
53
57
  require 'influxdb2/apis/generated/models/resource_member_all_of'
54
58
  require 'influxdb2/apis/generated/models/resource_members'
59
+ require 'influxdb2/apis/generated/models/resource_members_links'
55
60
  require 'influxdb2/apis/generated/models/resource_owner'
56
61
  require 'influxdb2/apis/generated/models/resource_owner_all_of'
57
62
  require 'influxdb2/apis/generated/models/resource_owners'
58
63
  require 'influxdb2/apis/generated/models/retention_rule'
59
64
  require 'influxdb2/apis/generated/models/user'
60
- require 'influxdb2/apis/generated/models/user_links'
61
65
  require 'influxdb2/apis/generated/models/users'
62
- require 'influxdb2/apis/generated/models/users_links'
66
+ require 'influxdb2/apis/generated/models/user_response'
67
+ require 'influxdb2/apis/generated/models/user_response_links'
63
68
 
64
69
  # APIs
65
70
  require 'influxdb2/apis/generated/api/authorizations_api'
@@ -1,12 +1,11 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0-beta3
10
9
 
11
10
  =end
12
11
 
@@ -90,7 +89,6 @@ module InfluxDB2::API
90
89
  # @option opts [String] :user Only show authorizations that belong to a user name.
91
90
  # @option opts [String] :org_id Only show authorizations that belong to an organization ID.
92
91
  # @option opts [String] :org Only show authorizations that belong to a organization name.
93
- # @option opts [String] :token Find a token by value.
94
92
  # @return [Authorizations]
95
93
  def get_authorizations(opts = {})
96
94
  data, _status_code, _headers = get_authorizations_with_http_info(opts)
@@ -104,7 +102,6 @@ module InfluxDB2::API
104
102
  # @option opts [String] :user Only show authorizations that belong to a user name.
105
103
  # @option opts [String] :org_id Only show authorizations that belong to an organization ID.
106
104
  # @option opts [String] :org Only show authorizations that belong to a organization name.
107
- # @option opts [String] :token Find a token by value.
108
105
  # @return [Array<(Authorizations, Integer, Hash)>] Authorizations data, response status code and response headers
109
106
  def get_authorizations_with_http_info(opts = {})
110
107
  if @api_client.config.debugging
@@ -119,7 +116,6 @@ module InfluxDB2::API
119
116
  query_params[:'user'] = opts[:'user'] if !opts[:'user'].nil?
120
117
  query_params[:'orgID'] = opts[:'org_id'] if !opts[:'org_id'].nil?
121
118
  query_params[:'org'] = opts[:'org'] if !opts[:'org'].nil?
122
- query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
123
119
 
124
120
  # header parameters
125
121
  header_params = opts[:header_params] || {}
@@ -293,27 +289,27 @@ module InfluxDB2::API
293
289
  end
294
290
 
295
291
  # Create an authorization
296
- # @param authorization [Authorization] Authorization to create
292
+ # @param authorization_post_request [AuthorizationPostRequest] Authorization to create
297
293
  # @param [Hash] opts the optional parameters
298
294
  # @option opts [String] :zap_trace_span OpenTracing span context
299
295
  # @return [Authorization]
300
- def post_authorizations(authorization, opts = {})
301
- data, _status_code, _headers = post_authorizations_with_http_info(authorization, opts)
296
+ def post_authorizations(authorization_post_request, opts = {})
297
+ data, _status_code, _headers = post_authorizations_with_http_info(authorization_post_request, opts)
302
298
  data
303
299
  end
304
300
 
305
301
  # Create an authorization
306
- # @param authorization [Authorization] Authorization to create
302
+ # @param authorization_post_request [AuthorizationPostRequest] Authorization to create
307
303
  # @param [Hash] opts the optional parameters
308
304
  # @option opts [String] :zap_trace_span OpenTracing span context
309
305
  # @return [Array<(Authorization, Integer, Hash)>] Authorization data, response status code and response headers
310
- def post_authorizations_with_http_info(authorization, opts = {})
306
+ def post_authorizations_with_http_info(authorization_post_request, opts = {})
311
307
  if @api_client.config.debugging
312
308
  @api_client.config.logger.debug 'Calling API: AuthorizationsApi.post_authorizations ...'
313
309
  end
314
- # verify the required parameter 'authorization' is set
315
- if @api_client.config.client_side_validation && authorization.nil?
316
- fail ArgumentError, "Missing the required parameter 'authorization' when calling AuthorizationsApi.post_authorizations"
310
+ # verify the required parameter 'authorization_post_request' is set
311
+ if @api_client.config.client_side_validation && authorization_post_request.nil?
312
+ fail ArgumentError, "Missing the required parameter 'authorization_post_request' when calling AuthorizationsApi.post_authorizations"
317
313
  end
318
314
  # resource path
319
315
  local_var_path = '/authorizations'
@@ -333,7 +329,7 @@ module InfluxDB2::API
333
329
  form_params = opts[:form_params] || {}
334
330
 
335
331
  # http body (model)
336
- post_body = opts[:debug_body] || @api_client.object_to_http_body(authorization)
332
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(authorization_post_request)
337
333
 
338
334
  # return_type
339
335
  return_type = opts[:debug_return_type] || 'Authorization'
@@ -1,12 +1,11 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0-beta3
10
9
 
11
10
  =end
12
11
 
@@ -302,6 +301,7 @@ module InfluxDB2::API
302
301
  # @option opts [String] :org The organization name.
303
302
  # @option opts [String] :org_id The organization ID.
304
303
  # @option opts [String] :name Only returns buckets with a specific name.
304
+ # @option opts [String] :id Only returns buckets with a specific ID.
305
305
  # @return [Buckets]
306
306
  def get_buckets(opts = {})
307
307
  data, _status_code, _headers = get_buckets_with_http_info(opts)
@@ -317,6 +317,7 @@ module InfluxDB2::API
317
317
  # @option opts [String] :org The organization name.
318
318
  # @option opts [String] :org_id The organization ID.
319
319
  # @option opts [String] :name Only returns buckets with a specific name.
320
+ # @option opts [String] :id Only returns buckets with a specific ID.
320
321
  # @return [Array<(Buckets, Integer, Hash)>] Buckets data, response status code and response headers
321
322
  def get_buckets_with_http_info(opts = {})
322
323
  if @api_client.config.debugging
@@ -345,6 +346,7 @@ module InfluxDB2::API
345
346
  query_params[:'org'] = opts[:'org'] if !opts[:'org'].nil?
346
347
  query_params[:'orgID'] = opts[:'org_id'] if !opts[:'org_id'].nil?
347
348
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
349
+ query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
348
350
 
349
351
  # header parameters
350
352
  header_params = opts[:header_params] || {}
@@ -706,22 +708,22 @@ module InfluxDB2::API
706
708
 
707
709
  # Update a bucket
708
710
  # @param bucket_id [String] The bucket ID.
709
- # @param bucket [Bucket] Bucket update to apply
711
+ # @param patch_bucket_request [PatchBucketRequest] Bucket update to apply
710
712
  # @param [Hash] opts the optional parameters
711
713
  # @option opts [String] :zap_trace_span OpenTracing span context
712
714
  # @return [Bucket]
713
- def patch_buckets_id(bucket_id, bucket, opts = {})
714
- data, _status_code, _headers = patch_buckets_id_with_http_info(bucket_id, bucket, opts)
715
+ def patch_buckets_id(bucket_id, patch_bucket_request, opts = {})
716
+ data, _status_code, _headers = patch_buckets_id_with_http_info(bucket_id, patch_bucket_request, opts)
715
717
  data
716
718
  end
717
719
 
718
720
  # Update a bucket
719
721
  # @param bucket_id [String] The bucket ID.
720
- # @param bucket [Bucket] Bucket update to apply
722
+ # @param patch_bucket_request [PatchBucketRequest] Bucket update to apply
721
723
  # @param [Hash] opts the optional parameters
722
724
  # @option opts [String] :zap_trace_span OpenTracing span context
723
725
  # @return [Array<(Bucket, Integer, Hash)>] Bucket data, response status code and response headers
724
- def patch_buckets_id_with_http_info(bucket_id, bucket, opts = {})
726
+ def patch_buckets_id_with_http_info(bucket_id, patch_bucket_request, opts = {})
725
727
  if @api_client.config.debugging
726
728
  @api_client.config.logger.debug 'Calling API: BucketsApi.patch_buckets_id ...'
727
729
  end
@@ -729,9 +731,9 @@ module InfluxDB2::API
729
731
  if @api_client.config.client_side_validation && bucket_id.nil?
730
732
  fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.patch_buckets_id"
731
733
  end
732
- # verify the required parameter 'bucket' is set
733
- if @api_client.config.client_side_validation && bucket.nil?
734
- fail ArgumentError, "Missing the required parameter 'bucket' when calling BucketsApi.patch_buckets_id"
734
+ # verify the required parameter 'patch_bucket_request' is set
735
+ if @api_client.config.client_side_validation && patch_bucket_request.nil?
736
+ fail ArgumentError, "Missing the required parameter 'patch_bucket_request' when calling BucketsApi.patch_buckets_id"
735
737
  end
736
738
  # resource path
737
739
  local_var_path = '/buckets/{bucketID}'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_id.to_s))
@@ -751,7 +753,7 @@ module InfluxDB2::API
751
753
  form_params = opts[:form_params] || {}
752
754
 
753
755
  # http body (model)
754
- post_body = opts[:debug_body] || @api_client.object_to_http_body(bucket)
756
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_bucket_request)
755
757
 
756
758
  # return_type
757
759
  return_type = opts[:debug_return_type] || 'Bucket'
@@ -1,12 +1,11 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0-beta3
10
9
 
11
10
  =end
12
11
 
@@ -1,12 +1,11 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0-beta3
10
9
 
11
10
  =end
12
11
 
@@ -569,22 +568,22 @@ module InfluxDB2::API
569
568
 
570
569
  # Update an organization
571
570
  # @param org_id [String] The ID of the organization to get.
572
- # @param organization [Organization] Organization update to apply
571
+ # @param patch_organization_request [PatchOrganizationRequest] Organization update to apply
573
572
  # @param [Hash] opts the optional parameters
574
573
  # @option opts [String] :zap_trace_span OpenTracing span context
575
574
  # @return [Organization]
576
- def patch_orgs_id(org_id, organization, opts = {})
577
- data, _status_code, _headers = patch_orgs_id_with_http_info(org_id, organization, opts)
575
+ def patch_orgs_id(org_id, patch_organization_request, opts = {})
576
+ data, _status_code, _headers = patch_orgs_id_with_http_info(org_id, patch_organization_request, opts)
578
577
  data
579
578
  end
580
579
 
581
580
  # Update an organization
582
581
  # @param org_id [String] The ID of the organization to get.
583
- # @param organization [Organization] Organization update to apply
582
+ # @param patch_organization_request [PatchOrganizationRequest] Organization update to apply
584
583
  # @param [Hash] opts the optional parameters
585
584
  # @option opts [String] :zap_trace_span OpenTracing span context
586
585
  # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
587
- def patch_orgs_id_with_http_info(org_id, organization, opts = {})
586
+ def patch_orgs_id_with_http_info(org_id, patch_organization_request, opts = {})
588
587
  if @api_client.config.debugging
589
588
  @api_client.config.logger.debug 'Calling API: OrganizationsApi.patch_orgs_id ...'
590
589
  end
@@ -592,9 +591,9 @@ module InfluxDB2::API
592
591
  if @api_client.config.client_side_validation && org_id.nil?
593
592
  fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.patch_orgs_id"
594
593
  end
595
- # verify the required parameter 'organization' is set
596
- if @api_client.config.client_side_validation && organization.nil?
597
- fail ArgumentError, "Missing the required parameter 'organization' when calling OrganizationsApi.patch_orgs_id"
594
+ # verify the required parameter 'patch_organization_request' is set
595
+ if @api_client.config.client_side_validation && patch_organization_request.nil?
596
+ fail ArgumentError, "Missing the required parameter 'patch_organization_request' when calling OrganizationsApi.patch_orgs_id"
598
597
  end
599
598
  # resource path
600
599
  local_var_path = '/orgs/{orgID}'.sub('{' + 'orgID' + '}', CGI.escape(org_id.to_s))
@@ -614,7 +613,7 @@ module InfluxDB2::API
614
613
  form_params = opts[:form_params] || {}
615
614
 
616
615
  # http body (model)
617
- post_body = opts[:debug_body] || @api_client.object_to_http_body(organization)
616
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_organization_request)
618
617
 
619
618
  # return_type
620
619
  return_type = opts[:debug_return_type] || 'Organization'
@@ -712,27 +711,27 @@ module InfluxDB2::API
712
711
  end
713
712
 
714
713
  # Create an organization
715
- # @param organization [Organization] Organization to create
714
+ # @param post_organization_request [PostOrganizationRequest] Organization to create
716
715
  # @param [Hash] opts the optional parameters
717
716
  # @option opts [String] :zap_trace_span OpenTracing span context
718
717
  # @return [Organization]
719
- def post_orgs(organization, opts = {})
720
- data, _status_code, _headers = post_orgs_with_http_info(organization, opts)
718
+ def post_orgs(post_organization_request, opts = {})
719
+ data, _status_code, _headers = post_orgs_with_http_info(post_organization_request, opts)
721
720
  data
722
721
  end
723
722
 
724
723
  # Create an organization
725
- # @param organization [Organization] Organization to create
724
+ # @param post_organization_request [PostOrganizationRequest] Organization to create
726
725
  # @param [Hash] opts the optional parameters
727
726
  # @option opts [String] :zap_trace_span OpenTracing span context
728
727
  # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
729
- def post_orgs_with_http_info(organization, opts = {})
728
+ def post_orgs_with_http_info(post_organization_request, opts = {})
730
729
  if @api_client.config.debugging
731
730
  @api_client.config.logger.debug 'Calling API: OrganizationsApi.post_orgs ...'
732
731
  end
733
- # verify the required parameter 'organization' is set
734
- if @api_client.config.client_side_validation && organization.nil?
735
- fail ArgumentError, "Missing the required parameter 'organization' when calling OrganizationsApi.post_orgs"
732
+ # verify the required parameter 'post_organization_request' is set
733
+ if @api_client.config.client_side_validation && post_organization_request.nil?
734
+ fail ArgumentError, "Missing the required parameter 'post_organization_request' when calling OrganizationsApi.post_orgs"
736
735
  end
737
736
  # resource path
738
737
  local_var_path = '/orgs'
@@ -752,7 +751,7 @@ module InfluxDB2::API
752
751
  form_params = opts[:form_params] || {}
753
752
 
754
753
  # http body (model)
755
- post_body = opts[:debug_body] || @api_client.object_to_http_body(organization)
754
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(post_organization_request)
756
755
 
757
756
  # return_type
758
757
  return_type = opts[:debug_return_type] || 'Organization'
@@ -1,12 +1,11 @@
1
1
  =begin
2
- #Influx API Service
2
+ #Influx OSS API Service
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
- The version of the OpenAPI document: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0-beta3
10
9
 
11
10
  =end
12
11
 
@@ -19,37 +18,31 @@ module InfluxDB2::API
19
18
  def initialize(api_client = ApiClient.default)
20
19
  @api_client = api_client
21
20
  end
22
- # Remove a member from a bucket
23
- # @param user_id [String] The ID of the member to remove.
24
- # @param bucket_id [String] The bucket ID.
21
+ # Delete a user
22
+ # @param user_id [String] The ID of the user to delete.
25
23
  # @param [Hash] opts the optional parameters
26
24
  # @option opts [String] :zap_trace_span OpenTracing span context
27
25
  # @return [nil]
28
- def delete_buckets_id_members_id(user_id, bucket_id, opts = {})
29
- delete_buckets_id_members_id_with_http_info(user_id, bucket_id, opts)
26
+ def delete_users_id(user_id, opts = {})
27
+ delete_users_id_with_http_info(user_id, opts)
30
28
  nil
31
29
  end
32
30
 
33
- # Remove a member from a bucket
34
- # @param user_id [String] The ID of the member to remove.
35
- # @param bucket_id [String] The bucket ID.
31
+ # Delete a user
32
+ # @param user_id [String] The ID of the user to delete.
36
33
  # @param [Hash] opts the optional parameters
37
34
  # @option opts [String] :zap_trace_span OpenTracing span context
38
35
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
- def delete_buckets_id_members_id_with_http_info(user_id, bucket_id, opts = {})
36
+ def delete_users_id_with_http_info(user_id, opts = {})
40
37
  if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_buckets_id_members_id ...'
38
+ @api_client.config.logger.debug 'Calling API: UsersApi.delete_users_id ...'
42
39
  end
43
40
  # verify the required parameter 'user_id' is set
44
41
  if @api_client.config.client_side_validation && user_id.nil?
45
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_buckets_id_members_id"
46
- end
47
- # verify the required parameter 'bucket_id' is set
48
- if @api_client.config.client_side_validation && bucket_id.nil?
49
- fail ArgumentError, "Missing the required parameter 'bucket_id' when calling UsersApi.delete_buckets_id_members_id"
42
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_users_id"
50
43
  end
51
44
  # resource path
52
- local_var_path = '/buckets/{bucketID}/members/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'bucketID' + '}', CGI.escape(bucket_id.to_s))
45
+ local_var_path = '/users/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s))
53
46
 
54
47
  # query parameters
55
48
  query_params = opts[:query_params] || {}
@@ -73,7 +66,7 @@ module InfluxDB2::API
73
66
  auth_names = opts[:debug_auth_names] || ['header']
74
67
 
75
68
  new_options = opts.merge(
76
- :operation => :"UsersApi.delete_buckets_id_members_id",
69
+ :operation => :"UsersApi.delete_users_id",
77
70
  :header_params => header_params,
78
71
  :query_params => query_params,
79
72
  :form_params => form_params,
@@ -84,42 +77,30 @@ module InfluxDB2::API
84
77
 
85
78
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
86
79
  if @api_client.config.debugging
87
- @api_client.config.logger.debug "API called: UsersApi#delete_buckets_id_members_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ @api_client.config.logger.debug "API called: UsersApi#delete_users_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
81
  end
89
82
  return data, status_code, headers
90
83
  end
91
84
 
92
- # Remove an owner from a bucket
93
- # @param user_id [String] The ID of the owner to remove.
94
- # @param bucket_id [String] The bucket ID.
85
+ # Return the feature flags for the currently authenticated user
95
86
  # @param [Hash] opts the optional parameters
96
87
  # @option opts [String] :zap_trace_span OpenTracing span context
97
- # @return [nil]
98
- def delete_buckets_id_owners_id(user_id, bucket_id, opts = {})
99
- delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, opts)
100
- nil
88
+ # @return [Hash<String, Object>]
89
+ def get_flags(opts = {})
90
+ data, _status_code, _headers = get_flags_with_http_info(opts)
91
+ data
101
92
  end
102
93
 
103
- # Remove an owner from a bucket
104
- # @param user_id [String] The ID of the owner to remove.
105
- # @param bucket_id [String] The bucket ID.
94
+ # Return the feature flags for the currently authenticated user
106
95
  # @param [Hash] opts the optional parameters
107
96
  # @option opts [String] :zap_trace_span OpenTracing span context
108
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
109
- def delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, opts = {})
97
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
98
+ def get_flags_with_http_info(opts = {})
110
99
  if @api_client.config.debugging
111
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_buckets_id_owners_id ...'
112
- end
113
- # verify the required parameter 'user_id' is set
114
- if @api_client.config.client_side_validation && user_id.nil?
115
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_buckets_id_owners_id"
116
- end
117
- # verify the required parameter 'bucket_id' is set
118
- if @api_client.config.client_side_validation && bucket_id.nil?
119
- fail ArgumentError, "Missing the required parameter 'bucket_id' when calling UsersApi.delete_buckets_id_owners_id"
100
+ @api_client.config.logger.debug 'Calling API: UsersApi.get_flags ...'
120
101
  end
121
102
  # resource path
122
- local_var_path = '/buckets/{bucketID}/owners/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'bucketID' + '}', CGI.escape(bucket_id.to_s))
103
+ local_var_path = '/flags'
123
104
 
124
105
  # query parameters
125
106
  query_params = opts[:query_params] || {}
@@ -137,13 +118,13 @@ module InfluxDB2::API
137
118
  post_body = opts[:debug_body]
138
119
 
139
120
  # return_type
140
- return_type = opts[:debug_return_type]
121
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
141
122
 
142
123
  # auth_names
143
124
  auth_names = opts[:debug_auth_names] || ['header']
144
125
 
145
126
  new_options = opts.merge(
146
- :operation => :"UsersApi.delete_buckets_id_owners_id",
127
+ :operation => :"UsersApi.get_flags",
147
128
  :header_params => header_params,
148
129
  :query_params => query_params,
149
130
  :form_params => form_params,
@@ -152,44 +133,32 @@ module InfluxDB2::API
152
133
  :return_type => return_type
153
134
  )
154
135
 
155
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
136
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
156
137
  if @api_client.config.debugging
157
- @api_client.config.logger.debug "API called: UsersApi#delete_buckets_id_owners_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
138
+ @api_client.config.logger.debug "API called: UsersApi#get_flags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
158
139
  end
159
140
  return data, status_code, headers
160
141
  end
161
142
 
162
- # Remove a member from a dashboard
163
- # @param user_id [String] The ID of the member to remove.
164
- # @param dashboard_id [String] The dashboard ID.
143
+ # Return the current authenticated user
165
144
  # @param [Hash] opts the optional parameters
166
145
  # @option opts [String] :zap_trace_span OpenTracing span context
167
- # @return [nil]
168
- def delete_dashboards_id_members_id(user_id, dashboard_id, opts = {})
169
- delete_dashboards_id_members_id_with_http_info(user_id, dashboard_id, opts)
170
- nil
146
+ # @return [UserResponse]
147
+ def get_me(opts = {})
148
+ data, _status_code, _headers = get_me_with_http_info(opts)
149
+ data
171
150
  end
172
151
 
173
- # Remove a member from a dashboard
174
- # @param user_id [String] The ID of the member to remove.
175
- # @param dashboard_id [String] The dashboard ID.
152
+ # Return the current authenticated user
176
153
  # @param [Hash] opts the optional parameters
177
154
  # @option opts [String] :zap_trace_span OpenTracing span context
178
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
179
- def delete_dashboards_id_members_id_with_http_info(user_id, dashboard_id, opts = {})
155
+ # @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers
156
+ def get_me_with_http_info(opts = {})
180
157
  if @api_client.config.debugging
181
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_dashboards_id_members_id ...'
182
- end
183
- # verify the required parameter 'user_id' is set
184
- if @api_client.config.client_side_validation && user_id.nil?
185
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_dashboards_id_members_id"
186
- end
187
- # verify the required parameter 'dashboard_id' is set
188
- if @api_client.config.client_side_validation && dashboard_id.nil?
189
- fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling UsersApi.delete_dashboards_id_members_id"
158
+ @api_client.config.logger.debug 'Calling API: UsersApi.get_me ...'
190
159
  end
191
160
  # resource path
192
- local_var_path = '/dashboards/{dashboardID}/members/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'dashboardID' + '}', CGI.escape(dashboard_id.to_s))
161
+ local_var_path = '/me'
193
162
 
194
163
  # query parameters
195
164
  query_params = opts[:query_params] || {}
@@ -207,13 +176,13 @@ module InfluxDB2::API
207
176
  post_body = opts[:debug_body]
208
177
 
209
178
  # return_type
210
- return_type = opts[:debug_return_type]
179
+ return_type = opts[:debug_return_type] || 'UserResponse'
211
180
 
212
181
  # auth_names
213
182
  auth_names = opts[:debug_auth_names] || ['header']
214
183
 
215
184
  new_options = opts.merge(
216
- :operation => :"UsersApi.delete_dashboards_id_members_id",
185
+ :operation => :"UsersApi.get_me",
217
186
  :header_params => header_params,
218
187
  :query_params => query_params,
219
188
  :form_params => form_params,
@@ -222,187 +191,56 @@ module InfluxDB2::API
222
191
  :return_type => return_type
223
192
  )
224
193
 
225
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
194
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
226
195
  if @api_client.config.debugging
227
- @api_client.config.logger.debug "API called: UsersApi#delete_dashboards_id_members_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
+ @api_client.config.logger.debug "API called: UsersApi#get_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
228
197
  end
229
198
  return data, status_code, headers
230
199
  end
231
200
 
232
- # Remove an owner from a dashboard
233
- # @param user_id [String] The ID of the owner to remove.
234
- # @param dashboard_id [String] The dashboard ID.
201
+ # List all users
235
202
  # @param [Hash] opts the optional parameters
236
203
  # @option opts [String] :zap_trace_span OpenTracing span context
237
- # @return [nil]
238
- def delete_dashboards_id_owners_id(user_id, dashboard_id, opts = {})
239
- delete_dashboards_id_owners_id_with_http_info(user_id, dashboard_id, opts)
240
- nil
204
+ # @option opts [Integer] :offset
205
+ # @option opts [Integer] :limit (default to 20)
206
+ # @option opts [String] :after The last resource ID from which to seek from (but not including). This is to be used instead of &#x60;offset&#x60;.
207
+ # @return [Users]
208
+ def get_users(opts = {})
209
+ data, _status_code, _headers = get_users_with_http_info(opts)
210
+ data
241
211
  end
242
212
 
243
- # Remove an owner from a dashboard
244
- # @param user_id [String] The ID of the owner to remove.
245
- # @param dashboard_id [String] The dashboard ID.
213
+ # List all users
246
214
  # @param [Hash] opts the optional parameters
247
215
  # @option opts [String] :zap_trace_span OpenTracing span context
248
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
249
- def delete_dashboards_id_owners_id_with_http_info(user_id, dashboard_id, opts = {})
216
+ # @option opts [Integer] :offset
217
+ # @option opts [Integer] :limit
218
+ # @option opts [String] :after The last resource ID from which to seek from (but not including). This is to be used instead of &#x60;offset&#x60;.
219
+ # @return [Array<(Users, Integer, Hash)>] Users data, response status code and response headers
220
+ def get_users_with_http_info(opts = {})
250
221
  if @api_client.config.debugging
251
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_dashboards_id_owners_id ...'
252
- end
253
- # verify the required parameter 'user_id' is set
254
- if @api_client.config.client_side_validation && user_id.nil?
255
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_dashboards_id_owners_id"
256
- end
257
- # verify the required parameter 'dashboard_id' is set
258
- if @api_client.config.client_side_validation && dashboard_id.nil?
259
- fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling UsersApi.delete_dashboards_id_owners_id"
222
+ @api_client.config.logger.debug 'Calling API: UsersApi.get_users ...'
260
223
  end
261
- # resource path
262
- local_var_path = '/dashboards/{dashboardID}/owners/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'dashboardID' + '}', CGI.escape(dashboard_id.to_s))
263
-
264
- # query parameters
265
- query_params = opts[:query_params] || {}
266
-
267
- # header parameters
268
- header_params = opts[:header_params] || {}
269
- # HTTP header 'Accept' (if needed)
270
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
271
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
272
-
273
- # form parameters
274
- form_params = opts[:form_params] || {}
275
-
276
- # http body (model)
277
- post_body = opts[:debug_body]
278
-
279
- # return_type
280
- return_type = opts[:debug_return_type]
281
-
282
- # auth_names
283
- auth_names = opts[:debug_auth_names] || ['header']
284
-
285
- new_options = opts.merge(
286
- :operation => :"UsersApi.delete_dashboards_id_owners_id",
287
- :header_params => header_params,
288
- :query_params => query_params,
289
- :form_params => form_params,
290
- :body => post_body,
291
- :auth_names => auth_names,
292
- :return_type => return_type
293
- )
294
-
295
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
296
- if @api_client.config.debugging
297
- @api_client.config.logger.debug "API called: UsersApi#delete_dashboards_id_owners_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
224
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
225
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling UsersApi.get_users, must be greater than or equal to 0.'
298
226
  end
299
- return data, status_code, headers
300
- end
301
-
302
- # Remove a member from an organization
303
- # @param user_id [String] The ID of the member to remove.
304
- # @param org_id [String] The organization ID.
305
- # @param [Hash] opts the optional parameters
306
- # @option opts [String] :zap_trace_span OpenTracing span context
307
- # @return [nil]
308
- def delete_orgs_id_members_id(user_id, org_id, opts = {})
309
- delete_orgs_id_members_id_with_http_info(user_id, org_id, opts)
310
- nil
311
- end
312
227
 
313
- # Remove a member from an organization
314
- # @param user_id [String] The ID of the member to remove.
315
- # @param org_id [String] The organization ID.
316
- # @param [Hash] opts the optional parameters
317
- # @option opts [String] :zap_trace_span OpenTracing span context
318
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
319
- def delete_orgs_id_members_id_with_http_info(user_id, org_id, opts = {})
320
- if @api_client.config.debugging
321
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_orgs_id_members_id ...'
322
- end
323
- # verify the required parameter 'user_id' is set
324
- if @api_client.config.client_side_validation && user_id.nil?
325
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_orgs_id_members_id"
326
- end
327
- # verify the required parameter 'org_id' is set
328
- if @api_client.config.client_side_validation && org_id.nil?
329
- fail ArgumentError, "Missing the required parameter 'org_id' when calling UsersApi.delete_orgs_id_members_id"
228
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
229
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.get_users, must be smaller than or equal to 100.'
330
230
  end
331
- # resource path
332
- local_var_path = '/orgs/{orgID}/members/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'orgID' + '}', CGI.escape(org_id.to_s))
333
-
334
- # query parameters
335
- query_params = opts[:query_params] || {}
336
-
337
- # header parameters
338
- header_params = opts[:header_params] || {}
339
- # HTTP header 'Accept' (if needed)
340
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
341
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
342
-
343
- # form parameters
344
- form_params = opts[:form_params] || {}
345
-
346
- # http body (model)
347
- post_body = opts[:debug_body]
348
-
349
- # return_type
350
- return_type = opts[:debug_return_type]
351
-
352
- # auth_names
353
- auth_names = opts[:debug_auth_names] || ['header']
354
231
 
355
- new_options = opts.merge(
356
- :operation => :"UsersApi.delete_orgs_id_members_id",
357
- :header_params => header_params,
358
- :query_params => query_params,
359
- :form_params => form_params,
360
- :body => post_body,
361
- :auth_names => auth_names,
362
- :return_type => return_type
363
- )
364
-
365
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
366
- if @api_client.config.debugging
367
- @api_client.config.logger.debug "API called: UsersApi#delete_orgs_id_members_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
232
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
233
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.get_users, must be greater than or equal to 1.'
368
234
  end
369
- return data, status_code, headers
370
- end
371
-
372
- # Remove an owner from an organization
373
- # @param user_id [String] The ID of the owner to remove.
374
- # @param org_id [String] The organization ID.
375
- # @param [Hash] opts the optional parameters
376
- # @option opts [String] :zap_trace_span OpenTracing span context
377
- # @return [nil]
378
- def delete_orgs_id_owners_id(user_id, org_id, opts = {})
379
- delete_orgs_id_owners_id_with_http_info(user_id, org_id, opts)
380
- nil
381
- end
382
235
 
383
- # Remove an owner from an organization
384
- # @param user_id [String] The ID of the owner to remove.
385
- # @param org_id [String] The organization ID.
386
- # @param [Hash] opts the optional parameters
387
- # @option opts [String] :zap_trace_span OpenTracing span context
388
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
389
- def delete_orgs_id_owners_id_with_http_info(user_id, org_id, opts = {})
390
- if @api_client.config.debugging
391
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_orgs_id_owners_id ...'
392
- end
393
- # verify the required parameter 'user_id' is set
394
- if @api_client.config.client_side_validation && user_id.nil?
395
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_orgs_id_owners_id"
396
- end
397
- # verify the required parameter 'org_id' is set
398
- if @api_client.config.client_side_validation && org_id.nil?
399
- fail ArgumentError, "Missing the required parameter 'org_id' when calling UsersApi.delete_orgs_id_owners_id"
400
- end
401
236
  # resource path
402
- local_var_path = '/orgs/{orgID}/owners/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'orgID' + '}', CGI.escape(org_id.to_s))
237
+ local_var_path = '/users'
403
238
 
404
239
  # query parameters
405
240
  query_params = opts[:query_params] || {}
241
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
242
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
243
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
406
244
 
407
245
  # header parameters
408
246
  header_params = opts[:header_params] || {}
@@ -417,13 +255,13 @@ module InfluxDB2::API
417
255
  post_body = opts[:debug_body]
418
256
 
419
257
  # return_type
420
- return_type = opts[:debug_return_type]
258
+ return_type = opts[:debug_return_type] || 'Users'
421
259
 
422
260
  # auth_names
423
261
  auth_names = opts[:debug_auth_names] || ['header']
424
262
 
425
263
  new_options = opts.merge(
426
- :operation => :"UsersApi.delete_orgs_id_owners_id",
264
+ :operation => :"UsersApi.get_users",
427
265
  :header_params => header_params,
428
266
  :query_params => query_params,
429
267
  :form_params => form_params,
@@ -432,44 +270,38 @@ module InfluxDB2::API
432
270
  :return_type => return_type
433
271
  )
434
272
 
435
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
273
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
436
274
  if @api_client.config.debugging
437
- @api_client.config.logger.debug "API called: UsersApi#delete_orgs_id_owners_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
275
+ @api_client.config.logger.debug "API called: UsersApi#get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
438
276
  end
439
277
  return data, status_code, headers
440
278
  end
441
279
 
442
- # Remove a member from a scraper target
443
- # @param user_id [String] The ID of member to remove.
444
- # @param scraper_target_id [String] The scraper target ID.
280
+ # Retrieve a user
281
+ # @param user_id [String] The user ID.
445
282
  # @param [Hash] opts the optional parameters
446
283
  # @option opts [String] :zap_trace_span OpenTracing span context
447
- # @return [nil]
448
- def delete_scrapers_id_members_id(user_id, scraper_target_id, opts = {})
449
- delete_scrapers_id_members_id_with_http_info(user_id, scraper_target_id, opts)
450
- nil
284
+ # @return [UserResponse]
285
+ def get_users_id(user_id, opts = {})
286
+ data, _status_code, _headers = get_users_id_with_http_info(user_id, opts)
287
+ data
451
288
  end
452
289
 
453
- # Remove a member from a scraper target
454
- # @param user_id [String] The ID of member to remove.
455
- # @param scraper_target_id [String] The scraper target ID.
290
+ # Retrieve a user
291
+ # @param user_id [String] The user ID.
456
292
  # @param [Hash] opts the optional parameters
457
293
  # @option opts [String] :zap_trace_span OpenTracing span context
458
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
459
- def delete_scrapers_id_members_id_with_http_info(user_id, scraper_target_id, opts = {})
294
+ # @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers
295
+ def get_users_id_with_http_info(user_id, opts = {})
460
296
  if @api_client.config.debugging
461
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_scrapers_id_members_id ...'
297
+ @api_client.config.logger.debug 'Calling API: UsersApi.get_users_id ...'
462
298
  end
463
299
  # verify the required parameter 'user_id' is set
464
300
  if @api_client.config.client_side_validation && user_id.nil?
465
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_scrapers_id_members_id"
466
- end
467
- # verify the required parameter 'scraper_target_id' is set
468
- if @api_client.config.client_side_validation && scraper_target_id.nil?
469
- fail ArgumentError, "Missing the required parameter 'scraper_target_id' when calling UsersApi.delete_scrapers_id_members_id"
301
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_users_id"
470
302
  end
471
303
  # resource path
472
- local_var_path = '/scrapers/{scraperTargetID}/members/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'scraperTargetID' + '}', CGI.escape(scraper_target_id.to_s))
304
+ local_var_path = '/users/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s))
473
305
 
474
306
  # query parameters
475
307
  query_params = opts[:query_params] || {}
@@ -487,13 +319,13 @@ module InfluxDB2::API
487
319
  post_body = opts[:debug_body]
488
320
 
489
321
  # return_type
490
- return_type = opts[:debug_return_type]
322
+ return_type = opts[:debug_return_type] || 'UserResponse'
491
323
 
492
324
  # auth_names
493
325
  auth_names = opts[:debug_auth_names] || ['header']
494
326
 
495
327
  new_options = opts.merge(
496
- :operation => :"UsersApi.delete_scrapers_id_members_id",
328
+ :operation => :"UsersApi.get_users_id",
497
329
  :header_params => header_params,
498
330
  :query_params => query_params,
499
331
  :form_params => form_params,
@@ -502,44 +334,44 @@ module InfluxDB2::API
502
334
  :return_type => return_type
503
335
  )
504
336
 
505
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
337
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
506
338
  if @api_client.config.debugging
507
- @api_client.config.logger.debug "API called: UsersApi#delete_scrapers_id_members_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
339
+ @api_client.config.logger.debug "API called: UsersApi#get_users_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
508
340
  end
509
341
  return data, status_code, headers
510
342
  end
511
343
 
512
- # Remove an owner from a scraper target
513
- # @param user_id [String] The ID of owner to remove.
514
- # @param scraper_target_id [String] The scraper target ID.
344
+ # Update a user
345
+ # @param user_id [String] The ID of the user to update.
346
+ # @param user [User] User update to apply
515
347
  # @param [Hash] opts the optional parameters
516
348
  # @option opts [String] :zap_trace_span OpenTracing span context
517
- # @return [nil]
518
- def delete_scrapers_id_owners_id(user_id, scraper_target_id, opts = {})
519
- delete_scrapers_id_owners_id_with_http_info(user_id, scraper_target_id, opts)
520
- nil
349
+ # @return [UserResponse]
350
+ def patch_users_id(user_id, user, opts = {})
351
+ data, _status_code, _headers = patch_users_id_with_http_info(user_id, user, opts)
352
+ data
521
353
  end
522
354
 
523
- # Remove an owner from a scraper target
524
- # @param user_id [String] The ID of owner to remove.
525
- # @param scraper_target_id [String] The scraper target ID.
355
+ # Update a user
356
+ # @param user_id [String] The ID of the user to update.
357
+ # @param user [User] User update to apply
526
358
  # @param [Hash] opts the optional parameters
527
359
  # @option opts [String] :zap_trace_span OpenTracing span context
528
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
529
- def delete_scrapers_id_owners_id_with_http_info(user_id, scraper_target_id, opts = {})
360
+ # @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers
361
+ def patch_users_id_with_http_info(user_id, user, opts = {})
530
362
  if @api_client.config.debugging
531
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_scrapers_id_owners_id ...'
363
+ @api_client.config.logger.debug 'Calling API: UsersApi.patch_users_id ...'
532
364
  end
533
365
  # verify the required parameter 'user_id' is set
534
366
  if @api_client.config.client_side_validation && user_id.nil?
535
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_scrapers_id_owners_id"
367
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_users_id"
536
368
  end
537
- # verify the required parameter 'scraper_target_id' is set
538
- if @api_client.config.client_side_validation && scraper_target_id.nil?
539
- fail ArgumentError, "Missing the required parameter 'scraper_target_id' when calling UsersApi.delete_scrapers_id_owners_id"
369
+ # verify the required parameter 'user' is set
370
+ if @api_client.config.client_side_validation && user.nil?
371
+ fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.patch_users_id"
540
372
  end
541
373
  # resource path
542
- local_var_path = '/scrapers/{scraperTargetID}/owners/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'scraperTargetID' + '}', CGI.escape(scraper_target_id.to_s))
374
+ local_var_path = '/users/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s))
543
375
 
544
376
  # query parameters
545
377
  query_params = opts[:query_params] || {}
@@ -548,22 +380,24 @@ module InfluxDB2::API
548
380
  header_params = opts[:header_params] || {}
549
381
  # HTTP header 'Accept' (if needed)
550
382
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
383
+ # HTTP header 'Content-Type'
384
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
551
385
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
552
386
 
553
387
  # form parameters
554
388
  form_params = opts[:form_params] || {}
555
389
 
556
390
  # http body (model)
557
- post_body = opts[:debug_body]
391
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
558
392
 
559
393
  # return_type
560
- return_type = opts[:debug_return_type]
394
+ return_type = opts[:debug_return_type] || 'UserResponse'
561
395
 
562
396
  # auth_names
563
397
  auth_names = opts[:debug_auth_names] || ['header']
564
398
 
565
399
  new_options = opts.merge(
566
- :operation => :"UsersApi.delete_scrapers_id_owners_id",
400
+ :operation => :"UsersApi.patch_users_id",
567
401
  :header_params => header_params,
568
402
  :query_params => query_params,
569
403
  :form_params => form_params,
@@ -572,2295 +406,9 @@ module InfluxDB2::API
572
406
  :return_type => return_type
573
407
  )
574
408
 
575
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
576
- if @api_client.config.debugging
577
- @api_client.config.logger.debug "API called: UsersApi#delete_scrapers_id_owners_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
578
- end
579
- return data, status_code, headers
580
- end
581
-
582
- # Remove a member from a task
583
- # @param user_id [String] The ID of the member to remove.
584
- # @param task_id [String] The task ID.
585
- # @param [Hash] opts the optional parameters
586
- # @option opts [String] :zap_trace_span OpenTracing span context
587
- # @return [nil]
588
- def delete_tasks_id_members_id(user_id, task_id, opts = {})
589
- delete_tasks_id_members_id_with_http_info(user_id, task_id, opts)
590
- nil
591
- end
592
-
593
- # Remove a member from a task
594
- # @param user_id [String] The ID of the member to remove.
595
- # @param task_id [String] The task ID.
596
- # @param [Hash] opts the optional parameters
597
- # @option opts [String] :zap_trace_span OpenTracing span context
598
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
599
- def delete_tasks_id_members_id_with_http_info(user_id, task_id, opts = {})
409
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
600
410
  if @api_client.config.debugging
601
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_tasks_id_members_id ...'
602
- end
603
- # verify the required parameter 'user_id' is set
604
- if @api_client.config.client_side_validation && user_id.nil?
605
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_tasks_id_members_id"
606
- end
607
- # verify the required parameter 'task_id' is set
608
- if @api_client.config.client_side_validation && task_id.nil?
609
- fail ArgumentError, "Missing the required parameter 'task_id' when calling UsersApi.delete_tasks_id_members_id"
610
- end
611
- # resource path
612
- local_var_path = '/tasks/{taskID}/members/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
613
-
614
- # query parameters
615
- query_params = opts[:query_params] || {}
616
-
617
- # header parameters
618
- header_params = opts[:header_params] || {}
619
- # HTTP header 'Accept' (if needed)
620
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
621
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
622
-
623
- # form parameters
624
- form_params = opts[:form_params] || {}
625
-
626
- # http body (model)
627
- post_body = opts[:debug_body]
628
-
629
- # return_type
630
- return_type = opts[:debug_return_type]
631
-
632
- # auth_names
633
- auth_names = opts[:debug_auth_names] || ['header']
634
-
635
- new_options = opts.merge(
636
- :operation => :"UsersApi.delete_tasks_id_members_id",
637
- :header_params => header_params,
638
- :query_params => query_params,
639
- :form_params => form_params,
640
- :body => post_body,
641
- :auth_names => auth_names,
642
- :return_type => return_type
643
- )
644
-
645
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
646
- if @api_client.config.debugging
647
- @api_client.config.logger.debug "API called: UsersApi#delete_tasks_id_members_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
648
- end
649
- return data, status_code, headers
650
- end
651
-
652
- # Remove an owner from a task
653
- # @param user_id [String] The ID of the owner to remove.
654
- # @param task_id [String] The task ID.
655
- # @param [Hash] opts the optional parameters
656
- # @option opts [String] :zap_trace_span OpenTracing span context
657
- # @return [nil]
658
- def delete_tasks_id_owners_id(user_id, task_id, opts = {})
659
- delete_tasks_id_owners_id_with_http_info(user_id, task_id, opts)
660
- nil
661
- end
662
-
663
- # Remove an owner from a task
664
- # @param user_id [String] The ID of the owner to remove.
665
- # @param task_id [String] The task ID.
666
- # @param [Hash] opts the optional parameters
667
- # @option opts [String] :zap_trace_span OpenTracing span context
668
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
669
- def delete_tasks_id_owners_id_with_http_info(user_id, task_id, opts = {})
670
- if @api_client.config.debugging
671
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_tasks_id_owners_id ...'
672
- end
673
- # verify the required parameter 'user_id' is set
674
- if @api_client.config.client_side_validation && user_id.nil?
675
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_tasks_id_owners_id"
676
- end
677
- # verify the required parameter 'task_id' is set
678
- if @api_client.config.client_side_validation && task_id.nil?
679
- fail ArgumentError, "Missing the required parameter 'task_id' when calling UsersApi.delete_tasks_id_owners_id"
680
- end
681
- # resource path
682
- local_var_path = '/tasks/{taskID}/owners/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
683
-
684
- # query parameters
685
- query_params = opts[:query_params] || {}
686
-
687
- # header parameters
688
- header_params = opts[:header_params] || {}
689
- # HTTP header 'Accept' (if needed)
690
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
691
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
692
-
693
- # form parameters
694
- form_params = opts[:form_params] || {}
695
-
696
- # http body (model)
697
- post_body = opts[:debug_body]
698
-
699
- # return_type
700
- return_type = opts[:debug_return_type]
701
-
702
- # auth_names
703
- auth_names = opts[:debug_auth_names] || ['header']
704
-
705
- new_options = opts.merge(
706
- :operation => :"UsersApi.delete_tasks_id_owners_id",
707
- :header_params => header_params,
708
- :query_params => query_params,
709
- :form_params => form_params,
710
- :body => post_body,
711
- :auth_names => auth_names,
712
- :return_type => return_type
713
- )
714
-
715
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
716
- if @api_client.config.debugging
717
- @api_client.config.logger.debug "API called: UsersApi#delete_tasks_id_owners_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
718
- end
719
- return data, status_code, headers
720
- end
721
-
722
- # Remove a member from a Telegraf config
723
- # @param user_id [String] The ID of the member to remove.
724
- # @param telegraf_id [String] The Telegraf config ID.
725
- # @param [Hash] opts the optional parameters
726
- # @option opts [String] :zap_trace_span OpenTracing span context
727
- # @return [nil]
728
- def delete_telegrafs_id_members_id(user_id, telegraf_id, opts = {})
729
- delete_telegrafs_id_members_id_with_http_info(user_id, telegraf_id, opts)
730
- nil
731
- end
732
-
733
- # Remove a member from a Telegraf config
734
- # @param user_id [String] The ID of the member to remove.
735
- # @param telegraf_id [String] The Telegraf config ID.
736
- # @param [Hash] opts the optional parameters
737
- # @option opts [String] :zap_trace_span OpenTracing span context
738
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
739
- def delete_telegrafs_id_members_id_with_http_info(user_id, telegraf_id, opts = {})
740
- if @api_client.config.debugging
741
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_telegrafs_id_members_id ...'
742
- end
743
- # verify the required parameter 'user_id' is set
744
- if @api_client.config.client_side_validation && user_id.nil?
745
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_telegrafs_id_members_id"
746
- end
747
- # verify the required parameter 'telegraf_id' is set
748
- if @api_client.config.client_side_validation && telegraf_id.nil?
749
- fail ArgumentError, "Missing the required parameter 'telegraf_id' when calling UsersApi.delete_telegrafs_id_members_id"
750
- end
751
- # resource path
752
- local_var_path = '/telegrafs/{telegrafID}/members/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'telegrafID' + '}', CGI.escape(telegraf_id.to_s))
753
-
754
- # query parameters
755
- query_params = opts[:query_params] || {}
756
-
757
- # header parameters
758
- header_params = opts[:header_params] || {}
759
- # HTTP header 'Accept' (if needed)
760
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
761
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
762
-
763
- # form parameters
764
- form_params = opts[:form_params] || {}
765
-
766
- # http body (model)
767
- post_body = opts[:debug_body]
768
-
769
- # return_type
770
- return_type = opts[:debug_return_type]
771
-
772
- # auth_names
773
- auth_names = opts[:debug_auth_names] || ['header']
774
-
775
- new_options = opts.merge(
776
- :operation => :"UsersApi.delete_telegrafs_id_members_id",
777
- :header_params => header_params,
778
- :query_params => query_params,
779
- :form_params => form_params,
780
- :body => post_body,
781
- :auth_names => auth_names,
782
- :return_type => return_type
783
- )
784
-
785
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
786
- if @api_client.config.debugging
787
- @api_client.config.logger.debug "API called: UsersApi#delete_telegrafs_id_members_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
788
- end
789
- return data, status_code, headers
790
- end
791
-
792
- # Remove an owner from a Telegraf config
793
- # @param user_id [String] The ID of the owner to remove.
794
- # @param telegraf_id [String] The Telegraf config ID.
795
- # @param [Hash] opts the optional parameters
796
- # @option opts [String] :zap_trace_span OpenTracing span context
797
- # @return [nil]
798
- def delete_telegrafs_id_owners_id(user_id, telegraf_id, opts = {})
799
- delete_telegrafs_id_owners_id_with_http_info(user_id, telegraf_id, opts)
800
- nil
801
- end
802
-
803
- # Remove an owner from a Telegraf config
804
- # @param user_id [String] The ID of the owner to remove.
805
- # @param telegraf_id [String] The Telegraf config ID.
806
- # @param [Hash] opts the optional parameters
807
- # @option opts [String] :zap_trace_span OpenTracing span context
808
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
809
- def delete_telegrafs_id_owners_id_with_http_info(user_id, telegraf_id, opts = {})
810
- if @api_client.config.debugging
811
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_telegrafs_id_owners_id ...'
812
- end
813
- # verify the required parameter 'user_id' is set
814
- if @api_client.config.client_side_validation && user_id.nil?
815
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_telegrafs_id_owners_id"
816
- end
817
- # verify the required parameter 'telegraf_id' is set
818
- if @api_client.config.client_side_validation && telegraf_id.nil?
819
- fail ArgumentError, "Missing the required parameter 'telegraf_id' when calling UsersApi.delete_telegrafs_id_owners_id"
820
- end
821
- # resource path
822
- local_var_path = '/telegrafs/{telegrafID}/owners/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'telegrafID' + '}', CGI.escape(telegraf_id.to_s))
823
-
824
- # query parameters
825
- query_params = opts[:query_params] || {}
826
-
827
- # header parameters
828
- header_params = opts[:header_params] || {}
829
- # HTTP header 'Accept' (if needed)
830
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
831
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
832
-
833
- # form parameters
834
- form_params = opts[:form_params] || {}
835
-
836
- # http body (model)
837
- post_body = opts[:debug_body]
838
-
839
- # return_type
840
- return_type = opts[:debug_return_type]
841
-
842
- # auth_names
843
- auth_names = opts[:debug_auth_names] || ['header']
844
-
845
- new_options = opts.merge(
846
- :operation => :"UsersApi.delete_telegrafs_id_owners_id",
847
- :header_params => header_params,
848
- :query_params => query_params,
849
- :form_params => form_params,
850
- :body => post_body,
851
- :auth_names => auth_names,
852
- :return_type => return_type
853
- )
854
-
855
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
856
- if @api_client.config.debugging
857
- @api_client.config.logger.debug "API called: UsersApi#delete_telegrafs_id_owners_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
858
- end
859
- return data, status_code, headers
860
- end
861
-
862
- # Delete a user
863
- # @param user_id [String] The ID of the user to delete.
864
- # @param [Hash] opts the optional parameters
865
- # @option opts [String] :zap_trace_span OpenTracing span context
866
- # @return [nil]
867
- def delete_users_id(user_id, opts = {})
868
- delete_users_id_with_http_info(user_id, opts)
869
- nil
870
- end
871
-
872
- # Delete a user
873
- # @param user_id [String] The ID of the user to delete.
874
- # @param [Hash] opts the optional parameters
875
- # @option opts [String] :zap_trace_span OpenTracing span context
876
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
877
- def delete_users_id_with_http_info(user_id, opts = {})
878
- if @api_client.config.debugging
879
- @api_client.config.logger.debug 'Calling API: UsersApi.delete_users_id ...'
880
- end
881
- # verify the required parameter 'user_id' is set
882
- if @api_client.config.client_side_validation && user_id.nil?
883
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_users_id"
884
- end
885
- # resource path
886
- local_var_path = '/users/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s))
887
-
888
- # query parameters
889
- query_params = opts[:query_params] || {}
890
-
891
- # header parameters
892
- header_params = opts[:header_params] || {}
893
- # HTTP header 'Accept' (if needed)
894
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
895
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
896
-
897
- # form parameters
898
- form_params = opts[:form_params] || {}
899
-
900
- # http body (model)
901
- post_body = opts[:debug_body]
902
-
903
- # return_type
904
- return_type = opts[:debug_return_type]
905
-
906
- # auth_names
907
- auth_names = opts[:debug_auth_names] || ['header']
908
-
909
- new_options = opts.merge(
910
- :operation => :"UsersApi.delete_users_id",
911
- :header_params => header_params,
912
- :query_params => query_params,
913
- :form_params => form_params,
914
- :body => post_body,
915
- :auth_names => auth_names,
916
- :return_type => return_type
917
- )
918
-
919
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
920
- if @api_client.config.debugging
921
- @api_client.config.logger.debug "API called: UsersApi#delete_users_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
922
- end
923
- return data, status_code, headers
924
- end
925
-
926
- # List all users with member privileges for a bucket
927
- # @param bucket_id [String] The bucket ID.
928
- # @param [Hash] opts the optional parameters
929
- # @option opts [String] :zap_trace_span OpenTracing span context
930
- # @return [ResourceMembers]
931
- def get_buckets_id_members(bucket_id, opts = {})
932
- data, _status_code, _headers = get_buckets_id_members_with_http_info(bucket_id, opts)
933
- data
934
- end
935
-
936
- # List all users with member privileges for a bucket
937
- # @param bucket_id [String] The bucket ID.
938
- # @param [Hash] opts the optional parameters
939
- # @option opts [String] :zap_trace_span OpenTracing span context
940
- # @return [Array<(ResourceMembers, Integer, Hash)>] ResourceMembers data, response status code and response headers
941
- def get_buckets_id_members_with_http_info(bucket_id, opts = {})
942
- if @api_client.config.debugging
943
- @api_client.config.logger.debug 'Calling API: UsersApi.get_buckets_id_members ...'
944
- end
945
- # verify the required parameter 'bucket_id' is set
946
- if @api_client.config.client_side_validation && bucket_id.nil?
947
- fail ArgumentError, "Missing the required parameter 'bucket_id' when calling UsersApi.get_buckets_id_members"
948
- end
949
- # resource path
950
- local_var_path = '/buckets/{bucketID}/members'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_id.to_s))
951
-
952
- # query parameters
953
- query_params = opts[:query_params] || {}
954
-
955
- # header parameters
956
- header_params = opts[:header_params] || {}
957
- # HTTP header 'Accept' (if needed)
958
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
959
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
960
-
961
- # form parameters
962
- form_params = opts[:form_params] || {}
963
-
964
- # http body (model)
965
- post_body = opts[:debug_body]
966
-
967
- # return_type
968
- return_type = opts[:debug_return_type] || 'ResourceMembers'
969
-
970
- # auth_names
971
- auth_names = opts[:debug_auth_names] || ['header']
972
-
973
- new_options = opts.merge(
974
- :operation => :"UsersApi.get_buckets_id_members",
975
- :header_params => header_params,
976
- :query_params => query_params,
977
- :form_params => form_params,
978
- :body => post_body,
979
- :auth_names => auth_names,
980
- :return_type => return_type
981
- )
982
-
983
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
984
- if @api_client.config.debugging
985
- @api_client.config.logger.debug "API called: UsersApi#get_buckets_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
986
- end
987
- return data, status_code, headers
988
- end
989
-
990
- # List all owners of a bucket
991
- # @param bucket_id [String] The bucket ID.
992
- # @param [Hash] opts the optional parameters
993
- # @option opts [String] :zap_trace_span OpenTracing span context
994
- # @return [ResourceOwners]
995
- def get_buckets_id_owners(bucket_id, opts = {})
996
- data, _status_code, _headers = get_buckets_id_owners_with_http_info(bucket_id, opts)
997
- data
998
- end
999
-
1000
- # List all owners of a bucket
1001
- # @param bucket_id [String] The bucket ID.
1002
- # @param [Hash] opts the optional parameters
1003
- # @option opts [String] :zap_trace_span OpenTracing span context
1004
- # @return [Array<(ResourceOwners, Integer, Hash)>] ResourceOwners data, response status code and response headers
1005
- def get_buckets_id_owners_with_http_info(bucket_id, opts = {})
1006
- if @api_client.config.debugging
1007
- @api_client.config.logger.debug 'Calling API: UsersApi.get_buckets_id_owners ...'
1008
- end
1009
- # verify the required parameter 'bucket_id' is set
1010
- if @api_client.config.client_side_validation && bucket_id.nil?
1011
- fail ArgumentError, "Missing the required parameter 'bucket_id' when calling UsersApi.get_buckets_id_owners"
1012
- end
1013
- # resource path
1014
- local_var_path = '/buckets/{bucketID}/owners'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_id.to_s))
1015
-
1016
- # query parameters
1017
- query_params = opts[:query_params] || {}
1018
-
1019
- # header parameters
1020
- header_params = opts[:header_params] || {}
1021
- # HTTP header 'Accept' (if needed)
1022
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1023
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1024
-
1025
- # form parameters
1026
- form_params = opts[:form_params] || {}
1027
-
1028
- # http body (model)
1029
- post_body = opts[:debug_body]
1030
-
1031
- # return_type
1032
- return_type = opts[:debug_return_type] || 'ResourceOwners'
1033
-
1034
- # auth_names
1035
- auth_names = opts[:debug_auth_names] || ['header']
1036
-
1037
- new_options = opts.merge(
1038
- :operation => :"UsersApi.get_buckets_id_owners",
1039
- :header_params => header_params,
1040
- :query_params => query_params,
1041
- :form_params => form_params,
1042
- :body => post_body,
1043
- :auth_names => auth_names,
1044
- :return_type => return_type
1045
- )
1046
-
1047
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1048
- if @api_client.config.debugging
1049
- @api_client.config.logger.debug "API called: UsersApi#get_buckets_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1050
- end
1051
- return data, status_code, headers
1052
- end
1053
-
1054
- # List all dashboard members
1055
- # @param dashboard_id [String] The dashboard ID.
1056
- # @param [Hash] opts the optional parameters
1057
- # @option opts [String] :zap_trace_span OpenTracing span context
1058
- # @return [ResourceMembers]
1059
- def get_dashboards_id_members(dashboard_id, opts = {})
1060
- data, _status_code, _headers = get_dashboards_id_members_with_http_info(dashboard_id, opts)
1061
- data
1062
- end
1063
-
1064
- # List all dashboard members
1065
- # @param dashboard_id [String] The dashboard ID.
1066
- # @param [Hash] opts the optional parameters
1067
- # @option opts [String] :zap_trace_span OpenTracing span context
1068
- # @return [Array<(ResourceMembers, Integer, Hash)>] ResourceMembers data, response status code and response headers
1069
- def get_dashboards_id_members_with_http_info(dashboard_id, opts = {})
1070
- if @api_client.config.debugging
1071
- @api_client.config.logger.debug 'Calling API: UsersApi.get_dashboards_id_members ...'
1072
- end
1073
- # verify the required parameter 'dashboard_id' is set
1074
- if @api_client.config.client_side_validation && dashboard_id.nil?
1075
- fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling UsersApi.get_dashboards_id_members"
1076
- end
1077
- # resource path
1078
- local_var_path = '/dashboards/{dashboardID}/members'.sub('{' + 'dashboardID' + '}', CGI.escape(dashboard_id.to_s))
1079
-
1080
- # query parameters
1081
- query_params = opts[:query_params] || {}
1082
-
1083
- # header parameters
1084
- header_params = opts[:header_params] || {}
1085
- # HTTP header 'Accept' (if needed)
1086
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1087
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1088
-
1089
- # form parameters
1090
- form_params = opts[:form_params] || {}
1091
-
1092
- # http body (model)
1093
- post_body = opts[:debug_body]
1094
-
1095
- # return_type
1096
- return_type = opts[:debug_return_type] || 'ResourceMembers'
1097
-
1098
- # auth_names
1099
- auth_names = opts[:debug_auth_names] || ['header']
1100
-
1101
- new_options = opts.merge(
1102
- :operation => :"UsersApi.get_dashboards_id_members",
1103
- :header_params => header_params,
1104
- :query_params => query_params,
1105
- :form_params => form_params,
1106
- :body => post_body,
1107
- :auth_names => auth_names,
1108
- :return_type => return_type
1109
- )
1110
-
1111
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1112
- if @api_client.config.debugging
1113
- @api_client.config.logger.debug "API called: UsersApi#get_dashboards_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1114
- end
1115
- return data, status_code, headers
1116
- end
1117
-
1118
- # List all dashboard owners
1119
- # @param dashboard_id [String] The dashboard ID.
1120
- # @param [Hash] opts the optional parameters
1121
- # @option opts [String] :zap_trace_span OpenTracing span context
1122
- # @return [ResourceOwners]
1123
- def get_dashboards_id_owners(dashboard_id, opts = {})
1124
- data, _status_code, _headers = get_dashboards_id_owners_with_http_info(dashboard_id, opts)
1125
- data
1126
- end
1127
-
1128
- # List all dashboard owners
1129
- # @param dashboard_id [String] The dashboard ID.
1130
- # @param [Hash] opts the optional parameters
1131
- # @option opts [String] :zap_trace_span OpenTracing span context
1132
- # @return [Array<(ResourceOwners, Integer, Hash)>] ResourceOwners data, response status code and response headers
1133
- def get_dashboards_id_owners_with_http_info(dashboard_id, opts = {})
1134
- if @api_client.config.debugging
1135
- @api_client.config.logger.debug 'Calling API: UsersApi.get_dashboards_id_owners ...'
1136
- end
1137
- # verify the required parameter 'dashboard_id' is set
1138
- if @api_client.config.client_side_validation && dashboard_id.nil?
1139
- fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling UsersApi.get_dashboards_id_owners"
1140
- end
1141
- # resource path
1142
- local_var_path = '/dashboards/{dashboardID}/owners'.sub('{' + 'dashboardID' + '}', CGI.escape(dashboard_id.to_s))
1143
-
1144
- # query parameters
1145
- query_params = opts[:query_params] || {}
1146
-
1147
- # header parameters
1148
- header_params = opts[:header_params] || {}
1149
- # HTTP header 'Accept' (if needed)
1150
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1151
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1152
-
1153
- # form parameters
1154
- form_params = opts[:form_params] || {}
1155
-
1156
- # http body (model)
1157
- post_body = opts[:debug_body]
1158
-
1159
- # return_type
1160
- return_type = opts[:debug_return_type] || 'ResourceOwners'
1161
-
1162
- # auth_names
1163
- auth_names = opts[:debug_auth_names] || ['header']
1164
-
1165
- new_options = opts.merge(
1166
- :operation => :"UsersApi.get_dashboards_id_owners",
1167
- :header_params => header_params,
1168
- :query_params => query_params,
1169
- :form_params => form_params,
1170
- :body => post_body,
1171
- :auth_names => auth_names,
1172
- :return_type => return_type
1173
- )
1174
-
1175
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1176
- if @api_client.config.debugging
1177
- @api_client.config.logger.debug "API called: UsersApi#get_dashboards_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1178
- end
1179
- return data, status_code, headers
1180
- end
1181
-
1182
- # Return the feature flags for the currently authenticated user
1183
- # @param [Hash] opts the optional parameters
1184
- # @option opts [String] :zap_trace_span OpenTracing span context
1185
- # @return [Hash<String, Object>]
1186
- def get_flags(opts = {})
1187
- data, _status_code, _headers = get_flags_with_http_info(opts)
1188
- data
1189
- end
1190
-
1191
- # Return the feature flags for the currently authenticated user
1192
- # @param [Hash] opts the optional parameters
1193
- # @option opts [String] :zap_trace_span OpenTracing span context
1194
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1195
- def get_flags_with_http_info(opts = {})
1196
- if @api_client.config.debugging
1197
- @api_client.config.logger.debug 'Calling API: UsersApi.get_flags ...'
1198
- end
1199
- # resource path
1200
- local_var_path = '/flags'
1201
-
1202
- # query parameters
1203
- query_params = opts[:query_params] || {}
1204
-
1205
- # header parameters
1206
- header_params = opts[:header_params] || {}
1207
- # HTTP header 'Accept' (if needed)
1208
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1209
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1210
-
1211
- # form parameters
1212
- form_params = opts[:form_params] || {}
1213
-
1214
- # http body (model)
1215
- post_body = opts[:debug_body]
1216
-
1217
- # return_type
1218
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1219
-
1220
- # auth_names
1221
- auth_names = opts[:debug_auth_names] || ['header']
1222
-
1223
- new_options = opts.merge(
1224
- :operation => :"UsersApi.get_flags",
1225
- :header_params => header_params,
1226
- :query_params => query_params,
1227
- :form_params => form_params,
1228
- :body => post_body,
1229
- :auth_names => auth_names,
1230
- :return_type => return_type
1231
- )
1232
-
1233
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1234
- if @api_client.config.debugging
1235
- @api_client.config.logger.debug "API called: UsersApi#get_flags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1236
- end
1237
- return data, status_code, headers
1238
- end
1239
-
1240
- # Return the current authenticated user
1241
- # @param [Hash] opts the optional parameters
1242
- # @option opts [String] :zap_trace_span OpenTracing span context
1243
- # @return [User]
1244
- def get_me(opts = {})
1245
- data, _status_code, _headers = get_me_with_http_info(opts)
1246
- data
1247
- end
1248
-
1249
- # Return the current authenticated user
1250
- # @param [Hash] opts the optional parameters
1251
- # @option opts [String] :zap_trace_span OpenTracing span context
1252
- # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
1253
- def get_me_with_http_info(opts = {})
1254
- if @api_client.config.debugging
1255
- @api_client.config.logger.debug 'Calling API: UsersApi.get_me ...'
1256
- end
1257
- # resource path
1258
- local_var_path = '/me'
1259
-
1260
- # query parameters
1261
- query_params = opts[:query_params] || {}
1262
-
1263
- # header parameters
1264
- header_params = opts[:header_params] || {}
1265
- # HTTP header 'Accept' (if needed)
1266
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1267
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1268
-
1269
- # form parameters
1270
- form_params = opts[:form_params] || {}
1271
-
1272
- # http body (model)
1273
- post_body = opts[:debug_body]
1274
-
1275
- # return_type
1276
- return_type = opts[:debug_return_type] || 'User'
1277
-
1278
- # auth_names
1279
- auth_names = opts[:debug_auth_names] || ['header']
1280
-
1281
- new_options = opts.merge(
1282
- :operation => :"UsersApi.get_me",
1283
- :header_params => header_params,
1284
- :query_params => query_params,
1285
- :form_params => form_params,
1286
- :body => post_body,
1287
- :auth_names => auth_names,
1288
- :return_type => return_type
1289
- )
1290
-
1291
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1292
- if @api_client.config.debugging
1293
- @api_client.config.logger.debug "API called: UsersApi#get_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1294
- end
1295
- return data, status_code, headers
1296
- end
1297
-
1298
- # List all members of an organization
1299
- # @param org_id [String] The organization ID.
1300
- # @param [Hash] opts the optional parameters
1301
- # @option opts [String] :zap_trace_span OpenTracing span context
1302
- # @return [ResourceMembers]
1303
- def get_orgs_id_members(org_id, opts = {})
1304
- data, _status_code, _headers = get_orgs_id_members_with_http_info(org_id, opts)
1305
- data
1306
- end
1307
-
1308
- # List all members of an organization
1309
- # @param org_id [String] The organization ID.
1310
- # @param [Hash] opts the optional parameters
1311
- # @option opts [String] :zap_trace_span OpenTracing span context
1312
- # @return [Array<(ResourceMembers, Integer, Hash)>] ResourceMembers data, response status code and response headers
1313
- def get_orgs_id_members_with_http_info(org_id, opts = {})
1314
- if @api_client.config.debugging
1315
- @api_client.config.logger.debug 'Calling API: UsersApi.get_orgs_id_members ...'
1316
- end
1317
- # verify the required parameter 'org_id' is set
1318
- if @api_client.config.client_side_validation && org_id.nil?
1319
- fail ArgumentError, "Missing the required parameter 'org_id' when calling UsersApi.get_orgs_id_members"
1320
- end
1321
- # resource path
1322
- local_var_path = '/orgs/{orgID}/members'.sub('{' + 'orgID' + '}', CGI.escape(org_id.to_s))
1323
-
1324
- # query parameters
1325
- query_params = opts[:query_params] || {}
1326
-
1327
- # header parameters
1328
- header_params = opts[:header_params] || {}
1329
- # HTTP header 'Accept' (if needed)
1330
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1331
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1332
-
1333
- # form parameters
1334
- form_params = opts[:form_params] || {}
1335
-
1336
- # http body (model)
1337
- post_body = opts[:debug_body]
1338
-
1339
- # return_type
1340
- return_type = opts[:debug_return_type] || 'ResourceMembers'
1341
-
1342
- # auth_names
1343
- auth_names = opts[:debug_auth_names] || ['header']
1344
-
1345
- new_options = opts.merge(
1346
- :operation => :"UsersApi.get_orgs_id_members",
1347
- :header_params => header_params,
1348
- :query_params => query_params,
1349
- :form_params => form_params,
1350
- :body => post_body,
1351
- :auth_names => auth_names,
1352
- :return_type => return_type
1353
- )
1354
-
1355
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1356
- if @api_client.config.debugging
1357
- @api_client.config.logger.debug "API called: UsersApi#get_orgs_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1358
- end
1359
- return data, status_code, headers
1360
- end
1361
-
1362
- # List all owners of an organization
1363
- # @param org_id [String] The organization ID.
1364
- # @param [Hash] opts the optional parameters
1365
- # @option opts [String] :zap_trace_span OpenTracing span context
1366
- # @return [ResourceOwners]
1367
- def get_orgs_id_owners(org_id, opts = {})
1368
- data, _status_code, _headers = get_orgs_id_owners_with_http_info(org_id, opts)
1369
- data
1370
- end
1371
-
1372
- # List all owners of an organization
1373
- # @param org_id [String] The organization ID.
1374
- # @param [Hash] opts the optional parameters
1375
- # @option opts [String] :zap_trace_span OpenTracing span context
1376
- # @return [Array<(ResourceOwners, Integer, Hash)>] ResourceOwners data, response status code and response headers
1377
- def get_orgs_id_owners_with_http_info(org_id, opts = {})
1378
- if @api_client.config.debugging
1379
- @api_client.config.logger.debug 'Calling API: UsersApi.get_orgs_id_owners ...'
1380
- end
1381
- # verify the required parameter 'org_id' is set
1382
- if @api_client.config.client_side_validation && org_id.nil?
1383
- fail ArgumentError, "Missing the required parameter 'org_id' when calling UsersApi.get_orgs_id_owners"
1384
- end
1385
- # resource path
1386
- local_var_path = '/orgs/{orgID}/owners'.sub('{' + 'orgID' + '}', CGI.escape(org_id.to_s))
1387
-
1388
- # query parameters
1389
- query_params = opts[:query_params] || {}
1390
-
1391
- # header parameters
1392
- header_params = opts[:header_params] || {}
1393
- # HTTP header 'Accept' (if needed)
1394
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1395
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1396
-
1397
- # form parameters
1398
- form_params = opts[:form_params] || {}
1399
-
1400
- # http body (model)
1401
- post_body = opts[:debug_body]
1402
-
1403
- # return_type
1404
- return_type = opts[:debug_return_type] || 'ResourceOwners'
1405
-
1406
- # auth_names
1407
- auth_names = opts[:debug_auth_names] || ['header']
1408
-
1409
- new_options = opts.merge(
1410
- :operation => :"UsersApi.get_orgs_id_owners",
1411
- :header_params => header_params,
1412
- :query_params => query_params,
1413
- :form_params => form_params,
1414
- :body => post_body,
1415
- :auth_names => auth_names,
1416
- :return_type => return_type
1417
- )
1418
-
1419
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1420
- if @api_client.config.debugging
1421
- @api_client.config.logger.debug "API called: UsersApi#get_orgs_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1422
- end
1423
- return data, status_code, headers
1424
- end
1425
-
1426
- # List all users with member privileges for a scraper target
1427
- # @param scraper_target_id [String] The scraper target ID.
1428
- # @param [Hash] opts the optional parameters
1429
- # @option opts [String] :zap_trace_span OpenTracing span context
1430
- # @return [ResourceMembers]
1431
- def get_scrapers_id_members(scraper_target_id, opts = {})
1432
- data, _status_code, _headers = get_scrapers_id_members_with_http_info(scraper_target_id, opts)
1433
- data
1434
- end
1435
-
1436
- # List all users with member privileges for a scraper target
1437
- # @param scraper_target_id [String] The scraper target ID.
1438
- # @param [Hash] opts the optional parameters
1439
- # @option opts [String] :zap_trace_span OpenTracing span context
1440
- # @return [Array<(ResourceMembers, Integer, Hash)>] ResourceMembers data, response status code and response headers
1441
- def get_scrapers_id_members_with_http_info(scraper_target_id, opts = {})
1442
- if @api_client.config.debugging
1443
- @api_client.config.logger.debug 'Calling API: UsersApi.get_scrapers_id_members ...'
1444
- end
1445
- # verify the required parameter 'scraper_target_id' is set
1446
- if @api_client.config.client_side_validation && scraper_target_id.nil?
1447
- fail ArgumentError, "Missing the required parameter 'scraper_target_id' when calling UsersApi.get_scrapers_id_members"
1448
- end
1449
- # resource path
1450
- local_var_path = '/scrapers/{scraperTargetID}/members'.sub('{' + 'scraperTargetID' + '}', CGI.escape(scraper_target_id.to_s))
1451
-
1452
- # query parameters
1453
- query_params = opts[:query_params] || {}
1454
-
1455
- # header parameters
1456
- header_params = opts[:header_params] || {}
1457
- # HTTP header 'Accept' (if needed)
1458
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1459
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1460
-
1461
- # form parameters
1462
- form_params = opts[:form_params] || {}
1463
-
1464
- # http body (model)
1465
- post_body = opts[:debug_body]
1466
-
1467
- # return_type
1468
- return_type = opts[:debug_return_type] || 'ResourceMembers'
1469
-
1470
- # auth_names
1471
- auth_names = opts[:debug_auth_names] || ['header']
1472
-
1473
- new_options = opts.merge(
1474
- :operation => :"UsersApi.get_scrapers_id_members",
1475
- :header_params => header_params,
1476
- :query_params => query_params,
1477
- :form_params => form_params,
1478
- :body => post_body,
1479
- :auth_names => auth_names,
1480
- :return_type => return_type
1481
- )
1482
-
1483
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1484
- if @api_client.config.debugging
1485
- @api_client.config.logger.debug "API called: UsersApi#get_scrapers_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1486
- end
1487
- return data, status_code, headers
1488
- end
1489
-
1490
- # List all owners of a scraper target
1491
- # @param scraper_target_id [String] The scraper target ID.
1492
- # @param [Hash] opts the optional parameters
1493
- # @option opts [String] :zap_trace_span OpenTracing span context
1494
- # @return [ResourceOwners]
1495
- def get_scrapers_id_owners(scraper_target_id, opts = {})
1496
- data, _status_code, _headers = get_scrapers_id_owners_with_http_info(scraper_target_id, opts)
1497
- data
1498
- end
1499
-
1500
- # List all owners of a scraper target
1501
- # @param scraper_target_id [String] The scraper target ID.
1502
- # @param [Hash] opts the optional parameters
1503
- # @option opts [String] :zap_trace_span OpenTracing span context
1504
- # @return [Array<(ResourceOwners, Integer, Hash)>] ResourceOwners data, response status code and response headers
1505
- def get_scrapers_id_owners_with_http_info(scraper_target_id, opts = {})
1506
- if @api_client.config.debugging
1507
- @api_client.config.logger.debug 'Calling API: UsersApi.get_scrapers_id_owners ...'
1508
- end
1509
- # verify the required parameter 'scraper_target_id' is set
1510
- if @api_client.config.client_side_validation && scraper_target_id.nil?
1511
- fail ArgumentError, "Missing the required parameter 'scraper_target_id' when calling UsersApi.get_scrapers_id_owners"
1512
- end
1513
- # resource path
1514
- local_var_path = '/scrapers/{scraperTargetID}/owners'.sub('{' + 'scraperTargetID' + '}', CGI.escape(scraper_target_id.to_s))
1515
-
1516
- # query parameters
1517
- query_params = opts[:query_params] || {}
1518
-
1519
- # header parameters
1520
- header_params = opts[:header_params] || {}
1521
- # HTTP header 'Accept' (if needed)
1522
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1523
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1524
-
1525
- # form parameters
1526
- form_params = opts[:form_params] || {}
1527
-
1528
- # http body (model)
1529
- post_body = opts[:debug_body]
1530
-
1531
- # return_type
1532
- return_type = opts[:debug_return_type] || 'ResourceOwners'
1533
-
1534
- # auth_names
1535
- auth_names = opts[:debug_auth_names] || ['header']
1536
-
1537
- new_options = opts.merge(
1538
- :operation => :"UsersApi.get_scrapers_id_owners",
1539
- :header_params => header_params,
1540
- :query_params => query_params,
1541
- :form_params => form_params,
1542
- :body => post_body,
1543
- :auth_names => auth_names,
1544
- :return_type => return_type
1545
- )
1546
-
1547
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1548
- if @api_client.config.debugging
1549
- @api_client.config.logger.debug "API called: UsersApi#get_scrapers_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1550
- end
1551
- return data, status_code, headers
1552
- end
1553
-
1554
- # List all task members
1555
- # @param task_id [String] The task ID.
1556
- # @param [Hash] opts the optional parameters
1557
- # @option opts [String] :zap_trace_span OpenTracing span context
1558
- # @return [ResourceMembers]
1559
- def get_tasks_id_members(task_id, opts = {})
1560
- data, _status_code, _headers = get_tasks_id_members_with_http_info(task_id, opts)
1561
- data
1562
- end
1563
-
1564
- # List all task members
1565
- # @param task_id [String] The task ID.
1566
- # @param [Hash] opts the optional parameters
1567
- # @option opts [String] :zap_trace_span OpenTracing span context
1568
- # @return [Array<(ResourceMembers, Integer, Hash)>] ResourceMembers data, response status code and response headers
1569
- def get_tasks_id_members_with_http_info(task_id, opts = {})
1570
- if @api_client.config.debugging
1571
- @api_client.config.logger.debug 'Calling API: UsersApi.get_tasks_id_members ...'
1572
- end
1573
- # verify the required parameter 'task_id' is set
1574
- if @api_client.config.client_side_validation && task_id.nil?
1575
- fail ArgumentError, "Missing the required parameter 'task_id' when calling UsersApi.get_tasks_id_members"
1576
- end
1577
- # resource path
1578
- local_var_path = '/tasks/{taskID}/members'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
1579
-
1580
- # query parameters
1581
- query_params = opts[:query_params] || {}
1582
-
1583
- # header parameters
1584
- header_params = opts[:header_params] || {}
1585
- # HTTP header 'Accept' (if needed)
1586
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1587
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1588
-
1589
- # form parameters
1590
- form_params = opts[:form_params] || {}
1591
-
1592
- # http body (model)
1593
- post_body = opts[:debug_body]
1594
-
1595
- # return_type
1596
- return_type = opts[:debug_return_type] || 'ResourceMembers'
1597
-
1598
- # auth_names
1599
- auth_names = opts[:debug_auth_names] || ['header']
1600
-
1601
- new_options = opts.merge(
1602
- :operation => :"UsersApi.get_tasks_id_members",
1603
- :header_params => header_params,
1604
- :query_params => query_params,
1605
- :form_params => form_params,
1606
- :body => post_body,
1607
- :auth_names => auth_names,
1608
- :return_type => return_type
1609
- )
1610
-
1611
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1612
- if @api_client.config.debugging
1613
- @api_client.config.logger.debug "API called: UsersApi#get_tasks_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1614
- end
1615
- return data, status_code, headers
1616
- end
1617
-
1618
- # List all owners of a task
1619
- # @param task_id [String] The task ID.
1620
- # @param [Hash] opts the optional parameters
1621
- # @option opts [String] :zap_trace_span OpenTracing span context
1622
- # @return [ResourceOwners]
1623
- def get_tasks_id_owners(task_id, opts = {})
1624
- data, _status_code, _headers = get_tasks_id_owners_with_http_info(task_id, opts)
1625
- data
1626
- end
1627
-
1628
- # List all owners of a task
1629
- # @param task_id [String] The task ID.
1630
- # @param [Hash] opts the optional parameters
1631
- # @option opts [String] :zap_trace_span OpenTracing span context
1632
- # @return [Array<(ResourceOwners, Integer, Hash)>] ResourceOwners data, response status code and response headers
1633
- def get_tasks_id_owners_with_http_info(task_id, opts = {})
1634
- if @api_client.config.debugging
1635
- @api_client.config.logger.debug 'Calling API: UsersApi.get_tasks_id_owners ...'
1636
- end
1637
- # verify the required parameter 'task_id' is set
1638
- if @api_client.config.client_side_validation && task_id.nil?
1639
- fail ArgumentError, "Missing the required parameter 'task_id' when calling UsersApi.get_tasks_id_owners"
1640
- end
1641
- # resource path
1642
- local_var_path = '/tasks/{taskID}/owners'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
1643
-
1644
- # query parameters
1645
- query_params = opts[:query_params] || {}
1646
-
1647
- # header parameters
1648
- header_params = opts[:header_params] || {}
1649
- # HTTP header 'Accept' (if needed)
1650
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1651
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1652
-
1653
- # form parameters
1654
- form_params = opts[:form_params] || {}
1655
-
1656
- # http body (model)
1657
- post_body = opts[:debug_body]
1658
-
1659
- # return_type
1660
- return_type = opts[:debug_return_type] || 'ResourceOwners'
1661
-
1662
- # auth_names
1663
- auth_names = opts[:debug_auth_names] || ['header']
1664
-
1665
- new_options = opts.merge(
1666
- :operation => :"UsersApi.get_tasks_id_owners",
1667
- :header_params => header_params,
1668
- :query_params => query_params,
1669
- :form_params => form_params,
1670
- :body => post_body,
1671
- :auth_names => auth_names,
1672
- :return_type => return_type
1673
- )
1674
-
1675
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1676
- if @api_client.config.debugging
1677
- @api_client.config.logger.debug "API called: UsersApi#get_tasks_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1678
- end
1679
- return data, status_code, headers
1680
- end
1681
-
1682
- # List all users with member privileges for a Telegraf config
1683
- # @param telegraf_id [String] The Telegraf config ID.
1684
- # @param [Hash] opts the optional parameters
1685
- # @option opts [String] :zap_trace_span OpenTracing span context
1686
- # @return [ResourceMembers]
1687
- def get_telegrafs_id_members(telegraf_id, opts = {})
1688
- data, _status_code, _headers = get_telegrafs_id_members_with_http_info(telegraf_id, opts)
1689
- data
1690
- end
1691
-
1692
- # List all users with member privileges for a Telegraf config
1693
- # @param telegraf_id [String] The Telegraf config ID.
1694
- # @param [Hash] opts the optional parameters
1695
- # @option opts [String] :zap_trace_span OpenTracing span context
1696
- # @return [Array<(ResourceMembers, Integer, Hash)>] ResourceMembers data, response status code and response headers
1697
- def get_telegrafs_id_members_with_http_info(telegraf_id, opts = {})
1698
- if @api_client.config.debugging
1699
- @api_client.config.logger.debug 'Calling API: UsersApi.get_telegrafs_id_members ...'
1700
- end
1701
- # verify the required parameter 'telegraf_id' is set
1702
- if @api_client.config.client_side_validation && telegraf_id.nil?
1703
- fail ArgumentError, "Missing the required parameter 'telegraf_id' when calling UsersApi.get_telegrafs_id_members"
1704
- end
1705
- # resource path
1706
- local_var_path = '/telegrafs/{telegrafID}/members'.sub('{' + 'telegrafID' + '}', CGI.escape(telegraf_id.to_s))
1707
-
1708
- # query parameters
1709
- query_params = opts[:query_params] || {}
1710
-
1711
- # header parameters
1712
- header_params = opts[:header_params] || {}
1713
- # HTTP header 'Accept' (if needed)
1714
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1715
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1716
-
1717
- # form parameters
1718
- form_params = opts[:form_params] || {}
1719
-
1720
- # http body (model)
1721
- post_body = opts[:debug_body]
1722
-
1723
- # return_type
1724
- return_type = opts[:debug_return_type] || 'ResourceMembers'
1725
-
1726
- # auth_names
1727
- auth_names = opts[:debug_auth_names] || ['header']
1728
-
1729
- new_options = opts.merge(
1730
- :operation => :"UsersApi.get_telegrafs_id_members",
1731
- :header_params => header_params,
1732
- :query_params => query_params,
1733
- :form_params => form_params,
1734
- :body => post_body,
1735
- :auth_names => auth_names,
1736
- :return_type => return_type
1737
- )
1738
-
1739
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1740
- if @api_client.config.debugging
1741
- @api_client.config.logger.debug "API called: UsersApi#get_telegrafs_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1742
- end
1743
- return data, status_code, headers
1744
- end
1745
-
1746
- # List all owners of a Telegraf config
1747
- # @param telegraf_id [String] The Telegraf config ID.
1748
- # @param [Hash] opts the optional parameters
1749
- # @option opts [String] :zap_trace_span OpenTracing span context
1750
- # @return [ResourceOwners]
1751
- def get_telegrafs_id_owners(telegraf_id, opts = {})
1752
- data, _status_code, _headers = get_telegrafs_id_owners_with_http_info(telegraf_id, opts)
1753
- data
1754
- end
1755
-
1756
- # List all owners of a Telegraf config
1757
- # @param telegraf_id [String] The Telegraf config ID.
1758
- # @param [Hash] opts the optional parameters
1759
- # @option opts [String] :zap_trace_span OpenTracing span context
1760
- # @return [Array<(ResourceOwners, Integer, Hash)>] ResourceOwners data, response status code and response headers
1761
- def get_telegrafs_id_owners_with_http_info(telegraf_id, opts = {})
1762
- if @api_client.config.debugging
1763
- @api_client.config.logger.debug 'Calling API: UsersApi.get_telegrafs_id_owners ...'
1764
- end
1765
- # verify the required parameter 'telegraf_id' is set
1766
- if @api_client.config.client_side_validation && telegraf_id.nil?
1767
- fail ArgumentError, "Missing the required parameter 'telegraf_id' when calling UsersApi.get_telegrafs_id_owners"
1768
- end
1769
- # resource path
1770
- local_var_path = '/telegrafs/{telegrafID}/owners'.sub('{' + 'telegrafID' + '}', CGI.escape(telegraf_id.to_s))
1771
-
1772
- # query parameters
1773
- query_params = opts[:query_params] || {}
1774
-
1775
- # header parameters
1776
- header_params = opts[:header_params] || {}
1777
- # HTTP header 'Accept' (if needed)
1778
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1779
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1780
-
1781
- # form parameters
1782
- form_params = opts[:form_params] || {}
1783
-
1784
- # http body (model)
1785
- post_body = opts[:debug_body]
1786
-
1787
- # return_type
1788
- return_type = opts[:debug_return_type] || 'ResourceOwners'
1789
-
1790
- # auth_names
1791
- auth_names = opts[:debug_auth_names] || ['header']
1792
-
1793
- new_options = opts.merge(
1794
- :operation => :"UsersApi.get_telegrafs_id_owners",
1795
- :header_params => header_params,
1796
- :query_params => query_params,
1797
- :form_params => form_params,
1798
- :body => post_body,
1799
- :auth_names => auth_names,
1800
- :return_type => return_type
1801
- )
1802
-
1803
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1804
- if @api_client.config.debugging
1805
- @api_client.config.logger.debug "API called: UsersApi#get_telegrafs_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1806
- end
1807
- return data, status_code, headers
1808
- end
1809
-
1810
- # List all users
1811
- # @param [Hash] opts the optional parameters
1812
- # @option opts [String] :zap_trace_span OpenTracing span context
1813
- # @return [Users]
1814
- def get_users(opts = {})
1815
- data, _status_code, _headers = get_users_with_http_info(opts)
1816
- data
1817
- end
1818
-
1819
- # List all users
1820
- # @param [Hash] opts the optional parameters
1821
- # @option opts [String] :zap_trace_span OpenTracing span context
1822
- # @return [Array<(Users, Integer, Hash)>] Users data, response status code and response headers
1823
- def get_users_with_http_info(opts = {})
1824
- if @api_client.config.debugging
1825
- @api_client.config.logger.debug 'Calling API: UsersApi.get_users ...'
1826
- end
1827
- # resource path
1828
- local_var_path = '/users'
1829
-
1830
- # query parameters
1831
- query_params = opts[:query_params] || {}
1832
-
1833
- # header parameters
1834
- header_params = opts[:header_params] || {}
1835
- # HTTP header 'Accept' (if needed)
1836
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1837
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1838
-
1839
- # form parameters
1840
- form_params = opts[:form_params] || {}
1841
-
1842
- # http body (model)
1843
- post_body = opts[:debug_body]
1844
-
1845
- # return_type
1846
- return_type = opts[:debug_return_type] || 'Users'
1847
-
1848
- # auth_names
1849
- auth_names = opts[:debug_auth_names] || ['header']
1850
-
1851
- new_options = opts.merge(
1852
- :operation => :"UsersApi.get_users",
1853
- :header_params => header_params,
1854
- :query_params => query_params,
1855
- :form_params => form_params,
1856
- :body => post_body,
1857
- :auth_names => auth_names,
1858
- :return_type => return_type
1859
- )
1860
-
1861
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1862
- if @api_client.config.debugging
1863
- @api_client.config.logger.debug "API called: UsersApi#get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1864
- end
1865
- return data, status_code, headers
1866
- end
1867
-
1868
- # Retrieve a user
1869
- # @param user_id [String] The user ID.
1870
- # @param [Hash] opts the optional parameters
1871
- # @option opts [String] :zap_trace_span OpenTracing span context
1872
- # @return [User]
1873
- def get_users_id(user_id, opts = {})
1874
- data, _status_code, _headers = get_users_id_with_http_info(user_id, opts)
1875
- data
1876
- end
1877
-
1878
- # Retrieve a user
1879
- # @param user_id [String] The user ID.
1880
- # @param [Hash] opts the optional parameters
1881
- # @option opts [String] :zap_trace_span OpenTracing span context
1882
- # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
1883
- def get_users_id_with_http_info(user_id, opts = {})
1884
- if @api_client.config.debugging
1885
- @api_client.config.logger.debug 'Calling API: UsersApi.get_users_id ...'
1886
- end
1887
- # verify the required parameter 'user_id' is set
1888
- if @api_client.config.client_side_validation && user_id.nil?
1889
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_users_id"
1890
- end
1891
- # resource path
1892
- local_var_path = '/users/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s))
1893
-
1894
- # query parameters
1895
- query_params = opts[:query_params] || {}
1896
-
1897
- # header parameters
1898
- header_params = opts[:header_params] || {}
1899
- # HTTP header 'Accept' (if needed)
1900
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1901
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1902
-
1903
- # form parameters
1904
- form_params = opts[:form_params] || {}
1905
-
1906
- # http body (model)
1907
- post_body = opts[:debug_body]
1908
-
1909
- # return_type
1910
- return_type = opts[:debug_return_type] || 'User'
1911
-
1912
- # auth_names
1913
- auth_names = opts[:debug_auth_names] || ['header']
1914
-
1915
- new_options = opts.merge(
1916
- :operation => :"UsersApi.get_users_id",
1917
- :header_params => header_params,
1918
- :query_params => query_params,
1919
- :form_params => form_params,
1920
- :body => post_body,
1921
- :auth_names => auth_names,
1922
- :return_type => return_type
1923
- )
1924
-
1925
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1926
- if @api_client.config.debugging
1927
- @api_client.config.logger.debug "API called: UsersApi#get_users_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1928
- end
1929
- return data, status_code, headers
1930
- end
1931
-
1932
- # Update a user
1933
- # @param user_id [String] The ID of the user to update.
1934
- # @param user [User] User update to apply
1935
- # @param [Hash] opts the optional parameters
1936
- # @option opts [String] :zap_trace_span OpenTracing span context
1937
- # @return [User]
1938
- def patch_users_id(user_id, user, opts = {})
1939
- data, _status_code, _headers = patch_users_id_with_http_info(user_id, user, opts)
1940
- data
1941
- end
1942
-
1943
- # Update a user
1944
- # @param user_id [String] The ID of the user to update.
1945
- # @param user [User] User update to apply
1946
- # @param [Hash] opts the optional parameters
1947
- # @option opts [String] :zap_trace_span OpenTracing span context
1948
- # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
1949
- def patch_users_id_with_http_info(user_id, user, opts = {})
1950
- if @api_client.config.debugging
1951
- @api_client.config.logger.debug 'Calling API: UsersApi.patch_users_id ...'
1952
- end
1953
- # verify the required parameter 'user_id' is set
1954
- if @api_client.config.client_side_validation && user_id.nil?
1955
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_users_id"
1956
- end
1957
- # verify the required parameter 'user' is set
1958
- if @api_client.config.client_side_validation && user.nil?
1959
- fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.patch_users_id"
1960
- end
1961
- # resource path
1962
- local_var_path = '/users/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s))
1963
-
1964
- # query parameters
1965
- query_params = opts[:query_params] || {}
1966
-
1967
- # header parameters
1968
- header_params = opts[:header_params] || {}
1969
- # HTTP header 'Accept' (if needed)
1970
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1971
- # HTTP header 'Content-Type'
1972
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1973
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
1974
-
1975
- # form parameters
1976
- form_params = opts[:form_params] || {}
1977
-
1978
- # http body (model)
1979
- post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
1980
-
1981
- # return_type
1982
- return_type = opts[:debug_return_type] || 'User'
1983
-
1984
- # auth_names
1985
- auth_names = opts[:debug_auth_names] || ['header']
1986
-
1987
- new_options = opts.merge(
1988
- :operation => :"UsersApi.patch_users_id",
1989
- :header_params => header_params,
1990
- :query_params => query_params,
1991
- :form_params => form_params,
1992
- :body => post_body,
1993
- :auth_names => auth_names,
1994
- :return_type => return_type
1995
- )
1996
-
1997
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1998
- if @api_client.config.debugging
1999
- @api_client.config.logger.debug "API called: UsersApi#patch_users_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2000
- end
2001
- return data, status_code, headers
2002
- end
2003
-
2004
- # Add a member to a bucket
2005
- # @param bucket_id [String] The bucket ID.
2006
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2007
- # @param [Hash] opts the optional parameters
2008
- # @option opts [String] :zap_trace_span OpenTracing span context
2009
- # @return [ResourceMember]
2010
- def post_buckets_id_members(bucket_id, add_resource_member_request_body, opts = {})
2011
- data, _status_code, _headers = post_buckets_id_members_with_http_info(bucket_id, add_resource_member_request_body, opts)
2012
- data
2013
- end
2014
-
2015
- # Add a member to a bucket
2016
- # @param bucket_id [String] The bucket ID.
2017
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2018
- # @param [Hash] opts the optional parameters
2019
- # @option opts [String] :zap_trace_span OpenTracing span context
2020
- # @return [Array<(ResourceMember, Integer, Hash)>] ResourceMember data, response status code and response headers
2021
- def post_buckets_id_members_with_http_info(bucket_id, add_resource_member_request_body, opts = {})
2022
- if @api_client.config.debugging
2023
- @api_client.config.logger.debug 'Calling API: UsersApi.post_buckets_id_members ...'
2024
- end
2025
- # verify the required parameter 'bucket_id' is set
2026
- if @api_client.config.client_side_validation && bucket_id.nil?
2027
- fail ArgumentError, "Missing the required parameter 'bucket_id' when calling UsersApi.post_buckets_id_members"
2028
- end
2029
- # verify the required parameter 'add_resource_member_request_body' is set
2030
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2031
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_buckets_id_members"
2032
- end
2033
- # resource path
2034
- local_var_path = '/buckets/{bucketID}/members'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_id.to_s))
2035
-
2036
- # query parameters
2037
- query_params = opts[:query_params] || {}
2038
-
2039
- # header parameters
2040
- header_params = opts[:header_params] || {}
2041
- # HTTP header 'Accept' (if needed)
2042
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2043
- # HTTP header 'Content-Type'
2044
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2045
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2046
-
2047
- # form parameters
2048
- form_params = opts[:form_params] || {}
2049
-
2050
- # http body (model)
2051
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2052
-
2053
- # return_type
2054
- return_type = opts[:debug_return_type] || 'ResourceMember'
2055
-
2056
- # auth_names
2057
- auth_names = opts[:debug_auth_names] || ['header']
2058
-
2059
- new_options = opts.merge(
2060
- :operation => :"UsersApi.post_buckets_id_members",
2061
- :header_params => header_params,
2062
- :query_params => query_params,
2063
- :form_params => form_params,
2064
- :body => post_body,
2065
- :auth_names => auth_names,
2066
- :return_type => return_type
2067
- )
2068
-
2069
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2070
- if @api_client.config.debugging
2071
- @api_client.config.logger.debug "API called: UsersApi#post_buckets_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2072
- end
2073
- return data, status_code, headers
2074
- end
2075
-
2076
- # Add an owner to a bucket
2077
- # @param bucket_id [String] The bucket ID.
2078
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2079
- # @param [Hash] opts the optional parameters
2080
- # @option opts [String] :zap_trace_span OpenTracing span context
2081
- # @return [ResourceOwner]
2082
- def post_buckets_id_owners(bucket_id, add_resource_member_request_body, opts = {})
2083
- data, _status_code, _headers = post_buckets_id_owners_with_http_info(bucket_id, add_resource_member_request_body, opts)
2084
- data
2085
- end
2086
-
2087
- # Add an owner to a bucket
2088
- # @param bucket_id [String] The bucket ID.
2089
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2090
- # @param [Hash] opts the optional parameters
2091
- # @option opts [String] :zap_trace_span OpenTracing span context
2092
- # @return [Array<(ResourceOwner, Integer, Hash)>] ResourceOwner data, response status code and response headers
2093
- def post_buckets_id_owners_with_http_info(bucket_id, add_resource_member_request_body, opts = {})
2094
- if @api_client.config.debugging
2095
- @api_client.config.logger.debug 'Calling API: UsersApi.post_buckets_id_owners ...'
2096
- end
2097
- # verify the required parameter 'bucket_id' is set
2098
- if @api_client.config.client_side_validation && bucket_id.nil?
2099
- fail ArgumentError, "Missing the required parameter 'bucket_id' when calling UsersApi.post_buckets_id_owners"
2100
- end
2101
- # verify the required parameter 'add_resource_member_request_body' is set
2102
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2103
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_buckets_id_owners"
2104
- end
2105
- # resource path
2106
- local_var_path = '/buckets/{bucketID}/owners'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_id.to_s))
2107
-
2108
- # query parameters
2109
- query_params = opts[:query_params] || {}
2110
-
2111
- # header parameters
2112
- header_params = opts[:header_params] || {}
2113
- # HTTP header 'Accept' (if needed)
2114
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2115
- # HTTP header 'Content-Type'
2116
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2117
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2118
-
2119
- # form parameters
2120
- form_params = opts[:form_params] || {}
2121
-
2122
- # http body (model)
2123
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2124
-
2125
- # return_type
2126
- return_type = opts[:debug_return_type] || 'ResourceOwner'
2127
-
2128
- # auth_names
2129
- auth_names = opts[:debug_auth_names] || ['header']
2130
-
2131
- new_options = opts.merge(
2132
- :operation => :"UsersApi.post_buckets_id_owners",
2133
- :header_params => header_params,
2134
- :query_params => query_params,
2135
- :form_params => form_params,
2136
- :body => post_body,
2137
- :auth_names => auth_names,
2138
- :return_type => return_type
2139
- )
2140
-
2141
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2142
- if @api_client.config.debugging
2143
- @api_client.config.logger.debug "API called: UsersApi#post_buckets_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2144
- end
2145
- return data, status_code, headers
2146
- end
2147
-
2148
- # Add a member to a dashboard
2149
- # @param dashboard_id [String] The dashboard ID.
2150
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2151
- # @param [Hash] opts the optional parameters
2152
- # @option opts [String] :zap_trace_span OpenTracing span context
2153
- # @return [ResourceMember]
2154
- def post_dashboards_id_members(dashboard_id, add_resource_member_request_body, opts = {})
2155
- data, _status_code, _headers = post_dashboards_id_members_with_http_info(dashboard_id, add_resource_member_request_body, opts)
2156
- data
2157
- end
2158
-
2159
- # Add a member to a dashboard
2160
- # @param dashboard_id [String] The dashboard ID.
2161
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2162
- # @param [Hash] opts the optional parameters
2163
- # @option opts [String] :zap_trace_span OpenTracing span context
2164
- # @return [Array<(ResourceMember, Integer, Hash)>] ResourceMember data, response status code and response headers
2165
- def post_dashboards_id_members_with_http_info(dashboard_id, add_resource_member_request_body, opts = {})
2166
- if @api_client.config.debugging
2167
- @api_client.config.logger.debug 'Calling API: UsersApi.post_dashboards_id_members ...'
2168
- end
2169
- # verify the required parameter 'dashboard_id' is set
2170
- if @api_client.config.client_side_validation && dashboard_id.nil?
2171
- fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling UsersApi.post_dashboards_id_members"
2172
- end
2173
- # verify the required parameter 'add_resource_member_request_body' is set
2174
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2175
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_dashboards_id_members"
2176
- end
2177
- # resource path
2178
- local_var_path = '/dashboards/{dashboardID}/members'.sub('{' + 'dashboardID' + '}', CGI.escape(dashboard_id.to_s))
2179
-
2180
- # query parameters
2181
- query_params = opts[:query_params] || {}
2182
-
2183
- # header parameters
2184
- header_params = opts[:header_params] || {}
2185
- # HTTP header 'Accept' (if needed)
2186
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2187
- # HTTP header 'Content-Type'
2188
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2189
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2190
-
2191
- # form parameters
2192
- form_params = opts[:form_params] || {}
2193
-
2194
- # http body (model)
2195
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2196
-
2197
- # return_type
2198
- return_type = opts[:debug_return_type] || 'ResourceMember'
2199
-
2200
- # auth_names
2201
- auth_names = opts[:debug_auth_names] || ['header']
2202
-
2203
- new_options = opts.merge(
2204
- :operation => :"UsersApi.post_dashboards_id_members",
2205
- :header_params => header_params,
2206
- :query_params => query_params,
2207
- :form_params => form_params,
2208
- :body => post_body,
2209
- :auth_names => auth_names,
2210
- :return_type => return_type
2211
- )
2212
-
2213
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2214
- if @api_client.config.debugging
2215
- @api_client.config.logger.debug "API called: UsersApi#post_dashboards_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2216
- end
2217
- return data, status_code, headers
2218
- end
2219
-
2220
- # Add an owner to a dashboard
2221
- # @param dashboard_id [String] The dashboard ID.
2222
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2223
- # @param [Hash] opts the optional parameters
2224
- # @option opts [String] :zap_trace_span OpenTracing span context
2225
- # @return [ResourceOwner]
2226
- def post_dashboards_id_owners(dashboard_id, add_resource_member_request_body, opts = {})
2227
- data, _status_code, _headers = post_dashboards_id_owners_with_http_info(dashboard_id, add_resource_member_request_body, opts)
2228
- data
2229
- end
2230
-
2231
- # Add an owner to a dashboard
2232
- # @param dashboard_id [String] The dashboard ID.
2233
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2234
- # @param [Hash] opts the optional parameters
2235
- # @option opts [String] :zap_trace_span OpenTracing span context
2236
- # @return [Array<(ResourceOwner, Integer, Hash)>] ResourceOwner data, response status code and response headers
2237
- def post_dashboards_id_owners_with_http_info(dashboard_id, add_resource_member_request_body, opts = {})
2238
- if @api_client.config.debugging
2239
- @api_client.config.logger.debug 'Calling API: UsersApi.post_dashboards_id_owners ...'
2240
- end
2241
- # verify the required parameter 'dashboard_id' is set
2242
- if @api_client.config.client_side_validation && dashboard_id.nil?
2243
- fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling UsersApi.post_dashboards_id_owners"
2244
- end
2245
- # verify the required parameter 'add_resource_member_request_body' is set
2246
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2247
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_dashboards_id_owners"
2248
- end
2249
- # resource path
2250
- local_var_path = '/dashboards/{dashboardID}/owners'.sub('{' + 'dashboardID' + '}', CGI.escape(dashboard_id.to_s))
2251
-
2252
- # query parameters
2253
- query_params = opts[:query_params] || {}
2254
-
2255
- # header parameters
2256
- header_params = opts[:header_params] || {}
2257
- # HTTP header 'Accept' (if needed)
2258
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2259
- # HTTP header 'Content-Type'
2260
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2261
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2262
-
2263
- # form parameters
2264
- form_params = opts[:form_params] || {}
2265
-
2266
- # http body (model)
2267
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2268
-
2269
- # return_type
2270
- return_type = opts[:debug_return_type] || 'ResourceOwner'
2271
-
2272
- # auth_names
2273
- auth_names = opts[:debug_auth_names] || ['header']
2274
-
2275
- new_options = opts.merge(
2276
- :operation => :"UsersApi.post_dashboards_id_owners",
2277
- :header_params => header_params,
2278
- :query_params => query_params,
2279
- :form_params => form_params,
2280
- :body => post_body,
2281
- :auth_names => auth_names,
2282
- :return_type => return_type
2283
- )
2284
-
2285
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2286
- if @api_client.config.debugging
2287
- @api_client.config.logger.debug "API called: UsersApi#post_dashboards_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2288
- end
2289
- return data, status_code, headers
2290
- end
2291
-
2292
- # Add a member to an organization
2293
- # @param org_id [String] The organization ID.
2294
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2295
- # @param [Hash] opts the optional parameters
2296
- # @option opts [String] :zap_trace_span OpenTracing span context
2297
- # @return [ResourceMember]
2298
- def post_orgs_id_members(org_id, add_resource_member_request_body, opts = {})
2299
- data, _status_code, _headers = post_orgs_id_members_with_http_info(org_id, add_resource_member_request_body, opts)
2300
- data
2301
- end
2302
-
2303
- # Add a member to an organization
2304
- # @param org_id [String] The organization ID.
2305
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2306
- # @param [Hash] opts the optional parameters
2307
- # @option opts [String] :zap_trace_span OpenTracing span context
2308
- # @return [Array<(ResourceMember, Integer, Hash)>] ResourceMember data, response status code and response headers
2309
- def post_orgs_id_members_with_http_info(org_id, add_resource_member_request_body, opts = {})
2310
- if @api_client.config.debugging
2311
- @api_client.config.logger.debug 'Calling API: UsersApi.post_orgs_id_members ...'
2312
- end
2313
- # verify the required parameter 'org_id' is set
2314
- if @api_client.config.client_side_validation && org_id.nil?
2315
- fail ArgumentError, "Missing the required parameter 'org_id' when calling UsersApi.post_orgs_id_members"
2316
- end
2317
- # verify the required parameter 'add_resource_member_request_body' is set
2318
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2319
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_orgs_id_members"
2320
- end
2321
- # resource path
2322
- local_var_path = '/orgs/{orgID}/members'.sub('{' + 'orgID' + '}', CGI.escape(org_id.to_s))
2323
-
2324
- # query parameters
2325
- query_params = opts[:query_params] || {}
2326
-
2327
- # header parameters
2328
- header_params = opts[:header_params] || {}
2329
- # HTTP header 'Accept' (if needed)
2330
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2331
- # HTTP header 'Content-Type'
2332
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2333
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2334
-
2335
- # form parameters
2336
- form_params = opts[:form_params] || {}
2337
-
2338
- # http body (model)
2339
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2340
-
2341
- # return_type
2342
- return_type = opts[:debug_return_type] || 'ResourceMember'
2343
-
2344
- # auth_names
2345
- auth_names = opts[:debug_auth_names] || ['header']
2346
-
2347
- new_options = opts.merge(
2348
- :operation => :"UsersApi.post_orgs_id_members",
2349
- :header_params => header_params,
2350
- :query_params => query_params,
2351
- :form_params => form_params,
2352
- :body => post_body,
2353
- :auth_names => auth_names,
2354
- :return_type => return_type
2355
- )
2356
-
2357
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2358
- if @api_client.config.debugging
2359
- @api_client.config.logger.debug "API called: UsersApi#post_orgs_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2360
- end
2361
- return data, status_code, headers
2362
- end
2363
-
2364
- # Add an owner to an organization
2365
- # @param org_id [String] The organization ID.
2366
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2367
- # @param [Hash] opts the optional parameters
2368
- # @option opts [String] :zap_trace_span OpenTracing span context
2369
- # @return [ResourceOwner]
2370
- def post_orgs_id_owners(org_id, add_resource_member_request_body, opts = {})
2371
- data, _status_code, _headers = post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body, opts)
2372
- data
2373
- end
2374
-
2375
- # Add an owner to an organization
2376
- # @param org_id [String] The organization ID.
2377
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2378
- # @param [Hash] opts the optional parameters
2379
- # @option opts [String] :zap_trace_span OpenTracing span context
2380
- # @return [Array<(ResourceOwner, Integer, Hash)>] ResourceOwner data, response status code and response headers
2381
- def post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body, opts = {})
2382
- if @api_client.config.debugging
2383
- @api_client.config.logger.debug 'Calling API: UsersApi.post_orgs_id_owners ...'
2384
- end
2385
- # verify the required parameter 'org_id' is set
2386
- if @api_client.config.client_side_validation && org_id.nil?
2387
- fail ArgumentError, "Missing the required parameter 'org_id' when calling UsersApi.post_orgs_id_owners"
2388
- end
2389
- # verify the required parameter 'add_resource_member_request_body' is set
2390
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2391
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_orgs_id_owners"
2392
- end
2393
- # resource path
2394
- local_var_path = '/orgs/{orgID}/owners'.sub('{' + 'orgID' + '}', CGI.escape(org_id.to_s))
2395
-
2396
- # query parameters
2397
- query_params = opts[:query_params] || {}
2398
-
2399
- # header parameters
2400
- header_params = opts[:header_params] || {}
2401
- # HTTP header 'Accept' (if needed)
2402
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2403
- # HTTP header 'Content-Type'
2404
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2405
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2406
-
2407
- # form parameters
2408
- form_params = opts[:form_params] || {}
2409
-
2410
- # http body (model)
2411
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2412
-
2413
- # return_type
2414
- return_type = opts[:debug_return_type] || 'ResourceOwner'
2415
-
2416
- # auth_names
2417
- auth_names = opts[:debug_auth_names] || ['header']
2418
-
2419
- new_options = opts.merge(
2420
- :operation => :"UsersApi.post_orgs_id_owners",
2421
- :header_params => header_params,
2422
- :query_params => query_params,
2423
- :form_params => form_params,
2424
- :body => post_body,
2425
- :auth_names => auth_names,
2426
- :return_type => return_type
2427
- )
2428
-
2429
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2430
- if @api_client.config.debugging
2431
- @api_client.config.logger.debug "API called: UsersApi#post_orgs_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2432
- end
2433
- return data, status_code, headers
2434
- end
2435
-
2436
- # Add a member to a scraper target
2437
- # @param scraper_target_id [String] The scraper target ID.
2438
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2439
- # @param [Hash] opts the optional parameters
2440
- # @option opts [String] :zap_trace_span OpenTracing span context
2441
- # @return [ResourceMember]
2442
- def post_scrapers_id_members(scraper_target_id, add_resource_member_request_body, opts = {})
2443
- data, _status_code, _headers = post_scrapers_id_members_with_http_info(scraper_target_id, add_resource_member_request_body, opts)
2444
- data
2445
- end
2446
-
2447
- # Add a member to a scraper target
2448
- # @param scraper_target_id [String] The scraper target ID.
2449
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2450
- # @param [Hash] opts the optional parameters
2451
- # @option opts [String] :zap_trace_span OpenTracing span context
2452
- # @return [Array<(ResourceMember, Integer, Hash)>] ResourceMember data, response status code and response headers
2453
- def post_scrapers_id_members_with_http_info(scraper_target_id, add_resource_member_request_body, opts = {})
2454
- if @api_client.config.debugging
2455
- @api_client.config.logger.debug 'Calling API: UsersApi.post_scrapers_id_members ...'
2456
- end
2457
- # verify the required parameter 'scraper_target_id' is set
2458
- if @api_client.config.client_side_validation && scraper_target_id.nil?
2459
- fail ArgumentError, "Missing the required parameter 'scraper_target_id' when calling UsersApi.post_scrapers_id_members"
2460
- end
2461
- # verify the required parameter 'add_resource_member_request_body' is set
2462
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2463
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_scrapers_id_members"
2464
- end
2465
- # resource path
2466
- local_var_path = '/scrapers/{scraperTargetID}/members'.sub('{' + 'scraperTargetID' + '}', CGI.escape(scraper_target_id.to_s))
2467
-
2468
- # query parameters
2469
- query_params = opts[:query_params] || {}
2470
-
2471
- # header parameters
2472
- header_params = opts[:header_params] || {}
2473
- # HTTP header 'Accept' (if needed)
2474
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2475
- # HTTP header 'Content-Type'
2476
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2477
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2478
-
2479
- # form parameters
2480
- form_params = opts[:form_params] || {}
2481
-
2482
- # http body (model)
2483
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2484
-
2485
- # return_type
2486
- return_type = opts[:debug_return_type] || 'ResourceMember'
2487
-
2488
- # auth_names
2489
- auth_names = opts[:debug_auth_names] || ['header']
2490
-
2491
- new_options = opts.merge(
2492
- :operation => :"UsersApi.post_scrapers_id_members",
2493
- :header_params => header_params,
2494
- :query_params => query_params,
2495
- :form_params => form_params,
2496
- :body => post_body,
2497
- :auth_names => auth_names,
2498
- :return_type => return_type
2499
- )
2500
-
2501
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2502
- if @api_client.config.debugging
2503
- @api_client.config.logger.debug "API called: UsersApi#post_scrapers_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2504
- end
2505
- return data, status_code, headers
2506
- end
2507
-
2508
- # Add an owner to a scraper target
2509
- # @param scraper_target_id [String] The scraper target ID.
2510
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2511
- # @param [Hash] opts the optional parameters
2512
- # @option opts [String] :zap_trace_span OpenTracing span context
2513
- # @return [ResourceOwner]
2514
- def post_scrapers_id_owners(scraper_target_id, add_resource_member_request_body, opts = {})
2515
- data, _status_code, _headers = post_scrapers_id_owners_with_http_info(scraper_target_id, add_resource_member_request_body, opts)
2516
- data
2517
- end
2518
-
2519
- # Add an owner to a scraper target
2520
- # @param scraper_target_id [String] The scraper target ID.
2521
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2522
- # @param [Hash] opts the optional parameters
2523
- # @option opts [String] :zap_trace_span OpenTracing span context
2524
- # @return [Array<(ResourceOwner, Integer, Hash)>] ResourceOwner data, response status code and response headers
2525
- def post_scrapers_id_owners_with_http_info(scraper_target_id, add_resource_member_request_body, opts = {})
2526
- if @api_client.config.debugging
2527
- @api_client.config.logger.debug 'Calling API: UsersApi.post_scrapers_id_owners ...'
2528
- end
2529
- # verify the required parameter 'scraper_target_id' is set
2530
- if @api_client.config.client_side_validation && scraper_target_id.nil?
2531
- fail ArgumentError, "Missing the required parameter 'scraper_target_id' when calling UsersApi.post_scrapers_id_owners"
2532
- end
2533
- # verify the required parameter 'add_resource_member_request_body' is set
2534
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2535
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_scrapers_id_owners"
2536
- end
2537
- # resource path
2538
- local_var_path = '/scrapers/{scraperTargetID}/owners'.sub('{' + 'scraperTargetID' + '}', CGI.escape(scraper_target_id.to_s))
2539
-
2540
- # query parameters
2541
- query_params = opts[:query_params] || {}
2542
-
2543
- # header parameters
2544
- header_params = opts[:header_params] || {}
2545
- # HTTP header 'Accept' (if needed)
2546
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2547
- # HTTP header 'Content-Type'
2548
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2549
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2550
-
2551
- # form parameters
2552
- form_params = opts[:form_params] || {}
2553
-
2554
- # http body (model)
2555
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2556
-
2557
- # return_type
2558
- return_type = opts[:debug_return_type] || 'ResourceOwner'
2559
-
2560
- # auth_names
2561
- auth_names = opts[:debug_auth_names] || ['header']
2562
-
2563
- new_options = opts.merge(
2564
- :operation => :"UsersApi.post_scrapers_id_owners",
2565
- :header_params => header_params,
2566
- :query_params => query_params,
2567
- :form_params => form_params,
2568
- :body => post_body,
2569
- :auth_names => auth_names,
2570
- :return_type => return_type
2571
- )
2572
-
2573
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2574
- if @api_client.config.debugging
2575
- @api_client.config.logger.debug "API called: UsersApi#post_scrapers_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2576
- end
2577
- return data, status_code, headers
2578
- end
2579
-
2580
- # Add a member to a task
2581
- # @param task_id [String] The task ID.
2582
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2583
- # @param [Hash] opts the optional parameters
2584
- # @option opts [String] :zap_trace_span OpenTracing span context
2585
- # @return [ResourceMember]
2586
- def post_tasks_id_members(task_id, add_resource_member_request_body, opts = {})
2587
- data, _status_code, _headers = post_tasks_id_members_with_http_info(task_id, add_resource_member_request_body, opts)
2588
- data
2589
- end
2590
-
2591
- # Add a member to a task
2592
- # @param task_id [String] The task ID.
2593
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2594
- # @param [Hash] opts the optional parameters
2595
- # @option opts [String] :zap_trace_span OpenTracing span context
2596
- # @return [Array<(ResourceMember, Integer, Hash)>] ResourceMember data, response status code and response headers
2597
- def post_tasks_id_members_with_http_info(task_id, add_resource_member_request_body, opts = {})
2598
- if @api_client.config.debugging
2599
- @api_client.config.logger.debug 'Calling API: UsersApi.post_tasks_id_members ...'
2600
- end
2601
- # verify the required parameter 'task_id' is set
2602
- if @api_client.config.client_side_validation && task_id.nil?
2603
- fail ArgumentError, "Missing the required parameter 'task_id' when calling UsersApi.post_tasks_id_members"
2604
- end
2605
- # verify the required parameter 'add_resource_member_request_body' is set
2606
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2607
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_tasks_id_members"
2608
- end
2609
- # resource path
2610
- local_var_path = '/tasks/{taskID}/members'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
2611
-
2612
- # query parameters
2613
- query_params = opts[:query_params] || {}
2614
-
2615
- # header parameters
2616
- header_params = opts[:header_params] || {}
2617
- # HTTP header 'Accept' (if needed)
2618
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2619
- # HTTP header 'Content-Type'
2620
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2621
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2622
-
2623
- # form parameters
2624
- form_params = opts[:form_params] || {}
2625
-
2626
- # http body (model)
2627
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2628
-
2629
- # return_type
2630
- return_type = opts[:debug_return_type] || 'ResourceMember'
2631
-
2632
- # auth_names
2633
- auth_names = opts[:debug_auth_names] || ['header']
2634
-
2635
- new_options = opts.merge(
2636
- :operation => :"UsersApi.post_tasks_id_members",
2637
- :header_params => header_params,
2638
- :query_params => query_params,
2639
- :form_params => form_params,
2640
- :body => post_body,
2641
- :auth_names => auth_names,
2642
- :return_type => return_type
2643
- )
2644
-
2645
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2646
- if @api_client.config.debugging
2647
- @api_client.config.logger.debug "API called: UsersApi#post_tasks_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2648
- end
2649
- return data, status_code, headers
2650
- end
2651
-
2652
- # Add an owner to a task
2653
- # @param task_id [String] The task ID.
2654
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2655
- # @param [Hash] opts the optional parameters
2656
- # @option opts [String] :zap_trace_span OpenTracing span context
2657
- # @return [ResourceOwner]
2658
- def post_tasks_id_owners(task_id, add_resource_member_request_body, opts = {})
2659
- data, _status_code, _headers = post_tasks_id_owners_with_http_info(task_id, add_resource_member_request_body, opts)
2660
- data
2661
- end
2662
-
2663
- # Add an owner to a task
2664
- # @param task_id [String] The task ID.
2665
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2666
- # @param [Hash] opts the optional parameters
2667
- # @option opts [String] :zap_trace_span OpenTracing span context
2668
- # @return [Array<(ResourceOwner, Integer, Hash)>] ResourceOwner data, response status code and response headers
2669
- def post_tasks_id_owners_with_http_info(task_id, add_resource_member_request_body, opts = {})
2670
- if @api_client.config.debugging
2671
- @api_client.config.logger.debug 'Calling API: UsersApi.post_tasks_id_owners ...'
2672
- end
2673
- # verify the required parameter 'task_id' is set
2674
- if @api_client.config.client_side_validation && task_id.nil?
2675
- fail ArgumentError, "Missing the required parameter 'task_id' when calling UsersApi.post_tasks_id_owners"
2676
- end
2677
- # verify the required parameter 'add_resource_member_request_body' is set
2678
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2679
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_tasks_id_owners"
2680
- end
2681
- # resource path
2682
- local_var_path = '/tasks/{taskID}/owners'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
2683
-
2684
- # query parameters
2685
- query_params = opts[:query_params] || {}
2686
-
2687
- # header parameters
2688
- header_params = opts[:header_params] || {}
2689
- # HTTP header 'Accept' (if needed)
2690
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2691
- # HTTP header 'Content-Type'
2692
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2693
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2694
-
2695
- # form parameters
2696
- form_params = opts[:form_params] || {}
2697
-
2698
- # http body (model)
2699
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2700
-
2701
- # return_type
2702
- return_type = opts[:debug_return_type] || 'ResourceOwner'
2703
-
2704
- # auth_names
2705
- auth_names = opts[:debug_auth_names] || ['header']
2706
-
2707
- new_options = opts.merge(
2708
- :operation => :"UsersApi.post_tasks_id_owners",
2709
- :header_params => header_params,
2710
- :query_params => query_params,
2711
- :form_params => form_params,
2712
- :body => post_body,
2713
- :auth_names => auth_names,
2714
- :return_type => return_type
2715
- )
2716
-
2717
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2718
- if @api_client.config.debugging
2719
- @api_client.config.logger.debug "API called: UsersApi#post_tasks_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2720
- end
2721
- return data, status_code, headers
2722
- end
2723
-
2724
- # Add a member to a Telegraf config
2725
- # @param telegraf_id [String] The Telegraf config ID.
2726
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2727
- # @param [Hash] opts the optional parameters
2728
- # @option opts [String] :zap_trace_span OpenTracing span context
2729
- # @return [ResourceMember]
2730
- def post_telegrafs_id_members(telegraf_id, add_resource_member_request_body, opts = {})
2731
- data, _status_code, _headers = post_telegrafs_id_members_with_http_info(telegraf_id, add_resource_member_request_body, opts)
2732
- data
2733
- end
2734
-
2735
- # Add a member to a Telegraf config
2736
- # @param telegraf_id [String] The Telegraf config ID.
2737
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
2738
- # @param [Hash] opts the optional parameters
2739
- # @option opts [String] :zap_trace_span OpenTracing span context
2740
- # @return [Array<(ResourceMember, Integer, Hash)>] ResourceMember data, response status code and response headers
2741
- def post_telegrafs_id_members_with_http_info(telegraf_id, add_resource_member_request_body, opts = {})
2742
- if @api_client.config.debugging
2743
- @api_client.config.logger.debug 'Calling API: UsersApi.post_telegrafs_id_members ...'
2744
- end
2745
- # verify the required parameter 'telegraf_id' is set
2746
- if @api_client.config.client_side_validation && telegraf_id.nil?
2747
- fail ArgumentError, "Missing the required parameter 'telegraf_id' when calling UsersApi.post_telegrafs_id_members"
2748
- end
2749
- # verify the required parameter 'add_resource_member_request_body' is set
2750
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2751
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_telegrafs_id_members"
2752
- end
2753
- # resource path
2754
- local_var_path = '/telegrafs/{telegrafID}/members'.sub('{' + 'telegrafID' + '}', CGI.escape(telegraf_id.to_s))
2755
-
2756
- # query parameters
2757
- query_params = opts[:query_params] || {}
2758
-
2759
- # header parameters
2760
- header_params = opts[:header_params] || {}
2761
- # HTTP header 'Accept' (if needed)
2762
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2763
- # HTTP header 'Content-Type'
2764
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2765
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2766
-
2767
- # form parameters
2768
- form_params = opts[:form_params] || {}
2769
-
2770
- # http body (model)
2771
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2772
-
2773
- # return_type
2774
- return_type = opts[:debug_return_type] || 'ResourceMember'
2775
-
2776
- # auth_names
2777
- auth_names = opts[:debug_auth_names] || ['header']
2778
-
2779
- new_options = opts.merge(
2780
- :operation => :"UsersApi.post_telegrafs_id_members",
2781
- :header_params => header_params,
2782
- :query_params => query_params,
2783
- :form_params => form_params,
2784
- :body => post_body,
2785
- :auth_names => auth_names,
2786
- :return_type => return_type
2787
- )
2788
-
2789
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2790
- if @api_client.config.debugging
2791
- @api_client.config.logger.debug "API called: UsersApi#post_telegrafs_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2792
- end
2793
- return data, status_code, headers
2794
- end
2795
-
2796
- # Add an owner to a Telegraf config
2797
- # @param telegraf_id [String] The Telegraf config ID.
2798
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2799
- # @param [Hash] opts the optional parameters
2800
- # @option opts [String] :zap_trace_span OpenTracing span context
2801
- # @return [ResourceOwner]
2802
- def post_telegrafs_id_owners(telegraf_id, add_resource_member_request_body, opts = {})
2803
- data, _status_code, _headers = post_telegrafs_id_owners_with_http_info(telegraf_id, add_resource_member_request_body, opts)
2804
- data
2805
- end
2806
-
2807
- # Add an owner to a Telegraf config
2808
- # @param telegraf_id [String] The Telegraf config ID.
2809
- # @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as owner
2810
- # @param [Hash] opts the optional parameters
2811
- # @option opts [String] :zap_trace_span OpenTracing span context
2812
- # @return [Array<(ResourceOwner, Integer, Hash)>] ResourceOwner data, response status code and response headers
2813
- def post_telegrafs_id_owners_with_http_info(telegraf_id, add_resource_member_request_body, opts = {})
2814
- if @api_client.config.debugging
2815
- @api_client.config.logger.debug 'Calling API: UsersApi.post_telegrafs_id_owners ...'
2816
- end
2817
- # verify the required parameter 'telegraf_id' is set
2818
- if @api_client.config.client_side_validation && telegraf_id.nil?
2819
- fail ArgumentError, "Missing the required parameter 'telegraf_id' when calling UsersApi.post_telegrafs_id_owners"
2820
- end
2821
- # verify the required parameter 'add_resource_member_request_body' is set
2822
- if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
2823
- fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_telegrafs_id_owners"
2824
- end
2825
- # resource path
2826
- local_var_path = '/telegrafs/{telegrafID}/owners'.sub('{' + 'telegrafID' + '}', CGI.escape(telegraf_id.to_s))
2827
-
2828
- # query parameters
2829
- query_params = opts[:query_params] || {}
2830
-
2831
- # header parameters
2832
- header_params = opts[:header_params] || {}
2833
- # HTTP header 'Accept' (if needed)
2834
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2835
- # HTTP header 'Content-Type'
2836
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2837
- header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
2838
-
2839
- # form parameters
2840
- form_params = opts[:form_params] || {}
2841
-
2842
- # http body (model)
2843
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
2844
-
2845
- # return_type
2846
- return_type = opts[:debug_return_type] || 'ResourceOwner'
2847
-
2848
- # auth_names
2849
- auth_names = opts[:debug_auth_names] || ['header']
2850
-
2851
- new_options = opts.merge(
2852
- :operation => :"UsersApi.post_telegrafs_id_owners",
2853
- :header_params => header_params,
2854
- :query_params => query_params,
2855
- :form_params => form_params,
2856
- :body => post_body,
2857
- :auth_names => auth_names,
2858
- :return_type => return_type
2859
- )
2860
-
2861
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2862
- if @api_client.config.debugging
2863
- @api_client.config.logger.debug "API called: UsersApi#post_telegrafs_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
411
+ @api_client.config.logger.debug "API called: UsersApi#patch_users_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2864
412
  end
2865
413
  return data, status_code, headers
2866
414
  end
@@ -2869,7 +417,7 @@ module InfluxDB2::API
2869
417
  # @param user [User] User to create
2870
418
  # @param [Hash] opts the optional parameters
2871
419
  # @option opts [String] :zap_trace_span OpenTracing span context
2872
- # @return [User]
420
+ # @return [UserResponse]
2873
421
  def post_users(user, opts = {})
2874
422
  data, _status_code, _headers = post_users_with_http_info(user, opts)
2875
423
  data
@@ -2879,7 +427,7 @@ module InfluxDB2::API
2879
427
  # @param user [User] User to create
2880
428
  # @param [Hash] opts the optional parameters
2881
429
  # @option opts [String] :zap_trace_span OpenTracing span context
2882
- # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
430
+ # @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers
2883
431
  def post_users_with_http_info(user, opts = {})
2884
432
  if @api_client.config.debugging
2885
433
  @api_client.config.logger.debug 'Calling API: UsersApi.post_users ...'
@@ -2909,7 +457,7 @@ module InfluxDB2::API
2909
457
  post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
2910
458
 
2911
459
  # return_type
2912
- return_type = opts[:debug_return_type] || 'User'
460
+ return_type = opts[:debug_return_type] || 'UserResponse'
2913
461
 
2914
462
  # auth_names
2915
463
  auth_names = opts[:debug_auth_names] || ['header']