Skip to content

Commit

Permalink
fix: add missing PatchBucketRequest (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
bednar authored Feb 24, 2022
1 parent 57d091a commit ff81f2f
Show file tree
Hide file tree
Showing 51 changed files with 591 additions and 331 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## 2.3.0 [unreleased]

### Bug Fixes
1. [#99](https://github.com/influxdata/influxdb-client-ruby/pull/99): Add missing `PatchBucketRequest` model

### CI
1. [#100](https://github.com/influxdata/influxdb-client-ruby/pull/100): Use new Codecov uploader for reporting code coverage

Expand Down
4 changes: 2 additions & 2 deletions apis/lib/influxdb2/apis/generated/api/authorizations_api.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=begin
#Influx OSS API Service
#InfluxDB OSS API Service
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
#The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
The version of the OpenAPI document: 2.0.0
Expand Down
16 changes: 8 additions & 8 deletions apis/lib/influxdb2/apis/generated/api/buckets_api.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=begin
#Influx OSS API Service
#InfluxDB OSS API Service
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
#The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
The version of the OpenAPI document: 2.0.0
Expand Down Expand Up @@ -297,8 +297,8 @@ def delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, opts = {})
# @option opts [String] :zap_trace_span OpenTracing span context
# @option opts [Integer] :offset
# @option opts [Integer] :limit (default to 20)
# @option opts [String] :after The last resource ID from which to seek from (but not including). This is to be used instead of `offset`.
# @option opts [String] :org The organization name.
# @option opts [String] :after Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`.
# @option opts [String] :org The name of the organization.
# @option opts [String] :org_id The organization ID.
# @option opts [String] :name Only returns buckets with a specific name.
# @option opts [String] :id Only returns buckets with a specific ID.
Expand All @@ -313,8 +313,8 @@ def get_buckets(opts = {})
# @option opts [String] :zap_trace_span OpenTracing span context
# @option opts [Integer] :offset
# @option opts [Integer] :limit
# @option opts [String] :after The last resource ID from which to seek from (but not including). This is to be used instead of `offset`.
# @option opts [String] :org The organization name.
# @option opts [String] :after Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`.
# @option opts [String] :org The name of the organization.
# @option opts [String] :org_id The organization ID.
# @option opts [String] :name Only returns buckets with a specific name.
# @option opts [String] :id Only returns buckets with a specific ID.
Expand Down Expand Up @@ -643,7 +643,7 @@ def get_buckets_id_owners_with_http_info(bucket_id, opts = {})
# @param source_id [String] The source ID.
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @option opts [String] :org The organization name.
# @option opts [String] :org The name of the organization.
# @return [Buckets]
def get_sources_id_buckets(source_id, opts = {})
data, _status_code, _headers = get_sources_id_buckets_with_http_info(source_id, opts)
Expand All @@ -654,7 +654,7 @@ def get_sources_id_buckets(source_id, opts = {})
# @param source_id [String] The source ID.
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @option opts [String] :org The organization name.
# @option opts [String] :org The name of the organization.
# @return [Array<(Buckets, Integer, Hash)>] Buckets data, response status code and response headers
def get_sources_id_buckets_with_http_info(source_id, opts = {})
if @api_client.config.debugging
Expand Down
12 changes: 6 additions & 6 deletions apis/lib/influxdb2/apis/generated/api/labels_api.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=begin
#Influx OSS API Service
#InfluxDB OSS API Service
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
#The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
The version of the OpenAPI document: 2.0.0
Expand Down Expand Up @@ -82,7 +82,7 @@ def delete_labels_id_with_http_info(label_id, opts = {})
return data, status_code, headers
end

# Get all labels
# List all labels
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @option opts [String] :org_id The organization ID.
Expand All @@ -92,7 +92,7 @@ def get_labels(opts = {})
data
end

# Get all labels
# List all labels
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @option opts [String] :org_id The organization ID.
Expand Down Expand Up @@ -143,7 +143,7 @@ def get_labels_with_http_info(opts = {})
return data, status_code, headers
end

# Get a label
# Retrieve a label
# @param label_id [String] The ID of the label to update.
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
Expand All @@ -153,7 +153,7 @@ def get_labels_id(label_id, opts = {})
data
end

# Get a label
# Retrieve a label
# @param label_id [String] The ID of the label to update.
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
Expand Down
212 changes: 2 additions & 210 deletions apis/lib/influxdb2/apis/generated/api/organizations_api.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=begin
#Influx OSS API Service
#InfluxDB OSS API Service
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
#The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
The version of the OpenAPI document: 2.0.0
Expand Down Expand Up @@ -502,70 +502,6 @@ def get_orgs_id_owners_with_http_info(org_id, opts = {})
return data, status_code, headers
end

# List all secret keys for an organization
# @param org_id [String] The organization ID.
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @return [SecretKeysResponse]
def get_orgs_id_secrets(org_id, opts = {})
data, _status_code, _headers = get_orgs_id_secrets_with_http_info(org_id, opts)
data
end

# List all secret keys for an organization
# @param org_id [String] The organization ID.
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @return [Array<(SecretKeysResponse, Integer, Hash)>] SecretKeysResponse data, response status code and response headers
def get_orgs_id_secrets_with_http_info(org_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: OrganizationsApi.get_orgs_id_secrets ...'
end
# verify the required parameter 'org_id' is set
if @api_client.config.client_side_validation && org_id.nil?
fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.get_orgs_id_secrets"
end
# resource path
local_var_path = '/orgs/{orgID}/secrets'.sub('{' + 'orgID' + '}', CGI.escape(org_id.to_s))

# query parameters
query_params = opts[:query_params] || {}

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'SecretKeysResponse'

# auth_names
auth_names = opts[:debug_auth_names] || ['header']

new_options = opts.merge(
:operation => :"OrganizationsApi.get_orgs_id_secrets",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)

data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: OrganizationsApi#get_orgs_id_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# Update an organization
# @param org_id [String] The ID of the organization to get.
# @param patch_organization_request [PatchOrganizationRequest] Organization update to apply
Expand Down Expand Up @@ -638,78 +574,6 @@ def patch_orgs_id_with_http_info(org_id, patch_organization_request, opts = {})
return data, status_code, headers
end

# Update secrets in an organization
# @param org_id [String] The organization ID.
# @param request_body [Hash<String, String>] Secret key value pairs to update/add
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @return [nil]
def patch_orgs_id_secrets(org_id, request_body, opts = {})
patch_orgs_id_secrets_with_http_info(org_id, request_body, opts)
nil
end

# Update secrets in an organization
# @param org_id [String] The organization ID.
# @param request_body [Hash<String, String>] Secret key value pairs to update/add
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def patch_orgs_id_secrets_with_http_info(org_id, request_body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: OrganizationsApi.patch_orgs_id_secrets ...'
end
# verify the required parameter 'org_id' is set
if @api_client.config.client_side_validation && org_id.nil?
fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.patch_orgs_id_secrets"
end
# verify the required parameter 'request_body' is set
if @api_client.config.client_side_validation && request_body.nil?
fail ArgumentError, "Missing the required parameter 'request_body' when calling OrganizationsApi.patch_orgs_id_secrets"
end
# resource path
local_var_path = '/orgs/{orgID}/secrets'.sub('{' + 'orgID' + '}', CGI.escape(org_id.to_s))

# query parameters
query_params = opts[:query_params] || {}

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# HTTP header 'Content-Type'
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

# return_type
return_type = opts[:debug_return_type]

# auth_names
auth_names = opts[:debug_auth_names] || ['header']

new_options = opts.merge(
:operation => :"OrganizationsApi.patch_orgs_id_secrets",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)

data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: OrganizationsApi#patch_orgs_id_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# Create an organization
# @param post_organization_request [PostOrganizationRequest] Organization to create
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -919,77 +783,5 @@ def post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body,
end
return data, status_code, headers
end

# Delete secrets from an organization
# @param org_id [String] The organization ID.
# @param secret_keys [SecretKeys] Secret key to delete
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @return [nil]
def post_orgs_id_secrets(org_id, secret_keys, opts = {})
post_orgs_id_secrets_with_http_info(org_id, secret_keys, opts)
nil
end

# Delete secrets from an organization
# @param org_id [String] The organization ID.
# @param secret_keys [SecretKeys] Secret key to delete
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def post_orgs_id_secrets_with_http_info(org_id, secret_keys, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: OrganizationsApi.post_orgs_id_secrets ...'
end
# verify the required parameter 'org_id' is set
if @api_client.config.client_side_validation && org_id.nil?
fail ArgumentError, "Missing the required parameter 'org_id' when calling OrganizationsApi.post_orgs_id_secrets"
end
# verify the required parameter 'secret_keys' is set
if @api_client.config.client_side_validation && secret_keys.nil?
fail ArgumentError, "Missing the required parameter 'secret_keys' when calling OrganizationsApi.post_orgs_id_secrets"
end
# resource path
local_var_path = '/orgs/{orgID}/secrets/delete'.sub('{' + 'orgID' + '}', CGI.escape(org_id.to_s))

# query parameters
query_params = opts[:query_params] || {}

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# HTTP header 'Content-Type'
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(secret_keys)

# return_type
return_type = opts[:debug_return_type]

# auth_names
auth_names = opts[:debug_auth_names] || ['header']

new_options = opts.merge(
:operation => :"OrganizationsApi.post_orgs_id_secrets",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)

data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: OrganizationsApi#post_orgs_id_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
end
end
Loading

0 comments on commit ff81f2f

Please sign in to comment.