From ff81f2f5ee4ffababeee19665726ce1782ef6115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Thu, 24 Feb 2022 12:38:06 +0100 Subject: [PATCH] fix: add missing `PatchBucketRequest` (#99) --- CHANGELOG.md | 3 + .../apis/generated/api/authorizations_api.rb | 4 +- .../apis/generated/api/buckets_api.rb | 16 +- .../apis/generated/api/labels_api.rb | 12 +- .../apis/generated/api/organizations_api.rb | 212 +--------------- .../influxdb2/apis/generated/api/users_api.rb | 18 +- .../influxdb2/apis/generated/api_client.rb | 4 +- .../lib/influxdb2/apis/generated/api_error.rb | 4 +- .../influxdb2/apis/generated/configuration.rb | 4 +- .../add_resource_member_request_body.rb | 224 +++++++++++++++++ .../apis/generated/models/authorization.rb | 18 +- .../generated/models/authorization_all_of.rb | 16 +- .../models/authorization_all_of_links.rb | 4 +- .../models/authorization_post_request.rb | 6 +- .../models/authorization_update_request.rb | 6 +- .../apis/generated/models/authorizations.rb | 4 +- .../influxdb2/apis/generated/models/bucket.rb | 4 +- .../apis/generated/models/bucket_links.rb | 4 +- .../apis/generated/models/buckets.rb | 4 +- .../influxdb2/apis/generated/models/label.rb | 4 +- .../generated/models/label_create_request.rb | 4 +- .../apis/generated/models/label_mapping.rb | 4 +- .../apis/generated/models/label_response.rb | 4 +- .../apis/generated/models/label_update.rb | 4 +- .../apis/generated/models/labels_response.rb | 4 +- .../influxdb2/apis/generated/models/links.rb | 4 +- .../apis/generated/models/organization.rb | 4 +- .../generated/models/organization_links.rb | 4 +- .../apis/generated/models/organizations.rb | 4 +- .../generated/models/password_reset_body.rb | 4 +- .../generated/models/patch_bucket_request.rb | 232 ++++++++++++++++++ .../models/patch_organization_request.rb | 4 +- .../apis/generated/models/permission.rb | 4 +- .../generated/models/post_bucket_request.rb | 4 +- .../models/post_organization_request.rb | 4 +- .../apis/generated/models/resource_member.rb | 4 +- .../models/resource_member_all_of.rb | 4 +- .../apis/generated/models/resource_members.rb | 4 +- .../models/resource_members_links.rb | 4 +- .../apis/generated/models/resource_owner.rb | 4 +- .../generated/models/resource_owner_all_of.rb | 4 +- .../apis/generated/models/resource_owners.rb | 4 +- .../apis/generated/models/retention_rule.rb | 4 +- .../influxdb2/apis/generated/models/user.rb | 4 +- .../apis/generated/models/user_response.rb | 4 +- .../generated/models/user_response_links.rb | 4 +- .../influxdb2/apis/generated/models/users.rb | 4 +- bin/generate-sources.sh | 3 + .../client/models/delete_predicate_request.rb | 4 +- lib/influxdb2/client/models/dialect.rb | 4 +- lib/influxdb2/client/models/health_check.rb | 4 +- 51 files changed, 591 insertions(+), 331 deletions(-) create mode 100644 apis/lib/influxdb2/apis/generated/models/add_resource_member_request_body.rb create mode 100644 apis/lib/influxdb2/apis/generated/models/patch_bucket_request.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index cc629c0b..9f6bc4cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/api/authorizations_api.rb b/apis/lib/influxdb2/apis/generated/api/authorizations_api.rb index 8e63643e..0e84f8f0 100644 --- a/apis/lib/influxdb2/apis/generated/api/authorizations_api.rb +++ b/apis/lib/influxdb2/apis/generated/api/authorizations_api.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/api/buckets_api.rb b/apis/lib/influxdb2/apis/generated/api/buckets_api.rb index 6e26bb6d..c7b0b015 100644 --- a/apis/lib/influxdb2/apis/generated/api/buckets_api.rb +++ b/apis/lib/influxdb2/apis/generated/api/buckets_api.rb @@ -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 @@ -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. @@ -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. @@ -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) @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/api/labels_api.rb b/apis/lib/influxdb2/apis/generated/api/labels_api.rb index a3476e78..c28b6f3f 100644 --- a/apis/lib/influxdb2/apis/generated/api/labels_api.rb +++ b/apis/lib/influxdb2/apis/generated/api/labels_api.rb @@ -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 @@ -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. @@ -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. @@ -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 @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/api/organizations_api.rb b/apis/lib/influxdb2/apis/generated/api/organizations_api.rb index 00303245..72970199 100644 --- a/apis/lib/influxdb2/apis/generated/api/organizations_api.rb +++ b/apis/lib/influxdb2/apis/generated/api/organizations_api.rb @@ -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 @@ -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 @@ -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] 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] 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 @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/api/users_api.rb b/apis/lib/influxdb2/apis/generated/api/users_api.rb index 08977c43..801d85ea 100644 --- a/apis/lib/influxdb2/apis/generated/api/users_api.rb +++ b/apis/lib/influxdb2/apis/generated/api/users_api.rb @@ -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 @@ -140,7 +140,7 @@ def get_flags_with_http_info(opts = {}) return data, status_code, headers end - # Return the current authenticated user + # Retrieve the currently authenticated user # @param [Hash] opts the optional parameters # @option opts [String] :zap_trace_span OpenTracing span context # @return [UserResponse] @@ -149,7 +149,7 @@ def get_me(opts = {}) data end - # Return the current authenticated user + # Retrieve the currently authenticated user # @param [Hash] opts the optional parameters # @option opts [String] :zap_trace_span OpenTracing span context # @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers @@ -203,7 +203,9 @@ def get_me_with_http_info(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] :after Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. + # @option opts [String] :name + # @option opts [String] :id # @return [Users] def get_users(opts = {}) data, _status_code, _headers = get_users_with_http_info(opts) @@ -215,7 +217,9 @@ def get_users(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] :after Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. + # @option opts [String] :name + # @option opts [String] :id # @return [Array<(Users, Integer, Hash)>] Users data, response status code and response headers def get_users_with_http_info(opts = {}) if @api_client.config.debugging @@ -241,6 +245,8 @@ def get_users_with_http_info(opts = {}) query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/apis/lib/influxdb2/apis/generated/api_client.rb b/apis/lib/influxdb2/apis/generated/api_client.rb index acdb0255..a688823a 100644 --- a/apis/lib/influxdb2/apis/generated/api_client.rb +++ b/apis/lib/influxdb2/apis/generated/api_client.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/api_error.rb b/apis/lib/influxdb2/apis/generated/api_error.rb index 91ae9569..732ead58 100644 --- a/apis/lib/influxdb2/apis/generated/api_error.rb +++ b/apis/lib/influxdb2/apis/generated/api_error.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/configuration.rb b/apis/lib/influxdb2/apis/generated/configuration.rb index 9b498033..5f567167 100644 --- a/apis/lib/influxdb2/apis/generated/configuration.rb +++ b/apis/lib/influxdb2/apis/generated/configuration.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/add_resource_member_request_body.rb b/apis/lib/influxdb2/apis/generated/models/add_resource_member_request_body.rb new file mode 100644 index 00000000..6e2b1817 --- /dev/null +++ b/apis/lib/influxdb2/apis/generated/models/add_resource_member_request_body.rb @@ -0,0 +1,224 @@ +=begin +#InfluxDB OSS API Service + +#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 + +Generated by: https://openapi-generator.tech + +=end + +require 'date' +require 'set' +require 'time' + +module InfluxDB2::API + class AddResourceMemberRequestBody + attr_accessor :id + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `InfluxDB2::AddResourceMemberRequestBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `InfluxDB2::AddResourceMemberRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + InfluxDB2::API.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/apis/lib/influxdb2/apis/generated/models/authorization.rb b/apis/lib/influxdb2/apis/generated/models/authorization.rb index 2d86624a..bcecb1d9 100644 --- a/apis/lib/influxdb2/apis/generated/models/authorization.rb +++ b/apis/lib/influxdb2/apis/generated/models/authorization.rb @@ -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 @@ -15,7 +15,7 @@ module InfluxDB2::API class Authorization - # If inactive the token is inactive and requests using the token will be rejected. + # Status of the token. If `inactive`, requests using the token will be rejected. attr_reader :status # A description of the token. @@ -25,24 +25,24 @@ class Authorization attr_accessor :updated_at - # ID of org that authorization is scoped to. + # ID of the organization that the authorization is scoped to. attr_accessor :org_id - # List of permissions for an auth. An auth must have at least one Permission. + # List of permissions for an authorization. An authorization must have at least one permission. attr_reader :permissions attr_accessor :id - # Passed via the Authorization Header and Token Authentication type. + # Token used to authenticate API requests. attr_accessor :token - # ID of user that created and owns the token. + # ID of the user that created and owns the token. attr_accessor :user_id - # Name of user that created and owns the token. + # Name of the user that created and owns the token. attr_accessor :user - # Name of the org token is scoped to. + # Name of the organization that the token is scoped to. attr_accessor :org attr_accessor :links diff --git a/apis/lib/influxdb2/apis/generated/models/authorization_all_of.rb b/apis/lib/influxdb2/apis/generated/models/authorization_all_of.rb index 68fc7fdf..d763a1f6 100644 --- a/apis/lib/influxdb2/apis/generated/models/authorization_all_of.rb +++ b/apis/lib/influxdb2/apis/generated/models/authorization_all_of.rb @@ -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 @@ -19,24 +19,24 @@ class AuthorizationAllOf attr_accessor :updated_at - # ID of org that authorization is scoped to. + # ID of the organization that the authorization is scoped to. attr_accessor :org_id - # List of permissions for an auth. An auth must have at least one Permission. + # List of permissions for an authorization. An authorization must have at least one permission. attr_reader :permissions attr_accessor :id - # Passed via the Authorization Header and Token Authentication type. + # Token used to authenticate API requests. attr_accessor :token - # ID of user that created and owns the token. + # ID of the user that created and owns the token. attr_accessor :user_id - # Name of user that created and owns the token. + # Name of the user that created and owns the token. attr_accessor :user - # Name of the org token is scoped to. + # Name of the organization that the token is scoped to. attr_accessor :org attr_accessor :links diff --git a/apis/lib/influxdb2/apis/generated/models/authorization_all_of_links.rb b/apis/lib/influxdb2/apis/generated/models/authorization_all_of_links.rb index 31e4c016..734dab7b 100644 --- a/apis/lib/influxdb2/apis/generated/models/authorization_all_of_links.rb +++ b/apis/lib/influxdb2/apis/generated/models/authorization_all_of_links.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/authorization_post_request.rb b/apis/lib/influxdb2/apis/generated/models/authorization_post_request.rb index c71af1dc..0792bdbd 100644 --- a/apis/lib/influxdb2/apis/generated/models/authorization_post_request.rb +++ b/apis/lib/influxdb2/apis/generated/models/authorization_post_request.rb @@ -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 @@ -15,7 +15,7 @@ module InfluxDB2::API class AuthorizationPostRequest - # If inactive the token is inactive and requests using the token will be rejected. + # Status of the token. If `inactive`, requests using the token will be rejected. attr_reader :status # A description of the token. diff --git a/apis/lib/influxdb2/apis/generated/models/authorization_update_request.rb b/apis/lib/influxdb2/apis/generated/models/authorization_update_request.rb index 82925f02..af766867 100644 --- a/apis/lib/influxdb2/apis/generated/models/authorization_update_request.rb +++ b/apis/lib/influxdb2/apis/generated/models/authorization_update_request.rb @@ -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 @@ -15,7 +15,7 @@ module InfluxDB2::API class AuthorizationUpdateRequest - # If inactive the token is inactive and requests using the token will be rejected. + # Status of the token. If `inactive`, requests using the token will be rejected. attr_reader :status # A description of the token. diff --git a/apis/lib/influxdb2/apis/generated/models/authorizations.rb b/apis/lib/influxdb2/apis/generated/models/authorizations.rb index b6f05779..bbcc6ee8 100644 --- a/apis/lib/influxdb2/apis/generated/models/authorizations.rb +++ b/apis/lib/influxdb2/apis/generated/models/authorizations.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/bucket.rb b/apis/lib/influxdb2/apis/generated/models/bucket.rb index cf67c986..ddbe2745 100644 --- a/apis/lib/influxdb2/apis/generated/models/bucket.rb +++ b/apis/lib/influxdb2/apis/generated/models/bucket.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/bucket_links.rb b/apis/lib/influxdb2/apis/generated/models/bucket_links.rb index 9e1aabb0..1889579b 100644 --- a/apis/lib/influxdb2/apis/generated/models/bucket_links.rb +++ b/apis/lib/influxdb2/apis/generated/models/bucket_links.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/buckets.rb b/apis/lib/influxdb2/apis/generated/models/buckets.rb index 4d30389c..16cf0165 100644 --- a/apis/lib/influxdb2/apis/generated/models/buckets.rb +++ b/apis/lib/influxdb2/apis/generated/models/buckets.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/label.rb b/apis/lib/influxdb2/apis/generated/models/label.rb index 4ed98186..a66da1b9 100644 --- a/apis/lib/influxdb2/apis/generated/models/label.rb +++ b/apis/lib/influxdb2/apis/generated/models/label.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/label_create_request.rb b/apis/lib/influxdb2/apis/generated/models/label_create_request.rb index 442fbd65..c93628db 100644 --- a/apis/lib/influxdb2/apis/generated/models/label_create_request.rb +++ b/apis/lib/influxdb2/apis/generated/models/label_create_request.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/label_mapping.rb b/apis/lib/influxdb2/apis/generated/models/label_mapping.rb index 1f3addd4..6b37949c 100644 --- a/apis/lib/influxdb2/apis/generated/models/label_mapping.rb +++ b/apis/lib/influxdb2/apis/generated/models/label_mapping.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/label_response.rb b/apis/lib/influxdb2/apis/generated/models/label_response.rb index 58a0f6f8..ba3b60fd 100644 --- a/apis/lib/influxdb2/apis/generated/models/label_response.rb +++ b/apis/lib/influxdb2/apis/generated/models/label_response.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/label_update.rb b/apis/lib/influxdb2/apis/generated/models/label_update.rb index 0b084d6e..9c92a1d1 100644 --- a/apis/lib/influxdb2/apis/generated/models/label_update.rb +++ b/apis/lib/influxdb2/apis/generated/models/label_update.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/labels_response.rb b/apis/lib/influxdb2/apis/generated/models/labels_response.rb index 09effc46..cb96a75b 100644 --- a/apis/lib/influxdb2/apis/generated/models/labels_response.rb +++ b/apis/lib/influxdb2/apis/generated/models/labels_response.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/links.rb b/apis/lib/influxdb2/apis/generated/models/links.rb index b7b14dc4..6c96c183 100644 --- a/apis/lib/influxdb2/apis/generated/models/links.rb +++ b/apis/lib/influxdb2/apis/generated/models/links.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/organization.rb b/apis/lib/influxdb2/apis/generated/models/organization.rb index 65c9628f..0fb84be8 100644 --- a/apis/lib/influxdb2/apis/generated/models/organization.rb +++ b/apis/lib/influxdb2/apis/generated/models/organization.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/organization_links.rb b/apis/lib/influxdb2/apis/generated/models/organization_links.rb index 9bc6c228..7f9b8638 100644 --- a/apis/lib/influxdb2/apis/generated/models/organization_links.rb +++ b/apis/lib/influxdb2/apis/generated/models/organization_links.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/organizations.rb b/apis/lib/influxdb2/apis/generated/models/organizations.rb index c9e71fc9..bf5110c6 100644 --- a/apis/lib/influxdb2/apis/generated/models/organizations.rb +++ b/apis/lib/influxdb2/apis/generated/models/organizations.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/password_reset_body.rb b/apis/lib/influxdb2/apis/generated/models/password_reset_body.rb index 7dde04ee..197fb651 100644 --- a/apis/lib/influxdb2/apis/generated/models/password_reset_body.rb +++ b/apis/lib/influxdb2/apis/generated/models/password_reset_body.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/patch_bucket_request.rb b/apis/lib/influxdb2/apis/generated/models/patch_bucket_request.rb new file mode 100644 index 00000000..872d9c4f --- /dev/null +++ b/apis/lib/influxdb2/apis/generated/models/patch_bucket_request.rb @@ -0,0 +1,232 @@ +=begin +#InfluxDB OSS API Service + +#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 + +Generated by: https://openapi-generator.tech + +=end + +require 'date' +require 'set' +require 'time' + +module InfluxDB2::API + # Updates to an existing bucket resource. + class PatchBucketRequest + attr_accessor :name + + attr_accessor :description + + # Updates to rules to expire or retain data. No rules means no updates. + attr_accessor :retention_rules + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'description' => :'description', + :'retention_rules' => :'retentionRules', + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'description' => :'String', + :'retention_rules' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `InfluxDB2::PatchBucketRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `InfluxDB2::PatchBucketRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'retention_rules') + if (value = attributes[:'retention_rules']).is_a?(Array) + self.retention_rules = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + description == o.description && + retention_rules == o.retention_rules + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, description, retention_rules].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + InfluxDB2::API.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/apis/lib/influxdb2/apis/generated/models/patch_organization_request.rb b/apis/lib/influxdb2/apis/generated/models/patch_organization_request.rb index 42cac738..0fc476c7 100644 --- a/apis/lib/influxdb2/apis/generated/models/patch_organization_request.rb +++ b/apis/lib/influxdb2/apis/generated/models/patch_organization_request.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/permission.rb b/apis/lib/influxdb2/apis/generated/models/permission.rb index a63124ec..09be88a7 100644 --- a/apis/lib/influxdb2/apis/generated/models/permission.rb +++ b/apis/lib/influxdb2/apis/generated/models/permission.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/post_bucket_request.rb b/apis/lib/influxdb2/apis/generated/models/post_bucket_request.rb index 046ea19a..ba40f4ff 100644 --- a/apis/lib/influxdb2/apis/generated/models/post_bucket_request.rb +++ b/apis/lib/influxdb2/apis/generated/models/post_bucket_request.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/post_organization_request.rb b/apis/lib/influxdb2/apis/generated/models/post_organization_request.rb index cf4530ca..2f60c471 100644 --- a/apis/lib/influxdb2/apis/generated/models/post_organization_request.rb +++ b/apis/lib/influxdb2/apis/generated/models/post_organization_request.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/resource_member.rb b/apis/lib/influxdb2/apis/generated/models/resource_member.rb index a4137779..36b05c11 100644 --- a/apis/lib/influxdb2/apis/generated/models/resource_member.rb +++ b/apis/lib/influxdb2/apis/generated/models/resource_member.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/resource_member_all_of.rb b/apis/lib/influxdb2/apis/generated/models/resource_member_all_of.rb index e40eceed..08070999 100644 --- a/apis/lib/influxdb2/apis/generated/models/resource_member_all_of.rb +++ b/apis/lib/influxdb2/apis/generated/models/resource_member_all_of.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/resource_members.rb b/apis/lib/influxdb2/apis/generated/models/resource_members.rb index 446a8384..2c324dd4 100644 --- a/apis/lib/influxdb2/apis/generated/models/resource_members.rb +++ b/apis/lib/influxdb2/apis/generated/models/resource_members.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/resource_members_links.rb b/apis/lib/influxdb2/apis/generated/models/resource_members_links.rb index 84257167..dd3d00a5 100644 --- a/apis/lib/influxdb2/apis/generated/models/resource_members_links.rb +++ b/apis/lib/influxdb2/apis/generated/models/resource_members_links.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/resource_owner.rb b/apis/lib/influxdb2/apis/generated/models/resource_owner.rb index 6ed8447f..fbbf891c 100644 --- a/apis/lib/influxdb2/apis/generated/models/resource_owner.rb +++ b/apis/lib/influxdb2/apis/generated/models/resource_owner.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/resource_owner_all_of.rb b/apis/lib/influxdb2/apis/generated/models/resource_owner_all_of.rb index 8336377c..0b2f35ea 100644 --- a/apis/lib/influxdb2/apis/generated/models/resource_owner_all_of.rb +++ b/apis/lib/influxdb2/apis/generated/models/resource_owner_all_of.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/resource_owners.rb b/apis/lib/influxdb2/apis/generated/models/resource_owners.rb index 24cc5839..ea0b66b7 100644 --- a/apis/lib/influxdb2/apis/generated/models/resource_owners.rb +++ b/apis/lib/influxdb2/apis/generated/models/resource_owners.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/retention_rule.rb b/apis/lib/influxdb2/apis/generated/models/retention_rule.rb index 4c219eb9..33e1dcce 100644 --- a/apis/lib/influxdb2/apis/generated/models/retention_rule.rb +++ b/apis/lib/influxdb2/apis/generated/models/retention_rule.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/user.rb b/apis/lib/influxdb2/apis/generated/models/user.rb index 984c89a6..dc5bd79d 100644 --- a/apis/lib/influxdb2/apis/generated/models/user.rb +++ b/apis/lib/influxdb2/apis/generated/models/user.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/user_response.rb b/apis/lib/influxdb2/apis/generated/models/user_response.rb index cc963eaf..250c93bd 100644 --- a/apis/lib/influxdb2/apis/generated/models/user_response.rb +++ b/apis/lib/influxdb2/apis/generated/models/user_response.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/user_response_links.rb b/apis/lib/influxdb2/apis/generated/models/user_response_links.rb index d0267ce7..5d75d2e1 100644 --- a/apis/lib/influxdb2/apis/generated/models/user_response_links.rb +++ b/apis/lib/influxdb2/apis/generated/models/user_response_links.rb @@ -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 diff --git a/apis/lib/influxdb2/apis/generated/models/users.rb b/apis/lib/influxdb2/apis/generated/models/users.rb index 6fa7bffa..8750c05c 100644 --- a/apis/lib/influxdb2/apis/generated/models/users.rb +++ b/apis/lib/influxdb2/apis/generated/models/users.rb @@ -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 diff --git a/bin/generate-sources.sh b/bin/generate-sources.sh index bc73cd4a..fc66a4ae 100755 --- a/bin/generate-sources.sh +++ b/bin/generate-sources.sh @@ -42,6 +42,7 @@ cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/api/organizations_api.rb "${SCRI cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/api/users_api.rb "${SCRIPT_PATH}"/../apis/lib/influxdb2/apis/generated/api/ ## copy models +cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/add_resource_member_request_body.rb "${SCRIPT_PATH}"/../apis/lib/influxdb2/apis/generated/models/ cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/health_check.rb "${SCRIPT_PATH}"/../lib/influxdb2/client/models/ cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/dialect.rb "${SCRIPT_PATH}"/../lib/influxdb2/client/models/ cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/query.rb "${SCRIPT_PATH}"/../lib/influxdb2/client/models/ @@ -51,6 +52,7 @@ cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/bucket_links.rb "${SCRIPT cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/buckets.rb "${SCRIPT_PATH}"/../apis/lib/influxdb2/apis/generated/models/ cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/retention_rule.rb "${SCRIPT_PATH}"/../apis/lib/influxdb2/apis/generated/models/ cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/post_bucket_request.rb "${SCRIPT_PATH}"/../apis/lib/influxdb2/apis/generated/models/ +cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/patch_bucket_request.rb "${SCRIPT_PATH}"/../apis/lib/influxdb2/apis/generated/models/ cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/organization.rb "${SCRIPT_PATH}"/../apis/lib/influxdb2/apis/generated/models/ cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/organization_links.rb "${SCRIPT_PATH}"/../apis/lib/influxdb2/apis/generated/models/ cp -r "${SCRIPT_PATH}"/generated/lib/influx_db2/models/organizations.rb "${SCRIPT_PATH}"/../apis/lib/influxdb2/apis/generated/models/ @@ -96,3 +98,4 @@ sed -i 's/::API//' "${SCRIPT_PATH}"/../lib/influxdb2/client/models/query.rb sed -i 's/::API//' "${SCRIPT_PATH}"/../lib/influxdb2/client/models/delete_predicate_request.rb rm -rf "${SCRIPT_PATH}"/generated +rm -rf "${SCRIPT_PATH}/influxdb-clients-apigen" diff --git a/lib/influxdb2/client/models/delete_predicate_request.rb b/lib/influxdb2/client/models/delete_predicate_request.rb index a8af68b9..16e7bc41 100644 --- a/lib/influxdb2/client/models/delete_predicate_request.rb +++ b/lib/influxdb2/client/models/delete_predicate_request.rb @@ -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 diff --git a/lib/influxdb2/client/models/dialect.rb b/lib/influxdb2/client/models/dialect.rb index b2d48441..79f852b4 100644 --- a/lib/influxdb2/client/models/dialect.rb +++ b/lib/influxdb2/client/models/dialect.rb @@ -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 diff --git a/lib/influxdb2/client/models/health_check.rb b/lib/influxdb2/client/models/health_check.rb index b6336e60..b036cc2c 100644 --- a/lib/influxdb2/client/models/health_check.rb +++ b/lib/influxdb2/client/models/health_check.rb @@ -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