From 27d97c9141d64cb78ea36a43e8aab81be4aeae5b Mon Sep 17 00:00:00 2001 From: Armando Belardo Date: Fri, 2 Feb 2024 18:01:33 -0500 Subject: [PATCH] several sdk fixes --- generators/ruby/codegen/src/ast/Parameter.ts | 10 +++ generators/ruby/codegen/src/ast/Yardoc.ts | 12 +-- .../ruby/codegen/src/ast/classes/Class_.ts | 3 +- .../src/ast/functions/FunctionInvocation.ts | 6 +- .../codegen/src/ast/functions/Function_.ts | 5 ++ .../ruby/codegen/src/ast/gem/Gemspec.ts | 14 +++- .../ruby/codegen/src/utils/RubyUtilities.ts | 5 ++ .../ruby/sdk/src/AbstractionUtilities.ts | 63 ++++++++++----- seed/ruby-sdk/alias/lib/gemconfig.rb | 1 + seed/ruby-sdk/alias/lib/seed_alias_client.rb | 8 +- seed/ruby-sdk/alias/seed_alias_client.gemspec | 1 + .../api-wide-base-path/lib/gemconfig.rb | 1 + .../lib/seed_api_wide_base_path_client.rb | 16 ++-- .../service/client.rb | 4 +- .../seed_api_wide_base_path_client.gemspec | 1 + seed/ruby-sdk/audiences/lib/gemconfig.rb | 1 + .../audiences/lib/seed_audiences_client.rb | 20 +++-- .../seed_audiences_client/folder_a/client.rb | 8 +- .../folder_a/service/client.rb | 4 +- .../lib/seed_audiences_client/foo/client.rb | 4 +- .../audiences/seed_audiences_client.gemspec | 1 + .../lib/gemconfig.rb | 1 + .../seed_auth_environment_variables_client.rb | 17 ++-- .../service/client.rb | 4 +- ..._auth_environment_variables_client.gemspec | 1 + seed/ruby-sdk/basic-auth/lib/gemconfig.rb | 1 + .../basic-auth/lib/seed_basic_auth_client.rb | 17 ++-- .../basic_auth/client.rb | 4 +- .../basic-auth/seed_basic_auth_client.gemspec | 1 + .../lib/gemconfig.rb | 1 + ...earer_token_environment_variable_client.rb | 17 ++-- .../service/client.rb | 4 +- ..._token_environment_variable_client.gemspec | 1 + seed/ruby-sdk/bytes/lib/gemconfig.rb | 1 + seed/ruby-sdk/bytes/lib/seed_bytes_client.rb | 16 ++-- .../lib/seed_bytes_client/service/client.rb | 4 +- seed/ruby-sdk/bytes/seed_bytes_client.gemspec | 1 + .../circular-references/lib/gemconfig.rb | 1 + .../lib/seed_api_client.rb | 8 +- .../seed_api_client.gemspec | 1 + seed/ruby-sdk/custom-auth/lib/gemconfig.rb | 1 + .../lib/seed_custom_auth_client.rb | 17 ++-- .../custom_auth/client.rb | 4 +- .../seed_custom_auth_client.gemspec | 1 + .../enum-query-params/lib/gemconfig.rb | 1 + .../enum-query-params/lib/seed_api_client.rb | 16 ++-- .../lib/seed_api_client/svc/client.rb | 4 +- .../enum-query-params/seed_api_client.gemspec | 1 + seed/ruby-sdk/enum/lib/gemconfig.rb | 1 + seed/ruby-sdk/enum/lib/seed_enum_client.rb | 19 ++--- .../inlined_request/client.rb | 53 ------------- .../lib/seed_enum_client/path_param/client.rb | 51 ------------ .../seed_enum_client/query_param/client.rb | 77 ------------------- .../types/{operand.rb => enum.rb} | 2 +- .../enum/lib/seed_enum_client/types/one.rb | 6 ++ seed/ruby-sdk/enum/seed_enum_client.gemspec | 1 + seed/ruby-sdk/error-property/lib/gemconfig.rb | 1 + .../lib/seed_error_property_client.rb | 16 ++-- .../property_based_error/client.rb | 4 +- .../seed_error_property_client.gemspec | 1 + seed/ruby-sdk/examples/lib/gemconfig.rb | 1 + .../examples/lib/seed_examples_client.rb | 25 +++--- .../lib/seed_examples_client/file/client.rb | 13 ++-- .../file/notification/client.rb | 8 +- .../file/notification/service/client.rb | 4 +- .../file/service/client.rb | 4 +- .../lib/seed_examples_client/health/client.rb | 8 +- .../health/service/client.rb | 4 +- .../seed_examples_client/service/client.rb | 4 +- .../examples/seed_examples_client.gemspec | 1 + seed/ruby-sdk/exhaustive/lib/gemconfig.rb | 1 + .../exhaustive/lib/seed_exhaustive_client.rb | 33 ++++---- .../endpoints/client.rb | 32 ++++---- .../endpoints/container/client.rb | 4 +- .../endpoints/enum/client.rb | 4 +- .../endpoints/http_methods/client.rb | 4 +- .../endpoints/object/client.rb | 4 +- .../endpoints/params/client.rb | 4 +- .../endpoints/primitive/client.rb | 4 +- .../endpoints/union/client.rb | 4 +- .../inlined_requests/client.rb | 4 +- .../seed_exhaustive_client/no_auth/client.rb | 4 +- .../no_req_body/client.rb | 4 +- .../req_with_headers/client.rb | 4 +- .../exhaustive/seed_exhaustive_client.gemspec | 1 + seed/ruby-sdk/extends/lib/gemconfig.rb | 1 + .../extends/lib/seed_extends_client.rb | 8 +- .../extends/seed_extends_client.gemspec | 1 + seed/ruby-sdk/file-download/lib/gemconfig.rb | 1 + .../lib/seed_file_download_client.rb | 16 ++-- .../service/client.rb | 4 +- .../seed_file_download_client.gemspec | 3 +- seed/ruby-sdk/file-upload/lib/gemconfig.rb | 1 + .../lib/seed_file_upload_client.rb | 16 ++-- .../seed_file_upload_client/service/client.rb | 4 +- .../seed_file_upload_client.gemspec | 3 +- seed/ruby-sdk/folders/lib/gemconfig.rb | 1 + seed/ruby-sdk/folders/lib/seed_api_client.rb | 20 +++-- .../folders/lib/seed_api_client/a/b/client.rb | 4 +- .../folders/lib/seed_api_client/a/c/client.rb | 4 +- .../folders/lib/seed_api_client/a/client.rb | 12 +-- .../lib/seed_api_client/folder/client.rb | 4 +- .../seed_api_client/folder/service/client.rb | 4 +- seed/ruby-sdk/folders/seed_api_client.gemspec | 1 + .../idempotency-headers/lib/gemconfig.rb | 1 + .../lib/seed_idempotency_headers_client.rb | 16 ++-- .../payment/client.rb | 4 +- .../seed_idempotency_headers_client.gemspec | 1 + seed/ruby-sdk/imdb/lib/gemconfig.rb | 1 + seed/ruby-sdk/imdb/lib/seed_api_client.rb | 16 ++-- .../imdb/lib/seed_api_client/imdb/client.rb | 4 +- seed/ruby-sdk/imdb/seed_api_client.gemspec | 1 + .../ruby-sdk/literal-headers/lib/gemconfig.rb | 1 + .../lib/seed_literal_headers_client.rb | 25 +++--- .../no_headers/client.rb | 4 +- .../only_literal_headers/client.rb | 4 +- .../with_non_literal_headers/client.rb | 4 +- .../seed_literal_headers_client.gemspec | 1 + seed/ruby-sdk/literal/lib/gemconfig.rb | 1 + .../literal/lib/seed_literal_client.rb | 16 ++-- .../lib/seed_literal_client/literal/client.rb | 4 +- .../literal/seed_literal_client.gemspec | 1 + .../multi-url-environment/lib/gemconfig.rb | 1 + .../lib/seed_multi_url_environment_client.rb | 21 +++-- .../ec_2/client.rb | 4 +- .../s_3/client.rb | 4 +- .../seed_multi_url_environment_client.gemspec | 1 + seed/ruby-sdk/no-environment/lib/gemconfig.rb | 1 + .../lib/seed_no_environment_client.rb | 16 ++-- .../dummy/client.rb | 4 +- .../seed_no_environment_client.gemspec | 1 + seed/ruby-sdk/object/lib/gemconfig.rb | 1 + .../ruby-sdk/object/lib/seed_object_client.rb | 8 +- .../object/seed_object_client.gemspec | 1 + .../objects-with-imports/lib/gemconfig.rb | 1 + .../lib/seed_objects_with_imports_client.rb | 8 +- .../seed_objects_with_imports_client.gemspec | 1 + seed/ruby-sdk/optional/lib/gemconfig.rb | 1 + .../lib/seed_objects_with_imports_client.rb | 16 ++-- .../optional/client.rb | 4 +- .../seed_objects_with_imports_client.gemspec | 1 + seed/ruby-sdk/package-yml/lib/gemconfig.rb | 1 + .../lib/seed_package_yml_client.rb | 16 ++-- .../seed_package_yml_client/service/client.rb | 4 +- .../seed_package_yml_client.gemspec | 1 + seed/ruby-sdk/plain-text/lib/gemconfig.rb | 1 + .../plain-text/lib/seed_plain_text_client.rb | 16 ++-- .../seed_plain_text_client/service/client.rb | 4 +- .../plain-text/seed_plain_text_client.gemspec | 1 + .../reserved-keywords/lib/gemconfig.rb | 1 + .../lib/seed_nursery_api_client.rb | 16 ++-- .../seed_nursery_api_client/package/client.rb | 4 +- .../seed_nursery_api_client.gemspec | 1 + .../response-property/lib/gemconfig.rb | 1 + .../lib/seed_response_property_client.rb | 16 ++-- .../service/client.rb | 4 +- .../seed_response_property_client.gemspec | 1 + .../lib/gemconfig.rb | 1 + ...d_single_url_environment_default_client.rb | 17 ++-- .../dummy/client.rb | 4 +- ...gle_url_environment_default_client.gemspec | 1 + .../lib/gemconfig.rb | 1 + ...ingle_url_environment_no_default_client.rb | 17 ++-- .../dummy/client.rb | 4 +- ..._url_environment_no_default_client.gemspec | 1 + seed/ruby-sdk/streaming/lib/gemconfig.rb | 1 + .../streaming/lib/seed_streaming_client.rb | 16 ++-- .../lib/seed_streaming_client/dummy/client.rb | 4 +- .../streaming/seed_streaming_client.gemspec | 1 + seed/ruby-sdk/trace/lib/gemconfig.rb | 1 + seed/ruby-sdk/trace/lib/seed_trace_client.rb | 47 ++++++----- .../lib/seed_trace_client/admin/client.rb | 4 +- .../lib/seed_trace_client/homepage/client.rb | 4 +- .../lib/seed_trace_client/migration/client.rb | 4 +- .../lib/seed_trace_client/playlist/client.rb | 4 +- .../lib/seed_trace_client/problem/client.rb | 4 +- .../seed_trace_client/submission/client.rb | 4 +- .../lib/seed_trace_client/sysprop/client.rb | 4 +- .../trace/lib/seed_trace_client/v_2/client.rb | 4 +- .../seed_trace_client/v_2/problem/client.rb | 4 +- .../lib/seed_trace_client/v_2/v_3/client.rb | 8 +- .../v_2/v_3/problem/client.rb | 4 +- seed/ruby-sdk/trace/seed_trace_client.gemspec | 1 + .../undiscriminated-unions/lib/gemconfig.rb | 1 + .../lib/seed_undiscriminated_unions_client.rb | 16 ++-- .../union/client.rb | 4 +- ...seed_undiscriminated_unions_client.gemspec | 1 + seed/ruby-sdk/unknown/lib/gemconfig.rb | 1 + .../unknown/lib/seed_unknown_as_any_client.rb | 16 ++-- .../unknown/client.rb | 4 +- .../seed_unknown_as_any_client.gemspec | 1 + seed/ruby-sdk/variables/lib/gemconfig.rb | 1 + .../variables/lib/seed_variables_client.rb | 16 ++-- .../seed_variables_client/service/client.rb | 4 +- .../variables/seed_variables_client.gemspec | 1 + 195 files changed, 737 insertions(+), 639 deletions(-) delete mode 100644 seed/ruby-sdk/enum/lib/seed_enum_client/inlined_request/client.rb delete mode 100644 seed/ruby-sdk/enum/lib/seed_enum_client/path_param/client.rb delete mode 100644 seed/ruby-sdk/enum/lib/seed_enum_client/query_param/client.rb rename seed/ruby-sdk/enum/lib/seed_enum_client/types/{operand.rb => enum.rb} (53%) create mode 100644 seed/ruby-sdk/enum/lib/seed_enum_client/types/one.rb diff --git a/generators/ruby/codegen/src/ast/Parameter.ts b/generators/ruby/codegen/src/ast/Parameter.ts index 57301e1b4e8..07498fede78 100644 --- a/generators/ruby/codegen/src/ast/Parameter.ts +++ b/generators/ruby/codegen/src/ast/Parameter.ts @@ -1,3 +1,4 @@ +import { Argument } from "./Argument"; import { ClassReference, NilValue } from "./classes/ClassReference"; import { AstNode } from "./core/AstNode"; import { Import } from "./Import"; @@ -58,4 +59,13 @@ export class Parameter extends AstNode { this.type.forEach((cr) => (imports = new Set([...imports, ...cr.getImports()]))); return imports; } + + public toArgument(value: Variable | string): Argument { + return new Argument({ + name: this.name, + type: this.type, + value, + isNamed: this.isNamed + }); + } } diff --git a/generators/ruby/codegen/src/ast/Yardoc.ts b/generators/ruby/codegen/src/ast/Yardoc.ts index cc652602c06..f35100f96e2 100644 --- a/generators/ruby/codegen/src/ast/Yardoc.ts +++ b/generators/ruby/codegen/src/ast/Yardoc.ts @@ -79,7 +79,7 @@ export class Yardoc extends AstNode { this.addText({ stringContent: parameter.name, templateString: "# @param %s [Hash] ", startingTabSpaces }); this.addText({ stringContent: - parameter.documentation ?? + parameter.documentation?.replaceAll("\n", "") ?? `Request of type ${parameter.type.map((param) => param.typeHint).join(", ")}, as a Hash`, appendToLastString: true }); @@ -99,7 +99,7 @@ export class Yardoc extends AstNode { private writeParameterAsClass(parameter: Parameter, startingTabSpaces: number): void { if (parameter.isBlock) { this.addText({ stringContent: parameter.name, templateString: "# @yield", startingTabSpaces }); - this.addText({ stringContent: parameter.documentation, appendToLastString: true }); + this.addText({ stringContent: parameter.documentation?.replaceAll("\n", ""), appendToLastString: true }); } else { this.addText({ stringContent: parameter.name, templateString: "# @param %s", startingTabSpaces }); this.addText({ @@ -107,7 +107,7 @@ export class Yardoc extends AstNode { templateString: " [%s] ", appendToLastString: true }); - this.addText({ stringContent: parameter.documentation, appendToLastString: true }); + this.addText({ stringContent: parameter.documentation?.replaceAll("\n", ""), appendToLastString: true }); } } @@ -121,9 +121,11 @@ export class Yardoc extends AstNode { ? this.reference.type.typeHint : this.reference.type; const documentation = - this.reference.type instanceof Property ? this.reference.type.documentation : undefined; + this.reference.type instanceof Property + ? this.reference.type.documentation?.replaceAll("\n", "") + : undefined; this.addText({ stringContent: typeName, templateString: "# @type [%s] ", startingTabSpaces }); - this.addText({ stringContent: documentation, appendToLastString: true }); + this.addText({ stringContent: documentation?.replaceAll("\n", ""), appendToLastString: true }); } else { this.reference.parameters.forEach((parameter) => { if (parameter.describeAsHashInYardoc) { diff --git a/generators/ruby/codegen/src/ast/classes/Class_.ts b/generators/ruby/codegen/src/ast/classes/Class_.ts index f9b22b27591..37d3d22c06a 100644 --- a/generators/ruby/codegen/src/ast/classes/Class_.ts +++ b/generators/ruby/codegen/src/ast/classes/Class_.ts @@ -58,7 +58,8 @@ export class Class_ extends AstNode { isAssignment: true, yardoc }); - }) + }), + invocationName: "new" }); functions = [this.initializer, ...functions]; } else if (initializerOverride !== undefined) { diff --git a/generators/ruby/codegen/src/ast/functions/FunctionInvocation.ts b/generators/ruby/codegen/src/ast/functions/FunctionInvocation.ts index 71841199ddf..8aa1c144534 100644 --- a/generators/ruby/codegen/src/ast/functions/FunctionInvocation.ts +++ b/generators/ruby/codegen/src/ast/functions/FunctionInvocation.ts @@ -75,7 +75,11 @@ export class FunctionInvocation extends AstNode { templateString: this.optionalSafeCall ? "%s&." : "%s.", startingTabSpaces }); - this.addText({ stringContent: this.baseFunction?.name, startingTabSpaces, appendToLastString: true }); + this.addText({ + stringContent: this.baseFunction?.invocationName ?? this.baseFunction?.name, + startingTabSpaces, + appendToLastString: true + }); this.addText({ stringContent: this.writeArgmuments(), appendToLastString: true }); this.writeBlock(startingTabSpaces); } diff --git a/generators/ruby/codegen/src/ast/functions/Function_.ts b/generators/ruby/codegen/src/ast/functions/Function_.ts index aa6b4420ccc..fdaac89c467 100644 --- a/generators/ruby/codegen/src/ast/functions/Function_.ts +++ b/generators/ruby/codegen/src/ast/functions/Function_.ts @@ -16,6 +16,7 @@ export declare namespace Function_ { returnValue?: ClassReference | ClassReference[]; flattenedProperties?: Map; crf?: ClassReferenceFactory; + invocationName?: string; } } export class Function_ extends AstNode { @@ -29,6 +30,8 @@ export class Function_ extends AstNode { public isStatic: boolean; public yardoc: Yardoc; + public invocationName: string | undefined; + constructor({ name, functionBody, @@ -38,6 +41,7 @@ export class Function_ extends AstNode { isAsync = false, isStatic = false, returnValue, + invocationName, ...rest }: Function_.Init) { super(rest); @@ -47,6 +51,7 @@ export class Function_ extends AstNode { this.functionBody = functionBody; this.isAsync = isAsync; this.isStatic = isStatic; + this.invocationName = invocationName; this.yardoc = new Yardoc({ reference: { name: "docString", parameters, returnValue: this.returnValue }, diff --git a/generators/ruby/codegen/src/ast/gem/Gemspec.ts b/generators/ruby/codegen/src/ast/gem/Gemspec.ts index 4e541dd79c5..d5ff3f3a588 100644 --- a/generators/ruby/codegen/src/ast/gem/Gemspec.ts +++ b/generators/ruby/codegen/src/ast/gem/Gemspec.ts @@ -27,7 +27,7 @@ export class Gemspec extends FunctionInvocation { globalDependencies.push( ...[ new ExternalDependency({ packageName: "mini_mime", specifier: "~>", version: "1.1" }), - new ExternalDependency({ packageName: "farady-multipart", specifier: "~>", version: "1.0" }) + new ExternalDependency({ packageName: "faraday-multipart", specifier: "~>", version: "1.0" }) ] ); } @@ -53,6 +53,18 @@ export class Gemspec extends FunctionInvocation { isAssignment: true }) ); + } else { + // Allow for people to use the gemconfig if no version is found + gemBlock.push( + new Expression({ + leftSide: "spec.version", + rightSide: new ClassReference({ + name: `${clientName}::Gemconfig::VERSION`, + import_: new Import({ from: "lib/gemconfig" }) + }), + isAssignment: true + }) + ); } super({ diff --git a/generators/ruby/codegen/src/utils/RubyUtilities.ts b/generators/ruby/codegen/src/utils/RubyUtilities.ts index c869e2d2ede..8ec78976529 100644 --- a/generators/ruby/codegen/src/utils/RubyUtilities.ts +++ b/generators/ruby/codegen/src/utils/RubyUtilities.ts @@ -40,6 +40,10 @@ export function getLocationFromFernFilepath(fernFilepath: FernFilepath): string return [...fernFilepath.allParts.map((pathPart) => pathPart.snakeCase.safeName)].join("/"); } +export function getBreadcrumbsFromFilepath(fernFilepath: FernFilepath): string[] { + return fernFilepath.allParts.map((pathPart) => pathPart.pascalCase.safeName); +} + export function generateGemspec( clientName: string, gemName: string, @@ -71,6 +75,7 @@ export function generateGemConfig(clientName: string): GeneratedRubyFile { child: new Module_({ name: "Gemconfig", child: [ + new Expression({ leftSide: "VERSION", rightSide: '""', isAssignment: true }), new Expression({ leftSide: "AUTHORS", rightSide: '[""].freeze', isAssignment: true }), new Expression({ leftSide: "EMAIL", rightSide: '""', isAssignment: true }), new Expression({ leftSide: "SUMMARY", rightSide: '""', isAssignment: true }), diff --git a/generators/ruby/sdk/src/AbstractionUtilities.ts b/generators/ruby/sdk/src/AbstractionUtilities.ts index 121b3bb6c8d..8d04db79cef 100644 --- a/generators/ruby/sdk/src/AbstractionUtilities.ts +++ b/generators/ruby/sdk/src/AbstractionUtilities.ts @@ -12,6 +12,7 @@ import { Function_, GeneratedRubyFile, GenericClassReference, + getBreadcrumbsFromFilepath, getLocationForServiceDeclaration, getLocationFromFernFilepath, HashInstance, @@ -170,6 +171,9 @@ export function generateRootPackage( }); const clientClass = new Class_({ classReference, + properties: syncSubpackages.map( + (sp) => new Property({ name: snakeCase(sp.classReference.name), type: sp.classReference }) + ), functions: rootService ? generateEndpoints( crf, @@ -187,13 +191,14 @@ export function generateRootPackage( includeInitializer: false, initializerOverride: new Function_({ name: "initialize", + invocationName: "new", functionBody: [ new Expression({ leftSide: requestClientVariable, rightSide: new FunctionInvocation({ onObject: requestClient.classReference, baseFunction: requestClient.initializer, - arguments_: requestClient.properties.map((prop) => prop.toArgument(prop.name, true)) + arguments_: requestClient.initializer?.parameters.map((param) => param.toArgument(param.name)) }), isAssignment: true }), @@ -214,7 +219,8 @@ export function generateRootPackage( }); }) ], - parameters: requestClient.initializer?.parameters + parameters: requestClient.initializer?.parameters, + returnValue: classReference }) }); @@ -224,11 +230,15 @@ export function generateRootPackage( type: asyncRequestClient.classReference, variableType: VariableType.LOCAL }); + const asyncClassReference = new ClassReference({ + name: "AsyncClient", + import_: new Import({ from: gemName, isExternal: false }) + }); const asyncClientClass = new Class_({ - classReference: new ClassReference({ - name: "AsyncClient", - import_: new Import({ from: gemName, isExternal: false }) - }), + classReference: asyncClassReference, + properties: asyncSubpackages.map( + (sp) => new Property({ name: snakeCase(sp.classReference.name), type: sp.classReference }) + ), functions: rootService ? generateEndpoints( crf, @@ -246,6 +256,7 @@ export function generateRootPackage( includeInitializer: false, initializerOverride: new Function_({ name: "initialize", + invocationName: "new", functionBody: [ new Expression({ leftSide: asyncRequestClientVariable, @@ -273,7 +284,8 @@ export function generateRootPackage( }); }) ], - parameters: asyncRequestClient.initializer?.parameters + parameters: asyncRequestClient.initializer?.parameters, + returnValue: asyncClassReference }) }); @@ -303,18 +315,22 @@ export function generateSubpackage( asyncSubpackages: Class_[] = [] ): ClientClassPair { const location = getLocationFromFernFilepath(package_.fernFilepath) + "client"; + const moduleBreadcrumbs = getBreadcrumbsFromFilepath(package_.fernFilepath); // Add Client class const requestClientProperty = new Property({ name: "request_client", type: requestClientCr }); + const syncClassReference = new ClassReference({ + name: "Client", + import_: new Import({ from: location, isExternal: false }), + moduleBreadcrumbs + }); const syncClientClass = new Class_({ - classReference: new ClassReference({ - name: "Client", - import_: new Import({ from: location, isExternal: false }) - }), + classReference: syncClassReference, properties: [requestClientProperty], includeInitializer: false, initializerOverride: new Function_({ name: "initialize", + invocationName: "new", // Initialize each subpackage functionBody: subpackages.map((sp) => { const subpackageClassVariable = new Variable({ @@ -337,21 +353,25 @@ export function generateSubpackage( isAssignment: true }); }), - parameters: [new Parameter({ name: "client", type: requestClientCr })] + parameters: [new Parameter({ name: "client", type: requestClientCr })], + returnValue: syncClassReference }) }); // Add Async Client class const asyncRequestClientProperty = new Property({ name: "request_client", type: asyncRequestClientCr }); + const asyncClassReference = new ClassReference({ + name: "AsyncClient", + import_: new Import({ from: location, isExternal: false }), + moduleBreadcrumbs + }); const asyncClientClass = new Class_({ - classReference: new ClassReference({ - name: "AsyncClient", - import_: new Import({ from: location, isExternal: false }) - }), + classReference: asyncClassReference, properties: [new Property({ name: "client", type: asyncRequestClientCr })], includeInitializer: false, initializerOverride: new Function_({ name: "initialize", + invocationName: "new", // Initialize each subpackage functionBody: asyncSubpackages.map((sp) => { const subpackageClassVariable = new Variable({ @@ -374,7 +394,8 @@ export function generateSubpackage( isAssignment: true }); }), - parameters: [new Parameter({ name: "client", type: asyncRequestClientCr })] + parameters: [new Parameter({ name: "client", type: asyncRequestClientCr })], + returnValue: asyncClassReference }) }); @@ -394,6 +415,7 @@ export function generateService( ): ClientClassPair { const serviceName = service.name.fernFilepath.file?.pascalCase.safeName ?? ""; const import_ = new Import({ from: getLocationForServiceDeclaration(service.name), isExternal: false }); + const moduleBreadcrumbs = getBreadcrumbsFromFilepath(service.name.fernFilepath); // Add Client class const serviceBasePath = generateRubyPathTemplate(service.pathParameters, service.basePath); @@ -401,7 +423,8 @@ export function generateService( const syncClientClass = new Class_({ classReference: new ClassReference({ name: `${serviceName}Client`, - import_ + import_, + moduleBreadcrumbs }), properties: [requestClientProperty], includeInitializer: true, @@ -424,7 +447,8 @@ export function generateService( const asyncClientClass = new Class_({ classReference: new ClassReference({ name: `Async${serviceName}Client`, - import_ + import_, + moduleBreadcrumbs }), properties: [asyncRequestClientProperty], includeInitializer: true, @@ -657,6 +681,7 @@ function generateRequestClientInitializer( return new Function_({ name: "initialize", + invocationName: "new", parameters: [ ...functionParams, // Select sample of the request overrides object properties diff --git a/seed/ruby-sdk/alias/lib/gemconfig.rb b/seed/ruby-sdk/alias/lib/gemconfig.rb index 4038bce2de3..88c45f7609f 100644 --- a/seed/ruby-sdk/alias/lib/gemconfig.rb +++ b/seed/ruby-sdk/alias/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedAliasClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/alias/lib/seed_alias_client.rb b/seed/ruby-sdk/alias/lib/seed_alias_client.rb index ba86eac2b6c..e608561da37 100644 --- a/seed/ruby-sdk/alias/lib/seed_alias_client.rb +++ b/seed/ruby-sdk/alias/lib/seed_alias_client.rb @@ -11,18 +11,18 @@ module SeedAliasClient class Client # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) + RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) end end class AsyncClient # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) end end end diff --git a/seed/ruby-sdk/alias/seed_alias_client.gemspec b/seed/ruby-sdk/alias/seed_alias_client.gemspec index 847b13763ba..0a02b984f94 100644 --- a/seed/ruby-sdk/alias/seed_alias_client.gemspec +++ b/seed/ruby-sdk/alias/seed_alias_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_alias_client" + spec.version = SeedAliasClient::Gemconfig::VERSION spec.authors = SeedAliasClient::Gemconfig::AUTHORS spec.email = SeedAliasClient::Gemconfig::EMAIL spec.summary = SeedAliasClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/api-wide-base-path/lib/gemconfig.rb b/seed/ruby-sdk/api-wide-base-path/lib/gemconfig.rb index f8f82622889..f5d3fca8c46 100644 --- a/seed/ruby-sdk/api-wide-base-path/lib/gemconfig.rb +++ b/seed/ruby-sdk/api-wide-base-path/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedApiWideBasePathClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/api-wide-base-path/lib/seed_api_wide_base_path_client.rb b/seed/ruby-sdk/api-wide-base-path/lib/seed_api_wide_base_path_client.rb index 3f42b025142..f61f2ffedb9 100644 --- a/seed/ruby-sdk/api-wide-base-path/lib/seed_api_wide_base_path_client.rb +++ b/seed/ruby-sdk/api-wide-base-path/lib/seed_api_wide_base_path_client.rb @@ -6,22 +6,26 @@ module SeedApiWideBasePathClient class Client + attr_reader :service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @service_client = Service::ServiceClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/api-wide-base-path/lib/seed_api_wide_base_path_client/service/client.rb b/seed/ruby-sdk/api-wide-base-path/lib/seed_api_wide_base_path_client/service/client.rb index f0a218cb307..62b98873fff 100644 --- a/seed/ruby-sdk/api-wide-base-path/lib/seed_api_wide_base_path_client/service/client.rb +++ b/seed/ruby-sdk/api-wide-base-path/lib/seed_api_wide_base_path_client/service/client.rb @@ -8,7 +8,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -31,7 +31,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/api-wide-base-path/seed_api_wide_base_path_client.gemspec b/seed/ruby-sdk/api-wide-base-path/seed_api_wide_base_path_client.gemspec index 8af14977365..acd3afd1973 100644 --- a/seed/ruby-sdk/api-wide-base-path/seed_api_wide_base_path_client.gemspec +++ b/seed/ruby-sdk/api-wide-base-path/seed_api_wide_base_path_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_api_wide_base_path_client" + spec.version = SeedApiWideBasePathClient::Gemconfig::VERSION spec.authors = SeedApiWideBasePathClient::Gemconfig::AUTHORS spec.email = SeedApiWideBasePathClient::Gemconfig::EMAIL spec.summary = SeedApiWideBasePathClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/audiences/lib/gemconfig.rb b/seed/ruby-sdk/audiences/lib/gemconfig.rb index 46b8e4cf90d..64ebd00ed33 100644 --- a/seed/ruby-sdk/audiences/lib/gemconfig.rb +++ b/seed/ruby-sdk/audiences/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedAudiencesClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/audiences/lib/seed_audiences_client.rb b/seed/ruby-sdk/audiences/lib/seed_audiences_client.rb index 2b3797ddb82..5edbd44c09f 100644 --- a/seed/ruby-sdk/audiences/lib/seed_audiences_client.rb +++ b/seed/ruby-sdk/audiences/lib/seed_audiences_client.rb @@ -15,24 +15,28 @@ module SeedAudiencesClient class Client + attr_reader :client, :foo_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @client = Client.initialize(request_client: request_client) - @foo_client = FooClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @client = FolderA::Client.new(request_client: request_client) + @foo_client = Foo::FooClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_client, :async_foo_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_client = AsyncClient.initialize(client: request_client) - @async_foo_client = AsyncFooClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_client = FolderA::AsyncClient.new(client: request_client) + @async_foo_client = Foo::AsyncFooClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/audiences/lib/seed_audiences_client/folder_a/client.rb b/seed/ruby-sdk/audiences/lib/seed_audiences_client/folder_a/client.rb index 5492c1956bb..c22dc1acecd 100644 --- a/seed/ruby-sdk/audiences/lib/seed_audiences_client/folder_a/client.rb +++ b/seed/ruby-sdk/audiences/lib/seed_audiences_client/folder_a/client.rb @@ -8,9 +8,9 @@ class Client attr_reader :request_client # @param client [RequestClient] - # @return [] + # @return [FolderA::Client] def initialize(client:) - @service_client = ServiceClient.initialize(request_client: @request_client) + @service_client = FolderA::Service::ServiceClient.new(request_client: @request_client) end end @@ -18,9 +18,9 @@ class AsyncClient attr_reader :client # @param client [AsyncRequestClient] - # @return [] + # @return [FolderA::AsyncClient] def initialize(client:) - @async_service_client = AsyncServiceClient.initialize(request_client: @request_client) + @async_service_client = FolderA::Service::AsyncServiceClient.new(request_client: @request_client) end end end diff --git a/seed/ruby-sdk/audiences/lib/seed_audiences_client/folder_a/service/client.rb b/seed/ruby-sdk/audiences/lib/seed_audiences_client/folder_a/service/client.rb index 67801d50967..33694d69a77 100644 --- a/seed/ruby-sdk/audiences/lib/seed_audiences_client/folder_a/service/client.rb +++ b/seed/ruby-sdk/audiences/lib/seed_audiences_client/folder_a/service/client.rb @@ -10,7 +10,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [FolderA::Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -31,7 +31,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [FolderA::Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/audiences/lib/seed_audiences_client/foo/client.rb b/seed/ruby-sdk/audiences/lib/seed_audiences_client/foo/client.rb index 5b9e641a3dc..ad4519811b3 100644 --- a/seed/ruby-sdk/audiences/lib/seed_audiences_client/foo/client.rb +++ b/seed/ruby-sdk/audiences/lib/seed_audiences_client/foo/client.rb @@ -11,7 +11,7 @@ class FooClient attr_reader :request_client # @param request_client [RequestClient] - # @return [FooClient] + # @return [Foo::FooClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -41,7 +41,7 @@ class AsyncFooClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncFooClient] + # @return [Foo::AsyncFooClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/audiences/seed_audiences_client.gemspec b/seed/ruby-sdk/audiences/seed_audiences_client.gemspec index 8ac7509155c..d9804f6f240 100644 --- a/seed/ruby-sdk/audiences/seed_audiences_client.gemspec +++ b/seed/ruby-sdk/audiences/seed_audiences_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_audiences_client" + spec.version = SeedAudiencesClient::Gemconfig::VERSION spec.authors = SeedAudiencesClient::Gemconfig::AUTHORS spec.email = SeedAudiencesClient::Gemconfig::EMAIL spec.summary = SeedAudiencesClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/auth-environment-variables/lib/gemconfig.rb b/seed/ruby-sdk/auth-environment-variables/lib/gemconfig.rb index d6e2db31dd5..624288e2221 100644 --- a/seed/ruby-sdk/auth-environment-variables/lib/gemconfig.rb +++ b/seed/ruby-sdk/auth-environment-variables/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedAuthEnvironmentVariablesClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/auth-environment-variables/lib/seed_auth_environment_variables_client.rb b/seed/ruby-sdk/auth-environment-variables/lib/seed_auth_environment_variables_client.rb index ccd6d63850b..20f31b420a6 100644 --- a/seed/ruby-sdk/auth-environment-variables/lib/seed_auth_environment_variables_client.rb +++ b/seed/ruby-sdk/auth-environment-variables/lib/seed_auth_environment_variables_client.rb @@ -6,24 +6,29 @@ module SeedAuthEnvironmentVariablesClient class Client + attr_reader :service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param api_key [String] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil, api_key: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, + api_key: api_key) + @service_client = Service::ServiceClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param api_key [String] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil, api_key: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/auth-environment-variables/lib/seed_auth_environment_variables_client/service/client.rb b/seed/ruby-sdk/auth-environment-variables/lib/seed_auth_environment_variables_client/service/client.rb index 032d0813f36..af6d5a23d58 100644 --- a/seed/ruby-sdk/auth-environment-variables/lib/seed_auth_environment_variables_client/service/client.rb +++ b/seed/ruby-sdk/auth-environment-variables/lib/seed_auth_environment_variables_client/service/client.rb @@ -8,7 +8,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -29,7 +29,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/auth-environment-variables/seed_auth_environment_variables_client.gemspec b/seed/ruby-sdk/auth-environment-variables/seed_auth_environment_variables_client.gemspec index ad6fb0e6c39..1a74ecef95e 100644 --- a/seed/ruby-sdk/auth-environment-variables/seed_auth_environment_variables_client.gemspec +++ b/seed/ruby-sdk/auth-environment-variables/seed_auth_environment_variables_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_auth_environment_variables_client" + spec.version = SeedAuthEnvironmentVariablesClient::Gemconfig::VERSION spec.authors = SeedAuthEnvironmentVariablesClient::Gemconfig::AUTHORS spec.email = SeedAuthEnvironmentVariablesClient::Gemconfig::EMAIL spec.summary = SeedAuthEnvironmentVariablesClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/basic-auth/lib/gemconfig.rb b/seed/ruby-sdk/basic-auth/lib/gemconfig.rb index e99b2e23c46..e8c8e98a635 100644 --- a/seed/ruby-sdk/basic-auth/lib/gemconfig.rb +++ b/seed/ruby-sdk/basic-auth/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedBasicAuthClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/basic-auth/lib/seed_basic_auth_client.rb b/seed/ruby-sdk/basic-auth/lib/seed_basic_auth_client.rb index 4574aa059fd..a5c6f22c7e7 100644 --- a/seed/ruby-sdk/basic-auth/lib/seed_basic_auth_client.rb +++ b/seed/ruby-sdk/basic-auth/lib/seed_basic_auth_client.rb @@ -7,26 +7,31 @@ module SeedBasicAuthClient class Client + attr_reader :basic_auth_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param username [String] # @param password [String] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil, username: nil, password: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @basic_auth_client = BasicAuthClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, + username: username, password: password) + @basic_auth_client = BasicAuth::BasicAuthClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_basic_auth_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param username [String] # @param password [String] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil, username: nil, password: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_basic_auth_client = AsyncBasicAuthClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_basic_auth_client = BasicAuth::AsyncBasicAuthClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/basic-auth/lib/seed_basic_auth_client/basic_auth/client.rb b/seed/ruby-sdk/basic-auth/lib/seed_basic_auth_client/basic_auth/client.rb index 5795a4efcac..abb2d540f18 100644 --- a/seed/ruby-sdk/basic-auth/lib/seed_basic_auth_client/basic_auth/client.rb +++ b/seed/ruby-sdk/basic-auth/lib/seed_basic_auth_client/basic_auth/client.rb @@ -8,7 +8,7 @@ class BasicAuthClient attr_reader :request_client # @param request_client [RequestClient] - # @return [BasicAuthClient] + # @return [BasicAuth::BasicAuthClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -43,7 +43,7 @@ class AsyncBasicAuthClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncBasicAuthClient] + # @return [BasicAuth::AsyncBasicAuthClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/basic-auth/seed_basic_auth_client.gemspec b/seed/ruby-sdk/basic-auth/seed_basic_auth_client.gemspec index 0ad723c6ff6..1f9e11e9c99 100644 --- a/seed/ruby-sdk/basic-auth/seed_basic_auth_client.gemspec +++ b/seed/ruby-sdk/basic-auth/seed_basic_auth_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_basic_auth_client" + spec.version = SeedBasicAuthClient::Gemconfig::VERSION spec.authors = SeedBasicAuthClient::Gemconfig::AUTHORS spec.email = SeedBasicAuthClient::Gemconfig::EMAIL spec.summary = SeedBasicAuthClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/bearer-token-environment-variable/lib/gemconfig.rb b/seed/ruby-sdk/bearer-token-environment-variable/lib/gemconfig.rb index c341ff69285..b2060c7d99c 100644 --- a/seed/ruby-sdk/bearer-token-environment-variable/lib/gemconfig.rb +++ b/seed/ruby-sdk/bearer-token-environment-variable/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedBearerTokenEnvironmentVariableClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/bearer-token-environment-variable/lib/seed_bearer_token_environment_variable_client.rb b/seed/ruby-sdk/bearer-token-environment-variable/lib/seed_bearer_token_environment_variable_client.rb index 11f9e740d93..3b37031e913 100644 --- a/seed/ruby-sdk/bearer-token-environment-variable/lib/seed_bearer_token_environment_variable_client.rb +++ b/seed/ruby-sdk/bearer-token-environment-variable/lib/seed_bearer_token_environment_variable_client.rb @@ -6,24 +6,29 @@ module SeedBearerTokenEnvironmentVariableClient class Client + attr_reader :service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param api_key [String] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil, api_key: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, + api_key: api_key) + @service_client = Service::ServiceClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param api_key [String] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil, api_key: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/bearer-token-environment-variable/lib/seed_bearer_token_environment_variable_client/service/client.rb b/seed/ruby-sdk/bearer-token-environment-variable/lib/seed_bearer_token_environment_variable_client/service/client.rb index 009af53a29c..d321136c2fc 100644 --- a/seed/ruby-sdk/bearer-token-environment-variable/lib/seed_bearer_token_environment_variable_client/service/client.rb +++ b/seed/ruby-sdk/bearer-token-environment-variable/lib/seed_bearer_token_environment_variable_client/service/client.rb @@ -8,7 +8,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -29,7 +29,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/bearer-token-environment-variable/seed_bearer_token_environment_variable_client.gemspec b/seed/ruby-sdk/bearer-token-environment-variable/seed_bearer_token_environment_variable_client.gemspec index ac4a5d3a1c6..478c9fe18b5 100644 --- a/seed/ruby-sdk/bearer-token-environment-variable/seed_bearer_token_environment_variable_client.gemspec +++ b/seed/ruby-sdk/bearer-token-environment-variable/seed_bearer_token_environment_variable_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_bearer_token_environment_variable_client" + spec.version = SeedBearerTokenEnvironmentVariableClient::Gemconfig::VERSION spec.authors = SeedBearerTokenEnvironmentVariableClient::Gemconfig::AUTHORS spec.email = SeedBearerTokenEnvironmentVariableClient::Gemconfig::EMAIL spec.summary = SeedBearerTokenEnvironmentVariableClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/bytes/lib/gemconfig.rb b/seed/ruby-sdk/bytes/lib/gemconfig.rb index e472d03dc9f..db2ae89f0d5 100644 --- a/seed/ruby-sdk/bytes/lib/gemconfig.rb +++ b/seed/ruby-sdk/bytes/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedBytesClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/bytes/lib/seed_bytes_client.rb b/seed/ruby-sdk/bytes/lib/seed_bytes_client.rb index 7cc8306ee18..d712572ba5a 100644 --- a/seed/ruby-sdk/bytes/lib/seed_bytes_client.rb +++ b/seed/ruby-sdk/bytes/lib/seed_bytes_client.rb @@ -6,22 +6,26 @@ module SeedBytesClient class Client + attr_reader :service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @service_client = Service::ServiceClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/bytes/lib/seed_bytes_client/service/client.rb b/seed/ruby-sdk/bytes/lib/seed_bytes_client/service/client.rb index 9fae05fe37d..766026e7303 100644 --- a/seed/ruby-sdk/bytes/lib/seed_bytes_client/service/client.rb +++ b/seed/ruby-sdk/bytes/lib/seed_bytes_client/service/client.rb @@ -8,7 +8,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -31,7 +31,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/bytes/seed_bytes_client.gemspec b/seed/ruby-sdk/bytes/seed_bytes_client.gemspec index 9aca1dec3ff..3521f251878 100644 --- a/seed/ruby-sdk/bytes/seed_bytes_client.gemspec +++ b/seed/ruby-sdk/bytes/seed_bytes_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_bytes_client" + spec.version = SeedBytesClient::Gemconfig::VERSION spec.authors = SeedBytesClient::Gemconfig::AUTHORS spec.email = SeedBytesClient::Gemconfig::EMAIL spec.summary = SeedBytesClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/circular-references/lib/gemconfig.rb b/seed/ruby-sdk/circular-references/lib/gemconfig.rb index ca0b8ab5623..b4c1f83d5b0 100644 --- a/seed/ruby-sdk/circular-references/lib/gemconfig.rb +++ b/seed/ruby-sdk/circular-references/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedApiClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/circular-references/lib/seed_api_client.rb b/seed/ruby-sdk/circular-references/lib/seed_api_client.rb index 25b115388b1..a8cabfef520 100644 --- a/seed/ruby-sdk/circular-references/lib/seed_api_client.rb +++ b/seed/ruby-sdk/circular-references/lib/seed_api_client.rb @@ -13,18 +13,18 @@ module SeedApiClient class Client # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) + RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) end end class AsyncClient # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) end end end diff --git a/seed/ruby-sdk/circular-references/seed_api_client.gemspec b/seed/ruby-sdk/circular-references/seed_api_client.gemspec index e3108090020..f2bc0cddd0a 100644 --- a/seed/ruby-sdk/circular-references/seed_api_client.gemspec +++ b/seed/ruby-sdk/circular-references/seed_api_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_api_client" + spec.version = SeedApiClient::Gemconfig::VERSION spec.authors = SeedApiClient::Gemconfig::AUTHORS spec.email = SeedApiClient::Gemconfig::EMAIL spec.summary = SeedApiClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/custom-auth/lib/gemconfig.rb b/seed/ruby-sdk/custom-auth/lib/gemconfig.rb index 11aad45bca6..52ab11a736c 100644 --- a/seed/ruby-sdk/custom-auth/lib/gemconfig.rb +++ b/seed/ruby-sdk/custom-auth/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedCustomAuthClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/custom-auth/lib/seed_custom_auth_client.rb b/seed/ruby-sdk/custom-auth/lib/seed_custom_auth_client.rb index c622ae305b0..5b07093c052 100644 --- a/seed/ruby-sdk/custom-auth/lib/seed_custom_auth_client.rb +++ b/seed/ruby-sdk/custom-auth/lib/seed_custom_auth_client.rb @@ -7,24 +7,29 @@ module SeedCustomAuthClient class Client + attr_reader :custom_auth_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param custom_auth_scheme [String] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil, custom_auth_scheme: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @custom_auth_client = CustomAuthClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, + custom_auth_scheme: custom_auth_scheme) + @custom_auth_client = CustomAuth::CustomAuthClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_custom_auth_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param custom_auth_scheme [String] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil, custom_auth_scheme: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_custom_auth_client = AsyncCustomAuthClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_custom_auth_client = CustomAuth::AsyncCustomAuthClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/custom-auth/lib/seed_custom_auth_client/custom_auth/client.rb b/seed/ruby-sdk/custom-auth/lib/seed_custom_auth_client/custom_auth/client.rb index a628d76ecb1..f34c77320c0 100644 --- a/seed/ruby-sdk/custom-auth/lib/seed_custom_auth_client/custom_auth/client.rb +++ b/seed/ruby-sdk/custom-auth/lib/seed_custom_auth_client/custom_auth/client.rb @@ -8,7 +8,7 @@ class CustomAuthClient attr_reader :request_client # @param request_client [RequestClient] - # @return [CustomAuthClient] + # @return [CustomAuth::CustomAuthClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -41,7 +41,7 @@ class AsyncCustomAuthClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncCustomAuthClient] + # @return [CustomAuth::AsyncCustomAuthClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/custom-auth/seed_custom_auth_client.gemspec b/seed/ruby-sdk/custom-auth/seed_custom_auth_client.gemspec index 20c23d10ee0..3c1e5a1dd8c 100644 --- a/seed/ruby-sdk/custom-auth/seed_custom_auth_client.gemspec +++ b/seed/ruby-sdk/custom-auth/seed_custom_auth_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_custom_auth_client" + spec.version = SeedCustomAuthClient::Gemconfig::VERSION spec.authors = SeedCustomAuthClient::Gemconfig::AUTHORS spec.email = SeedCustomAuthClient::Gemconfig::EMAIL spec.summary = SeedCustomAuthClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/enum-query-params/lib/gemconfig.rb b/seed/ruby-sdk/enum-query-params/lib/gemconfig.rb index ca0b8ab5623..b4c1f83d5b0 100644 --- a/seed/ruby-sdk/enum-query-params/lib/gemconfig.rb +++ b/seed/ruby-sdk/enum-query-params/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedApiClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/enum-query-params/lib/seed_api_client.rb b/seed/ruby-sdk/enum-query-params/lib/seed_api_client.rb index 229370a44c7..183e1f1e6ff 100644 --- a/seed/ruby-sdk/enum-query-params/lib/seed_api_client.rb +++ b/seed/ruby-sdk/enum-query-params/lib/seed_api_client.rb @@ -6,24 +6,28 @@ module SeedApiClient class Client + attr_reader :svc_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil, token: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @svc_client = SvcClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, token: token) + @svc_client = Svc::SvcClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_svc_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil, token: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_svc_client = AsyncSvcClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_svc_client = Svc::AsyncSvcClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/enum-query-params/lib/seed_api_client/svc/client.rb b/seed/ruby-sdk/enum-query-params/lib/seed_api_client/svc/client.rb index 6ec5dcd7ff0..a8f4dfe6177 100644 --- a/seed/ruby-sdk/enum-query-params/lib/seed_api_client/svc/client.rb +++ b/seed/ruby-sdk/enum-query-params/lib/seed_api_client/svc/client.rb @@ -8,7 +8,7 @@ class SvcClient attr_reader :request_client # @param request_client [RequestClient] - # @return [SvcClient] + # @return [Svc::SvcClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -31,7 +31,7 @@ class AsyncSvcClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncSvcClient] + # @return [Svc::AsyncSvcClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/enum-query-params/seed_api_client.gemspec b/seed/ruby-sdk/enum-query-params/seed_api_client.gemspec index e3108090020..f2bc0cddd0a 100644 --- a/seed/ruby-sdk/enum-query-params/seed_api_client.gemspec +++ b/seed/ruby-sdk/enum-query-params/seed_api_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_api_client" + spec.version = SeedApiClient::Gemconfig::VERSION spec.authors = SeedApiClient::Gemconfig::AUTHORS spec.email = SeedApiClient::Gemconfig::EMAIL spec.summary = SeedApiClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/enum/lib/gemconfig.rb b/seed/ruby-sdk/enum/lib/gemconfig.rb index 5658239e1c3..a615fe6448a 100644 --- a/seed/ruby-sdk/enum/lib/gemconfig.rb +++ b/seed/ruby-sdk/enum/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedEnumClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client.rb b/seed/ruby-sdk/enum/lib/seed_enum_client.rb index 572892b2203..9337321f76b 100644 --- a/seed/ruby-sdk/enum/lib/seed_enum_client.rb +++ b/seed/ruby-sdk/enum/lib/seed_enum_client.rb @@ -1,33 +1,24 @@ # frozen_string_literal: true -require "faraday" -require_relative "seed_enum_client/inlined_request/client" -require_relative "seed_enum_client/path_param/client" -require_relative "seed_enum_client/query_param/client" require "async/http/faraday" +require "faraday" module SeedEnumClient class Client # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @inlined_request_client = InlinedRequestClient.initialize(request_client: request_client) - @path_param_client = PathParamClient.initialize(request_client: request_client) - @query_param_client = QueryParamClient.initialize(request_client: request_client) + RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) end end class AsyncClient # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_inlined_request_client = AsyncInlinedRequestClient.initialize(request_client: request_client) - @async_path_param_client = AsyncPathParamClient.initialize(request_client: request_client) - @async_query_param_client = AsyncQueryParamClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) end end end diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client/inlined_request/client.rb b/seed/ruby-sdk/enum/lib/seed_enum_client/inlined_request/client.rb deleted file mode 100644 index 62a02ac4cec..00000000000 --- a/seed/ruby-sdk/enum/lib/seed_enum_client/inlined_request/client.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -require "async" - -module SeedEnumClient - module InlinedRequest - class InlinedRequestClient - attr_reader :request_client - - # @param request_client [RequestClient] - # @return [InlinedRequestClient] - def initialize(request_client:) - # @type [RequestClient] - @request_client = request_client - end - - # @param value [Hash{String => String}] - # @param request_options [RequestOptions] - # @return [Void] - def send(value: nil, request_options: nil) - @request_client.conn.post("/inlined-request") do |req| - req.options.timeout = request_options.timeout_in_seconds unless request_options.timeout_in_seconds.nil? - req.headers = { **req.headers, **request_options&.additional_headers }.compact - req.body = { **request_options&.additional_body_parameters, value: value }.compact - end - end - end - - class AsyncInlinedRequestClient - attr_reader :request_client - - # @param request_client [AsyncRequestClient] - # @return [AsyncInlinedRequestClient] - def initialize(request_client:) - # @type [AsyncRequestClient] - @request_client = request_client - end - - # @param value [Hash{String => String}] - # @param request_options [RequestOptions] - # @return [Void] - def send(value: nil, request_options: nil) - Async.call do - @request_client.conn.post("/inlined-request") do |req| - req.options.timeout = request_options.timeout_in_seconds unless request_options.timeout_in_seconds.nil? - req.headers = { **req.headers, **request_options&.additional_headers }.compact - req.body = { **request_options&.additional_body_parameters, value: value }.compact - end - end - end - end - end -end diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client/path_param/client.rb b/seed/ruby-sdk/enum/lib/seed_enum_client/path_param/client.rb deleted file mode 100644 index 7a50a5ce80c..00000000000 --- a/seed/ruby-sdk/enum/lib/seed_enum_client/path_param/client.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -require "async" - -module SeedEnumClient - module PathParam - class PathParamClient - attr_reader :request_client - - # @param request_client [RequestClient] - # @return [PathParamClient] - def initialize(request_client:) - # @type [RequestClient] - @request_client = request_client - end - - # @param value [Hash{String => String}] - # @param request_options [RequestOptions] - # @return [Void] - def send(value:, request_options: nil) - @request_client.conn.post("/path-param/#{value}") do |req| - req.options.timeout = request_options.timeout_in_seconds unless request_options.timeout_in_seconds.nil? - req.headers = { **req.headers, **request_options&.additional_headers }.compact - end - end - end - - class AsyncPathParamClient - attr_reader :request_client - - # @param request_client [AsyncRequestClient] - # @return [AsyncPathParamClient] - def initialize(request_client:) - # @type [AsyncRequestClient] - @request_client = request_client - end - - # @param value [Hash{String => String}] - # @param request_options [RequestOptions] - # @return [Void] - def send(value:, request_options: nil) - Async.call do - @request_client.conn.post("/path-param/#{value}") do |req| - req.options.timeout = request_options.timeout_in_seconds unless request_options.timeout_in_seconds.nil? - req.headers = { **req.headers, **request_options&.additional_headers }.compact - end - end - end - end - end -end diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client/query_param/client.rb b/seed/ruby-sdk/enum/lib/seed_enum_client/query_param/client.rb deleted file mode 100644 index 325c07bf395..00000000000 --- a/seed/ruby-sdk/enum/lib/seed_enum_client/query_param/client.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -require "async" - -module SeedEnumClient - module QueryParam - class QueryParamClient - attr_reader :request_client - - # @param request_client [RequestClient] - # @return [QueryParamClient] - def initialize(request_client:) - # @type [RequestClient] - @request_client = request_client - end - - # @param value [Hash{String => String}] - # @param request_options [RequestOptions] - # @return [Void] - def send(value: nil, request_options: nil) - @request_client.conn.post("/query") do |req| - req.options.timeout = request_options.timeout_in_seconds unless request_options.timeout_in_seconds.nil? - req.headers = { **req.headers, **request_options&.additional_headers }.compact - req.params = { **request_options&.additional_query_parameters, "value": value }.compact - end - end - - # @param value [Hash{String => String}] - # @param request_options [RequestOptions] - # @return [Void] - def send_list(value: nil, request_options: nil) - @request_client.conn.post("/query-list") do |req| - req.options.timeout = request_options.timeout_in_seconds unless request_options.timeout_in_seconds.nil? - req.headers = { **req.headers, **request_options&.additional_headers }.compact - req.params = { **request_options&.additional_query_parameters, "value": value }.compact - end - end - end - - class AsyncQueryParamClient - attr_reader :request_client - - # @param request_client [AsyncRequestClient] - # @return [AsyncQueryParamClient] - def initialize(request_client:) - # @type [AsyncRequestClient] - @request_client = request_client - end - - # @param value [Hash{String => String}] - # @param request_options [RequestOptions] - # @return [Void] - def send(value: nil, request_options: nil) - Async.call do - @request_client.conn.post("/query") do |req| - req.options.timeout = request_options.timeout_in_seconds unless request_options.timeout_in_seconds.nil? - req.headers = { **req.headers, **request_options&.additional_headers }.compact - req.params = { **request_options&.additional_query_parameters, "value": value }.compact - end - end - end - - # @param value [Hash{String => String}] - # @param request_options [RequestOptions] - # @return [Void] - def send_list(value: nil, request_options: nil) - Async.call do - @request_client.conn.post("/query-list") do |req| - req.options.timeout = request_options.timeout_in_seconds unless request_options.timeout_in_seconds.nil? - req.headers = { **req.headers, **request_options&.additional_headers }.compact - req.params = { **request_options&.additional_query_parameters, "value": value }.compact - end - end - end - end - end -end diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client/types/operand.rb b/seed/ruby-sdk/enum/lib/seed_enum_client/types/enum.rb similarity index 53% rename from seed/ruby-sdk/enum/lib/seed_enum_client/types/operand.rb rename to seed/ruby-sdk/enum/lib/seed_enum_client/types/enum.rb index 5045ea714d6..1b18f0f59e3 100644 --- a/seed/ruby-sdk/enum/lib/seed_enum_client/types/operand.rb +++ b/seed/ruby-sdk/enum/lib/seed_enum_client/types/enum.rb @@ -2,5 +2,5 @@ module SeedEnumClient # @type [Hash{String => String}] - OPERAND = { greater_than: ">", equal_to: "=", less_than: "less_than" }.frozen + ENUM = { one: "ONE", two: "TWO", three: "THREE" }.frozen end diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client/types/one.rb b/seed/ruby-sdk/enum/lib/seed_enum_client/types/one.rb new file mode 100644 index 00000000000..3b51f91057b --- /dev/null +++ b/seed/ruby-sdk/enum/lib/seed_enum_client/types/one.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +module SeedEnumClient + # @type [Hash{String => String}] + ONE = { one: "ONE", o_ne: "ONe" }.frozen +end diff --git a/seed/ruby-sdk/enum/seed_enum_client.gemspec b/seed/ruby-sdk/enum/seed_enum_client.gemspec index 3f6b5af29bf..fd30df60984 100644 --- a/seed/ruby-sdk/enum/seed_enum_client.gemspec +++ b/seed/ruby-sdk/enum/seed_enum_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_enum_client" + spec.version = SeedEnumClient::Gemconfig::VERSION spec.authors = SeedEnumClient::Gemconfig::AUTHORS spec.email = SeedEnumClient::Gemconfig::EMAIL spec.summary = SeedEnumClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/error-property/lib/gemconfig.rb b/seed/ruby-sdk/error-property/lib/gemconfig.rb index 12c8bedeac1..aee244ffbf4 100644 --- a/seed/ruby-sdk/error-property/lib/gemconfig.rb +++ b/seed/ruby-sdk/error-property/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedErrorPropertyClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/error-property/lib/seed_error_property_client.rb b/seed/ruby-sdk/error-property/lib/seed_error_property_client.rb index 1c4407cabc4..2283e4857fb 100644 --- a/seed/ruby-sdk/error-property/lib/seed_error_property_client.rb +++ b/seed/ruby-sdk/error-property/lib/seed_error_property_client.rb @@ -7,22 +7,26 @@ module SeedErrorPropertyClient class Client + attr_reader :property_based_error_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @property_based_error_client = PropertyBasedErrorClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @property_based_error_client = PropertyBasedError::PropertyBasedErrorClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_property_based_error_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_property_based_error_client = AsyncPropertyBasedErrorClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_property_based_error_client = PropertyBasedError::AsyncPropertyBasedErrorClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/error-property/lib/seed_error_property_client/property_based_error/client.rb b/seed/ruby-sdk/error-property/lib/seed_error_property_client/property_based_error/client.rb index ad1ba28f1c8..a7c1161a080 100644 --- a/seed/ruby-sdk/error-property/lib/seed_error_property_client/property_based_error/client.rb +++ b/seed/ruby-sdk/error-property/lib/seed_error_property_client/property_based_error/client.rb @@ -8,7 +8,7 @@ class PropertyBasedErrorClient attr_reader :request_client # @param request_client [RequestClient] - # @return [PropertyBasedErrorClient] + # @return [PropertyBasedError::PropertyBasedErrorClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -28,7 +28,7 @@ class AsyncPropertyBasedErrorClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncPropertyBasedErrorClient] + # @return [PropertyBasedError::AsyncPropertyBasedErrorClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/error-property/seed_error_property_client.gemspec b/seed/ruby-sdk/error-property/seed_error_property_client.gemspec index 57e466df7be..c5f5c9aa25f 100644 --- a/seed/ruby-sdk/error-property/seed_error_property_client.gemspec +++ b/seed/ruby-sdk/error-property/seed_error_property_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_error_property_client" + spec.version = SeedErrorPropertyClient::Gemconfig::VERSION spec.authors = SeedErrorPropertyClient::Gemconfig::AUTHORS spec.email = SeedErrorPropertyClient::Gemconfig::EMAIL spec.summary = SeedErrorPropertyClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/examples/lib/gemconfig.rb b/seed/ruby-sdk/examples/lib/gemconfig.rb index 3096258f1bb..da9515ea405 100644 --- a/seed/ruby-sdk/examples/lib/gemconfig.rb +++ b/seed/ruby-sdk/examples/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedExamplesClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/examples/lib/seed_examples_client.rb b/seed/ruby-sdk/examples/lib/seed_examples_client.rb index 1e647fa0295..1f30f32b301 100644 --- a/seed/ruby-sdk/examples/lib/seed_examples_client.rb +++ b/seed/ruby-sdk/examples/lib/seed_examples_client.rb @@ -37,16 +37,19 @@ module SeedExamplesClient class Client + attr_reader :client, :client, :service_client + # @param environment [Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [Client] def initialize(environment: nil, max_retries: nil, timeout_in_seconds: nil, token: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @client = Client.initialize(request_client: request_client) - @client = Client.initialize(request_client: request_client) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(environment: environment, max_retries: max_retries, + timeout_in_seconds: timeout_in_seconds, token: token) + @client = File::Client.new(request_client: request_client) + @client = Health::Client.new(request_client: request_client) + @service_client = Service::ServiceClient.new(request_client: request_client) end # @param request [String] @@ -63,16 +66,18 @@ def echo(request:, request_options: nil) end class AsyncClient + attr_reader :async_client, :async_client, :async_service_client + # @param environment [Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [AsyncClient] def initialize(environment: nil, max_retries: nil, timeout_in_seconds: nil, token: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_client = AsyncClient.initialize(client: request_client) - @async_client = AsyncClient.initialize(client: request_client) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_client = File::AsyncClient.new(client: request_client) + @async_client = Health::AsyncClient.new(client: request_client) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end # @param request [String] diff --git a/seed/ruby-sdk/examples/lib/seed_examples_client/file/client.rb b/seed/ruby-sdk/examples/lib/seed_examples_client/file/client.rb index 361944fe93d..9d2fe42db43 100644 --- a/seed/ruby-sdk/examples/lib/seed_examples_client/file/client.rb +++ b/seed/ruby-sdk/examples/lib/seed_examples_client/file/client.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require_relative "notification/service/client" + require_relative "notificationclient" require_relative "service/client" @@ -10,10 +11,10 @@ class Client attr_reader :request_client # @param client [RequestClient] - # @return [] + # @return [File::Client] def initialize(client:) - @client = Client.initialize(request_client: @request_client) - @service_client = ServiceClient.initialize(request_client: @request_client) + @client = File::Notification::Client.new(request_client: @request_client) + @service_client = File::Service::ServiceClient.new(request_client: @request_client) end end @@ -21,10 +22,10 @@ class AsyncClient attr_reader :client # @param client [AsyncRequestClient] - # @return [] + # @return [File::AsyncClient] def initialize(client:) - @async_client = AsyncClient.initialize(client: @request_client) - @async_service_client = AsyncServiceClient.initialize(request_client: @request_client) + @async_client = File::Notification::AsyncClient.new(client: @request_client) + @async_service_client = File::Service::AsyncServiceClient.new(request_client: @request_client) end end end diff --git a/seed/ruby-sdk/examples/lib/seed_examples_client/file/notification/client.rb b/seed/ruby-sdk/examples/lib/seed_examples_client/file/notification/client.rb index 1d7b20b56bd..099dbb53eb3 100644 --- a/seed/ruby-sdk/examples/lib/seed_examples_client/file/notification/client.rb +++ b/seed/ruby-sdk/examples/lib/seed_examples_client/file/notification/client.rb @@ -9,9 +9,9 @@ class Client attr_reader :request_client # @param client [RequestClient] - # @return [] + # @return [File::Notification::Client] def initialize(client:) - @service_client = ServiceClient.initialize(request_client: @request_client) + @service_client = File::Notification::Service::ServiceClient.new(request_client: @request_client) end end @@ -19,9 +19,9 @@ class AsyncClient attr_reader :client # @param client [AsyncRequestClient] - # @return [] + # @return [File::Notification::AsyncClient] def initialize(client:) - @async_service_client = AsyncServiceClient.initialize(request_client: @request_client) + @async_service_client = File::Notification::Service::AsyncServiceClient.new(request_client: @request_client) end end end diff --git a/seed/ruby-sdk/examples/lib/seed_examples_client/file/notification/service/client.rb b/seed/ruby-sdk/examples/lib/seed_examples_client/file/notification/service/client.rb index 663c60c921d..e59a3a9ad89 100644 --- a/seed/ruby-sdk/examples/lib/seed_examples_client/file/notification/service/client.rb +++ b/seed/ruby-sdk/examples/lib/seed_examples_client/file/notification/service/client.rb @@ -11,7 +11,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [File::Notification::Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -34,7 +34,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [File::Notification::Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/examples/lib/seed_examples_client/file/service/client.rb b/seed/ruby-sdk/examples/lib/seed_examples_client/file/service/client.rb index 8ff3204f8c8..13ed483d360 100644 --- a/seed/ruby-sdk/examples/lib/seed_examples_client/file/service/client.rb +++ b/seed/ruby-sdk/examples/lib/seed_examples_client/file/service/client.rb @@ -10,7 +10,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [File::Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -33,7 +33,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [File::Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/examples/lib/seed_examples_client/health/client.rb b/seed/ruby-sdk/examples/lib/seed_examples_client/health/client.rb index c202fe4c140..0d4f45c7c63 100644 --- a/seed/ruby-sdk/examples/lib/seed_examples_client/health/client.rb +++ b/seed/ruby-sdk/examples/lib/seed_examples_client/health/client.rb @@ -8,9 +8,9 @@ class Client attr_reader :request_client # @param client [RequestClient] - # @return [] + # @return [Health::Client] def initialize(client:) - @service_client = ServiceClient.initialize(request_client: @request_client) + @service_client = Health::Service::ServiceClient.new(request_client: @request_client) end end @@ -18,9 +18,9 @@ class AsyncClient attr_reader :client # @param client [AsyncRequestClient] - # @return [] + # @return [Health::AsyncClient] def initialize(client:) - @async_service_client = AsyncServiceClient.initialize(request_client: @request_client) + @async_service_client = Health::Service::AsyncServiceClient.new(request_client: @request_client) end end end diff --git a/seed/ruby-sdk/examples/lib/seed_examples_client/health/service/client.rb b/seed/ruby-sdk/examples/lib/seed_examples_client/health/service/client.rb index 452fd9fc04f..9680cd0b1f5 100644 --- a/seed/ruby-sdk/examples/lib/seed_examples_client/health/service/client.rb +++ b/seed/ruby-sdk/examples/lib/seed_examples_client/health/service/client.rb @@ -9,7 +9,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Health::Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -41,7 +41,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Health::Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/examples/lib/seed_examples_client/service/client.rb b/seed/ruby-sdk/examples/lib/seed_examples_client/service/client.rb index 5c23404d769..9dcc141914c 100644 --- a/seed/ruby-sdk/examples/lib/seed_examples_client/service/client.rb +++ b/seed/ruby-sdk/examples/lib/seed_examples_client/service/client.rb @@ -12,7 +12,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -69,7 +69,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/examples/seed_examples_client.gemspec b/seed/ruby-sdk/examples/seed_examples_client.gemspec index 1bc4bbc686c..ad5bcbead44 100644 --- a/seed/ruby-sdk/examples/seed_examples_client.gemspec +++ b/seed/ruby-sdk/examples/seed_examples_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_examples_client" + spec.version = SeedExamplesClient::Gemconfig::VERSION spec.authors = SeedExamplesClient::Gemconfig::AUTHORS spec.email = SeedExamplesClient::Gemconfig::EMAIL spec.summary = SeedExamplesClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/exhaustive/lib/gemconfig.rb b/seed/ruby-sdk/exhaustive/lib/gemconfig.rb index fd926713a39..878fe59accb 100644 --- a/seed/ruby-sdk/exhaustive/lib/gemconfig.rb +++ b/seed/ruby-sdk/exhaustive/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedExhaustiveClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client.rb index 7dad06028eb..56c528ea9c8 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client.rb @@ -26,32 +26,37 @@ module SeedExhaustiveClient class Client + attr_reader :client, :inlined_requests_client, :no_auth_client, :no_req_body_client, :req_with_headers_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil, token: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @client = Client.initialize(request_client: request_client) - @inlined_requests_client = InlinedRequestsClient.initialize(request_client: request_client) - @no_auth_client = NoAuthClient.initialize(request_client: request_client) - @no_req_body_client = NoReqBodyClient.initialize(request_client: request_client) - @req_with_headers_client = ReqWithHeadersClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, token: token) + @client = Endpoints::Client.new(request_client: request_client) + @inlined_requests_client = InlinedRequests::InlinedRequestsClient.new(request_client: request_client) + @no_auth_client = NoAuth::NoAuthClient.new(request_client: request_client) + @no_req_body_client = NoReqBody::NoReqBodyClient.new(request_client: request_client) + @req_with_headers_client = ReqWithHeaders::ReqWithHeadersClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_client, :async_inlined_requests_client, :async_no_auth_client, :async_no_req_body_client, + :async_req_with_headers_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil, token: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_client = AsyncClient.initialize(client: request_client) - @async_inlined_requests_client = AsyncInlinedRequestsClient.initialize(request_client: request_client) - @async_no_auth_client = AsyncNoAuthClient.initialize(request_client: request_client) - @async_no_req_body_client = AsyncNoReqBodyClient.initialize(request_client: request_client) - @async_req_with_headers_client = AsyncReqWithHeadersClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_client = Endpoints::AsyncClient.new(client: request_client) + @async_inlined_requests_client = InlinedRequests::AsyncInlinedRequestsClient.new(request_client: request_client) + @async_no_auth_client = NoAuth::AsyncNoAuthClient.new(request_client: request_client) + @async_no_req_body_client = NoReqBody::AsyncNoReqBodyClient.new(request_client: request_client) + @async_req_with_headers_client = ReqWithHeaders::AsyncReqWithHeadersClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/client.rb index 7306995cadb..a84ba72de70 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/client.rb @@ -14,15 +14,15 @@ class Client attr_reader :request_client # @param client [RequestClient] - # @return [] + # @return [Endpoints::Client] def initialize(client:) - @container_client = ContainerClient.initialize(request_client: @request_client) - @enum_client = EnumClient.initialize(request_client: @request_client) - @http_methods_client = HttpMethodsClient.initialize(request_client: @request_client) - @object_client = ObjectClient.initialize(request_client: @request_client) - @params_client = ParamsClient.initialize(request_client: @request_client) - @primitive_client = PrimitiveClient.initialize(request_client: @request_client) - @union_client = UnionClient.initialize(request_client: @request_client) + @container_client = Endpoints::Container::ContainerClient.new(request_client: @request_client) + @enum_client = Endpoints::Enum::EnumClient.new(request_client: @request_client) + @http_methods_client = Endpoints::HttpMethods::HttpMethodsClient.new(request_client: @request_client) + @object_client = Endpoints::Object::ObjectClient.new(request_client: @request_client) + @params_client = Endpoints::Params::ParamsClient.new(request_client: @request_client) + @primitive_client = Endpoints::Primitive::PrimitiveClient.new(request_client: @request_client) + @union_client = Endpoints::Union::UnionClient.new(request_client: @request_client) end end @@ -30,15 +30,15 @@ class AsyncClient attr_reader :client # @param client [AsyncRequestClient] - # @return [] + # @return [Endpoints::AsyncClient] def initialize(client:) - @async_container_client = AsyncContainerClient.initialize(request_client: @request_client) - @async_enum_client = AsyncEnumClient.initialize(request_client: @request_client) - @async_http_methods_client = AsyncHttpMethodsClient.initialize(request_client: @request_client) - @async_object_client = AsyncObjectClient.initialize(request_client: @request_client) - @async_params_client = AsyncParamsClient.initialize(request_client: @request_client) - @async_primitive_client = AsyncPrimitiveClient.initialize(request_client: @request_client) - @async_union_client = AsyncUnionClient.initialize(request_client: @request_client) + @async_container_client = Endpoints::Container::AsyncContainerClient.new(request_client: @request_client) + @async_enum_client = Endpoints::Enum::AsyncEnumClient.new(request_client: @request_client) + @async_http_methods_client = Endpoints::HttpMethods::AsyncHttpMethodsClient.new(request_client: @request_client) + @async_object_client = Endpoints::Object::AsyncObjectClient.new(request_client: @request_client) + @async_params_client = Endpoints::Params::AsyncParamsClient.new(request_client: @request_client) + @async_primitive_client = Endpoints::Primitive::AsyncPrimitiveClient.new(request_client: @request_client) + @async_union_client = Endpoints::Union::AsyncUnionClient.new(request_client: @request_client) end end end diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/container/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/container/client.rb index 2291319ccf9..ead4a7aee67 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/container/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/container/client.rb @@ -11,7 +11,7 @@ class ContainerClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ContainerClient] + # @return [Endpoints::Container::ContainerClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -114,7 +114,7 @@ class AsyncContainerClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncContainerClient] + # @return [Endpoints::Container::AsyncContainerClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/enum/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/enum/client.rb index 8cfa686f04d..b11b1579c78 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/enum/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/enum/client.rb @@ -9,7 +9,7 @@ class EnumClient attr_reader :request_client # @param request_client [RequestClient] - # @return [EnumClient] + # @return [Endpoints::Enum::EnumClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -33,7 +33,7 @@ class AsyncEnumClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncEnumClient] + # @return [Endpoints::Enum::AsyncEnumClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/http_methods/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/http_methods/client.rb index 48036d2ab3a..37497c7c2ac 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/http_methods/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/http_methods/client.rb @@ -12,7 +12,7 @@ class HttpMethodsClient attr_reader :request_client # @param request_client [RequestClient] - # @return [HttpMethodsClient] + # @return [Endpoints::HttpMethods::HttpMethodsClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -100,7 +100,7 @@ class AsyncHttpMethodsClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncHttpMethodsClient] + # @return [Endpoints::HttpMethods::AsyncHttpMethodsClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/object/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/object/client.rb index dc4361dc5f8..a3bb171e595 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/object/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/object/client.rb @@ -14,7 +14,7 @@ class ObjectClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ObjectClient] + # @return [Endpoints::Object::ObjectClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -132,7 +132,7 @@ class AsyncObjectClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncObjectClient] + # @return [Endpoints::Object::AsyncObjectClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/params/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/params/client.rb index 378d9cc50d7..efe9ecce026 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/params/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/params/client.rb @@ -9,7 +9,7 @@ class ParamsClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ParamsClient] + # @return [Endpoints::Params::ParamsClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -83,7 +83,7 @@ class AsyncParamsClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncParamsClient] + # @return [Endpoints::Params::AsyncParamsClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/primitive/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/primitive/client.rb index bb5326ec69d..dac388b465f 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/primitive/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/primitive/client.rb @@ -10,7 +10,7 @@ class PrimitiveClient attr_reader :request_client # @param request_client [RequestClient] - # @return [PrimitiveClient] + # @return [Endpoints::Primitive::PrimitiveClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -131,7 +131,7 @@ class AsyncPrimitiveClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncPrimitiveClient] + # @return [Endpoints::Primitive::AsyncPrimitiveClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/union/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/union/client.rb index 5ae7350ffd9..a9660482add 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/union/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/endpoints/union/client.rb @@ -10,7 +10,7 @@ class UnionClient attr_reader :request_client # @param request_client [RequestClient] - # @return [UnionClient] + # @return [Endpoints::Union::UnionClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -34,7 +34,7 @@ class AsyncUnionClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncUnionClient] + # @return [Endpoints::Union::AsyncUnionClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/inlined_requests/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/inlined_requests/client.rb index 7c711756781..2ccd1bfd0f7 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/inlined_requests/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/inlined_requests/client.rb @@ -9,7 +9,7 @@ class InlinedRequestsClient attr_reader :request_client # @param request_client [RequestClient] - # @return [InlinedRequestsClient] + # @return [InlinedRequests::InlinedRequestsClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -52,7 +52,7 @@ class AsyncInlinedRequestsClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncInlinedRequestsClient] + # @return [InlinedRequests::AsyncInlinedRequestsClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/no_auth/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/no_auth/client.rb index c367a68a30e..b7f6e0ab36b 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/no_auth/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/no_auth/client.rb @@ -8,7 +8,7 @@ class NoAuthClient attr_reader :request_client # @param request_client [RequestClient] - # @return [NoAuthClient] + # @return [NoAuth::NoAuthClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -31,7 +31,7 @@ class AsyncNoAuthClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncNoAuthClient] + # @return [NoAuth::AsyncNoAuthClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/no_req_body/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/no_req_body/client.rb index c4335973414..ba1003f4ad9 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/no_req_body/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/no_req_body/client.rb @@ -9,7 +9,7 @@ class NoReqBodyClient attr_reader :request_client # @param request_client [RequestClient] - # @return [NoReqBodyClient] + # @return [NoReqBody::NoReqBodyClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -41,7 +41,7 @@ class AsyncNoReqBodyClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncNoReqBodyClient] + # @return [NoReqBody::AsyncNoReqBodyClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/req_with_headers/client.rb b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/req_with_headers/client.rb index ef8370897ab..03508192cab 100644 --- a/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/req_with_headers/client.rb +++ b/seed/ruby-sdk/exhaustive/lib/seed_exhaustive_client/req_with_headers/client.rb @@ -8,7 +8,7 @@ class ReqWithHeadersClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ReqWithHeadersClient] + # @return [ReqWithHeaders::ReqWithHeadersClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -36,7 +36,7 @@ class AsyncReqWithHeadersClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncReqWithHeadersClient] + # @return [ReqWithHeaders::AsyncReqWithHeadersClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/exhaustive/seed_exhaustive_client.gemspec b/seed/ruby-sdk/exhaustive/seed_exhaustive_client.gemspec index 2cdeea5c2ee..ad46b0330ef 100644 --- a/seed/ruby-sdk/exhaustive/seed_exhaustive_client.gemspec +++ b/seed/ruby-sdk/exhaustive/seed_exhaustive_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_exhaustive_client" + spec.version = SeedExhaustiveClient::Gemconfig::VERSION spec.authors = SeedExhaustiveClient::Gemconfig::AUTHORS spec.email = SeedExhaustiveClient::Gemconfig::EMAIL spec.summary = SeedExhaustiveClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/extends/lib/gemconfig.rb b/seed/ruby-sdk/extends/lib/gemconfig.rb index e541320cd06..f5e3603f16b 100644 --- a/seed/ruby-sdk/extends/lib/gemconfig.rb +++ b/seed/ruby-sdk/extends/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedExtendsClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/extends/lib/seed_extends_client.rb b/seed/ruby-sdk/extends/lib/seed_extends_client.rb index 62d60d7f352..2dfa73c77b4 100644 --- a/seed/ruby-sdk/extends/lib/seed_extends_client.rb +++ b/seed/ruby-sdk/extends/lib/seed_extends_client.rb @@ -11,18 +11,18 @@ module SeedExtendsClient class Client # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) + RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) end end class AsyncClient # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) end end end diff --git a/seed/ruby-sdk/extends/seed_extends_client.gemspec b/seed/ruby-sdk/extends/seed_extends_client.gemspec index 3c0d0683527..a7c4b766eaa 100644 --- a/seed/ruby-sdk/extends/seed_extends_client.gemspec +++ b/seed/ruby-sdk/extends/seed_extends_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_extends_client" + spec.version = SeedExtendsClient::Gemconfig::VERSION spec.authors = SeedExtendsClient::Gemconfig::AUTHORS spec.email = SeedExtendsClient::Gemconfig::EMAIL spec.summary = SeedExtendsClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/file-download/lib/gemconfig.rb b/seed/ruby-sdk/file-download/lib/gemconfig.rb index 311ac5cc6e3..f32dab34836 100644 --- a/seed/ruby-sdk/file-download/lib/gemconfig.rb +++ b/seed/ruby-sdk/file-download/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedFileDownloadClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/file-download/lib/seed_file_download_client.rb b/seed/ruby-sdk/file-download/lib/seed_file_download_client.rb index e5a1806a3bc..c98ca1d7bb3 100644 --- a/seed/ruby-sdk/file-download/lib/seed_file_download_client.rb +++ b/seed/ruby-sdk/file-download/lib/seed_file_download_client.rb @@ -7,22 +7,26 @@ module SeedFileDownloadClient class Client + attr_reader :service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @service_client = Service::ServiceClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/file-download/lib/seed_file_download_client/service/client.rb b/seed/ruby-sdk/file-download/lib/seed_file_download_client/service/client.rb index 6015ff2b332..c0cd8b92e8f 100644 --- a/seed/ruby-sdk/file-download/lib/seed_file_download_client/service/client.rb +++ b/seed/ruby-sdk/file-download/lib/seed_file_download_client/service/client.rb @@ -6,7 +6,7 @@ module Service class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -27,7 +27,7 @@ def download_file(&on_data, request_options: nil) class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/file-download/seed_file_download_client.gemspec b/seed/ruby-sdk/file-download/seed_file_download_client.gemspec index 01ac8f1d838..0a9c814447a 100644 --- a/seed/ruby-sdk/file-download/seed_file_download_client.gemspec +++ b/seed/ruby-sdk/file-download/seed_file_download_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_file_download_client" + spec.version = SeedFileDownloadClient::Gemconfig::VERSION spec.authors = SeedFileDownloadClient::Gemconfig::AUTHORS spec.email = SeedFileDownloadClient::Gemconfig::EMAIL spec.summary = SeedFileDownloadClient::Gemconfig::SUMMARY @@ -19,7 +20,7 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_dependency "async-http-faraday", "~> 0.12" spec.add_dependency "faraday", "~> 2.7" + spec.add_dependency "faraday-multipart", "~> 1.0" spec.add_dependency "faraday-retry", "~> 2.2" - spec.add_dependency "farady-multipart", "~> 1.0" spec.add_dependency "mini_mime", "~> 1.1" end diff --git a/seed/ruby-sdk/file-upload/lib/gemconfig.rb b/seed/ruby-sdk/file-upload/lib/gemconfig.rb index 60dddb888cd..a796b1aa978 100644 --- a/seed/ruby-sdk/file-upload/lib/gemconfig.rb +++ b/seed/ruby-sdk/file-upload/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedFileUploadClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/file-upload/lib/seed_file_upload_client.rb b/seed/ruby-sdk/file-upload/lib/seed_file_upload_client.rb index 60402834ac1..fc03ae3a066 100644 --- a/seed/ruby-sdk/file-upload/lib/seed_file_upload_client.rb +++ b/seed/ruby-sdk/file-upload/lib/seed_file_upload_client.rb @@ -10,22 +10,26 @@ module SeedFileUploadClient class Client + attr_reader :service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @service_client = Service::ServiceClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/file-upload/lib/seed_file_upload_client/service/client.rb b/seed/ruby-sdk/file-upload/lib/seed_file_upload_client/service/client.rb index c8bb2158a80..34ab998b7c7 100644 --- a/seed/ruby-sdk/file-upload/lib/seed_file_upload_client/service/client.rb +++ b/seed/ruby-sdk/file-upload/lib/seed_file_upload_client/service/client.rb @@ -12,7 +12,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -106,7 +106,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/file-upload/seed_file_upload_client.gemspec b/seed/ruby-sdk/file-upload/seed_file_upload_client.gemspec index c5bdf32a5ab..4f8dabb4445 100644 --- a/seed/ruby-sdk/file-upload/seed_file_upload_client.gemspec +++ b/seed/ruby-sdk/file-upload/seed_file_upload_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_file_upload_client" + spec.version = SeedFileUploadClient::Gemconfig::VERSION spec.authors = SeedFileUploadClient::Gemconfig::AUTHORS spec.email = SeedFileUploadClient::Gemconfig::EMAIL spec.summary = SeedFileUploadClient::Gemconfig::SUMMARY @@ -19,7 +20,7 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_dependency "async-http-faraday", "~> 0.12" spec.add_dependency "faraday", "~> 2.7" + spec.add_dependency "faraday-multipart", "~> 1.0" spec.add_dependency "faraday-retry", "~> 2.2" - spec.add_dependency "farady-multipart", "~> 1.0" spec.add_dependency "mini_mime", "~> 1.1" end diff --git a/seed/ruby-sdk/folders/lib/gemconfig.rb b/seed/ruby-sdk/folders/lib/gemconfig.rb index ca0b8ab5623..b4c1f83d5b0 100644 --- a/seed/ruby-sdk/folders/lib/gemconfig.rb +++ b/seed/ruby-sdk/folders/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedApiClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/folders/lib/seed_api_client.rb b/seed/ruby-sdk/folders/lib/seed_api_client.rb index 50ab6934ff4..15a2bfb0c63 100644 --- a/seed/ruby-sdk/folders/lib/seed_api_client.rb +++ b/seed/ruby-sdk/folders/lib/seed_api_client.rb @@ -10,13 +10,15 @@ module SeedApiClient class Client + attr_reader :client, :client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @client = Client.initialize(request_client: request_client) - @client = Client.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @client = A::Client.new(request_client: request_client) + @client = Folder::Client.new(request_client: request_client) end # @param request_options [RequestOptions] @@ -30,13 +32,15 @@ def foo(request_options: nil) end class AsyncClient + attr_reader :async_client, :async_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_client = AsyncClient.initialize(client: request_client) - @async_client = AsyncClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_client = A::AsyncClient.new(client: request_client) + @async_client = Folder::AsyncClient.new(request_client: request_client) end # @param request_options [RequestOptions] diff --git a/seed/ruby-sdk/folders/lib/seed_api_client/a/b/client.rb b/seed/ruby-sdk/folders/lib/seed_api_client/a/b/client.rb index e921e1bb8f8..03c08802cce 100644 --- a/seed/ruby-sdk/folders/lib/seed_api_client/a/b/client.rb +++ b/seed/ruby-sdk/folders/lib/seed_api_client/a/b/client.rb @@ -9,7 +9,7 @@ class Client attr_reader :request_client # @param request_client [RequestClient] - # @return [Client] + # @return [A::B::Client] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -29,7 +29,7 @@ class AsyncClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncClient] + # @return [A::B::AsyncClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/folders/lib/seed_api_client/a/c/client.rb b/seed/ruby-sdk/folders/lib/seed_api_client/a/c/client.rb index 295350c930d..73002fc6e4b 100644 --- a/seed/ruby-sdk/folders/lib/seed_api_client/a/c/client.rb +++ b/seed/ruby-sdk/folders/lib/seed_api_client/a/c/client.rb @@ -9,7 +9,7 @@ class Client attr_reader :request_client # @param request_client [RequestClient] - # @return [Client] + # @return [A::C::Client] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -29,7 +29,7 @@ class AsyncClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncClient] + # @return [A::C::AsyncClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/folders/lib/seed_api_client/a/client.rb b/seed/ruby-sdk/folders/lib/seed_api_client/a/client.rb index 18baf33584f..1c3d47bc2e9 100644 --- a/seed/ruby-sdk/folders/lib/seed_api_client/a/client.rb +++ b/seed/ruby-sdk/folders/lib/seed_api_client/a/client.rb @@ -9,10 +9,10 @@ class Client attr_reader :request_client # @param client [RequestClient] - # @return [] + # @return [A::Client] def initialize(client:) - @client = Client.initialize(request_client: @request_client) - @client = Client.initialize(request_client: @request_client) + @client = A::B::Client.new(request_client: @request_client) + @client = A::C::Client.new(request_client: @request_client) end end @@ -20,10 +20,10 @@ class AsyncClient attr_reader :client # @param client [AsyncRequestClient] - # @return [] + # @return [A::AsyncClient] def initialize(client:) - @async_client = AsyncClient.initialize(request_client: @request_client) - @async_client = AsyncClient.initialize(request_client: @request_client) + @async_client = A::B::AsyncClient.new(request_client: @request_client) + @async_client = A::C::AsyncClient.new(request_client: @request_client) end end end diff --git a/seed/ruby-sdk/folders/lib/seed_api_client/folder/client.rb b/seed/ruby-sdk/folders/lib/seed_api_client/folder/client.rb index 80ca3e5e42d..650783effbe 100644 --- a/seed/ruby-sdk/folders/lib/seed_api_client/folder/client.rb +++ b/seed/ruby-sdk/folders/lib/seed_api_client/folder/client.rb @@ -8,7 +8,7 @@ class Client attr_reader :request_client # @param request_client [RequestClient] - # @return [Client] + # @return [Folder::Client] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -28,7 +28,7 @@ class AsyncClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncClient] + # @return [Folder::AsyncClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/folders/lib/seed_api_client/folder/service/client.rb b/seed/ruby-sdk/folders/lib/seed_api_client/folder/service/client.rb index b5464eb5e08..d5060dfdeeb 100644 --- a/seed/ruby-sdk/folders/lib/seed_api_client/folder/service/client.rb +++ b/seed/ruby-sdk/folders/lib/seed_api_client/folder/service/client.rb @@ -9,7 +9,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Folder::Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -40,7 +40,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Folder::Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/folders/seed_api_client.gemspec b/seed/ruby-sdk/folders/seed_api_client.gemspec index e3108090020..f2bc0cddd0a 100644 --- a/seed/ruby-sdk/folders/seed_api_client.gemspec +++ b/seed/ruby-sdk/folders/seed_api_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_api_client" + spec.version = SeedApiClient::Gemconfig::VERSION spec.authors = SeedApiClient::Gemconfig::AUTHORS spec.email = SeedApiClient::Gemconfig::EMAIL spec.summary = SeedApiClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/idempotency-headers/lib/gemconfig.rb b/seed/ruby-sdk/idempotency-headers/lib/gemconfig.rb index 1fef07848b7..048480e4ec1 100644 --- a/seed/ruby-sdk/idempotency-headers/lib/gemconfig.rb +++ b/seed/ruby-sdk/idempotency-headers/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedIdempotencyHeadersClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/idempotency-headers/lib/seed_idempotency_headers_client.rb b/seed/ruby-sdk/idempotency-headers/lib/seed_idempotency_headers_client.rb index 9b1c9bd84b9..5af89628c98 100644 --- a/seed/ruby-sdk/idempotency-headers/lib/seed_idempotency_headers_client.rb +++ b/seed/ruby-sdk/idempotency-headers/lib/seed_idempotency_headers_client.rb @@ -6,24 +6,28 @@ module SeedIdempotencyHeadersClient class Client + attr_reader :payment_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil, token: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @payment_client = PaymentClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, token: token) + @payment_client = Payment::PaymentClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_payment_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil, token: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_payment_client = AsyncPaymentClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_payment_client = Payment::AsyncPaymentClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/idempotency-headers/lib/seed_idempotency_headers_client/payment/client.rb b/seed/ruby-sdk/idempotency-headers/lib/seed_idempotency_headers_client/payment/client.rb index f70efcdae15..f5b85fa3b46 100644 --- a/seed/ruby-sdk/idempotency-headers/lib/seed_idempotency_headers_client/payment/client.rb +++ b/seed/ruby-sdk/idempotency-headers/lib/seed_idempotency_headers_client/payment/client.rb @@ -8,7 +8,7 @@ class PaymentClient attr_reader :request_client # @param request_client [RequestClient] - # @return [PaymentClient] + # @return [Payment::PaymentClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -43,7 +43,7 @@ class AsyncPaymentClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncPaymentClient] + # @return [Payment::AsyncPaymentClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/idempotency-headers/seed_idempotency_headers_client.gemspec b/seed/ruby-sdk/idempotency-headers/seed_idempotency_headers_client.gemspec index 0b1a30d3507..5d3f8bc61ad 100644 --- a/seed/ruby-sdk/idempotency-headers/seed_idempotency_headers_client.gemspec +++ b/seed/ruby-sdk/idempotency-headers/seed_idempotency_headers_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_idempotency_headers_client" + spec.version = SeedIdempotencyHeadersClient::Gemconfig::VERSION spec.authors = SeedIdempotencyHeadersClient::Gemconfig::AUTHORS spec.email = SeedIdempotencyHeadersClient::Gemconfig::EMAIL spec.summary = SeedIdempotencyHeadersClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/imdb/lib/gemconfig.rb b/seed/ruby-sdk/imdb/lib/gemconfig.rb index ca0b8ab5623..b4c1f83d5b0 100644 --- a/seed/ruby-sdk/imdb/lib/gemconfig.rb +++ b/seed/ruby-sdk/imdb/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedApiClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/imdb/lib/seed_api_client.rb b/seed/ruby-sdk/imdb/lib/seed_api_client.rb index dc4edb44302..63684d6d82f 100644 --- a/seed/ruby-sdk/imdb/lib/seed_api_client.rb +++ b/seed/ruby-sdk/imdb/lib/seed_api_client.rb @@ -10,24 +10,28 @@ module SeedApiClient class Client + attr_reader :imdb_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil, token: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @imdb_client = ImdbClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, token: token) + @imdb_client = Imdb::ImdbClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_imdb_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil, token: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_imdb_client = AsyncImdbClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_imdb_client = Imdb::AsyncImdbClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/imdb/lib/seed_api_client/imdb/client.rb b/seed/ruby-sdk/imdb/lib/seed_api_client/imdb/client.rb index 1334216b91d..1ad928ec680 100644 --- a/seed/ruby-sdk/imdb/lib/seed_api_client/imdb/client.rb +++ b/seed/ruby-sdk/imdb/lib/seed_api_client/imdb/client.rb @@ -11,7 +11,7 @@ class ImdbClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ImdbClient] + # @return [Imdb::ImdbClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -48,7 +48,7 @@ class AsyncImdbClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncImdbClient] + # @return [Imdb::AsyncImdbClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/imdb/seed_api_client.gemspec b/seed/ruby-sdk/imdb/seed_api_client.gemspec index e3108090020..f2bc0cddd0a 100644 --- a/seed/ruby-sdk/imdb/seed_api_client.gemspec +++ b/seed/ruby-sdk/imdb/seed_api_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_api_client" + spec.version = SeedApiClient::Gemconfig::VERSION spec.authors = SeedApiClient::Gemconfig::AUTHORS spec.email = SeedApiClient::Gemconfig::EMAIL spec.summary = SeedApiClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/literal-headers/lib/gemconfig.rb b/seed/ruby-sdk/literal-headers/lib/gemconfig.rb index f3be0556677..30cda88a6cf 100644 --- a/seed/ruby-sdk/literal-headers/lib/gemconfig.rb +++ b/seed/ruby-sdk/literal-headers/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedLiteralHeadersClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client.rb b/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client.rb index eb61a1d8038..d284e87b3e3 100644 --- a/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client.rb +++ b/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client.rb @@ -8,30 +8,35 @@ module SeedLiteralHeadersClient class Client + attr_reader :no_headers_client, :only_literal_headers_client, :with_non_literal_headers_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param api_header [String] # @param api_test [Boolean] - # @return [] + # @return [Client] def initialize(api_header:, api_test:, max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @no_headers_client = NoHeadersClient.initialize(request_client: request_client) - @only_literal_headers_client = OnlyLiteralHeadersClient.initialize(request_client: request_client) - @with_non_literal_headers_client = WithNonLiteralHeadersClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, + api_header: api_header, api_test: api_test) + @no_headers_client = NoHeaders::NoHeadersClient.new(request_client: request_client) + @only_literal_headers_client = OnlyLiteralHeaders::OnlyLiteralHeadersClient.new(request_client: request_client) + @with_non_literal_headers_client = WithNonLiteralHeaders::WithNonLiteralHeadersClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_no_headers_client, :async_only_literal_headers_client, :async_with_non_literal_headers_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param api_header [String] # @param api_test [Boolean] - # @return [] + # @return [AsyncClient] def initialize(api_header:, api_test:, max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_no_headers_client = AsyncNoHeadersClient.initialize(request_client: request_client) - @async_only_literal_headers_client = AsyncOnlyLiteralHeadersClient.initialize(request_client: request_client) - @async_with_non_literal_headers_client = AsyncWithNonLiteralHeadersClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_no_headers_client = NoHeaders::AsyncNoHeadersClient.new(request_client: request_client) + @async_only_literal_headers_client = OnlyLiteralHeaders::AsyncOnlyLiteralHeadersClient.new(request_client: request_client) + @async_with_non_literal_headers_client = WithNonLiteralHeaders::AsyncWithNonLiteralHeadersClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/no_headers/client.rb b/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/no_headers/client.rb index 546dbea8a2c..940ebbfef77 100644 --- a/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/no_headers/client.rb +++ b/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/no_headers/client.rb @@ -8,7 +8,7 @@ class NoHeadersClient attr_reader :request_client # @param request_client [RequestClient] - # @return [NoHeadersClient] + # @return [NoHeaders::NoHeadersClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -30,7 +30,7 @@ class AsyncNoHeadersClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncNoHeadersClient] + # @return [NoHeaders::AsyncNoHeadersClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/only_literal_headers/client.rb b/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/only_literal_headers/client.rb index b6781b77bc9..821232c8313 100644 --- a/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/only_literal_headers/client.rb +++ b/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/only_literal_headers/client.rb @@ -8,7 +8,7 @@ class OnlyLiteralHeadersClient attr_reader :request_client # @param request_client [RequestClient] - # @return [OnlyLiteralHeadersClient] + # @return [OnlyLiteralHeaders::OnlyLiteralHeadersClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -37,7 +37,7 @@ class AsyncOnlyLiteralHeadersClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncOnlyLiteralHeadersClient] + # @return [OnlyLiteralHeaders::AsyncOnlyLiteralHeadersClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/with_non_literal_headers/client.rb b/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/with_non_literal_headers/client.rb index 6f596e52bc6..83ddc999124 100644 --- a/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/with_non_literal_headers/client.rb +++ b/seed/ruby-sdk/literal-headers/lib/seed_literal_headers_client/with_non_literal_headers/client.rb @@ -8,7 +8,7 @@ class WithNonLiteralHeadersClient attr_reader :request_client # @param request_client [RequestClient] - # @return [WithNonLiteralHeadersClient] + # @return [WithNonLiteralHeaders::WithNonLiteralHeadersClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -39,7 +39,7 @@ class AsyncWithNonLiteralHeadersClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncWithNonLiteralHeadersClient] + # @return [WithNonLiteralHeaders::AsyncWithNonLiteralHeadersClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/literal-headers/seed_literal_headers_client.gemspec b/seed/ruby-sdk/literal-headers/seed_literal_headers_client.gemspec index fed87a4c05e..32eeda67391 100644 --- a/seed/ruby-sdk/literal-headers/seed_literal_headers_client.gemspec +++ b/seed/ruby-sdk/literal-headers/seed_literal_headers_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_literal_headers_client" + spec.version = SeedLiteralHeadersClient::Gemconfig::VERSION spec.authors = SeedLiteralHeadersClient::Gemconfig::AUTHORS spec.email = SeedLiteralHeadersClient::Gemconfig::EMAIL spec.summary = SeedLiteralHeadersClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/literal/lib/gemconfig.rb b/seed/ruby-sdk/literal/lib/gemconfig.rb index 8d858b47a0b..fb36a4c1b5b 100644 --- a/seed/ruby-sdk/literal/lib/gemconfig.rb +++ b/seed/ruby-sdk/literal/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedLiteralClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/literal/lib/seed_literal_client.rb b/seed/ruby-sdk/literal/lib/seed_literal_client.rb index d2e789df0d3..c9e77bd4fe1 100644 --- a/seed/ruby-sdk/literal/lib/seed_literal_client.rb +++ b/seed/ruby-sdk/literal/lib/seed_literal_client.rb @@ -9,22 +9,26 @@ module SeedLiteralClient class Client + attr_reader :literal_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @literal_client = LiteralClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @literal_client = Literal::LiteralClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_literal_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_literal_client = AsyncLiteralClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_literal_client = Literal::AsyncLiteralClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/literal/lib/seed_literal_client/literal/client.rb b/seed/ruby-sdk/literal/lib/seed_literal_client/literal/client.rb index d4ba040e1f3..c0809ea7189 100644 --- a/seed/ruby-sdk/literal/lib/seed_literal_client/literal/client.rb +++ b/seed/ruby-sdk/literal/lib/seed_literal_client/literal/client.rb @@ -11,7 +11,7 @@ class LiteralClient attr_reader :request_client # @param request_client [RequestClient] - # @return [LiteralClient] + # @return [Literal::LiteralClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -58,7 +58,7 @@ class AsyncLiteralClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncLiteralClient] + # @return [Literal::AsyncLiteralClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/literal/seed_literal_client.gemspec b/seed/ruby-sdk/literal/seed_literal_client.gemspec index ca43e95e5bc..cf597877a3f 100644 --- a/seed/ruby-sdk/literal/seed_literal_client.gemspec +++ b/seed/ruby-sdk/literal/seed_literal_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_literal_client" + spec.version = SeedLiteralClient::Gemconfig::VERSION spec.authors = SeedLiteralClient::Gemconfig::AUTHORS spec.email = SeedLiteralClient::Gemconfig::EMAIL spec.summary = SeedLiteralClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/multi-url-environment/lib/gemconfig.rb b/seed/ruby-sdk/multi-url-environment/lib/gemconfig.rb index b01e6fdbc1d..a2e658fbd42 100644 --- a/seed/ruby-sdk/multi-url-environment/lib/gemconfig.rb +++ b/seed/ruby-sdk/multi-url-environment/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedMultiUrlEnvironmentClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client.rb b/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client.rb index b088f4a4269..84e0a473fb6 100644 --- a/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client.rb +++ b/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client.rb @@ -7,28 +7,33 @@ module SeedMultiUrlEnvironmentClient class Client + attr_reader :ec_2_client, :s_3_client + # @param environment [Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [Client] def initialize(environment: Environment::PRODUCTION, max_retries: nil, timeout_in_seconds: nil, token: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @ec_2_client = Ec2Client.initialize(request_client: request_client) - @s_3_client = S3Client.initialize(request_client: request_client) + request_client = RequestClient.new(environment: environment, max_retries: max_retries, + timeout_in_seconds: timeout_in_seconds, token: token) + @ec_2_client = Ec2::Ec2Client.new(request_client: request_client) + @s_3_client = S3::S3Client.new(request_client: request_client) end end class AsyncClient + attr_reader :async_ec_2_client, :async_s_3_client + # @param environment [Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [AsyncClient] def initialize(environment: Environment::PRODUCTION, max_retries: nil, timeout_in_seconds: nil, token: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_ec_2_client = AsyncEc2Client.initialize(request_client: request_client) - @async_s_3_client = AsyncS3Client.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_ec_2_client = Ec2::AsyncEc2Client.new(request_client: request_client) + @async_s_3_client = S3::AsyncS3Client.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client/ec_2/client.rb b/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client/ec_2/client.rb index 90bf0f03228..0ed4cb572c8 100644 --- a/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client/ec_2/client.rb +++ b/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client/ec_2/client.rb @@ -8,7 +8,7 @@ class Ec2Client attr_reader :request_client # @param request_client [RequestClient] - # @return [Ec2Client] + # @return [Ec2::Ec2Client] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -32,7 +32,7 @@ class AsyncEc2Client attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncEc2Client] + # @return [Ec2::AsyncEc2Client] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client/s_3/client.rb b/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client/s_3/client.rb index a2b50cf1069..cdd9a613cdd 100644 --- a/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client/s_3/client.rb +++ b/seed/ruby-sdk/multi-url-environment/lib/seed_multi_url_environment_client/s_3/client.rb @@ -8,7 +8,7 @@ class S3Client attr_reader :request_client # @param request_client [RequestClient] - # @return [S3Client] + # @return [S3::S3Client] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -32,7 +32,7 @@ class AsyncS3Client attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncS3Client] + # @return [S3::AsyncS3Client] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/multi-url-environment/seed_multi_url_environment_client.gemspec b/seed/ruby-sdk/multi-url-environment/seed_multi_url_environment_client.gemspec index babdccf716e..62832ccf76a 100644 --- a/seed/ruby-sdk/multi-url-environment/seed_multi_url_environment_client.gemspec +++ b/seed/ruby-sdk/multi-url-environment/seed_multi_url_environment_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_multi_url_environment_client" + spec.version = SeedMultiUrlEnvironmentClient::Gemconfig::VERSION spec.authors = SeedMultiUrlEnvironmentClient::Gemconfig::AUTHORS spec.email = SeedMultiUrlEnvironmentClient::Gemconfig::EMAIL spec.summary = SeedMultiUrlEnvironmentClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/no-environment/lib/gemconfig.rb b/seed/ruby-sdk/no-environment/lib/gemconfig.rb index 56440982bf6..02528d851ad 100644 --- a/seed/ruby-sdk/no-environment/lib/gemconfig.rb +++ b/seed/ruby-sdk/no-environment/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedNoEnvironmentClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/no-environment/lib/seed_no_environment_client.rb b/seed/ruby-sdk/no-environment/lib/seed_no_environment_client.rb index 01c14781312..2ff6e8ddf89 100644 --- a/seed/ruby-sdk/no-environment/lib/seed_no_environment_client.rb +++ b/seed/ruby-sdk/no-environment/lib/seed_no_environment_client.rb @@ -6,24 +6,28 @@ module SeedNoEnvironmentClient class Client + attr_reader :dummy_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil, token: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @dummy_client = DummyClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, token: token) + @dummy_client = Dummy::DummyClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_dummy_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil, token: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_dummy_client = AsyncDummyClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_dummy_client = Dummy::AsyncDummyClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/no-environment/lib/seed_no_environment_client/dummy/client.rb b/seed/ruby-sdk/no-environment/lib/seed_no_environment_client/dummy/client.rb index d5947e5219f..db3a9cb5ad3 100644 --- a/seed/ruby-sdk/no-environment/lib/seed_no_environment_client/dummy/client.rb +++ b/seed/ruby-sdk/no-environment/lib/seed_no_environment_client/dummy/client.rb @@ -8,7 +8,7 @@ class DummyClient attr_reader :request_client # @param request_client [RequestClient] - # @return [DummyClient] + # @return [Dummy::DummyClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -29,7 +29,7 @@ class AsyncDummyClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncDummyClient] + # @return [Dummy::AsyncDummyClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/no-environment/seed_no_environment_client.gemspec b/seed/ruby-sdk/no-environment/seed_no_environment_client.gemspec index 23101701046..333ad891de1 100644 --- a/seed/ruby-sdk/no-environment/seed_no_environment_client.gemspec +++ b/seed/ruby-sdk/no-environment/seed_no_environment_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_no_environment_client" + spec.version = SeedNoEnvironmentClient::Gemconfig::VERSION spec.authors = SeedNoEnvironmentClient::Gemconfig::AUTHORS spec.email = SeedNoEnvironmentClient::Gemconfig::EMAIL spec.summary = SeedNoEnvironmentClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/object/lib/gemconfig.rb b/seed/ruby-sdk/object/lib/gemconfig.rb index e0dbd9394da..d90831f0fcd 100644 --- a/seed/ruby-sdk/object/lib/gemconfig.rb +++ b/seed/ruby-sdk/object/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedObjectClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/object/lib/seed_object_client.rb b/seed/ruby-sdk/object/lib/seed_object_client.rb index 1ba7fa9e244..fb1c0c815e1 100644 --- a/seed/ruby-sdk/object/lib/seed_object_client.rb +++ b/seed/ruby-sdk/object/lib/seed_object_client.rb @@ -10,18 +10,18 @@ module SeedObjectClient class Client # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) + RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) end end class AsyncClient # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) end end end diff --git a/seed/ruby-sdk/object/seed_object_client.gemspec b/seed/ruby-sdk/object/seed_object_client.gemspec index a83b5af0bfa..4d452b6f3c4 100644 --- a/seed/ruby-sdk/object/seed_object_client.gemspec +++ b/seed/ruby-sdk/object/seed_object_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_object_client" + spec.version = SeedObjectClient::Gemconfig::VERSION spec.authors = SeedObjectClient::Gemconfig::AUTHORS spec.email = SeedObjectClient::Gemconfig::EMAIL spec.summary = SeedObjectClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/objects-with-imports/lib/gemconfig.rb b/seed/ruby-sdk/objects-with-imports/lib/gemconfig.rb index de75cda39db..89ca60b7620 100644 --- a/seed/ruby-sdk/objects-with-imports/lib/gemconfig.rb +++ b/seed/ruby-sdk/objects-with-imports/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedObjectsWithImportsClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/objects-with-imports/lib/seed_objects_with_imports_client.rb b/seed/ruby-sdk/objects-with-imports/lib/seed_objects_with_imports_client.rb index cc1e957db4b..4261dbbdddb 100644 --- a/seed/ruby-sdk/objects-with-imports/lib/seed_objects_with_imports_client.rb +++ b/seed/ruby-sdk/objects-with-imports/lib/seed_objects_with_imports_client.rb @@ -12,18 +12,18 @@ module SeedObjectsWithImportsClient class Client # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) + RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) end end class AsyncClient # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) end end end diff --git a/seed/ruby-sdk/objects-with-imports/seed_objects_with_imports_client.gemspec b/seed/ruby-sdk/objects-with-imports/seed_objects_with_imports_client.gemspec index 8f645624054..5be8f3ef82a 100644 --- a/seed/ruby-sdk/objects-with-imports/seed_objects_with_imports_client.gemspec +++ b/seed/ruby-sdk/objects-with-imports/seed_objects_with_imports_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_objects_with_imports_client" + spec.version = SeedObjectsWithImportsClient::Gemconfig::VERSION spec.authors = SeedObjectsWithImportsClient::Gemconfig::AUTHORS spec.email = SeedObjectsWithImportsClient::Gemconfig::EMAIL spec.summary = SeedObjectsWithImportsClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/optional/lib/gemconfig.rb b/seed/ruby-sdk/optional/lib/gemconfig.rb index de75cda39db..89ca60b7620 100644 --- a/seed/ruby-sdk/optional/lib/gemconfig.rb +++ b/seed/ruby-sdk/optional/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedObjectsWithImportsClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/optional/lib/seed_objects_with_imports_client.rb b/seed/ruby-sdk/optional/lib/seed_objects_with_imports_client.rb index 3629df968ae..34c982900a2 100644 --- a/seed/ruby-sdk/optional/lib/seed_objects_with_imports_client.rb +++ b/seed/ruby-sdk/optional/lib/seed_objects_with_imports_client.rb @@ -6,22 +6,26 @@ module SeedObjectsWithImportsClient class Client + attr_reader :optional_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @optional_client = OptionalClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @optional_client = Optional::OptionalClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_optional_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_optional_client = AsyncOptionalClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_optional_client = Optional::AsyncOptionalClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/optional/lib/seed_objects_with_imports_client/optional/client.rb b/seed/ruby-sdk/optional/lib/seed_objects_with_imports_client/optional/client.rb index f8b0b103c20..4ab3249bcd7 100644 --- a/seed/ruby-sdk/optional/lib/seed_objects_with_imports_client/optional/client.rb +++ b/seed/ruby-sdk/optional/lib/seed_objects_with_imports_client/optional/client.rb @@ -8,7 +8,7 @@ class OptionalClient attr_reader :request_client # @param request_client [RequestClient] - # @return [OptionalClient] + # @return [Optional::OptionalClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -30,7 +30,7 @@ class AsyncOptionalClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncOptionalClient] + # @return [Optional::AsyncOptionalClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/optional/seed_objects_with_imports_client.gemspec b/seed/ruby-sdk/optional/seed_objects_with_imports_client.gemspec index 8f645624054..5be8f3ef82a 100644 --- a/seed/ruby-sdk/optional/seed_objects_with_imports_client.gemspec +++ b/seed/ruby-sdk/optional/seed_objects_with_imports_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_objects_with_imports_client" + spec.version = SeedObjectsWithImportsClient::Gemconfig::VERSION spec.authors = SeedObjectsWithImportsClient::Gemconfig::AUTHORS spec.email = SeedObjectsWithImportsClient::Gemconfig::EMAIL spec.summary = SeedObjectsWithImportsClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/package-yml/lib/gemconfig.rb b/seed/ruby-sdk/package-yml/lib/gemconfig.rb index b0a16bebd62..aca258854f5 100644 --- a/seed/ruby-sdk/package-yml/lib/gemconfig.rb +++ b/seed/ruby-sdk/package-yml/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedPackageYmlClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/package-yml/lib/seed_package_yml_client.rb b/seed/ruby-sdk/package-yml/lib/seed_package_yml_client.rb index e17c87afc21..5c948e5d31a 100644 --- a/seed/ruby-sdk/package-yml/lib/seed_package_yml_client.rb +++ b/seed/ruby-sdk/package-yml/lib/seed_package_yml_client.rb @@ -6,12 +6,14 @@ module SeedPackageYmlClient class Client + attr_reader :service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @service_client = Service::ServiceClient.new(request_client: request_client) end # @param id [String] @@ -28,12 +30,14 @@ def echo(id:, request:, request_options: nil) end class AsyncClient + attr_reader :async_service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end # @param id [String] diff --git a/seed/ruby-sdk/package-yml/lib/seed_package_yml_client/service/client.rb b/seed/ruby-sdk/package-yml/lib/seed_package_yml_client/service/client.rb index e7218bc4d3e..c93f7a670b8 100644 --- a/seed/ruby-sdk/package-yml/lib/seed_package_yml_client/service/client.rb +++ b/seed/ruby-sdk/package-yml/lib/seed_package_yml_client/service/client.rb @@ -8,7 +8,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -30,7 +30,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/package-yml/seed_package_yml_client.gemspec b/seed/ruby-sdk/package-yml/seed_package_yml_client.gemspec index 37fcee41959..5577d5a0217 100644 --- a/seed/ruby-sdk/package-yml/seed_package_yml_client.gemspec +++ b/seed/ruby-sdk/package-yml/seed_package_yml_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_package_yml_client" + spec.version = SeedPackageYmlClient::Gemconfig::VERSION spec.authors = SeedPackageYmlClient::Gemconfig::AUTHORS spec.email = SeedPackageYmlClient::Gemconfig::EMAIL spec.summary = SeedPackageYmlClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/plain-text/lib/gemconfig.rb b/seed/ruby-sdk/plain-text/lib/gemconfig.rb index ab188e2b775..66cad302ffe 100644 --- a/seed/ruby-sdk/plain-text/lib/gemconfig.rb +++ b/seed/ruby-sdk/plain-text/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedPlainTextClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/plain-text/lib/seed_plain_text_client.rb b/seed/ruby-sdk/plain-text/lib/seed_plain_text_client.rb index a4a7247ef4e..6c07a186101 100644 --- a/seed/ruby-sdk/plain-text/lib/seed_plain_text_client.rb +++ b/seed/ruby-sdk/plain-text/lib/seed_plain_text_client.rb @@ -6,22 +6,26 @@ module SeedPlainTextClient class Client + attr_reader :service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @service_client = Service::ServiceClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/plain-text/lib/seed_plain_text_client/service/client.rb b/seed/ruby-sdk/plain-text/lib/seed_plain_text_client/service/client.rb index ce94d215ed1..5a1aded1b2a 100644 --- a/seed/ruby-sdk/plain-text/lib/seed_plain_text_client/service/client.rb +++ b/seed/ruby-sdk/plain-text/lib/seed_plain_text_client/service/client.rb @@ -8,7 +8,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -28,7 +28,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/plain-text/seed_plain_text_client.gemspec b/seed/ruby-sdk/plain-text/seed_plain_text_client.gemspec index fa1147d2f58..8290ac037b7 100644 --- a/seed/ruby-sdk/plain-text/seed_plain_text_client.gemspec +++ b/seed/ruby-sdk/plain-text/seed_plain_text_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_plain_text_client" + spec.version = SeedPlainTextClient::Gemconfig::VERSION spec.authors = SeedPlainTextClient::Gemconfig::AUTHORS spec.email = SeedPlainTextClient::Gemconfig::EMAIL spec.summary = SeedPlainTextClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/reserved-keywords/lib/gemconfig.rb b/seed/ruby-sdk/reserved-keywords/lib/gemconfig.rb index 96d9cde5b9b..5f7be76ba0b 100644 --- a/seed/ruby-sdk/reserved-keywords/lib/gemconfig.rb +++ b/seed/ruby-sdk/reserved-keywords/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedNurseryApiClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/reserved-keywords/lib/seed_nursery_api_client.rb b/seed/ruby-sdk/reserved-keywords/lib/seed_nursery_api_client.rb index d9f437e3a11..03b06a9b511 100644 --- a/seed/ruby-sdk/reserved-keywords/lib/seed_nursery_api_client.rb +++ b/seed/ruby-sdk/reserved-keywords/lib/seed_nursery_api_client.rb @@ -8,22 +8,26 @@ module SeedNurseryApiClient class Client + attr_reader :package_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @package_client = PackageClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @package_client = Package::PackageClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_package_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_package_client = AsyncPackageClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_package_client = Package::AsyncPackageClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/reserved-keywords/lib/seed_nursery_api_client/package/client.rb b/seed/ruby-sdk/reserved-keywords/lib/seed_nursery_api_client/package/client.rb index cdf79b6a084..6bf6b1cb074 100644 --- a/seed/ruby-sdk/reserved-keywords/lib/seed_nursery_api_client/package/client.rb +++ b/seed/ruby-sdk/reserved-keywords/lib/seed_nursery_api_client/package/client.rb @@ -8,7 +8,7 @@ class PackageClient attr_reader :request_client # @param request_client [RequestClient] - # @return [PackageClient] + # @return [Package::PackageClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -30,7 +30,7 @@ class AsyncPackageClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncPackageClient] + # @return [Package::AsyncPackageClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/reserved-keywords/seed_nursery_api_client.gemspec b/seed/ruby-sdk/reserved-keywords/seed_nursery_api_client.gemspec index 5026db06049..c352f7731ac 100644 --- a/seed/ruby-sdk/reserved-keywords/seed_nursery_api_client.gemspec +++ b/seed/ruby-sdk/reserved-keywords/seed_nursery_api_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_nursery_api_client" + spec.version = SeedNurseryApiClient::Gemconfig::VERSION spec.authors = SeedNurseryApiClient::Gemconfig::AUTHORS spec.email = SeedNurseryApiClient::Gemconfig::EMAIL spec.summary = SeedNurseryApiClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/response-property/lib/gemconfig.rb b/seed/ruby-sdk/response-property/lib/gemconfig.rb index 5e8d7c4034a..3be4f14d97b 100644 --- a/seed/ruby-sdk/response-property/lib/gemconfig.rb +++ b/seed/ruby-sdk/response-property/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedResponsePropertyClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/response-property/lib/seed_response_property_client.rb b/seed/ruby-sdk/response-property/lib/seed_response_property_client.rb index e7d262fe061..6d9fb3074a1 100644 --- a/seed/ruby-sdk/response-property/lib/seed_response_property_client.rb +++ b/seed/ruby-sdk/response-property/lib/seed_response_property_client.rb @@ -14,22 +14,26 @@ module SeedResponsePropertyClient class Client + attr_reader :service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @service_client = Service::ServiceClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/response-property/lib/seed_response_property_client/service/client.rb b/seed/ruby-sdk/response-property/lib/seed_response_property_client/service/client.rb index 04a7815960a..0bb74e1376c 100644 --- a/seed/ruby-sdk/response-property/lib/seed_response_property_client/service/client.rb +++ b/seed/ruby-sdk/response-property/lib/seed_response_property_client/service/client.rb @@ -13,7 +13,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -115,7 +115,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/response-property/seed_response_property_client.gemspec b/seed/ruby-sdk/response-property/seed_response_property_client.gemspec index 2921d06631d..5f925e0b44a 100644 --- a/seed/ruby-sdk/response-property/seed_response_property_client.gemspec +++ b/seed/ruby-sdk/response-property/seed_response_property_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_response_property_client" + spec.version = SeedResponsePropertyClient::Gemconfig::VERSION spec.authors = SeedResponsePropertyClient::Gemconfig::AUTHORS spec.email = SeedResponsePropertyClient::Gemconfig::EMAIL spec.summary = SeedResponsePropertyClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/single-url-environment-default/lib/gemconfig.rb b/seed/ruby-sdk/single-url-environment-default/lib/gemconfig.rb index c57e951bfa7..584b397d5ca 100644 --- a/seed/ruby-sdk/single-url-environment-default/lib/gemconfig.rb +++ b/seed/ruby-sdk/single-url-environment-default/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedSingleUrlEnvironmentDefaultClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/single-url-environment-default/lib/seed_single_url_environment_default_client.rb b/seed/ruby-sdk/single-url-environment-default/lib/seed_single_url_environment_default_client.rb index 86fd21e2114..26b805f2cd6 100644 --- a/seed/ruby-sdk/single-url-environment-default/lib/seed_single_url_environment_default_client.rb +++ b/seed/ruby-sdk/single-url-environment-default/lib/seed_single_url_environment_default_client.rb @@ -6,26 +6,31 @@ module SeedSingleUrlEnvironmentDefaultClient class Client + attr_reader :dummy_client + # @param environment [Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [Client] def initialize(environment: Environment::PRODUCTION, max_retries: nil, timeout_in_seconds: nil, token: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @dummy_client = DummyClient.initialize(request_client: request_client) + request_client = RequestClient.new(environment: environment, max_retries: max_retries, + timeout_in_seconds: timeout_in_seconds, token: token) + @dummy_client = Dummy::DummyClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_dummy_client + # @param environment [Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [AsyncClient] def initialize(environment: Environment::PRODUCTION, max_retries: nil, timeout_in_seconds: nil, token: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_dummy_client = AsyncDummyClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_dummy_client = Dummy::AsyncDummyClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/single-url-environment-default/lib/seed_single_url_environment_default_client/dummy/client.rb b/seed/ruby-sdk/single-url-environment-default/lib/seed_single_url_environment_default_client/dummy/client.rb index d7a63f64154..6e44ac01f97 100644 --- a/seed/ruby-sdk/single-url-environment-default/lib/seed_single_url_environment_default_client/dummy/client.rb +++ b/seed/ruby-sdk/single-url-environment-default/lib/seed_single_url_environment_default_client/dummy/client.rb @@ -8,7 +8,7 @@ class DummyClient attr_reader :request_client # @param request_client [RequestClient] - # @return [DummyClient] + # @return [Dummy::DummyClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -29,7 +29,7 @@ class AsyncDummyClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncDummyClient] + # @return [Dummy::AsyncDummyClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/single-url-environment-default/seed_single_url_environment_default_client.gemspec b/seed/ruby-sdk/single-url-environment-default/seed_single_url_environment_default_client.gemspec index 61107f5b6e0..f9e5ef2cc42 100644 --- a/seed/ruby-sdk/single-url-environment-default/seed_single_url_environment_default_client.gemspec +++ b/seed/ruby-sdk/single-url-environment-default/seed_single_url_environment_default_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_single_url_environment_default_client" + spec.version = SeedSingleUrlEnvironmentDefaultClient::Gemconfig::VERSION spec.authors = SeedSingleUrlEnvironmentDefaultClient::Gemconfig::AUTHORS spec.email = SeedSingleUrlEnvironmentDefaultClient::Gemconfig::EMAIL spec.summary = SeedSingleUrlEnvironmentDefaultClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/single-url-environment-no-default/lib/gemconfig.rb b/seed/ruby-sdk/single-url-environment-no-default/lib/gemconfig.rb index b37b448f7cb..9cdcbf122f7 100644 --- a/seed/ruby-sdk/single-url-environment-no-default/lib/gemconfig.rb +++ b/seed/ruby-sdk/single-url-environment-no-default/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedSingleUrlEnvironmentNoDefaultClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/single-url-environment-no-default/lib/seed_single_url_environment_no_default_client.rb b/seed/ruby-sdk/single-url-environment-no-default/lib/seed_single_url_environment_no_default_client.rb index 2d884c2e226..4271c76abd7 100644 --- a/seed/ruby-sdk/single-url-environment-no-default/lib/seed_single_url_environment_no_default_client.rb +++ b/seed/ruby-sdk/single-url-environment-no-default/lib/seed_single_url_environment_no_default_client.rb @@ -6,26 +6,31 @@ module SeedSingleUrlEnvironmentNoDefaultClient class Client + attr_reader :dummy_client + # @param environment [Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [Client] def initialize(environment: nil, max_retries: nil, timeout_in_seconds: nil, token: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @dummy_client = DummyClient.initialize(request_client: request_client) + request_client = RequestClient.new(environment: environment, max_retries: max_retries, + timeout_in_seconds: timeout_in_seconds, token: token) + @dummy_client = Dummy::DummyClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_dummy_client + # @param environment [Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] - # @return [] + # @return [AsyncClient] def initialize(environment: nil, max_retries: nil, timeout_in_seconds: nil, token: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_dummy_client = AsyncDummyClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_dummy_client = Dummy::AsyncDummyClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/single-url-environment-no-default/lib/seed_single_url_environment_no_default_client/dummy/client.rb b/seed/ruby-sdk/single-url-environment-no-default/lib/seed_single_url_environment_no_default_client/dummy/client.rb index 97ed952b8e4..2fb27e0b382 100644 --- a/seed/ruby-sdk/single-url-environment-no-default/lib/seed_single_url_environment_no_default_client/dummy/client.rb +++ b/seed/ruby-sdk/single-url-environment-no-default/lib/seed_single_url_environment_no_default_client/dummy/client.rb @@ -8,7 +8,7 @@ class DummyClient attr_reader :request_client # @param request_client [RequestClient] - # @return [DummyClient] + # @return [Dummy::DummyClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -29,7 +29,7 @@ class AsyncDummyClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncDummyClient] + # @return [Dummy::AsyncDummyClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/single-url-environment-no-default/seed_single_url_environment_no_default_client.gemspec b/seed/ruby-sdk/single-url-environment-no-default/seed_single_url_environment_no_default_client.gemspec index 476917d0fdc..95867483322 100644 --- a/seed/ruby-sdk/single-url-environment-no-default/seed_single_url_environment_no_default_client.gemspec +++ b/seed/ruby-sdk/single-url-environment-no-default/seed_single_url_environment_no_default_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_single_url_environment_no_default_client" + spec.version = SeedSingleUrlEnvironmentNoDefaultClient::Gemconfig::VERSION spec.authors = SeedSingleUrlEnvironmentNoDefaultClient::Gemconfig::AUTHORS spec.email = SeedSingleUrlEnvironmentNoDefaultClient::Gemconfig::EMAIL spec.summary = SeedSingleUrlEnvironmentNoDefaultClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/streaming/lib/gemconfig.rb b/seed/ruby-sdk/streaming/lib/gemconfig.rb index c7e96f46d9e..f776f7bd6cb 100644 --- a/seed/ruby-sdk/streaming/lib/gemconfig.rb +++ b/seed/ruby-sdk/streaming/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedStreamingClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/streaming/lib/seed_streaming_client.rb b/seed/ruby-sdk/streaming/lib/seed_streaming_client.rb index 067d40073de..79c869f94bd 100644 --- a/seed/ruby-sdk/streaming/lib/seed_streaming_client.rb +++ b/seed/ruby-sdk/streaming/lib/seed_streaming_client.rb @@ -7,22 +7,26 @@ module SeedStreamingClient class Client + attr_reader :dummy_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @dummy_client = DummyClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @dummy_client = Dummy::DummyClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_dummy_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_dummy_client = AsyncDummyClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_dummy_client = Dummy::AsyncDummyClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/streaming/lib/seed_streaming_client/dummy/client.rb b/seed/ruby-sdk/streaming/lib/seed_streaming_client/dummy/client.rb index ed297fd6105..79835de43a5 100644 --- a/seed/ruby-sdk/streaming/lib/seed_streaming_client/dummy/client.rb +++ b/seed/ruby-sdk/streaming/lib/seed_streaming_client/dummy/client.rb @@ -6,7 +6,7 @@ class DummyClient attr_reader :request_client # @param request_client [RequestClient] - # @return [DummyClient] + # @return [Dummy::DummyClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -17,7 +17,7 @@ class AsyncDummyClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncDummyClient] + # @return [Dummy::AsyncDummyClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/streaming/seed_streaming_client.gemspec b/seed/ruby-sdk/streaming/seed_streaming_client.gemspec index 0a10cb65432..2e631631cd4 100644 --- a/seed/ruby-sdk/streaming/seed_streaming_client.gemspec +++ b/seed/ruby-sdk/streaming/seed_streaming_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_streaming_client" + spec.version = SeedStreamingClient::Gemconfig::VERSION spec.authors = SeedStreamingClient::Gemconfig::AUTHORS spec.email = SeedStreamingClient::Gemconfig::EMAIL spec.summary = SeedStreamingClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/trace/lib/gemconfig.rb b/seed/ruby-sdk/trace/lib/gemconfig.rb index 3f41146dd35..0e809dcecd7 100644 --- a/seed/ruby-sdk/trace/lib/gemconfig.rb +++ b/seed/ruby-sdk/trace/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedTraceClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client.rb index 9835785f55b..83f0ebe1dbe 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client.rb @@ -217,44 +217,51 @@ module SeedTraceClient class Client + attr_reader :client, :admin_client, :homepage_client, :migration_client, :playlist_client, :problem_client, + :submission_client, :sysprop_client + # @param environment [Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] # @param x_random_header [String] - # @return [] + # @return [Client] def initialize(environment: Environment::PROD, max_retries: nil, timeout_in_seconds: nil, token: nil, x_random_header: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @client = Client.initialize(request_client: request_client) - @admin_client = AdminClient.initialize(request_client: request_client) - @homepage_client = HomepageClient.initialize(request_client: request_client) - @migration_client = MigrationClient.initialize(request_client: request_client) - @playlist_client = PlaylistClient.initialize(request_client: request_client) - @problem_client = ProblemClient.initialize(request_client: request_client) - @submission_client = SubmissionClient.initialize(request_client: request_client) - @sysprop_client = SyspropClient.initialize(request_client: request_client) + request_client = RequestClient.new(environment: environment, max_retries: max_retries, + timeout_in_seconds: timeout_in_seconds, token: token, x_random_header: x_random_header) + @client = V2::Client.new(request_client: request_client) + @admin_client = Admin::AdminClient.new(request_client: request_client) + @homepage_client = Homepage::HomepageClient.new(request_client: request_client) + @migration_client = Migration::MigrationClient.new(request_client: request_client) + @playlist_client = Playlist::PlaylistClient.new(request_client: request_client) + @problem_client = Problem::ProblemClient.new(request_client: request_client) + @submission_client = Submission::SubmissionClient.new(request_client: request_client) + @sysprop_client = Sysprop::SyspropClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_client, :async_admin_client, :async_homepage_client, :async_migration_client, + :async_playlist_client, :async_problem_client, :async_submission_client, :async_sysprop_client + # @param environment [Environment] # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] # @param token [String] # @param x_random_header [String] - # @return [] + # @return [AsyncClient] def initialize(environment: Environment::PROD, max_retries: nil, timeout_in_seconds: nil, token: nil, x_random_header: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_client = AsyncClient.initialize(request_client: request_client) - @async_admin_client = AsyncAdminClient.initialize(request_client: request_client) - @async_homepage_client = AsyncHomepageClient.initialize(request_client: request_client) - @async_migration_client = AsyncMigrationClient.initialize(request_client: request_client) - @async_playlist_client = AsyncPlaylistClient.initialize(request_client: request_client) - @async_problem_client = AsyncProblemClient.initialize(request_client: request_client) - @async_submission_client = AsyncSubmissionClient.initialize(request_client: request_client) - @async_sysprop_client = AsyncSyspropClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_client = V2::AsyncClient.new(request_client: request_client) + @async_admin_client = Admin::AsyncAdminClient.new(request_client: request_client) + @async_homepage_client = Homepage::AsyncHomepageClient.new(request_client: request_client) + @async_migration_client = Migration::AsyncMigrationClient.new(request_client: request_client) + @async_playlist_client = Playlist::AsyncPlaylistClient.new(request_client: request_client) + @async_problem_client = Problem::AsyncProblemClient.new(request_client: request_client) + @async_submission_client = Submission::AsyncSubmissionClient.new(request_client: request_client) + @async_sysprop_client = Sysprop::AsyncSyspropClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/admin/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/admin/client.rb index bcca9de7fc2..2727b3dce8a 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/admin/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/admin/client.rb @@ -18,7 +18,7 @@ class AdminClient attr_reader :request_client # @param request_client [RequestClient] - # @return [AdminClient] + # @return [Admin::AdminClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -168,7 +168,7 @@ class AsyncAdminClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncAdminClient] + # @return [Admin::AsyncAdminClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/homepage/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/homepage/client.rb index 8abe56bbfa8..27b5eda3c6c 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/homepage/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/homepage/client.rb @@ -9,7 +9,7 @@ class HomepageClient attr_reader :request_client # @param request_client [RequestClient] - # @return [HomepageClient] + # @return [Homepage::HomepageClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -44,7 +44,7 @@ class AsyncHomepageClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncHomepageClient] + # @return [Homepage::AsyncHomepageClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/migration/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/migration/client.rb index e56d1ed8cf9..a40fd8bea8a 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/migration/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/migration/client.rb @@ -9,7 +9,7 @@ class MigrationClient attr_reader :request_client # @param request_client [RequestClient] - # @return [MigrationClient] + # @return [Migration::MigrationClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -40,7 +40,7 @@ class AsyncMigrationClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncMigrationClient] + # @return [Migration::AsyncMigrationClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/playlist/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/playlist/client.rb index 9ccbf59df14..0937bac3c24 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/playlist/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/playlist/client.rb @@ -13,7 +13,7 @@ class PlaylistClient attr_reader :request_client # @param request_client [RequestClient] - # @return [PlaylistClient] + # @return [Playlist::PlaylistClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -123,7 +123,7 @@ class AsyncPlaylistClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncPlaylistClient] + # @return [Playlist::AsyncPlaylistClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/problem/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/problem/client.rb index bedfcaaceba..db40f9a22fd 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/problem/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/problem/client.rb @@ -15,7 +15,7 @@ class ProblemClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ProblemClient] + # @return [Problem::ProblemClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -104,7 +104,7 @@ class AsyncProblemClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncProblemClient] + # @return [Problem::AsyncProblemClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/submission/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/submission/client.rb index 191508c59c5..3bd394e5069 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/submission/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/submission/client.rb @@ -10,7 +10,7 @@ class SubmissionClient attr_reader :request_client # @param request_client [RequestClient] - # @return [SubmissionClient] + # @return [Submission::SubmissionClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -71,7 +71,7 @@ class AsyncSubmissionClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncSubmissionClient] + # @return [Submission::AsyncSubmissionClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/sysprop/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/sysprop/client.rb index d2b50374281..5d16a315bb0 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/sysprop/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/sysprop/client.rb @@ -8,7 +8,7 @@ class SyspropClient attr_reader :request_client # @param request_client [RequestClient] - # @return [SyspropClient] + # @return [Sysprop::SyspropClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -47,7 +47,7 @@ class AsyncSyspropClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncSyspropClient] + # @return [Sysprop::AsyncSyspropClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/client.rb index ae47d51fc24..674a40d5388 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/client.rb @@ -8,7 +8,7 @@ class Client attr_reader :request_client # @param request_client [RequestClient] - # @return [Client] + # @return [V2::Client] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -30,7 +30,7 @@ class AsyncClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncClient] + # @return [V2::AsyncClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/problem/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/problem/client.rb index c9b39ff741e..5bef6482f19 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/problem/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/problem/client.rb @@ -12,7 +12,7 @@ class ProblemClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ProblemClient] + # @return [V2::Problem::ProblemClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -80,7 +80,7 @@ class AsyncProblemClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncProblemClient] + # @return [V2::Problem::AsyncProblemClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/v_3/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/v_3/client.rb index d1bdae7eff3..b2667d0d0c3 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/v_3/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/v_3/client.rb @@ -9,9 +9,9 @@ class Client attr_reader :request_client # @param client [RequestClient] - # @return [] + # @return [V2::V3::Client] def initialize(client:) - @problem_client = ProblemClient.initialize(request_client: @request_client) + @problem_client = V2::V3::Problem::ProblemClient.new(request_client: @request_client) end end @@ -19,9 +19,9 @@ class AsyncClient attr_reader :client # @param client [AsyncRequestClient] - # @return [] + # @return [V2::V3::AsyncClient] def initialize(client:) - @async_problem_client = AsyncProblemClient.initialize(request_client: @request_client) + @async_problem_client = V2::V3::Problem::AsyncProblemClient.new(request_client: @request_client) end end end diff --git a/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/v_3/problem/client.rb b/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/v_3/problem/client.rb index cccdc7b0d45..69743492208 100644 --- a/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/v_3/problem/client.rb +++ b/seed/ruby-sdk/trace/lib/seed_trace_client/v_2/v_3/problem/client.rb @@ -13,7 +13,7 @@ class ProblemClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ProblemClient] + # @return [V2::V3::Problem::ProblemClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -81,7 +81,7 @@ class AsyncProblemClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncProblemClient] + # @return [V2::V3::Problem::AsyncProblemClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/trace/seed_trace_client.gemspec b/seed/ruby-sdk/trace/seed_trace_client.gemspec index 98f9448cd92..e590a1d0cc2 100644 --- a/seed/ruby-sdk/trace/seed_trace_client.gemspec +++ b/seed/ruby-sdk/trace/seed_trace_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_trace_client" + spec.version = SeedTraceClient::Gemconfig::VERSION spec.authors = SeedTraceClient::Gemconfig::AUTHORS spec.email = SeedTraceClient::Gemconfig::EMAIL spec.summary = SeedTraceClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/undiscriminated-unions/lib/gemconfig.rb b/seed/ruby-sdk/undiscriminated-unions/lib/gemconfig.rb index 6e6daafd733..3da2832afc4 100644 --- a/seed/ruby-sdk/undiscriminated-unions/lib/gemconfig.rb +++ b/seed/ruby-sdk/undiscriminated-unions/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedUndiscriminatedUnionsClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/undiscriminated-unions/lib/seed_undiscriminated_unions_client.rb b/seed/ruby-sdk/undiscriminated-unions/lib/seed_undiscriminated_unions_client.rb index ff868a3ec40..415db0fb6b2 100644 --- a/seed/ruby-sdk/undiscriminated-unions/lib/seed_undiscriminated_unions_client.rb +++ b/seed/ruby-sdk/undiscriminated-unions/lib/seed_undiscriminated_unions_client.rb @@ -7,22 +7,26 @@ module SeedUndiscriminatedUnionsClient class Client + attr_reader :union_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @union_client = UnionClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @union_client = Union::UnionClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_union_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_union_client = AsyncUnionClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_union_client = Union::AsyncUnionClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/undiscriminated-unions/lib/seed_undiscriminated_unions_client/union/client.rb b/seed/ruby-sdk/undiscriminated-unions/lib/seed_undiscriminated_unions_client/union/client.rb index 5702e51aa47..23ba1099a6f 100644 --- a/seed/ruby-sdk/undiscriminated-unions/lib/seed_undiscriminated_unions_client/union/client.rb +++ b/seed/ruby-sdk/undiscriminated-unions/lib/seed_undiscriminated_unions_client/union/client.rb @@ -9,7 +9,7 @@ class UnionClient attr_reader :request_client # @param request_client [RequestClient] - # @return [UnionClient] + # @return [Union::UnionClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -32,7 +32,7 @@ class AsyncUnionClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncUnionClient] + # @return [Union::AsyncUnionClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/undiscriminated-unions/seed_undiscriminated_unions_client.gemspec b/seed/ruby-sdk/undiscriminated-unions/seed_undiscriminated_unions_client.gemspec index c72daa283ff..c95c0ae5598 100644 --- a/seed/ruby-sdk/undiscriminated-unions/seed_undiscriminated_unions_client.gemspec +++ b/seed/ruby-sdk/undiscriminated-unions/seed_undiscriminated_unions_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_undiscriminated_unions_client" + spec.version = SeedUndiscriminatedUnionsClient::Gemconfig::VERSION spec.authors = SeedUndiscriminatedUnionsClient::Gemconfig::AUTHORS spec.email = SeedUndiscriminatedUnionsClient::Gemconfig::EMAIL spec.summary = SeedUndiscriminatedUnionsClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/unknown/lib/gemconfig.rb b/seed/ruby-sdk/unknown/lib/gemconfig.rb index b8016256780..e8f5bfe739c 100644 --- a/seed/ruby-sdk/unknown/lib/gemconfig.rb +++ b/seed/ruby-sdk/unknown/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedUnknownAsAnyClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/unknown/lib/seed_unknown_as_any_client.rb b/seed/ruby-sdk/unknown/lib/seed_unknown_as_any_client.rb index dace31c770d..9854be4630b 100644 --- a/seed/ruby-sdk/unknown/lib/seed_unknown_as_any_client.rb +++ b/seed/ruby-sdk/unknown/lib/seed_unknown_as_any_client.rb @@ -8,22 +8,26 @@ module SeedUnknownAsAnyClient class Client + attr_reader :unknown_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @unknown_client = UnknownClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @unknown_client = Unknown::UnknownClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_unknown_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_unknown_client = AsyncUnknownClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_unknown_client = Unknown::AsyncUnknownClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/unknown/lib/seed_unknown_as_any_client/unknown/client.rb b/seed/ruby-sdk/unknown/lib/seed_unknown_as_any_client/unknown/client.rb index d2d0feec7ee..1d0fde2b390 100644 --- a/seed/ruby-sdk/unknown/lib/seed_unknown_as_any_client/unknown/client.rb +++ b/seed/ruby-sdk/unknown/lib/seed_unknown_as_any_client/unknown/client.rb @@ -8,7 +8,7 @@ class UnknownClient attr_reader :request_client # @param request_client [RequestClient] - # @return [UnknownClient] + # @return [Unknown::UnknownClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -30,7 +30,7 @@ class AsyncUnknownClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncUnknownClient] + # @return [Unknown::AsyncUnknownClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/unknown/seed_unknown_as_any_client.gemspec b/seed/ruby-sdk/unknown/seed_unknown_as_any_client.gemspec index 39ed6273fdc..b1b9bb71e7b 100644 --- a/seed/ruby-sdk/unknown/seed_unknown_as_any_client.gemspec +++ b/seed/ruby-sdk/unknown/seed_unknown_as_any_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_unknown_as_any_client" + spec.version = SeedUnknownAsAnyClient::Gemconfig::VERSION spec.authors = SeedUnknownAsAnyClient::Gemconfig::AUTHORS spec.email = SeedUnknownAsAnyClient::Gemconfig::EMAIL spec.summary = SeedUnknownAsAnyClient::Gemconfig::SUMMARY diff --git a/seed/ruby-sdk/variables/lib/gemconfig.rb b/seed/ruby-sdk/variables/lib/gemconfig.rb index 87961957426..4fcc169da55 100644 --- a/seed/ruby-sdk/variables/lib/gemconfig.rb +++ b/seed/ruby-sdk/variables/lib/gemconfig.rb @@ -2,6 +2,7 @@ module SeedVariablesClient module Gemconfig + VERSION = "" AUTHORS = [""].freeze EMAIL = "" SUMMARY = "" diff --git a/seed/ruby-sdk/variables/lib/seed_variables_client.rb b/seed/ruby-sdk/variables/lib/seed_variables_client.rb index c14a199af84..da82c901bc8 100644 --- a/seed/ruby-sdk/variables/lib/seed_variables_client.rb +++ b/seed/ruby-sdk/variables/lib/seed_variables_client.rb @@ -6,22 +6,26 @@ module SeedVariablesClient class Client + attr_reader :service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [Client] def initialize(max_retries: nil, timeout_in_seconds: nil) - request_client = RequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @service_client = ServiceClient.initialize(request_client: request_client) + request_client = RequestClient.new(max_retries: max_retries, timeout_in_seconds: timeout_in_seconds) + @service_client = Service::ServiceClient.new(request_client: request_client) end end class AsyncClient + attr_reader :async_service_client + # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. # @param timeout_in_seconds [Long] - # @return [] + # @return [AsyncClient] def initialize(max_retries: nil, timeout_in_seconds: nil) - AsyncRequestClient.initialize(headers: headers, base_url: base_url, conn: conn) - @async_service_client = AsyncServiceClient.initialize(request_client: request_client) + AsyncRequestClient.new(headers: headers, base_url: base_url, conn: conn) + @async_service_client = Service::AsyncServiceClient.new(request_client: request_client) end end end diff --git a/seed/ruby-sdk/variables/lib/seed_variables_client/service/client.rb b/seed/ruby-sdk/variables/lib/seed_variables_client/service/client.rb index 8c31dfb636f..26f21660b0e 100644 --- a/seed/ruby-sdk/variables/lib/seed_variables_client/service/client.rb +++ b/seed/ruby-sdk/variables/lib/seed_variables_client/service/client.rb @@ -8,7 +8,7 @@ class ServiceClient attr_reader :request_client # @param request_client [RequestClient] - # @return [ServiceClient] + # @return [Service::ServiceClient] def initialize(request_client:) # @type [RequestClient] @request_client = request_client @@ -29,7 +29,7 @@ class AsyncServiceClient attr_reader :request_client # @param request_client [AsyncRequestClient] - # @return [AsyncServiceClient] + # @return [Service::AsyncServiceClient] def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client diff --git a/seed/ruby-sdk/variables/seed_variables_client.gemspec b/seed/ruby-sdk/variables/seed_variables_client.gemspec index 73bfd4faa36..be164abe73c 100644 --- a/seed/ruby-sdk/variables/seed_variables_client.gemspec +++ b/seed/ruby-sdk/variables/seed_variables_client.gemspec @@ -4,6 +4,7 @@ require_relative "lib/gemconfig" Gem::Specification.new do |spec| spec.name = "seed_variables_client" + spec.version = SeedVariablesClient::Gemconfig::VERSION spec.authors = SeedVariablesClient::Gemconfig::AUTHORS spec.email = SeedVariablesClient::Gemconfig::EMAIL spec.summary = SeedVariablesClient::Gemconfig::SUMMARY