influxdb-client-apis 1.15.0.pre.2461 → 1.15.0.pre.2653

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